Update license and include source headers
Pass a deep copy of gunspec instead of a direct reference Fix Lua style multi-line comments :/ Fix flaregun dependencies Add mod.conf and description files plus some readme fixes
This commit is contained in:
parent
8ef3b1d379
commit
fde2b72a68
40 changed files with 570 additions and 213 deletions
|
@ -1,32 +0,0 @@
|
|||
Minetest Mod - Simple Shooter [shooter]
|
||||
=======================================
|
||||
|
||||
License Source Code: 2013 Stuart Jones - LGPL v2.1
|
||||
|
||||
Additional credit for code ideas taken from other mods.
|
||||
|
||||
PilzAdam [throwing] for the throwing physics
|
||||
ShadowNinja [nuke] for the vm explosion routine
|
||||
|
||||
License Textures: Stuart Jones - WTFPL
|
||||
|
||||
Licence Models: Stuart Jones - CC-BY-SA 3.0
|
||||
|
||||
License Sounds: freesound.org
|
||||
|
||||
flobert1_20070728.wav by Nonoo - Attribution 3.0 Unported (CC BY 3.0)
|
||||
|
||||
shot.wav by Sergenious - Attribution 3.0 Unported (CC BY 3.0)
|
||||
|
||||
GUNSHOT.WAV by erkanozan - CC0 1.0 Universal (CC0 1.0)
|
||||
|
||||
winchester-rifle-cock-reload.wav by MentalSanityOff - CC0 1.0 Universal (CC0 1.0)
|
||||
|
||||
trigger-with-hammer-fall.wav by Nanashi - CC0 1.0 Universal (CC0 1.0)
|
||||
|
||||
woosh.wav by ReadeOnly - CC0 1.0 Universal (CC0 1.0)
|
||||
|
||||
AGM-114 Hellfire Rocket Missile Launch.flac by qubodup - CC0 1.0 Universal (CC0 1.0)
|
||||
|
||||
Sparkler.aif by Ned Bouhalassa - CC0 1.0 Universal (CC0 1.0)
|
||||
|
69
shooter/README.md
Normal file
69
shooter/README.md
Normal file
|
@ -0,0 +1,69 @@
|
|||
Minetest Mod - Shooter API [shooter]
|
||||
====================================
|
||||
|
||||
Depends: default
|
||||
|
||||
Handles raycasting, blasting and audio-visual effects of dependent mods.
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
Override the following default settings by adding them to your minetest.conf file.
|
||||
|
||||
-- Enable automatic weapons, uses globalstep to detect left mouse button
|
||||
|
||||
`shooter_admin_weapons = true`
|
||||
|
||||
-- Enable admin super weapons
|
||||
-- This lets admins shoot guns automatically after 2 seconds without munition.
|
||||
|
||||
`shooter_admin_weapons = false`
|
||||
|
||||
-- Enable node destruction with explosives
|
||||
shooter_enable_blasting = true
|
||||
|
||||
-- Enable Crafting
|
||||
|
||||
`shooter_enable_crafting = true`
|
||||
|
||||
-- Enable particle effects
|
||||
|
||||
`shooter_enable_particle_fx = true`
|
||||
|
||||
-- Enable protection mod support, requires a protection mod that utilizes
|
||||
-- minetest.is_protected(), tested with TenPlus1's version of [protector]
|
||||
|
||||
`shooter_enable_protection = false`
|
||||
|
||||
-- Particle texture used when a player or entity is hit
|
||||
|
||||
`shooter_explosion = "shooter_hit.png"`
|
||||
|
||||
-- Allow node destruction
|
||||
|
||||
`shooter_allow_nodes = true`
|
||||
|
||||
-- Allow entities in multiplayer mode
|
||||
|
||||
`shooter_allow_entities = false`
|
||||
|
||||
-- Allow players in multiplayer mode
|
||||
|
||||
`shooter_allow_players = true`
|
||||
|
||||
-- How often objects are fully reloaded
|
||||
|
||||
`shooter_object_reload_time = 1`
|
||||
|
||||
-- How often object positions are updated
|
||||
|
||||
`shooter_object_update_time = 0.25`
|
||||
|
||||
-- How often rounds are processed
|
||||
|
||||
`shooter_rounds_update_time = 0.4`
|
||||
|
||||
API Documentation
|
||||
-----------------
|
||||
|
||||
TODO
|
|
@ -1,206 +0,0 @@
|
|||
Minetest Mod - Simple Shooter [shooter]
|
||||
=======================================
|
||||
|
||||
Mod Version: 0.5.3
|
||||
|
||||
Minetest Version: 0.4.9, 0.4.10, 0.4.11
|
||||
|
||||
Depends: default, dye, tnt, wool
|
||||
|
||||
An experimental first person shooter mod that uses simple vector mathematics
|
||||
to produce an accurate and server-firendly method of hit detection.
|
||||
|
||||
By default this mod is configured to work only against other players in
|
||||
multiplayer mode and against Simple Mobs [mobs] in singleplayer mode.
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
Override the following default settings by adding them to your minetest.conf file.
|
||||
|
||||
-- Enable admin super weapons
|
||||
-- This lets admins shoot guns automatically after 2 seconds without munition.
|
||||
shooter_admin_weapons = false
|
||||
|
||||
-- Enable node destruction with explosives
|
||||
shooter_enable_blasting = true
|
||||
|
||||
-- Enable Crafting
|
||||
shooter_enable_crafting = true
|
||||
|
||||
-- Enable particle effects
|
||||
shooter_enable_particle_fx = true
|
||||
|
||||
-- Enable protection mod support, requires a protection mod that utilizes
|
||||
-- minetest.is_protected(), tested with TenPlus1's version of [protector]
|
||||
shooter_enable_protection = false
|
||||
|
||||
-- Particle texture used when a player or entity is hit
|
||||
shooter_explosion = "shooter_hit.png"
|
||||
|
||||
-- Allow node destruction
|
||||
shooter_allow_nodes = true
|
||||
|
||||
-- Allow entities in multiplayer mode
|
||||
shooter_allow_entities = false
|
||||
|
||||
-- Allow players in multiplayer mode
|
||||
shooter_allow_players = true
|
||||
|
||||
-- How often objects are fully reloaded
|
||||
shooter_object_reload_time = 1
|
||||
|
||||
-- How often object positions are updated
|
||||
shooter_object_update_time = 0.25
|
||||
|
||||
-- How often rounds are processed
|
||||
shooter_rounds_update_time = 0.4
|
||||
|
||||
Crafting
|
||||
========
|
||||
|
||||
<color> = grey, black, red, yellow, green, cyan, blue, magenta
|
||||
|
||||
A = Arrow [shooter:arrow_white]
|
||||
C = Color Dye [dye:<color>]
|
||||
W = Wooden Stick [default:stick]
|
||||
P = Paper [default:paper]
|
||||
S = Steel Ingot [default:steel_ingot]
|
||||
B = Bronze Ingot [default:bronze_ingot]
|
||||
M = Mese Crystal [default:mese_crysytal]
|
||||
D = Diamond [default:diamond]
|
||||
R = Red Wool [wool:red]
|
||||
G = Gun Powder [tnt:gunpowder]
|
||||
|
||||
Crossbow: [shooter:crossbow]
|
||||
|
||||
+---+---+---+
|
||||
| W | W | W |
|
||||
+---+---+---+
|
||||
| W | W | |
|
||||
+---+---+---+
|
||||
| W | | B |
|
||||
+---+---+---+
|
||||
|
||||
White Arrow: [shooter:arrow_white]
|
||||
|
||||
+---+---+---+
|
||||
| S | | |
|
||||
+---+---+---+
|
||||
| | W | P |
|
||||
+---+---+---+
|
||||
| | P | W |
|
||||
+---+---+---+
|
||||
|
||||
Coloured Arrow: [shooter:arrow_<color>]
|
||||
|
||||
+---+---+
|
||||
| C | A |
|
||||
+---+---+
|
||||
|
||||
Pistol: [shooter:pistol]
|
||||
|
||||
+---+---+
|
||||
| S | S |
|
||||
+---+---+
|
||||
| | M |
|
||||
+---+---+
|
||||
|
||||
Rifle: [shooter:rifle]
|
||||
|
||||
+---+---+---+
|
||||
| S | | |
|
||||
+---+---+---+
|
||||
| | B | |
|
||||
+---+---+---+
|
||||
| | M | B |
|
||||
+---+---+---+
|
||||
|
||||
Shotgun: [shooter:shotgun]
|
||||
|
||||
+---+---+---+
|
||||
| S | | |
|
||||
+---+---+---+
|
||||
| | S | |
|
||||
+---+---+---+
|
||||
| | M | B |
|
||||
+---+---+---+
|
||||
|
||||
Sub Machine Gun: [shooter:machine_gun]
|
||||
|
||||
+---+---+---+
|
||||
| S | S | S |
|
||||
+---+---+---+
|
||||
| | B | M |
|
||||
+---+---+---+
|
||||
| | B | |
|
||||
+---+---+---+
|
||||
|
||||
Ammo Pack: [shooter:ammo]
|
||||
|
||||
+---+---+
|
||||
| G | B |
|
||||
+---+---+
|
||||
|
||||
Grappling Hook: [shooter:grapple_hook]
|
||||
|
||||
+---+---+---+
|
||||
| S | S | D |
|
||||
+---+---+---+
|
||||
| S | S | |
|
||||
+---+---+---+
|
||||
| D | | S |
|
||||
+---+---+---+
|
||||
|
||||
Grappling Hook Gun: [shooter:grapple_gun]
|
||||
|
||||
+---+---+
|
||||
| S | S |
|
||||
+---+---+
|
||||
| | D |
|
||||
+---+---+
|
||||
|
||||
Flare: [shooter:flare]
|
||||
|
||||
+---+---+
|
||||
| G | R |
|
||||
+---+---+
|
||||
|
||||
Flare Gun: [shooter:flaregun]
|
||||
|
||||
+---+---+---+
|
||||
| R | R | R |
|
||||
+---+---+---+
|
||||
| | | S |
|
||||
+---+---+---+
|
||||
|
||||
Grenade: [shooter:grenade]
|
||||
|
||||
+---+---+
|
||||
| G | S |
|
||||
+---+---+
|
||||
|
||||
Flare Gun: [shooter:rocket_gun]
|
||||
|
||||
+---+---+---+
|
||||
| B | S | S |
|
||||
+---+---+---+
|
||||
| | | D |
|
||||
+---+---+---+
|
||||
|
||||
Rocket: [shooter:rocket]
|
||||
|
||||
+---+---+---+
|
||||
| B | G | B |
|
||||
+---+---+---+
|
||||
|
||||
Turret: [shooter:turret]
|
||||
|
||||
+---+---+---+
|
||||
| B | B | S |
|
||||
+---+---+---+
|
||||
| | B | S |
|
||||
+---+---+---+
|
||||
| | D | |
|
||||
+---+---+---+
|
||||
|
|
@ -1,3 +1,22 @@
|
|||
--[[
|
||||
Shooter API [shooter]
|
||||
Copyright (C) 2013-2019 stujones11, Stuart Jones
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
]]--
|
||||
|
||||
shooter = {
|
||||
registered_weapons = {},
|
||||
}
|
||||
|
@ -60,7 +79,8 @@ shooter.register_weapon = function(name, def)
|
|||
description = def.description,
|
||||
inventory_image = def.inventory_image,
|
||||
on_use = function(itemstack, user)
|
||||
if shooter.fire_weapon(user, itemstack, def.spec) then
|
||||
local spec = table.copy(def.spec)
|
||||
if shooter.fire_weapon(user, itemstack, spec) then
|
||||
itemstack:add_wear(def.spec.wear)
|
||||
if itemstack:get_count() == 0 then
|
||||
itemstack = def.unloaded_item.name
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
First person shooter mod.
|
||||
Adds firearms plus a few other fun items.
|
||||
Shooter Mod API.
|
||||
Handles raycasting, blasting and audio-visual effects of dependent mods.
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
--[[
|
||||
Simple Shooter [shooter]
|
||||
Copyright (C) 2013-2019 stujones11, Stuart Jones
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
]]--
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
local worldpath = minetest.get_worldpath()
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 175 KiB |
Loading…
Add table
Add a link
Reference in a new issue