Implement more of the create-a-class mechanism.
Add non-functioning support for player cosmetics. Prepare other weapons for implementation to the new weapon system.
This commit is contained in:
parent
1411e44aa3
commit
8f4beb6327
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -6,7 +6,8 @@
|
||||
"weapons",
|
||||
"core",
|
||||
"VoxelArea",
|
||||
"ItemStack"
|
||||
"ItemStack",
|
||||
"dump"
|
||||
],
|
||||
"Lua.diagnostics.disable": [
|
||||
"undefined-field",
|
||||
|
@ -13,6 +13,25 @@ function weapons.get_nick(player)
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
solarsail.util.function.normalize_pos()
|
||||
|
||||
pos_a = vector.new(); considered the zero point
|
||||
pos_b = vector.new(); considered the space around the zero point
|
||||
returns pos_b localised by pos_a.
|
||||
]]
|
||||
|
||||
function solarsail.util.functions.get_local_pos(pos_a, pos_b)
|
||||
local pa = table.copy(pos_a)
|
||||
local pb = table.copy(pos_b)
|
||||
local res = vector.new(
|
||||
pb.x - pa.x,
|
||||
pb.y - pa.y,
|
||||
pb.z - pa.z
|
||||
)
|
||||
return res
|
||||
end
|
||||
|
||||
--[[
|
||||
solarsail.util.functions.convert_from_hex()
|
||||
|
||||
@ -258,11 +277,12 @@ function weapons.respawn_player(player, respawn)
|
||||
weapons.hud.remove_blackout(player)
|
||||
end
|
||||
|
||||
function weapons.kill_player(player, target_player, weapon, dist)
|
||||
weapons.update_killfeed(player, target_player, weapon, dist)
|
||||
function weapons.kill_player(player, target_player, weapon, dist, headshot)
|
||||
weapons.update_killfeed(player, target_player, weapon, dist, headshot)
|
||||
weapons.player_list[target_player:get_player_name()].hp = 0
|
||||
weapons.player.cancel_reload(target_player)
|
||||
weapons.hud.blackout(target_player)
|
||||
weapons.creator.creator_to_class(player, player:get_player_name())
|
||||
minetest.after(4.9, weapons.respawn_player, target_player, true)
|
||||
minetest.after(5, weapons.reset_health, target_player)
|
||||
end
|
@ -136,6 +136,7 @@ end
|
||||
|
||||
local function remove_team_waypoint(id, team)
|
||||
for _, player in ipairs(minetest.get_connected_players()) do
|
||||
local pname = player:get_player_name()
|
||||
if weapons.player_list[pname].waypoints[id] == nil then
|
||||
elseif team == weapons.player_list[pname].team then
|
||||
local pname = player:get_player_name()
|
||||
|
@ -100,7 +100,12 @@ local function calc_ammo_bar_pos(player, weapon)
|
||||
local pname = player:get_player_name()
|
||||
if weapon._ammo_type == nil then
|
||||
return 256
|
||||
elseif weapons.player_list[pname][weapon._ammo_type.."_max"] == nil then
|
||||
return 256
|
||||
elseif weapons.player_list[pname][weapon._ammo_type] == nil then
|
||||
return 256
|
||||
else
|
||||
|
||||
return math.floor(
|
||||
(256/weapons.player_list[pname][weapon._ammo_type.."_max"]) * weapons.player_list[pname][weapon._ammo_type]
|
||||
)
|
||||
@ -149,14 +154,32 @@ local function hud_update_ammo(player, bar_pos, weapon)
|
||||
else
|
||||
local ammostring = ""
|
||||
if weapon._is_energy == nil then
|
||||
ammostring =
|
||||
weapons.player_list[pname][weapon._ammo_type] .. "/" .. weapons.player_list[pname][weapon._ammo_type.."_max"]
|
||||
elseif weapon._is_energy then
|
||||
ammostring = weapons.player_list[pname][weapon._ammo_type] .. "%"
|
||||
if weapons.player_list[pname][weapon._ammo_type.."_max"] == nil then
|
||||
ammostring = "nil"
|
||||
elseif weapons.player_list[pname][weapon._ammo_type] == nil then
|
||||
ammostring = "nil"
|
||||
else
|
||||
ammostring =
|
||||
weapons.player_list[pname][weapon._ammo_type] .. "/" .. weapons.player_list[pname][weapon._ammo_type.."_max"]
|
||||
end
|
||||
elseif weapon._is_energy then
|
||||
if weapons.player_list[pname][weapon._ammo_type.."_max"] == nil then
|
||||
ammostring = "nil"
|
||||
elseif weapons.player_list[pname][weapon._ammo_type] == nil then
|
||||
ammostring = "nil"
|
||||
else
|
||||
ammostring = weapons.player_list[pname][weapon._ammo_type] .. "%"
|
||||
end
|
||||
else
|
||||
if weapons.player_list[pname][weapon._ammo_type.."_max"] == nil then
|
||||
ammostring = "nil"
|
||||
elseif weapons.player_list[pname][weapon._ammo_type] == nil then
|
||||
ammostring = "nil"
|
||||
else
|
||||
ammostring =
|
||||
weapons.player_list[pname][weapon._ammo_type] .. "/" .. weapons.player_list[pname][weapon._ammo_type.."_max"]
|
||||
end
|
||||
end
|
||||
player:hud_change(weapons.player_huds[pname].ammo.ammo_count, "text", ammostring)
|
||||
|
||||
end
|
||||
@ -479,10 +502,25 @@ function weapons.hud.hide_hitmarker(player)
|
||||
"transparent.png")
|
||||
end
|
||||
|
||||
function weapons.hud.render_hitmarker(player)
|
||||
player:hud_change(weapons.player_huds[player:get_player_name()].misc.hitmarker, "text",
|
||||
"hitmarker.png")
|
||||
minetest.after(0.25, weapons.hud.hide_hitmarker, player)
|
||||
-- Prevent overlapping afters
|
||||
local hitmarker_after = {}
|
||||
|
||||
function weapons.hud.render_hitmarker(player, headshot)
|
||||
local pname = player:get_player_name()
|
||||
|
||||
if headshot == nil then
|
||||
player:hud_change(weapons.player_huds[pname].misc.hitmarker, "text", "hitmarker.png")
|
||||
elseif headshot then
|
||||
player:hud_change(weapons.player_huds[pname].misc.hitmarker, "text", "hitmarker_headshot.png")
|
||||
else
|
||||
player:hud_change(weapons.player_huds[pname].misc.hitmarker, "text", "hitmarker.png")
|
||||
end
|
||||
|
||||
if hitmarker_after[pname] ~= nil then -- Cancel any outstanding hitmarker.
|
||||
hitmarker_after[pname]:cancel()
|
||||
hitmarker_after[pname] = nil
|
||||
end
|
||||
hitmarker_after[pname] = minetest.after(0.25, weapons.hud.hide_hitmarker, player)
|
||||
end
|
||||
|
||||
-- This functions sole existance is to update waypoints if bases fail to generate on-time or properly
|
||||
|
@ -14,8 +14,8 @@ weapons.player = {} -- Some functions
|
||||
weapons.player_list = {} -- Current game related data
|
||||
weapons.player_data = {} -- Save data and config
|
||||
weapons.is_reloading = {} -- This should be part of player_list
|
||||
weapons.default_eye_height = 1.52 -- Defaults
|
||||
weapons.default_first_person_eyes = vector.new(0, 0, 1)
|
||||
weapons.default_eye_height = 1.57 -- Defaults
|
||||
weapons.default_first_person_eyes = vector.new(0, 0, 1.5)
|
||||
weapons.default_modchannel = "battleforarkhos_" -- Defaults
|
||||
|
||||
-- Handle a one time file load at bootup to ensure data is properly loaded
|
||||
@ -119,7 +119,6 @@ function core.get_server_status(player_name, joined)
|
||||
if solarsail.avg_dtime == nil or solarsail.avg_dtime == 0 then
|
||||
local _chance = math.random(1, 100)
|
||||
local _msg = "Excuse me, but why are you launching the server as a client?"
|
||||
print(_chance)
|
||||
if _chance < 11 then
|
||||
-- https://discord.com/channels/369122544273588224/369122544273588226/807084993854701608
|
||||
-- From @ElCeejus
|
||||
@ -172,7 +171,7 @@ end)
|
||||
|
||||
-- TODO move into hud.lua
|
||||
|
||||
function weapons.update_killfeed(player, dead_player, weapon, dist)
|
||||
function weapons.update_killfeed(player, dead_player, weapon, dist, headshot)
|
||||
local tname = dead_player:get_player_name()
|
||||
local pname = player:get_player_name()
|
||||
local kill_verbs = {
|
||||
@ -186,7 +185,10 @@ function weapons.update_killfeed(player, dead_player, weapon, dist)
|
||||
" booked ", " executed ", " mercy killed ", " stopped ",
|
||||
" autistically screeched at ", " melted ", " #lounge'd ",
|
||||
" moderated ", " banhammered ", " 13373D ", " Flex Taped ",
|
||||
" cronched ", " destroyed ", " blown out ", " sawn "
|
||||
" cronched ", " destroyed ", " blown out ", " sawn ",
|
||||
" leeroy'd ", " inverted ", " forever boxed ", " fucky wucky'd ",
|
||||
" locked down ", " cringed ", " light theme'd", " I II II I_ ",
|
||||
" vaccinated ", " VAC banned "
|
||||
}
|
||||
local special_verbs = { "'s Ankha killed " }
|
||||
local suicide_verbs = {
|
||||
@ -200,19 +202,25 @@ function weapons.update_killfeed(player, dead_player, weapon, dist)
|
||||
if tname == pname then
|
||||
verb = math.random(1, #suicide_verbs)
|
||||
form = death_formspec ..
|
||||
"label[2,2;You" .. suicide_verbs[verb] .. "with the " .. weapon._localisation.name
|
||||
minetest.chat_send_all(weapons.get_nick(player) .. suicide_verbs[verb] .. "with the " ..
|
||||
"label[2,2;You" .. suicide_verbs[verb] .. "with your " .. weapon._localisation.name
|
||||
minetest.chat_send_all(weapons.get_nick(player) .. suicide_verbs[verb] .. "with their " ..
|
||||
weapon._localisation.name .. ".")
|
||||
weapons.discord_send_message("**" .. weapons.get_nick(player) .. "**" .. suicide_verbs[verb] .. "with the "
|
||||
weapons.discord_send_message("**" .. weapons.get_nick(player) .. "**" .. suicide_verbs[verb] .. "with their "
|
||||
.. weapon._localisation.name .. ".")
|
||||
else
|
||||
verb = math.random(1, #kill_verbs)
|
||||
form = death_formspec ..
|
||||
"label[2,2;You " .. kill_verbs[verb] .. "by: "..pname.."]"
|
||||
minetest.chat_send_all(weapons.get_nick(player) .. kill_verbs[verb] .. weapons.get_nick(dead_player) .. " with the " .. weapon._localisation.name
|
||||
.. ", (" .. (math.floor(dist * figs + 0.5) / 100) .. "m)")
|
||||
weapons.discord_send_message("**" .. weapons.get_nick(player) .. "**" .. kill_verbs[verb] .. weapons.get_nick(dead_player) .. " with the " .. weapon._localisation.name
|
||||
.. ", (" .. (math.floor(dist * figs + 0.5) / 100) .. "m)")
|
||||
|
||||
local msg = kill_verbs[verb] .. weapons.get_nick(dead_player) .. " with the " .. weapon._localisation.name
|
||||
local dist_msg = "(" .. (math.floor(dist * figs + 0.5) / 100) .. "m)"
|
||||
if headshot then
|
||||
msg = msg .. ", with a headshot. " .. dist_msg
|
||||
else
|
||||
msg = msg .. ". " .. dist_msg
|
||||
end
|
||||
minetest.chat_send_all(weapons.get_nick(player) .. msg)
|
||||
weapons.discord_send_message("**" .. weapons.get_nick(player) .. "**" .. msg)
|
||||
end
|
||||
|
||||
minetest.show_formspec(tname, "death", form)
|
||||
@ -220,16 +228,36 @@ end
|
||||
|
||||
|
||||
-- TODO move to a more suitable place than functions.lua
|
||||
function weapons.handle_damage(weapon, player, target_player, dist)
|
||||
function weapons.handle_damage(weapon, player, target_player, dist, pointed)
|
||||
local pname = player:get_player_name()
|
||||
local tname = target_player:get_player_name()
|
||||
if weapons.player_list[tname].hp == nil then return end
|
||||
local new_hp = weapons.player_list[tname].hp - weapon._damage
|
||||
local new_hp = weapons.player_list[tname].hp
|
||||
local is_headshot = false
|
||||
|
||||
print(weapons.player_list[tname].hp, new_hp, tname)
|
||||
if pointed == nil then -- Exposions, bullet magnetism are ineligible for headshots
|
||||
new_hp = new_hp - weapon._damage
|
||||
else
|
||||
local pos = target_player:get_pos()
|
||||
local ray_pos = pointed.intersection_point
|
||||
local real_pos = solarsail.util.functions.get_local_pos(pos, ray_pos)
|
||||
|
||||
-- (1.77/32)*24 -- player head height
|
||||
-- this looks like a real magic value, but really it isn't.
|
||||
-- it's just counting the total number of pixels the player has divided by the height of the collision box
|
||||
if real_pos.y > (1.77/32)*24 then
|
||||
if weapon._headshot_multiplier == nil then
|
||||
-- 50% damage buff if unspecified.
|
||||
new_hp = new_hp - (weapon._damage * 1.5)
|
||||
else
|
||||
new_hp = new_hp - (weapon._damage * weapon._headshot_multiplier)
|
||||
end
|
||||
is_headshot = true
|
||||
else
|
||||
new_hp = new_hp - weapon._damage
|
||||
end
|
||||
end
|
||||
|
||||
--if weapons.player_list[tname] == 0 then
|
||||
--weapons.player_list[tname].hp = weapons.player_list[tname].hp_max
|
||||
if weapons.player_list[tname].hp < 1 then
|
||||
return
|
||||
end
|
||||
@ -250,21 +278,21 @@ function weapons.handle_damage(weapon, player, target_player, dist)
|
||||
if weapons.player_list[pname].team ~=
|
||||
weapons.player_list[tname].team then
|
||||
if new_hp < 1 then
|
||||
weapons.kill_player(player, target_player, weapon, dist)
|
||||
weapons.hud.render_hitmarker(player)
|
||||
minetest.sound_play("hitsound", {to_player=pname})
|
||||
minetest.sound_play("player_impact", {pos=target_player:get_pos(),
|
||||
max_hear_distance=6, gain=0.85})
|
||||
weapons.kill_player(player, target_player, weapon, dist, is_headshot)
|
||||
else
|
||||
weapons.player_list[tname].hp = new_hp
|
||||
weapons.hud.render_hitmarker(player)
|
||||
minetest.sound_play("hitsound", {to_player=pname})
|
||||
minetest.sound_play("player_impact", {pos=target_player:get_pos(),
|
||||
max_hear_distance=6, gain=0.98})
|
||||
end
|
||||
weapons.hud.render_hitmarker(player, is_headshot)
|
||||
if is_headshot then
|
||||
minetest.sound_play("hitsound_headshot", {to_player=pname})
|
||||
else
|
||||
minetest.sound_play("hitsound", {to_player=pname})
|
||||
end
|
||||
minetest.sound_play("player_impact", {pos=target_player:get_pos(),
|
||||
max_hear_distance=6, gain=0.85})
|
||||
elseif pname == tname then
|
||||
if new_hp < 1 then
|
||||
weapons.kill_player(player, player, weapon, dist)
|
||||
weapons.kill_player(player, player, weapon, dist, false)
|
||||
minetest.sound_play("player_impact", {pos=target_player:get_pos(),
|
||||
max_hear_distance=6, gain=0.85})
|
||||
else
|
||||
@ -274,7 +302,7 @@ function weapons.handle_damage(weapon, player, target_player, dist)
|
||||
if weapon._heals == nil then return
|
||||
else
|
||||
weapons.player_list[tname].hp = new_hp
|
||||
weapons.hud.render_hitmarker(player)
|
||||
weapons.hud.render_hitmarker(player, true)
|
||||
minetest.sound_play("hitsound", {to_player=pname})
|
||||
minetest.sound_play("player_heal", {pos=target_player:get_pos(),
|
||||
max_hear_distance=6, gain=0.98})
|
||||
|
694
mods/weapons/models/preview_boringpistol.obj
Normal file
694
mods/weapons/models/preview_boringpistol.obj
Normal file
@ -0,0 +1,694 @@
|
||||
# Blender v2.79 (sub 7) OBJ File: 'BoringPistol.blend'
|
||||
# www.blender.org
|
||||
mtllib preview_boringpistol.mtl
|
||||
o Cube_Cube.001
|
||||
v -1.500000 2.500000 -3.500000
|
||||
v -1.500000 5.000000 -3.500000
|
||||
v -1.000000 3.000000 -11.500000
|
||||
v -1.000000 4.500000 -11.500000
|
||||
v 1.000000 2.500000 -3.500000
|
||||
v 1.000000 5.000000 -3.500000
|
||||
v 0.500000 3.000000 -11.500000
|
||||
v 0.500000 4.500000 -11.500000
|
||||
v -1.250000 1.000000 6.000000
|
||||
v -1.250000 2.500000 6.000000
|
||||
v -1.250000 1.000000 -11.000000
|
||||
v -1.250000 2.500000 -11.000000
|
||||
v 0.750000 1.000000 6.000000
|
||||
v 0.750000 2.500000 6.000000
|
||||
v 0.750000 1.000000 -11.000000
|
||||
v 0.750000 2.500000 -11.000000
|
||||
v -0.750000 -1.000000 0.000000
|
||||
v -0.750000 1.000000 0.000000
|
||||
v -0.750000 -1.000000 -0.500000
|
||||
v -0.750000 1.000000 -0.500000
|
||||
v 0.250000 -1.000000 0.000000
|
||||
v 0.250000 1.000000 0.000000
|
||||
v 0.250000 -1.000000 -0.500000
|
||||
v 0.250000 1.000000 -0.500000
|
||||
v -1.250000 -2.000000 -4.000000
|
||||
v -1.250000 1.000000 -4.000000
|
||||
v -1.250000 -2.000000 -4.500000
|
||||
v -1.250000 1.000000 -4.500000
|
||||
v 0.750000 -2.000000 -4.000000
|
||||
v 0.750000 1.000000 -4.000000
|
||||
v 0.750000 -2.000000 -4.500000
|
||||
v 0.750000 1.000000 -4.500000
|
||||
v -1.250000 -2.000000 0.500000
|
||||
v -1.250000 -1.500000 0.500000
|
||||
v -1.250000 -2.000000 -4.000000
|
||||
v -1.250000 -1.500000 -4.000000
|
||||
v 0.750000 -2.000000 0.500000
|
||||
v 0.750000 -1.500000 0.500000
|
||||
v 0.750000 -2.000000 -4.000000
|
||||
v 0.750000 -1.500000 -4.000000
|
||||
v -1.250000 2.000000 7.000000
|
||||
v -1.250000 2.500000 7.000000
|
||||
v 0.750000 2.000000 7.000000
|
||||
v 0.750000 2.500000 7.000000
|
||||
v 0.750000 2.500000 8.000000
|
||||
v 0.750000 2.000000 8.000000
|
||||
v -1.250000 2.500000 8.000000
|
||||
v -1.250000 2.000000 8.000000
|
||||
v -1.250000 2.000000 7.000000
|
||||
v -1.250000 2.500000 7.000000
|
||||
v -1.250000 1.000000 6.000000
|
||||
v -1.250000 2.500000 6.000000
|
||||
v 0.750000 2.000000 7.000000
|
||||
v 0.750000 2.500000 7.000000
|
||||
v 0.750000 1.000000 6.000000
|
||||
v 0.750000 2.500000 6.000000
|
||||
v -1.250000 -8.000000 9.500000
|
||||
v -1.250000 -2.000000 7.000000
|
||||
v -1.250000 -8.000000 3.500000
|
||||
v -1.250000 -2.000000 1.000000
|
||||
v 0.750000 -8.000000 9.500000
|
||||
v 0.750000 -2.000000 7.000000
|
||||
v 0.750000 -8.000000 3.500000
|
||||
v 0.750000 -2.000000 1.000000
|
||||
v 0.750000 1.000000 0.500000
|
||||
v 0.750000 -2.000000 0.500000
|
||||
v 0.750000 1.000000 6.000000
|
||||
v 0.750000 -2.000000 7.000000
|
||||
v -1.250000 1.000000 0.500000
|
||||
v -1.250000 -2.000000 0.500000
|
||||
v -1.250000 1.000000 6.000000
|
||||
v -1.250000 -2.000000 7.000000
|
||||
v -1.750000 -9.000000 8.000000
|
||||
v -1.750000 -8.000000 8.000000
|
||||
v -1.750000 -9.000000 4.000000
|
||||
v -1.750000 -8.000000 4.000000
|
||||
v 1.250000 -9.000000 8.000000
|
||||
v 1.250000 -8.000000 8.000000
|
||||
v 1.250000 -9.000000 4.000000
|
||||
v 1.250000 -8.000000 4.000000
|
||||
v -1.000000 -8.000000 7.500000
|
||||
v -1.000000 2.500000 5.000000
|
||||
v -1.000000 -8.000000 4.500000
|
||||
v -1.000000 2.500000 2.000000
|
||||
v 0.500000 -8.000000 7.500000
|
||||
v 0.500000 2.500000 5.000000
|
||||
v 0.500000 -8.000000 4.500000
|
||||
v 0.500000 2.500000 2.000000
|
||||
v -1.000000 3.000000 -8.000000
|
||||
v -1.000000 4.500000 -8.000000
|
||||
v -0.750000 3.250000 -12.000000
|
||||
v -0.750000 4.250000 -12.000000
|
||||
v 0.500000 3.000000 -8.000000
|
||||
v 0.500000 4.500000 -8.000000
|
||||
v 0.250000 3.250000 -12.000000
|
||||
v 0.250000 4.250000 -12.000000
|
||||
v 0.310000 5.060000 7.000000
|
||||
v 0.310000 5.440000 7.000000
|
||||
v 0.250000 5.000000 6.000000
|
||||
v 0.250000 5.500000 6.000000
|
||||
v 0.690000 5.060000 7.000000
|
||||
v 0.690000 5.440000 7.000000
|
||||
v 0.750000 5.000000 6.000000
|
||||
v 0.750000 5.500000 6.000000
|
||||
v -1.000000 4.500000 -12.000000
|
||||
v -1.000000 3.000000 -12.000000
|
||||
v 0.500000 3.000000 -12.000000
|
||||
v 0.500000 4.500000 -12.000000
|
||||
v -0.750000 4.250000 -8.000000
|
||||
v -0.750000 3.250000 -8.000000
|
||||
v 0.250000 3.250000 -8.000000
|
||||
v 0.250000 4.250000 -8.000000
|
||||
v 0.250000 5.000000 7.000000
|
||||
v 0.250000 5.500000 7.000000
|
||||
v 0.750000 5.500000 7.000000
|
||||
v 0.750000 5.000000 7.000000
|
||||
v -1.190000 5.060000 7.000000
|
||||
v -1.190000 5.440000 7.000000
|
||||
v -1.250000 5.000000 6.000000
|
||||
v -1.250000 5.500000 6.000000
|
||||
v -0.810000 5.060000 7.000000
|
||||
v -0.810000 5.440000 7.000000
|
||||
v -0.750000 5.000000 6.000000
|
||||
v -0.750000 5.500000 6.000000
|
||||
v -1.250000 5.000000 7.000000
|
||||
v -1.250000 5.500000 7.000000
|
||||
v -0.750000 5.500000 7.000000
|
||||
v -0.750000 5.000000 7.000000
|
||||
v -0.440000 5.060000 -10.000000
|
||||
v -0.440000 5.440000 -10.000000
|
||||
v -0.500000 5.000000 -11.000000
|
||||
v -0.500000 5.500000 -11.000000
|
||||
v -0.060000 5.060000 -10.000000
|
||||
v -0.060000 5.440000 -10.000000
|
||||
v 0.000000 5.000000 -11.000000
|
||||
v 0.000000 5.500000 -11.000000
|
||||
v -0.500000 5.000000 -10.000000
|
||||
v -0.500000 5.500000 -10.000000
|
||||
v 0.000000 5.500000 -10.000000
|
||||
v 0.000000 5.000000 -10.000000
|
||||
v -1.500000 2.500000 7.500000
|
||||
v -1.500000 5.000000 7.500000
|
||||
v 1.000000 2.500000 7.500000
|
||||
v 1.000000 5.000000 7.500000
|
||||
v -1.500000 2.500000 0.000000
|
||||
v -1.500000 5.000000 0.000000
|
||||
v 1.000000 5.000000 0.000000
|
||||
v 1.000000 2.500000 0.000000
|
||||
v -1.500000 4.500000 0.000000
|
||||
v -1.500000 5.000000 0.000000
|
||||
v 1.000000 4.500000 0.000000
|
||||
v 1.000000 5.000000 0.000000
|
||||
v -1.500000 4.500000 -3.500000
|
||||
v -1.500000 5.000000 -3.500000
|
||||
v 1.000000 5.000000 -3.500000
|
||||
v 1.000000 4.500000 -3.500000
|
||||
v 0.750000 2.500000 3.500000
|
||||
v 0.750000 4.500000 3.500000
|
||||
v 0.750000 4.500000 0.000000
|
||||
v 0.750000 2.500000 0.000000
|
||||
v 0.500000 4.500000 -3.500000
|
||||
v 0.500000 2.500000 -3.500000
|
||||
v 0.500000 4.500000 0.000000
|
||||
v 0.500000 2.500000 0.000000
|
||||
v -1.250000 3.000000 3.000000
|
||||
v -1.250000 4.000000 3.000000
|
||||
v -1.250000 3.000000 0.500000
|
||||
v -1.250000 4.000000 0.500000
|
||||
v -1.500000 2.500000 0.000000
|
||||
v -1.500000 4.500000 0.000000
|
||||
v -1.500000 2.500000 -3.500000
|
||||
v -1.500000 4.500000 -3.500000
|
||||
v -1.500000 5.000000 -11.500000
|
||||
v -1.500000 2.500000 -11.500000
|
||||
v 1.000000 2.500000 -11.500000
|
||||
v 1.000000 5.000000 -11.500000
|
||||
v -1.000000 2.500000 0.000000
|
||||
v -1.000000 2.500000 -3.500000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.281250 0.406250
|
||||
vt 0.203125 0.593750
|
||||
vt 0.015625 0.593750
|
||||
vt 0.093750 0.406250
|
||||
vt 0.671875 0.406250
|
||||
vt 0.671875 0.593750
|
||||
vt 0.609375 0.593750
|
||||
vt 0.609375 0.406250
|
||||
vt 0.421875 0.406250
|
||||
vt 0.343750 0.593750
|
||||
vt 0.531250 0.593750
|
||||
vt 0.609375 0.406250
|
||||
vt 0.343750 0.406250
|
||||
vt 0.343750 0.593750
|
||||
vt 0.281250 0.593750
|
||||
vt 0.343750 0.406250
|
||||
vt 0.281250 0.406250
|
||||
vt 0.281250 0.218750
|
||||
vt 0.343750 0.218750
|
||||
vt 0.703125 0.687500
|
||||
vt 0.703125 0.750000
|
||||
vt 0.500000 0.750000
|
||||
vt 0.500000 0.687500
|
||||
vt 0.609375 0.593750
|
||||
vt 0.609375 0.687500
|
||||
vt 0.546875 0.687500
|
||||
vt 0.546875 0.593750
|
||||
vt 0.281250 0.593750
|
||||
vt 0.250000 0.687500
|
||||
vt 0.078125 0.687500
|
||||
vt 0.078125 0.593750
|
||||
vt 0.343750 0.593750
|
||||
vt 0.343750 0.687500
|
||||
vt 0.281250 0.687500
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.375000 0.687500
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.406250 0.359375
|
||||
vt 0.406250 0.296875
|
||||
vt 0.468750 0.312500
|
||||
vt 0.468750 0.343750
|
||||
vt 0.609375 0.359375
|
||||
vt 0.546875 0.343750
|
||||
vt 0.546875 0.312500
|
||||
vt 0.609375 0.296875
|
||||
vt 0.562500 0.406250
|
||||
vt 0.453125 0.406250
|
||||
vt 0.468750 0.343750
|
||||
vt 0.546875 0.343750
|
||||
vt 0.546875 0.312500
|
||||
vt 0.468750 0.312500
|
||||
vt 0.453125 0.250000
|
||||
vt 0.562500 0.250000
|
||||
vt 0.078125 0.531250
|
||||
vt 0.078125 0.453125
|
||||
vt 0.328125 0.453125
|
||||
vt 0.328125 0.531250
|
||||
vt 0.875000 0.453125
|
||||
vt 0.875000 0.531250
|
||||
vt 0.625000 0.531250
|
||||
vt 0.625000 0.453125
|
||||
vt 0.468750 0.531250
|
||||
vt 0.468750 0.453125
|
||||
vt 0.546875 0.453125
|
||||
vt 0.546875 0.531250
|
||||
vt 0.875000 0.562500
|
||||
vt 0.875000 0.640625
|
||||
vt 0.546875 0.640625
|
||||
vt 0.546875 0.562500
|
||||
vt 0.406250 0.531250
|
||||
vt 0.406250 0.609375
|
||||
vt 0.078125 0.609375
|
||||
vt 0.078125 0.531250
|
||||
vt 0.093750 0.453125
|
||||
vt 0.093750 0.406250
|
||||
vt 0.625000 0.406250
|
||||
vt 0.625000 0.453125
|
||||
vt 0.531250 0.343750
|
||||
vt 0.531250 0.390625
|
||||
vt 0.468750 0.390625
|
||||
vt 0.468750 0.343750
|
||||
vt 0.859375 0.406250
|
||||
vt 0.859375 0.453125
|
||||
vt 0.328125 0.453125
|
||||
vt 0.328125 0.406250
|
||||
vt 0.734375 0.078125
|
||||
vt 0.734375 0.140625
|
||||
vt 0.203125 0.140625
|
||||
vt 0.203125 0.078125
|
||||
vt 0.031250 0.453125
|
||||
vt 0.031250 0.546875
|
||||
vt 0.015625 0.546875
|
||||
vt 0.015625 0.453125
|
||||
vt 0.171875 0.453125
|
||||
vt 0.171875 0.546875
|
||||
vt 0.109375 0.546875
|
||||
vt 0.109375 0.453125
|
||||
vt 0.656250 0.312500
|
||||
vt 0.656250 0.406250
|
||||
vt 0.640625 0.406250
|
||||
vt 0.640625 0.312500
|
||||
vt 0.093750 0.453125
|
||||
vt 0.093750 0.546875
|
||||
vt 0.031250 0.437500
|
||||
vt 0.093750 0.437500
|
||||
vt 0.468750 0.093750
|
||||
vt 0.468750 0.078125
|
||||
vt 0.609375 0.078125
|
||||
vt 0.609375 0.093750
|
||||
vt 0.640625 0.312500
|
||||
vt 0.640625 0.328125
|
||||
vt 0.500000 0.328125
|
||||
vt 0.500000 0.312500
|
||||
vt 0.609375 0.156250
|
||||
vt 0.468750 0.156250
|
||||
vt 0.609375 0.171875
|
||||
vt 0.609375 0.234375
|
||||
vt 0.468750 0.234375
|
||||
vt 0.468750 0.171875
|
||||
vt 0.265625 0.437500
|
||||
vt 0.296875 0.437500
|
||||
vt 0.296875 0.453125
|
||||
vt 0.265625 0.453125
|
||||
vt 0.531250 0.109375
|
||||
vt 0.531250 0.125000
|
||||
vt 0.468750 0.125000
|
||||
vt 0.468750 0.109375
|
||||
vt 0.484375 0.375000
|
||||
vt 0.484375 0.406250
|
||||
vt 0.421875 0.406250
|
||||
vt 0.421875 0.375000
|
||||
vt 0.656250 0.437500
|
||||
vt 0.687500 0.437500
|
||||
vt 0.687500 0.453125
|
||||
vt 0.656250 0.453125
|
||||
vt 0.421875 0.406250
|
||||
vt 0.421875 0.375000
|
||||
vt 0.484375 0.375000
|
||||
vt 0.484375 0.406250
|
||||
vt 0.656250 0.437500
|
||||
vt 0.656250 0.453125
|
||||
vt 0.625000 0.453125
|
||||
vt 0.625000 0.406250
|
||||
vt 0.328125 0.406250
|
||||
vt 0.328125 0.453125
|
||||
vt 0.296875 0.453125
|
||||
vt 0.296875 0.437500
|
||||
vt 0.468750 0.328125
|
||||
vt 0.531250 0.328125
|
||||
vt 0.531250 0.375000
|
||||
vt 0.468750 0.375000
|
||||
vt 0.546875 0.312500
|
||||
vt 0.546875 0.281250
|
||||
vt 0.671875 0.281250
|
||||
vt 0.671875 0.312500
|
||||
vt 0.468750 0.312500
|
||||
vt 0.468750 0.281250
|
||||
vt 0.546875 0.281250
|
||||
vt 0.546875 0.312500
|
||||
vt 0.468750 0.281250
|
||||
vt 0.468750 0.312500
|
||||
vt 0.343750 0.312500
|
||||
vt 0.343750 0.281250
|
||||
vt 0.750000 0.281250
|
||||
vt 0.750000 0.312500
|
||||
vt 0.671875 0.312500
|
||||
vt 0.671875 0.281250
|
||||
vt 0.468750 0.203125
|
||||
vt 0.343750 0.203125
|
||||
vt 0.468750 0.390625
|
||||
vt 0.343750 0.390625
|
||||
vt 0.312500 0.281250
|
||||
vt 0.312500 0.609375
|
||||
vt 0.218750 0.609375
|
||||
vt 0.218750 0.281250
|
||||
vt 0.500000 0.281250
|
||||
vt 0.500000 0.609375
|
||||
vt 0.453125 0.609375
|
||||
vt 0.453125 0.281250
|
||||
vt 0.359375 0.609375
|
||||
vt 0.359375 0.281250
|
||||
vt 0.437500 0.125000
|
||||
vt 0.437500 0.078125
|
||||
vt 0.562500 0.078125
|
||||
vt 0.562500 0.125000
|
||||
vt 0.562500 0.171875
|
||||
vt 0.562500 0.218750
|
||||
vt 0.437500 0.218750
|
||||
vt 0.437500 0.171875
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.562500 0.265625
|
||||
vt 0.437500 0.265625
|
||||
vt 0.500000 0.515625
|
||||
vt 0.500000 0.500000
|
||||
vt 0.531250 0.500000
|
||||
vt 0.531250 0.515625
|
||||
vt 0.437500 0.515625
|
||||
vt 0.437500 0.500000
|
||||
vt 0.453125 0.500000
|
||||
vt 0.453125 0.515625
|
||||
vt 0.531250 0.515625
|
||||
vt 0.531250 0.531250
|
||||
vt 0.500000 0.531250
|
||||
vt 0.500000 0.515625
|
||||
vt 0.531250 0.546875
|
||||
vt 0.500000 0.546875
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.492188 0.523438
|
||||
vt 0.492188 0.523438
|
||||
vt 0.484375 0.531250
|
||||
vt 0.484375 0.515625
|
||||
vt 0.492188 0.523438
|
||||
vt 0.492188 0.523438
|
||||
vt 0.750000 0.515625
|
||||
vt 0.750000 0.500000
|
||||
vt 0.781250 0.500000
|
||||
vt 0.781250 0.515625
|
||||
vt 0.687500 0.515625
|
||||
vt 0.687500 0.500000
|
||||
vt 0.703125 0.500000
|
||||
vt 0.703125 0.515625
|
||||
vt 0.781250 0.515625
|
||||
vt 0.781250 0.531250
|
||||
vt 0.750000 0.531250
|
||||
vt 0.750000 0.515625
|
||||
vt 0.781250 0.546875
|
||||
vt 0.750000 0.546875
|
||||
vt 0.742188 0.523438
|
||||
vt 0.742188 0.523438
|
||||
vt 0.734375 0.531250
|
||||
vt 0.734375 0.515625
|
||||
vt 0.742188 0.523438
|
||||
vt 0.742188 0.523438
|
||||
vt 0.750000 0.265625
|
||||
vt 0.750000 0.250000
|
||||
vt 0.781250 0.250000
|
||||
vt 0.781250 0.265625
|
||||
vt 0.687500 0.265625
|
||||
vt 0.687500 0.250000
|
||||
vt 0.703125 0.250000
|
||||
vt 0.703125 0.265625
|
||||
vt 0.781250 0.265625
|
||||
vt 0.781250 0.281250
|
||||
vt 0.750000 0.281250
|
||||
vt 0.750000 0.265625
|
||||
vt 0.781250 0.296875
|
||||
vt 0.750000 0.296875
|
||||
vt 0.742188 0.273438
|
||||
vt 0.742188 0.273438
|
||||
vt 0.734375 0.281250
|
||||
vt 0.734375 0.265625
|
||||
vt 0.742188 0.273438
|
||||
vt 0.742188 0.273438
|
||||
vt 0.656250 0.421875
|
||||
vt 0.656250 0.500000
|
||||
vt 0.578125 0.500000
|
||||
vt 0.578125 0.421875
|
||||
vt 0.578125 0.421875
|
||||
vt 0.656250 0.421875
|
||||
vt 0.656250 0.500000
|
||||
vt 0.578125 0.500000
|
||||
vt 0.671875 0.531250
|
||||
vt 0.437500 0.531250
|
||||
vt 0.437500 0.453125
|
||||
vt 0.671875 0.453125
|
||||
vt 0.671875 0.609375
|
||||
vt 0.515625 0.609375
|
||||
vt 0.515625 0.531250
|
||||
vt 0.281250 0.453125
|
||||
vt 0.515625 0.453125
|
||||
vt 0.515625 0.531250
|
||||
vt 0.281250 0.531250
|
||||
vt 0.546875 0.343750
|
||||
vt 0.703125 0.343750
|
||||
vt 0.703125 0.421875
|
||||
vt 0.546875 0.421875
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.328125 0.515625
|
||||
vt 0.437500 0.515625
|
||||
vt 0.437500 0.531250
|
||||
vt 0.328125 0.531250
|
||||
vt 0.406250 0.531250
|
||||
vt 0.515625 0.531250
|
||||
vt 0.515625 0.609375
|
||||
vt 0.406250 0.609375
|
||||
vt 0.515625 0.515625
|
||||
vt 0.625000 0.515625
|
||||
vt 0.625000 0.531250
|
||||
vt 0.515625 0.531250
|
||||
vt 0.421875 0.296875
|
||||
vt 0.531250 0.296875
|
||||
vt 0.531250 0.375000
|
||||
vt 0.421875 0.375000
|
||||
vt 0.406250 0.515625
|
||||
vt 0.515625 0.515625
|
||||
vt 0.515625 0.453125
|
||||
vt 0.406250 0.453125
|
||||
vt 0.437500 0.453125
|
||||
vt 0.328125 0.453125
|
||||
vt 0.328125 0.515625
|
||||
vt 0.437500 0.515625
|
||||
vt 0.531250 0.515625
|
||||
vt 0.531250 0.468750
|
||||
vt 0.546875 0.453125
|
||||
vt 0.546875 0.531250
|
||||
vt 0.484375 0.468750
|
||||
vt 0.531250 0.468750
|
||||
vt 0.546875 0.453125
|
||||
vt 0.468750 0.453125
|
||||
vt 0.531250 0.515625
|
||||
vt 0.484375 0.515625
|
||||
vt 0.468750 0.531250
|
||||
vt 0.546875 0.531250
|
||||
vt 0.484375 0.468750
|
||||
vt 0.484375 0.515625
|
||||
vt 0.468750 0.531250
|
||||
vt 0.468750 0.453125
|
||||
vt 0.328125 0.515625
|
||||
vt 0.859375 0.515625
|
||||
vt 0.437500 0.500000
|
||||
vt 0.328125 0.500000
|
||||
vt 0.328125 0.515625
|
||||
vt 0.437500 0.515625
|
||||
vt 0.406250 0.468750
|
||||
vt 0.406250 0.531250
|
||||
vt 0.390625 0.531250
|
||||
vt 0.390625 0.468750
|
||||
vt 0.359375 0.531250
|
||||
vt 0.359375 0.468750
|
||||
vt 0.453125 0.468750
|
||||
vt 0.453125 0.531250
|
||||
vt 0.437500 0.531250
|
||||
vt 0.437500 0.468750
|
||||
vt 0.406250 0.453125
|
||||
vt 0.437500 0.453125
|
||||
vt 0.500000 0.484375
|
||||
vt 0.500000 0.500000
|
||||
vt 0.484375 0.500000
|
||||
vt 0.484375 0.484375
|
||||
vt 0.750000 0.484375
|
||||
vt 0.750000 0.500000
|
||||
vt 0.734375 0.500000
|
||||
vt 0.734375 0.484375
|
||||
vt 0.750000 0.234375
|
||||
vt 0.750000 0.250000
|
||||
vt 0.734375 0.250000
|
||||
vt 0.734375 0.234375
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 -0.3846 -0.9231
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.3846 0.9231
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
vn 0.0000 0.3162 0.9487
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn -0.2425 0.0000 0.9701
|
||||
vn -0.2425 0.0000 -0.9701
|
||||
vn -0.2425 0.9701 0.0000
|
||||
vn -0.2425 -0.9701 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 0.0000 -0.7071 0.7071
|
||||
vn 0.0000 -0.2316 -0.9728
|
||||
vn 0.0000 0.2316 0.9728
|
||||
g Cube_Cube.001_Rubber
|
||||
usemtl Rubber
|
||||
s off
|
||||
f 3/1/1 4/2/1 8/3/1 7/4/1
|
||||
f 57/5/2 58/6/2 60/7/2 59/8/2
|
||||
f 59/9/3 60/10/3 64/11/3 63/12/3
|
||||
f 63/13/4 64/14/4 62/15/4 61/16/4
|
||||
f 61/17/5 62/18/5 58/19/5 57/5/5
|
||||
f 59/20/6 63/21/6 61/22/6 57/23/6
|
||||
f 70/24/6 66/25/6 68/26/6 72/27/6
|
||||
f 70/28/1 69/29/1 65/30/1 66/31/1
|
||||
f 72/32/2 71/33/2 69/34/2 70/35/2
|
||||
f 68/36/7 67/37/7 71/38/7 72/32/7
|
||||
f 65/39/8 69/40/8 71/41/8 67/42/8
|
||||
f 66/31/4 65/30/4 67/43/4 68/36/4
|
||||
f 92/44/6 96/45/6 112/46/6 109/47/6
|
||||
f 91/48/4 92/44/4 109/47/4 110/49/4
|
||||
f 96/45/2 95/50/2 111/51/2 112/46/2
|
||||
f 95/50/8 91/48/8 110/49/8 111/51/8
|
||||
f 157/52/9 158/53/9 166/54/9 165/55/9
|
||||
f 160/56/10 167/57/10 168/58/10 159/59/10
|
||||
f 158/60/11 159/61/11 168/62/11 166/63/11
|
||||
f 165/64/12 167/65/12 160/66/12 157/67/12
|
||||
f 166/54/2 168/58/2 167/57/2 165/55/2
|
||||
g Cube_Cube.001_Steel_Dark
|
||||
usemtl Steel_Dark
|
||||
f 1/68/2 2/69/2 173/70/2 174/71/2
|
||||
f 175/72/4 176/73/4 6/74/4 5/75/4
|
||||
f 5/76/13 6/77/13 2/78/13 1/79/13
|
||||
f 174/80/6 175/81/6 5/82/6 1/83/6
|
||||
f 176/84/8 173/85/8 2/86/8 6/87/8
|
||||
f 9/88/2 10/89/2 12/90/2 11/91/2
|
||||
f 11/92/1 12/93/1 16/94/1 15/95/1
|
||||
f 15/96/4 16/97/4 14/98/4 13/99/4
|
||||
f 11/100/6 15/101/6 13/102/6 9/103/6
|
||||
f 25/104/2 26/105/2 28/106/2 27/107/2
|
||||
f 27/108/1 28/109/1 32/110/1 31/111/1
|
||||
f 31/112/4 32/113/4 30/114/4 29/115/4
|
||||
f 29/116/13 30/117/13 26/105/13 25/104/13
|
||||
f 27/118/6 31/119/6 29/116/6 25/104/6
|
||||
f 33/120/2 34/121/2 36/122/2 35/123/2
|
||||
f 39/124/4 40/125/4 38/126/4 37/127/4
|
||||
f 35/123/6 39/128/6 37/129/6 33/120/6
|
||||
f 40/130/8 36/131/8 34/132/8 38/133/8
|
||||
f 46/134/4 43/135/4 44/136/4 45/137/4
|
||||
f 46/138/13 45/139/13 47/140/13 48/141/13
|
||||
f 45/142/8 44/143/8 42/144/8 47/145/8
|
||||
f 47/146/2 42/147/2 41/148/2 48/149/2
|
||||
f 48/150/6 41/151/6 43/152/6 46/153/6
|
||||
f 49/154/2 50/155/2 52/156/2 51/157/2
|
||||
f 55/158/4 56/159/4 54/160/4 53/161/4
|
||||
f 51/162/14 55/163/14 53/164/14 49/165/14
|
||||
f 73/166/2 74/167/2 76/168/2 75/169/2
|
||||
f 75/170/1 76/171/1 80/172/1 79/173/1
|
||||
f 79/174/4 80/175/4 78/176/4 77/177/4
|
||||
f 77/178/13 78/179/13 74/180/13 73/181/13
|
||||
f 75/182/6 79/174/6 77/177/6 73/183/6
|
||||
f 80/175/8 76/184/8 74/185/8 78/176/8
|
||||
f 81/186/2 82/187/2 84/188/2 83/189/2
|
||||
f 83/190/15 84/191/15 88/192/15 87/193/15
|
||||
f 87/193/4 88/192/4 86/194/4 85/195/4
|
||||
f 85/195/16 86/194/16 82/187/16 81/186/16
|
||||
f 89/196/2 90/197/2 105/198/2 106/199/2
|
||||
f 107/200/4 108/201/4 94/202/4 93/203/4
|
||||
f 93/204/13 94/205/13 90/206/13 89/207/13
|
||||
f 106/199/6 107/200/6 93/203/6 89/196/6
|
||||
f 108/201/8 105/208/8 90/209/8 94/202/8
|
||||
f 113/210/2 114/211/2 100/212/2 99/213/2
|
||||
f 99/214/1 100/215/1 104/216/1 103/217/1
|
||||
f 103/218/4 104/219/4 115/220/4 116/221/4
|
||||
f 104/219/8 100/222/8 114/223/8 115/220/8
|
||||
f 92/44/1 91/48/1 106/224/1 105/225/1
|
||||
f 91/48/1 95/50/1 107/226/1 106/224/1
|
||||
f 96/45/1 92/44/1 105/225/1 108/227/1
|
||||
f 95/50/1 96/45/1 108/227/1 107/226/1
|
||||
f 97/228/13 98/229/13 114/230/13 113/231/13
|
||||
f 102/232/13 101/233/13 116/221/13 115/220/13
|
||||
f 101/233/13 97/228/13 113/231/13 116/221/13
|
||||
f 98/229/13 102/232/13 115/220/13 114/230/13
|
||||
f 125/234/2 126/235/2 120/236/2 119/237/2
|
||||
f 119/238/1 120/239/1 124/240/1 123/241/1
|
||||
f 123/242/4 124/243/4 127/244/4 128/245/4
|
||||
f 124/243/8 120/246/8 126/247/8 127/244/8
|
||||
f 117/248/13 118/249/13 126/250/13 125/251/13
|
||||
f 122/252/13 121/253/13 128/245/13 127/244/13
|
||||
f 121/253/13 117/248/13 125/251/13 128/245/13
|
||||
f 118/249/13 122/252/13 127/244/13 126/250/13
|
||||
f 137/254/2 138/255/2 132/256/2 131/257/2
|
||||
f 131/258/1 132/259/1 136/260/1 135/261/1
|
||||
f 135/262/4 136/263/4 139/264/4 140/265/4
|
||||
f 136/263/8 132/266/8 138/267/8 139/264/8
|
||||
f 129/268/13 130/269/13 138/270/13 137/271/13
|
||||
f 134/272/13 133/273/13 140/265/13 139/264/13
|
||||
f 133/273/13 129/268/13 137/271/13 140/265/13
|
||||
f 130/269/13 134/272/13 139/264/13 138/270/13
|
||||
f 143/274/13 144/275/13 142/276/13 141/277/13
|
||||
f 148/278/1 145/279/1 146/280/1 147/281/1
|
||||
f 142/282/2 146/283/2 145/284/2 141/285/2
|
||||
f 144/286/8 147/287/8 146/288/8 142/282/8
|
||||
f 143/289/4 148/290/4 147/291/4 144/292/4
|
||||
f 141/293/6 145/294/6 148/295/6 143/296/6
|
||||
f 156/297/1 153/298/1 154/299/1 155/300/1
|
||||
f 150/301/2 154/302/2 153/303/2 149/304/2
|
||||
f 152/305/8 155/306/8 154/307/8 150/308/8
|
||||
f 151/309/4 156/310/4 155/311/4 152/312/4
|
||||
f 149/313/6 153/314/6 156/315/6 151/316/6
|
||||
f 163/317/2 161/318/2 162/319/2 164/320/2
|
||||
f 170/321/2 172/322/2 171/323/2 169/324/2
|
||||
f 4/325/1 3/326/1 174/327/1 173/328/1
|
||||
f 3/329/1 7/330/1 175/331/1 174/332/1
|
||||
f 8/333/1 4/334/1 173/335/1 176/336/1
|
||||
f 7/337/1 8/338/1 176/339/1 175/340/1
|
||||
f 10/341/8 14/98/8 16/97/8 12/342/8
|
||||
f 169/343/6 171/344/6 178/345/6 177/346/6
|
||||
g Cube_Cube.001_Steel_Grey
|
||||
usemtl Steel_Grey
|
||||
f 17/347/2 18/348/2 20/349/2 19/350/2
|
||||
f 19/350/1 20/349/1 24/351/1 23/352/1
|
||||
f 23/353/4 24/354/4 22/355/4 21/356/4
|
||||
f 21/356/13 22/355/13 18/348/13 17/347/13
|
||||
f 19/357/6 23/358/6 21/356/6 17/347/6
|
||||
g Cube_Cube.001_Sight_Green
|
||||
usemtl Sight_Green
|
||||
f 101/359/13 102/360/13 98/361/13 97/362/13
|
||||
f 121/363/13 122/364/13 118/365/13 117/366/13
|
||||
f 133/367/13 134/368/13 130/369/13 129/370/13
|
1654
mods/weapons/models/preview_shotgun.obj
Normal file
1654
mods/weapons/models/preview_shotgun.obj
Normal file
File diff suppressed because it is too large
Load Diff
@ -6,35 +6,31 @@
|
||||
weapons.creator = {}
|
||||
weapons.creator.base_points = 50
|
||||
|
||||
weapons.creator.hp_cost = 3
|
||||
weapons.creator.hp_cost = 5
|
||||
weapons.creator.hp_base = 100
|
||||
weapons.creator.hp_gain = 5
|
||||
weapons.creator.hp_gain = 15
|
||||
|
||||
weapons.creator.speed_cost = 3
|
||||
weapons.creator.speed_cost = 10
|
||||
weapons.creator.speed_base = 1
|
||||
weapons.creator.speed_gain = 0.2
|
||||
|
||||
weapons.creator.jump_cost = 3
|
||||
weapons.creator.jump_cost = 10
|
||||
weapons.creator.jump_base = 1
|
||||
weapons.creator.jump_gain = 0.15
|
||||
|
||||
weapons.creator.weight_cost = 2
|
||||
weapons.creator.weight_base = 1
|
||||
weapons.creator.weight_loss = 0.05
|
||||
weapons.creator.jump_gain = 0.2
|
||||
|
||||
weapons.creator.blocks_cost = 1
|
||||
weapons.creator.blocks_base = 20
|
||||
weapons.creator.blocks_gain = 3
|
||||
weapons.creator.blocks_gain = 5
|
||||
|
||||
local base_class = {}
|
||||
base_class.stats = {
|
||||
hp = weapons.creator.hp_base,
|
||||
blocks = weapons.creator.blocks_base
|
||||
}
|
||||
|
||||
base_class.physics = {
|
||||
speed = weapons.creator.speed_base,
|
||||
jump = weapons.creator.jump_base,
|
||||
gravity = weapons.creator.weight_base,
|
||||
-- Legacy
|
||||
sneak = true,
|
||||
sneak_glitch = true,
|
||||
@ -42,10 +38,7 @@ base_class.physics = {
|
||||
}
|
||||
|
||||
|
||||
base_class.items = {
|
||||
"weapons:assault_rifle",
|
||||
"weapons:boring_pistol"
|
||||
}
|
||||
base_class.items = {}
|
||||
|
||||
-- base_class.items = {
|
||||
-- "weapons:assault_rifle",
|
||||
@ -68,9 +61,6 @@ local always_given_items = {
|
||||
"weapons:fists"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
---------------------------------
|
||||
---------------------------------
|
||||
-- Create a class testing zone --
|
||||
@ -78,15 +68,27 @@ local always_given_items = {
|
||||
---------------------------------
|
||||
|
||||
local create_a_class =
|
||||
"size[12,8]"..
|
||||
"button[10,6;2,1;save_changes;Respawn]"..
|
||||
"button[10,7;2,1;refresh;Refresh]"
|
||||
"formspec_version[4]"..
|
||||
"size[24,12]"..
|
||||
"image[12,0.5;0.01,9;creator_divider.png]"..
|
||||
"button[11,10;2,0.5;respawn;Respawn]"..
|
||||
"button[11,11;2,0.5;refresh;Refresh]"..
|
||||
"label[0.5,11.5;Note: Exiting this menu will save changes and take effect on next respawn.]"
|
||||
|
||||
weapons.creator.weapons = {}
|
||||
weapons.creator.weapons.primary = {}
|
||||
weapons.creator.weapons.secondary = {}
|
||||
weapons.creator.weapons.grenades = {}
|
||||
weapons.creator.perks = {}
|
||||
|
||||
-- use this for unsuccessful actions
|
||||
function weapons.creator.play_error_sound(player, pname)
|
||||
|
||||
end
|
||||
|
||||
-- use this for successful actions
|
||||
function weapons.creator.play_ui_beep(player, pname)
|
||||
|
||||
end
|
||||
|
||||
function weapons.creator.register_weapon(localisation, slot)
|
||||
weapons.creator.weapons[slot][#weapons.creator.weapons[slot]+1] = localisation
|
||||
@ -106,7 +108,7 @@ function weapons.creator.generate_weapons_list(player)
|
||||
end
|
||||
|
||||
if index == weapons.player_list[pname].creator.weapon_pri then
|
||||
pri_tooltip = "tooltip[0,0;5,1;"..localisation.tooltip.."]"
|
||||
pri_tooltip = "tooltip[0.5,0.5;4,1;"..localisation.tooltip.."]"
|
||||
pri_index = index
|
||||
end
|
||||
end
|
||||
@ -114,7 +116,7 @@ function weapons.creator.generate_weapons_list(player)
|
||||
-- Invalidate weapons that used to exist but no longer exist in updates,
|
||||
-- ideally this should never happen but just in case classes are remembered between restarts
|
||||
if #weapons.creator.weapons.primary < weapons.player_list[pname].creator.weapon_pri then
|
||||
pri_tooltip = "tooltip[0,0;5,1;"..weapons.creator.weapons.primary[1].tooltip.."]"
|
||||
pri_tooltip = "tooltip[0.5,0.5;4,1;"..weapons.creator.weapons.primary[1].tooltip.."]"
|
||||
print("[WARNING]: Weapon index is invalid. Potentially a missing weapon?")
|
||||
end
|
||||
|
||||
@ -126,7 +128,7 @@ function weapons.creator.generate_weapons_list(player)
|
||||
end
|
||||
|
||||
if index == weapons.player_list[pname].creator.weapon_sec then
|
||||
sec_tooltip = "tooltip[0,2.5;5,1;"..localisation.tooltip.."]"
|
||||
sec_tooltip = "tooltip[0.5,3;4,1;"..localisation.tooltip.."]"
|
||||
sec_index = index
|
||||
end
|
||||
end
|
||||
@ -134,25 +136,82 @@ function weapons.creator.generate_weapons_list(player)
|
||||
-- Invalidate weapons that used to exist but no longer exist in updates,
|
||||
-- ideally this should never happen but just in case classes are remembered between restarts
|
||||
if #weapons.creator.weapons.secondary < weapons.player_list[pname].creator.weapon_sec then
|
||||
sec_tooltip = "tooltip[0,2.5;5,1;"..weapons.creator.weapons.secondary[1].tooltip.."]"
|
||||
sec_tooltip = "tooltip[0.5,3;5,1;"..weapons.creator.weapons.secondary[1].tooltip.."]"
|
||||
print("[WARNING]: Weapon index is invalid. Potentially a missing weapon?")
|
||||
end
|
||||
|
||||
local dropdown_pri = "dropdown[0,0;4;weapon_pri;"..pri_list..pri_index..";true]"
|
||||
local dropdown_sec = "dropdown[0,2.5;4;weapon_sec;"..sec_list..sec_index..";true]"
|
||||
local dropdown_pri = "dropdown[0.5,0.5;4;weapon_pri;"..pri_list..pri_index..";true]"
|
||||
local dropdown_sec = "dropdown[0.5,3.5;4;weapon_sec;"..sec_list..sec_index..";true]"
|
||||
|
||||
return dropdown_pri..pri_tooltip..dropdown_sec..sec_tooltip
|
||||
end
|
||||
|
||||
-- weapon_sec = "1",
|
||||
-- weapon_pri = "3",
|
||||
function weapons.creator.form_to_creator(fields, player, pname)
|
||||
if fields.weapon_pri ~= nil then
|
||||
if fields == nil then
|
||||
elseif fields.weapon_pri ~= nil then
|
||||
weapons.player_list[pname].creator.weapon_pri = tonumber(fields.weapon_pri)
|
||||
end
|
||||
if fields.weapon_sec ~= nil then
|
||||
|
||||
if fields == nil then
|
||||
elseif fields.weapon_sec ~= nil then
|
||||
weapons.player_list[pname].creator.weapon_sec = tonumber(fields.weapon_sec)
|
||||
end
|
||||
|
||||
if fields == nil then
|
||||
elseif fields.dec_hp == "-" then
|
||||
if weapons.player_list[pname].creator.hp <= weapons.creator.hp_base then
|
||||
else
|
||||
weapons.player_list[pname].creator.hp = weapons.player_list[pname].creator.hp - weapons.creator.hp_gain
|
||||
weapons.player_list[pname].creator.points = weapons.player_list[pname].creator.points + weapons.creator.hp_cost
|
||||
end
|
||||
elseif fields.inc_hp == "+" then
|
||||
if weapons.player_list[pname].creator.points >= weapons.creator.hp_cost then
|
||||
weapons.player_list[pname].creator.hp = weapons.player_list[pname].creator.hp + weapons.creator.hp_gain
|
||||
weapons.player_list[pname].creator.points = weapons.player_list[pname].creator.points - weapons.creator.hp_cost
|
||||
end
|
||||
end
|
||||
|
||||
if fields == nil then
|
||||
elseif fields.dec_blk == "-" then
|
||||
if weapons.player_list[pname].creator.blocks <= weapons.creator.blocks_base then
|
||||
else
|
||||
weapons.player_list[pname].creator.blocks = weapons.player_list[pname].creator.blocks - weapons.creator.blocks_gain
|
||||
weapons.player_list[pname].creator.points = weapons.player_list[pname].creator.points + weapons.creator.blocks_cost
|
||||
end
|
||||
elseif fields.inc_blk == "+" then
|
||||
if weapons.player_list[pname].creator.points >= weapons.creator.blocks_cost then
|
||||
weapons.player_list[pname].creator.blocks = weapons.player_list[pname].creator.blocks + weapons.creator.blocks_gain
|
||||
weapons.player_list[pname].creator.points = weapons.player_list[pname].creator.points - weapons.creator.blocks_cost
|
||||
end
|
||||
end
|
||||
|
||||
if fields == nil then
|
||||
elseif fields.dec_spd == "-" then
|
||||
if weapons.player_list[pname].creator.speed <= weapons.creator.speed_base then
|
||||
else
|
||||
weapons.player_list[pname].creator.speed = weapons.player_list[pname].creator.speed - weapons.creator.speed_gain
|
||||
weapons.player_list[pname].creator.points = weapons.player_list[pname].creator.points + weapons.creator.speed_cost
|
||||
end
|
||||
elseif fields.inc_spd == "+" then
|
||||
if weapons.player_list[pname].creator.points >= weapons.creator.speed_cost then
|
||||
weapons.player_list[pname].creator.speed = weapons.player_list[pname].creator.speed + weapons.creator.speed_gain
|
||||
weapons.player_list[pname].creator.points = weapons.player_list[pname].creator.points - weapons.creator.speed_cost
|
||||
end
|
||||
end
|
||||
|
||||
if fields == nil then
|
||||
elseif fields.dec_jump == "-" then
|
||||
if weapons.player_list[pname].creator.jump <= weapons.creator.jump_base then
|
||||
else
|
||||
weapons.player_list[pname].creator.jump = weapons.player_list[pname].creator.jump - weapons.creator.jump_gain
|
||||
weapons.player_list[pname].creator.points = weapons.player_list[pname].creator.points + weapons.creator.jump_cost
|
||||
end
|
||||
elseif fields.inc_jump == "+" then
|
||||
if weapons.player_list[pname].creator.points >= weapons.creator.jump_cost then
|
||||
weapons.player_list[pname].creator.jump = weapons.player_list[pname].creator.jump + weapons.creator.jump_gain
|
||||
weapons.player_list[pname].creator.points = weapons.player_list[pname].creator.points - weapons.creator.jump_cost
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function weapons.creator.creator_to_class(player, pname)
|
||||
@ -165,48 +224,176 @@ function weapons.creator.creator_to_class(player, pname)
|
||||
items[#items+1] = item
|
||||
end
|
||||
|
||||
-- Manage Health and stuff right here
|
||||
weapons.player.set_class(player, items)
|
||||
end
|
||||
|
||||
function weapons.creator.player_preview(player, pname)
|
||||
local player_texture = minetest.formspec_escape(weapons.get_player_texture(player))
|
||||
local arms_mat = player_texture .. ",rubber.png,steel_dark.png,steel_grey.png,sight_green.png"
|
||||
local primary_weapon_index = weapons.player_list[pname].creator.weapon_pri
|
||||
local primary_weapon = minetest.registered_nodes[weapons.creator.weapons.primary[primary_weapon_index].itemstring]
|
||||
local primary_preview, primary_materials = "", ""
|
||||
if primary_weapon._localisation.preview == nil then
|
||||
-- Fallback or use an invisible model /shrug
|
||||
primary_preview = "preview_shotgun.obj;"
|
||||
else
|
||||
primary_preview = primary_weapon._localisation.preview .. ";"
|
||||
end
|
||||
|
||||
for k, v in pairs(primary_weapon._arms.textures) do
|
||||
if primary_weapon._arms.skin_pos == k then
|
||||
else
|
||||
if #primary_weapon._arms.textures == k then
|
||||
primary_materials = primary_materials .. primary_weapon._arms.textures[k] .. ";"
|
||||
else
|
||||
primary_materials = primary_materials .. primary_weapon._arms.textures[k] .. ","
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local secondary_weapon_index = weapons.player_list[pname].creator.weapon_sec
|
||||
local secondary_weapon = minetest.registered_nodes[weapons.creator.weapons.secondary[secondary_weapon_index].itemstring]
|
||||
local secondary_preview, secondary_materials = "", ""
|
||||
|
||||
if secondary_weapon._localisation.preview == nil then
|
||||
secondary_preview = "preview_boringpistol.obj;"
|
||||
else
|
||||
secondary_preview = secondary_weapon._localisation.preview .. ";"
|
||||
end
|
||||
|
||||
for k, v in pairs (secondary_weapon._arms.textures) do
|
||||
if secondary_weapon._arms.skin_pos == k then
|
||||
else
|
||||
if #secondary_weapon._arms.textures == k then
|
||||
secondary_materials = secondary_materials .. secondary_weapon._arms.textures[k] .. ";"
|
||||
else
|
||||
secondary_materials = secondary_materials .. secondary_weapon._arms.textures[k] .. ","
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local primary_model = "model[5,-0.5;8,3;preview_primary;"..primary_preview..primary_materials.."0,-90]"
|
||||
local secondary_model = "model[5,2.5;8,3;preview_secondary;"..secondary_preview..secondary_materials.."0,-90]"
|
||||
return primary_model .. secondary_model
|
||||
end
|
||||
|
||||
function weapons.creator.player_stats(player, pname)
|
||||
local points_label = "label[14, 0.5;"
|
||||
local p_lbl_text = ""
|
||||
if weapons.player_list[pname].creator.points <= 0 then
|
||||
p_lbl_text = "No points available to spend, unallocate some spent points!"
|
||||
points_label = "label[13.5, 0.5;"
|
||||
elseif weapons.player_list[pname].creator.points > 0 then
|
||||
p_lbl_text = weapons.player_list[pname].creator.points .. " available points to spend, allocate some points!"
|
||||
end
|
||||
|
||||
points_label = points_label .. p_lbl_text .. "]"
|
||||
|
||||
local dec_hp = "button[12.5,1.5;0.5,0.5;dec_hp;-]"
|
||||
local inc_hp = "button[14.5,1.5;0.5,0.5;inc_hp;+]"
|
||||
|
||||
local dec_blk = "button[12.5,2.5;0.5,0.5;dec_blk;-]"
|
||||
local inc_blk = "button[14.5,2.5;0.5,0.5;inc_blk;+]"
|
||||
|
||||
local dec_spd = "button[12.5,3.5;0.5,0.5;dec_spd;-]"
|
||||
local inc_spd = "button[14.5,3.5;0.5,0.5;inc_spd;+]"
|
||||
|
||||
local dec_jump = "button[12.5,4.5;0.5,0.5;dec_jump;-]"
|
||||
local inc_jump = "button[14.5,4.5;0.5,0.5;inc_jump;+]"
|
||||
|
||||
local lbl_hp = "label[13.2,1.65;Health: "..weapons.player_list[pname].creator.hp.."]"
|
||||
local lbl_blk = "label[13.225,2.65;Blocks: "..weapons.player_list[pname].creator.blocks.."]"
|
||||
local lbl_spd = "label[13.25,3.65;Speed: "..weapons.player_list[pname].creator.speed.."x]"
|
||||
local lbl_jump = "label[13.3,4.65;Jump: "..weapons.player_list[pname].creator.jump.."x]"
|
||||
|
||||
local cost_hp = "label[13.3,1.85;Cost: "..weapons.creator.hp_cost.."]"
|
||||
local cost_blk = "label[13.3,2.85;Cost: "..weapons.creator.blocks_cost.."]"
|
||||
local cost_spd = "label[13.3,3.85;Cost: "..weapons.creator.speed_cost.."]"
|
||||
local cost_jump = "label[13.3,4.85;Cost: "..weapons.creator.jump_cost.."]"
|
||||
|
||||
local player_preview = "image[20.5,0.5;3,6;creator_skin_placeholder.png]"
|
||||
local helmet_index = 1
|
||||
local armour_index = 1
|
||||
local undersuit_index = 1
|
||||
local helmet_dropdown = "dropdown[20.5,6.5;3;armour_chooser;Default Helmet,Unlockable Helmet,Placeholder Hemlet;"..helmet_index..";true]"
|
||||
local armour_dropdown = "dropdown[20.5,7.5;3;armour_chooser;Default Armour,Unlockable Armour,Placeholder Armour;"..armour_index..";true]"
|
||||
local undersuit_dropdown = "dropdown[20.5,8.5;3;undersuit_chooser;Default Undersuit,Unlockable Undersuit,Placeholder Undersuit;"..undersuit_index..";true]"
|
||||
|
||||
|
||||
return
|
||||
points_label..
|
||||
lbl_hp..
|
||||
cost_hp..
|
||||
dec_hp..
|
||||
inc_hp..
|
||||
|
||||
lbl_jump..
|
||||
cost_jump..
|
||||
dec_jump..
|
||||
inc_jump..
|
||||
|
||||
lbl_spd..
|
||||
cost_spd..
|
||||
dec_spd..
|
||||
inc_spd..
|
||||
|
||||
lbl_blk..
|
||||
cost_blk..
|
||||
dec_blk..
|
||||
inc_blk..
|
||||
|
||||
player_preview..
|
||||
undersuit_dropdown..
|
||||
armour_dropdown..
|
||||
helmet_dropdown
|
||||
|
||||
end
|
||||
|
||||
function weapons.creator.display_formspec(pname, player, fields)
|
||||
weapons.creator.form_to_creator(fields, player, pname)
|
||||
local weapon_lists = weapons.creator.generate_weapons_list(player)
|
||||
local preview = weapons.creator.player_preview(player, pname)
|
||||
local player_stats = weapons.creator.player_stats(player, pname)
|
||||
minetest.show_formspec(pname, "create_a_class", create_a_class..weapon_lists..preview..player_stats)
|
||||
end
|
||||
|
||||
minetest.register_chatcommand("creator", {
|
||||
|
||||
description = "create a class, will respawn you.",
|
||||
func = function(name, param)
|
||||
local player = minetest.get_player_by_name(name
|
||||
)
|
||||
local weapon_lists = weapons.creator.generate_weapons_list(minetest.get_player_by_name(name))
|
||||
minetest.show_formspec(name, "create_a_class", create_a_class..weapon_lists)
|
||||
local preview = weapons.creator.player_preview(player, name)
|
||||
local player_stats = weapons.creator.player_stats(player, name)
|
||||
minetest.show_formspec(name, "create_a_class", create_a_class..weapon_lists..preview..player_stats)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
local pname = player:get_player_name()
|
||||
--print(dump(fields))
|
||||
if formname == "create_a_class" then
|
||||
if fields.save_changes then
|
||||
if fields.respawn == "Respawn" then
|
||||
weapons.creator.form_to_creator(fields, player, pname)
|
||||
if weapons.player_list[pname].texture == nil then
|
||||
minetest.close_formspec(pname, "create_a_class")
|
||||
else
|
||||
weapons.kill_player(player, player, {_localisation={name="Suicide Pill"}}, 0)
|
||||
weapons.kill_player(player, player, {_localisation={name="Suicide Pill"}}, 0, false)
|
||||
end
|
||||
weapons.creator.form_to_creator(fields, player, pname)
|
||||
weapons.creator.creator_to_class(player, pname)
|
||||
elseif fields.quit then
|
||||
weapons.creator.form_to_creator(fields, player, pname)
|
||||
elseif fields.quit == "true" then
|
||||
if weapons.player_list[pname].texture == nil then
|
||||
local weapon_lists = weapons.creator.generate_weapons_list(player)
|
||||
minetest.show_formspec(player:get_player_name(), "create_a_class", create_a_class..weapon_lists)
|
||||
minetest.after(0.06, weapons.creator.display_formspec, pname, player, fields)
|
||||
else
|
||||
minetest.close_formspec(pname, "create_a_class")
|
||||
end
|
||||
else -- Formspec updates
|
||||
weapons.creator.form_to_creator(fields, player, pname)
|
||||
local weapon_lists = weapons.creator.generate_weapons_list(player)
|
||||
minetest.show_formspec(player:get_player_name(), "create_a_class", create_a_class..weapon_lists)
|
||||
weapons.creator.display_formspec(pname, player, fields)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
weapons.red_flag = red_flag
|
||||
weapons.blue_flag = blue_flag
|
||||
|
||||
local function clear_inv(player)
|
||||
local p_inv = player:get_inventory()
|
||||
p_inv:set_list("main", {})
|
||||
@ -233,15 +420,26 @@ end
|
||||
|
||||
weapons.add_class_items = add_class_items
|
||||
|
||||
local function set_player_physics(player)
|
||||
|
||||
local function set_player_physics(player, class_stats)
|
||||
local pname = player:get_player_name()
|
||||
local cstat = {
|
||||
speed = weapons.player_list[pname].creator.speed,
|
||||
jump = weapons.player_list[pname].creator.jump,
|
||||
sneak_glitch = true,
|
||||
new_move = false
|
||||
}
|
||||
player:set_physics_override(cstat)
|
||||
end
|
||||
|
||||
local function set_ammo(player, class_items, class_stats)
|
||||
local function set_ammo(player, class_items)
|
||||
local pname = player:get_player_name()
|
||||
|
||||
local items = class_items or base_class.items
|
||||
local stats = class_stats or base_class.items
|
||||
local items, stats
|
||||
if class_items == nil then
|
||||
items = base_class.items
|
||||
else
|
||||
items = class_items
|
||||
end
|
||||
|
||||
for _, stack in pairs(items) do
|
||||
-- Big hax btw, teams can have differing magazine sizes
|
||||
@ -271,8 +469,8 @@ local function set_ammo(player, class_items, class_stats)
|
||||
end
|
||||
end
|
||||
end
|
||||
weapons.player_list[pname].blocks = stats.blocks
|
||||
weapons.player_list[pname].blocks_max = stats.blocks
|
||||
weapons.player_list[pname].blocks = weapons.player_list[pname].creator.blocks
|
||||
weapons.player_list[pname].blocks_max = weapons.player_list[pname].creator.blocks
|
||||
weapons.player_list[pname].fatigue = 0
|
||||
weapons.player_list[pname].fatigue_max = 100
|
||||
end
|
||||
@ -296,10 +494,11 @@ end
|
||||
function weapons.get_player_skin(player)
|
||||
local pname = player:get_player_name()
|
||||
local team = weapons.player.get_team(player)
|
||||
local skin = 1
|
||||
if team == nil then
|
||||
return nil
|
||||
else
|
||||
return "skin_1_" .. team .. ".png"
|
||||
return "skin_"..skin.."_" .. team .. ".png"
|
||||
end
|
||||
end
|
||||
|
||||
@ -336,7 +535,6 @@ function weapons.set_player_texture(player)
|
||||
return
|
||||
end
|
||||
weapons.player_list[pname].texture = ptex
|
||||
--minetest.chat_send_all(ptex)
|
||||
end
|
||||
|
||||
weapons.set_ammo = set_ammo
|
||||
@ -371,6 +569,18 @@ minetest.register_on_joinplayer(function(player)
|
||||
if minetest.get_player_information(pname).formspec_version < 4 then
|
||||
minetest.kick_player(pname, "Hello ".. pname .. ", please upgrade your client to Minetest 5.4.0 or greater!")
|
||||
end
|
||||
|
||||
player:set_nametag_attributes({
|
||||
color = "#00000000"
|
||||
})
|
||||
|
||||
player:set_properties({
|
||||
textures = {"transparent.png", "transparent.png"}
|
||||
})
|
||||
|
||||
weapons.update_blue_flag = true
|
||||
weapons.update_red_flag = true
|
||||
|
||||
-- Animation things
|
||||
anim_lock[pname] = false
|
||||
anim_frame[pname] = -1
|
||||
@ -394,29 +604,23 @@ minetest.register_on_joinplayer(function(player)
|
||||
weapons.player_list[pname].anim_mode = false -- true == alternate animation, false == regular
|
||||
|
||||
-- Create a class things
|
||||
-- I'm only doing this to enable me to fold this up.
|
||||
if true then
|
||||
weapons.player_list[pname].creator = {}
|
||||
weapons.player_list[pname].creator.points = weapons.creator.base_points
|
||||
weapons.player_list[pname].creator.spent = 0
|
||||
weapons.player_list[pname].creator.hp_base = weapons.creator.hp_base
|
||||
weapons.player_list[pname].creator.speed_base = weapons.creator.speed_base
|
||||
weapons.player_list[pname].creator.jump_base = weapons.creator.jump_base
|
||||
weapons.player_list[pname].creator.weight_base = weapons.creator.weight_base
|
||||
weapons.player_list[pname].creator.hp = weapons.creator.hp_base
|
||||
weapons.player_list[pname].creator.speed = weapons.creator.speed_base
|
||||
weapons.player_list[pname].creator.jump = weapons.creator.jump_base
|
||||
weapons.player_list[pname].creator.blocks = weapons.creator.blocks_base
|
||||
|
||||
weapons.player_list[pname].creator.weapon_pri = 1
|
||||
weapons.player_list[pname].creator.weapon_sec = 1
|
||||
weapons.player_list[pname].creator.weapon_gre = 1
|
||||
end
|
||||
|
||||
weapons.assign_team(player, nil)
|
||||
local weapon_lists = weapons.creator.generate_weapons_list(player)
|
||||
minetest.show_formspec(pname, "create_a_class", create_a_class..weapon_lists)
|
||||
player:set_nametag_attributes({
|
||||
color = "#00000000"
|
||||
})
|
||||
|
||||
weapons.update_blue_flag = true
|
||||
weapons.update_red_flag = true
|
||||
weapons.assign_team(player, nil)
|
||||
weapons.creator.display_formspec(pname, player, {})
|
||||
end)
|
||||
|
||||
-- cache bone positions for speed
|
||||
@ -430,14 +634,13 @@ local arms_pos = vector.new(0,10,0)
|
||||
local arms_rot = vector.new(0,0,0)
|
||||
local nulvec = vector.new(0,0,0)
|
||||
|
||||
function weapons.player.set_class(player, class_items, class_stats)
|
||||
function weapons.player.set_class(player, class_items)
|
||||
local pname = player:get_player_name()
|
||||
|
||||
--weapons.player_list[pname].class = {stats = table.copy(class_stats), items = table.copy(class_items)}
|
||||
--set_player_physics(player, class)
|
||||
-- Clear inv:
|
||||
clear_inv(player)
|
||||
set_health(player, class_stats)
|
||||
set_health(player)
|
||||
set_player_physics(player)
|
||||
set_ammo(player, class_items)
|
||||
add_class_items(player, class_items)
|
||||
|
||||
@ -497,7 +700,7 @@ minetest.register_chatcommand("respawn", {
|
||||
description = "Respawn back to base if stuck.",
|
||||
func = function(name, param)
|
||||
local player = minetest.get_player_by_name(name)
|
||||
weapons.kill_player(player, player, {_localisation = {name="Suicide Pill"}}, 0)
|
||||
weapons.kill_player(player, player, {_localisation = {name="Suicide Pill"}}, 0, false)
|
||||
end,
|
||||
})
|
||||
|
||||
@ -549,8 +752,11 @@ minetest.register_globalstep(function(dtime)
|
||||
local anim_group
|
||||
if look_pitch[pname] ~= ppitch then
|
||||
player:set_animation({x=ppitch+90, y=ppitch+90}, 1, 0.03, false)
|
||||
local pidiv2 = 1.5707963268
|
||||
|
||||
look_pitch[pname] = ppitch+0 -- Do not alias
|
||||
if weapon == nil then
|
||||
elseif weapon._min_arm_angle == nil then
|
||||
elseif weapon._max_arm_angle == nil then
|
||||
else
|
||||
if weapons.player_arms[pname] ~= nil then
|
||||
@ -564,7 +770,11 @@ minetest.register_globalstep(function(dtime)
|
||||
if weapon._arms.pos ~= nil then
|
||||
bpos = weapon._arms.pos
|
||||
end
|
||||
weapons.player_arms[pname]:set_bone_position("Armature_Root", bpos, {x=ppitch+arms_rot.x, y=arms_rot.y, z=arms_rot.z})
|
||||
weapons.player_arms[pname]:set_bone_position(
|
||||
"Armature_Root",
|
||||
bpos,
|
||||
{x=ppitch+arms_rot.x, y=arms_rot.y, z=arms_rot.z}
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -673,7 +883,7 @@ minetest.register_globalstep(function(dtime)
|
||||
end
|
||||
elseif solarsail.controls.player[pname].RMB then -- Handle aiming
|
||||
if solarsail.controls.player[pname].LMB then
|
||||
if weapons.player_list[pname][ammo] > 0 or weapon._ammo_type == "blocks" then
|
||||
if weapons.player_list[pname][ammo] > 0 or ammo == "blocks" then
|
||||
arm_frame[pname] = 0
|
||||
arm_type[pname] = "aim_fire"
|
||||
arm_after[pname] = minetest.after((60 / weapon._rpm), unlock_arms, pname)
|
||||
@ -690,7 +900,7 @@ minetest.register_globalstep(function(dtime)
|
||||
end
|
||||
else
|
||||
if solarsail.controls.player[pname].LMB then
|
||||
if weapons.player_list[pname][ammo] > 0 or weapon._ammo_type == "blocks" then
|
||||
if weapons.player_list[pname][ammo] > 0 or ammo == "blocks" then
|
||||
arm_frame[pname] = 0
|
||||
arm_type[pname] = "idle_fire"
|
||||
arm_after[pname] = minetest.after((60 / weapon._rpm), unlock_arms, pname)
|
||||
|
BIN
mods/weapons/textures/hud/creator_divider.png
Normal file
BIN
mods/weapons/textures/hud/creator_divider.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 173 B |
BIN
mods/weapons/textures/hud/creator_skin_placeholder.png
Normal file
BIN
mods/weapons/textures/hud/creator_skin_placeholder.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
@ -101,8 +101,13 @@ function weapons.magazine_reload(player, weapon, wield, keypressed)
|
||||
if not weapons.is_reloading[pname][wield] then
|
||||
weapons.is_reloading[pname][wield] = true
|
||||
minetest.after(weapon._reload * chamber_bonus, weapons.finish_magazine, player, weapon, wield, chambered)
|
||||
if weapons.player_list[pname].anim_mode then
|
||||
minetest.sound_play({name=weapon._reload_sound_alt},
|
||||
{object=player, max_hear_distance=8, gain=0.15})
|
||||
else
|
||||
minetest.sound_play({name=weapon._reload_sound},
|
||||
{object=player, max_hear_distance=8, gain=0.15})
|
||||
end
|
||||
if weapon._no_reload_hud then
|
||||
else
|
||||
player:hud_change(weapons.player_huds[pname].ammo.reloading,
|
||||
@ -170,12 +175,15 @@ function weapons.tube_reload(player, weapon, wield, keypressed)
|
||||
if weapons.player_list[pname][ammo] == 0 then
|
||||
minetest.after(weapon._reload, weapons.finish_tube, player, weapon, wield)
|
||||
weapons.player_list[pname].anim_mode = false
|
||||
minetest.sound_play({name=weapon._reload_sound},
|
||||
{object=player, max_hear_distance=8, gain=0.15})
|
||||
else
|
||||
minetest.after(weapon._reload*0.9, weapons.finish_tube, player, weapon, wield)
|
||||
weapons.player_list[pname].anim_mode = true
|
||||
end
|
||||
minetest.sound_play({name=weapon._reload_sound},
|
||||
minetest.sound_play({name=weapon._reload_sound_alt},
|
||||
{object=player, max_hear_distance=8, gain=0.15})
|
||||
end
|
||||
|
||||
if weapon._no_reload_hud then
|
||||
else
|
||||
player:hud_change(weapons.player_huds[pname].ammo.reloading,
|
||||
@ -332,7 +340,7 @@ function weapons.bullet_on_hit(pointed, player, weapon, target_pos, dist)
|
||||
local diff = solarsail.util.functions.pos_to_dist(t_pos, target_pos)
|
||||
if diff < 0.31 then
|
||||
if pointed.ref:is_player() then
|
||||
weapons.handle_damage(weapon, player, pointed.ref, dist)
|
||||
weapons.handle_damage(weapon, player, pointed.ref, dist, pointed)
|
||||
end
|
||||
end
|
||||
else
|
||||
@ -341,7 +349,7 @@ function weapons.bullet_on_hit(pointed, player, weapon, target_pos, dist)
|
||||
local ppos = players:get_pos()
|
||||
local splash_dist = solarsail.util.functions.pos_to_dist(ppos, pointed.intersection_point)
|
||||
if splash_dist < 0.61 then
|
||||
weapons.handle_damage(weapon, player, players, dist)
|
||||
weapons.handle_damage(weapon, player, players, dist, nil)
|
||||
return
|
||||
end
|
||||
end
|
||||
@ -394,7 +402,7 @@ end
|
||||
function weapons.melee_on_hit(pointed, player, weapon, target_pos, dist)
|
||||
if pointed.type == "object" then
|
||||
if pointed.ref:is_player() then
|
||||
weapons.handle_damage(weapon, player, pointed.ref, dist)
|
||||
weapons.handle_damage(weapon, player, pointed.ref, dist, pointed)
|
||||
end
|
||||
else
|
||||
local nodedef = minetest.registered_nodes[minetest.get_node(target_pos).name]
|
||||
@ -463,7 +471,7 @@ end
|
||||
function weapons.flag_on_hit(pointed, player, weapon, target_pos, dist)
|
||||
if pointed.type == "object" then
|
||||
if pointed.ref:is_player() then
|
||||
weapons.handle_damage(weapon, player, pointed.ref, dist)
|
||||
weapons.handle_damage(weapon, player, pointed.ref, dist, pointed)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1,107 +1,4 @@
|
||||
local bounce_factor = 0.36
|
||||
local casing_ent = {
|
||||
visual = "mesh",
|
||||
mesh = "ar_casing.obj",
|
||||
textures = {"casing.png"},
|
||||
physical = true,
|
||||
collide_with_objects = false,
|
||||
pointable = false,
|
||||
collisionbox = {-0.05, -0.05, -0.05, 0.05, 0.05, 0.05},
|
||||
visual_size = {x=5, y=5},
|
||||
_ttl = 4,
|
||||
_timer = 0
|
||||
}
|
||||
|
||||
function casing_ent:on_step(dtime, moveresult)
|
||||
local rot = self.object:get_rotation()
|
||||
local velocity = {x=0, y=0, z=0}
|
||||
if moveresult.collides then
|
||||
local old_vel
|
||||
-- Check for velocities:
|
||||
if moveresult.collisions[1] == nil then
|
||||
old_vel = self.object:get_velocity()
|
||||
else
|
||||
old_vel = table.copy(moveresult.collisions[1].old_velocity)
|
||||
end
|
||||
-- Handle air resistance, friction:
|
||||
if moveresult.touching_ground then
|
||||
old_vel.x = old_vel.x * 0.75
|
||||
old_vel.z = old_vel.z * 0.75
|
||||
else
|
||||
old_vel.x = old_vel.x * 0.975
|
||||
old_vel.z = old_vel.z * 0.975
|
||||
end
|
||||
|
||||
if moveresult.collisions[1] == nil then
|
||||
if not moveresult.touching_ground then
|
||||
velocity.x = old_vel.x
|
||||
velocity.z = old_vel.z
|
||||
end
|
||||
velocity.y = old_vel.y
|
||||
elseif moveresult.collisions[1].axis == "x" then
|
||||
velocity.x = -(old_vel.x * bounce_factor)
|
||||
velocity.y = old_vel.y
|
||||
velocity.z = old_vel.z
|
||||
minetest.sound_play({name = "ar_casing"},
|
||||
{object=self.object, max_hear_distance=8, gain=0.035, pitch=math.random(85, 115)/100}, true)
|
||||
elseif moveresult.collisions[1].axis == "y" then
|
||||
velocity.x = old_vel.x
|
||||
velocity.y = -(old_vel.y * bounce_factor)
|
||||
velocity.z = old_vel.z
|
||||
if math.abs(old_vel.y) > 0.38 then
|
||||
minetest.sound_play({name = "ar_casing"},
|
||||
{object=self.object, max_hear_distance=8, gain=0.035, pitch=math.random(85, 115)/100}, true)
|
||||
end
|
||||
elseif moveresult.collisions[1].axis == "z" then
|
||||
velocity.x = old_vel.x
|
||||
velocity.y = old_vel.y
|
||||
velocity.z = -(old_vel.z * bounce_factor)
|
||||
minetest.sound_play({name = "ar_casing"},
|
||||
{object=self.object, max_hear_distance=8, gain=0.035, pitch=math.random(85, 115)/100}, true)
|
||||
end
|
||||
|
||||
-- Rotate object for rolling and shit:
|
||||
local xz, y = solarsail.util.functions.get_3d_angles(
|
||||
vector.new(0, 0, 0), velocity
|
||||
)
|
||||
rot.x = xz + math.rad(math.pi/2)
|
||||
|
||||
self.object:set_velocity(velocity)
|
||||
end
|
||||
|
||||
local norm = vector.normalize(self.object:get_velocity())
|
||||
rot.y = rot.y + ((norm.x + norm.z) / 3)
|
||||
self.object:set_rotation(rot)
|
||||
|
||||
if self._timer > self._ttl then
|
||||
self.object:remove()
|
||||
end
|
||||
self._timer = self._timer + dtime
|
||||
end
|
||||
|
||||
minetest.register_entity("weapons:shotgun_casing", casing_ent)
|
||||
|
||||
local function add_extras(player)
|
||||
local ldir = player:get_look_dir()
|
||||
local ppos = vector.add(player:get_pos(), vector.new(0, 1.2+ldir.y/3.5, 0))
|
||||
|
||||
local px, pz = solarsail.util.functions.yaw_to_vec(player:get_look_horizontal(), 1, false)
|
||||
ppos = vector.add(ppos, vector.multiply(vector.new(px, 0, pz), 0.225))
|
||||
local dir = vector.new(pz, 0, -px)
|
||||
local res = vector.add(ppos, vector.multiply(dir, 0.25))
|
||||
|
||||
local ent = minetest.add_entity(res, "weapons:shotgun_casing")
|
||||
local pvel = player:get_velocity()
|
||||
pvel.x = pvel.x/2
|
||||
pvel.y = pvel.y/2
|
||||
pvel.z = pvel.z/2
|
||||
local vel = vector.multiply(vector.new(pz/1.5, ldir.y+1, -px/1.5), 3)
|
||||
vel = vector.add(vel, vector.new(math.random(-25, 25)/100, 0, math.random(-25, 25)/100))
|
||||
ent:set_acceleration({x=0, y=-9.80, z=0})
|
||||
ent:set_velocity(vector.add(pvel, vel))
|
||||
end
|
||||
|
||||
local wep_rpm = 75
|
||||
local wep_rpm = 76
|
||||
local shots_used = 1
|
||||
|
||||
weapons.register_weapon("weapons:pump_shotgun", true,
|
||||
@ -118,37 +15,37 @@ weapons.register_weapon("weapons:pump_shotgun", true,
|
||||
|
||||
Stats:
|
||||
|
||||
5 Damage per pellet, of a total of 9 pellets.
|
||||
0.65 second reload per shell.
|
||||
12 Damage per pellet, of a total of 9 pellets.
|
||||
1 second reload when empty, 0.9 seconds when topping off.
|
||||
Unaimed spread +- 14 nodes at maximum range.
|
||||
Aimed spread +- 12 nodes at maximum range.
|
||||
Range 150 nodes.]],
|
||||
preview = "preview_shotgun.obj"
|
||||
},
|
||||
|
||||
-- HUD / Visual
|
||||
_tracer = "ar",
|
||||
_tracer = "shotgun",
|
||||
_name = "pump_shotgun",
|
||||
_ammo_bg = "shotgun_bg",
|
||||
_crosshair = "shotgun_crosshair.png",
|
||||
_crosshair_aim = "shotgun_crosshair.png",
|
||||
_fov_mult = 0,
|
||||
_fov_mult_aim = 0.95,
|
||||
_min_arm_angle = -45,
|
||||
_max_arm_angle = 75,
|
||||
_max_arm_angle = 50,
|
||||
_arm_angle_offset = 0,
|
||||
-- Sounds
|
||||
_firing_sound = "shotgun_fire",
|
||||
_reload_sound = "ass_rifle_reload",
|
||||
_casing = "Armature_Casing",
|
||||
|
||||
-- Base Stats:
|
||||
_pellets = 9,
|
||||
_mag = 6,
|
||||
_rpm = wep_rpm,
|
||||
_reload = 1,
|
||||
_reload = 0.81,
|
||||
_speed = 1200,
|
||||
_range = 150,
|
||||
_damage = 25,
|
||||
_damage = 12,
|
||||
_headshot_multiplier = 1.0125,
|
||||
_movespeed = 1,
|
||||
_movespeed_aim = 0.45,
|
||||
_shots_used = shots_used,
|
||||
@ -185,7 +82,7 @@ Range 150 nodes.]],
|
||||
textures = {"transarent.png", "rubber.png", "steel_dark.png", "steel_light.png", "steel_grey.png", "sight_green.png"},
|
||||
},
|
||||
on_fire = weapons.raycast_bullet,
|
||||
on_fire_visual = add_extras,
|
||||
--on_fire_visual = add_extras,
|
||||
on_reload = weapons.tube_reload,
|
||||
bullet_on_hit = weapons.bullet_on_hit,
|
||||
})
|
@ -2,7 +2,9 @@
|
||||
-- Author: Jordach
|
||||
-- License: RESERVED
|
||||
|
||||
local wep_rpm = 180
|
||||
|
||||
local wep_rpm = 200
|
||||
|
||||
local shots_used = 1
|
||||
|
||||
weapons.register_weapon("weapons:boring_pistol", true,
|
||||
@ -25,6 +27,7 @@ Stats:
|
||||
Unaimed spread +- 5 nodes at maximum range.
|
||||
Aimed spread +- 2.5 nodes at maximum range.
|
||||
Range 100 nodes.]],
|
||||
preview = "preview_boringpistol.obj"
|
||||
},
|
||||
|
||||
-- HUD / Visual
|
||||
@ -34,12 +37,13 @@ Range 100 nodes.]],
|
||||
_crosshair_aim = "railgun_crosshair.png",
|
||||
_fov_mult = 0,
|
||||
_fov_mult_aim = 0.9,
|
||||
_min_arm_angle = -45,
|
||||
_max_arm_angle = 75,
|
||||
_min_arm_angle = -65,
|
||||
_max_arm_angle = 70,
|
||||
_arm_angle_offset = 0,
|
||||
-- Sounds
|
||||
_firing_sound = "ass_rifle_fire",
|
||||
_reload_sound = "ass_rifle_reload",
|
||||
_firing_sound = "bpistol_fire",
|
||||
_reload_sound = "bpistol_reload",
|
||||
_reload_sound_alt = "bpistol_reload_alt",
|
||||
_casing = "Armature_Casing",
|
||||
|
||||
-- Base Stats:
|
||||
@ -50,6 +54,7 @@ Range 100 nodes.]],
|
||||
_speed = 1200,
|
||||
_range = 100,
|
||||
_damage = 18,
|
||||
_headshot_multiplier = 1.5,
|
||||
_movespeed = 1.1,
|
||||
_movespeed_aim = 0.85,
|
||||
_shots_used = shots_used,
|
||||
@ -62,7 +67,7 @@ Range 100 nodes.]],
|
||||
_recoil_aim_factor = 0.5,
|
||||
|
||||
_fatigue = 15,
|
||||
_fatigue_timer = 0.6,
|
||||
_fatigue_timer = 0.06,
|
||||
_fatigue_recovery = 0.95,
|
||||
|
||||
_spread = 5,
|
||||
|
@ -49,7 +49,7 @@ function plas_ent:collide(self, moveresult)
|
||||
return
|
||||
else
|
||||
dist = solarsail.util.functions.pos_to_dist(self._player_ref:get_pos(), ppos)
|
||||
weapons.handle_damage(weapon, self._player_ref, player, dist)
|
||||
weapons.handle_damage(weapon, self._player_ref, player, dist, nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -147,10 +147,10 @@ function rocket_ent:explode(self, moveresult)
|
||||
if dist < 4.01 then
|
||||
if player == self._player_ref then
|
||||
rocket_damage._damage = rocket._damage/2.5
|
||||
weapons.handle_damage(rocket_damage, self._player_ref, player, dist)
|
||||
weapons.handle_damage(rocket_damage, self._player_ref, player, dist, nil)
|
||||
else
|
||||
dist = solarsail.util.functions.pos_to_dist(self._player_ref:get_pos(), ppos)
|
||||
weapons.handle_damage(rocket_damage, self._player_ref, player, dist)
|
||||
weapons.handle_damage(rocket_damage, self._player_ref, player, dist, nil)
|
||||
end
|
||||
-- Add player knockback:
|
||||
solarsail.util.functions.apply_explosion_recoil(player, 25, pos)
|
||||
@ -202,7 +202,6 @@ local launcher_def_red = {
|
||||
|
||||
_no_reload_hud = true,
|
||||
_reload_node = "weapons:rocket_launcher_reload_red",
|
||||
_ammo_bg = "rocket_bg",
|
||||
_kf_name = "Rocket Launcher",
|
||||
_fov_mult = 0.95,
|
||||
_crosshair = "railgun_crosshair.png",
|
||||
@ -247,7 +246,6 @@ local launcher_reload_red = {
|
||||
|
||||
_no_reload_hud = true,
|
||||
_reset_node = "weapons:rocket_launcher_red",
|
||||
_ammo_bg = "rocket_bg",
|
||||
_kf_name = "Rocket Launcher",
|
||||
_damage = 0,
|
||||
_mag = 1,
|
||||
|
@ -116,7 +116,6 @@ weapons.register_weapon("weapons:smg",
|
||||
mesh = "smg_fp.b3d",
|
||||
range = 1,
|
||||
|
||||
_ammo_bg = "bullet_bg",
|
||||
_kf_name = "SMG",
|
||||
_alt_mode = "weapons:smg_alt",
|
||||
_fov_mult = 0,
|
||||
@ -159,7 +158,6 @@ weapons.register_weapon("weapons:smg",
|
||||
mesh = "smg_alt_fp.b3d",
|
||||
range = 1,
|
||||
|
||||
_ammo_bg = "bullet_bg",
|
||||
_kf_name = "SMG",
|
||||
_alt_mode = "weapons:smg",
|
||||
_fov_mult = 0.8,
|
||||
@ -204,7 +202,6 @@ weapons.register_weapon("weapons:smg",
|
||||
use_texture_alpha = true,
|
||||
range = 1,
|
||||
|
||||
_ammo_bg = "bullet_bg",
|
||||
_kf_name = "SMG",
|
||||
_damage = 8,
|
||||
_mag = 65,
|
||||
|
@ -15,17 +15,16 @@ weapons.register_weapon("weapons:sniper_rifle", true,
|
||||
|
||||
Stats:
|
||||
|
||||
65 Damage.
|
||||
3.76 second reload.
|
||||
85 Damage.
|
||||
5.3 second reload.
|
||||
Unaimed spread +- 25 nodes at maximum range.
|
||||
Aimed spread +- 0 nodes at maximum range.
|
||||
Range 200 nodes.]],
|
||||
Range 250 nodes.]],
|
||||
},
|
||||
|
||||
-- HUD / Visual
|
||||
_tracer = "railgun",
|
||||
_name = "sniper_rifle",
|
||||
_ammo_bg = "rail_bg",
|
||||
_crosshair = "sniper_unaim.png",
|
||||
_crosshair_aim = "railgun_crosshair.png",
|
||||
_fov_mult = 0,
|
||||
@ -46,6 +45,7 @@ Range 200 nodes.]],
|
||||
_speed = 1200,
|
||||
_range = 250,
|
||||
_damage = 85,
|
||||
_headshot_multiplier = 2.5,
|
||||
_movespeed = 0.85,
|
||||
_movespeed_aim = 0.15,
|
||||
_shots_used = shots_used,
|
||||
|
@ -8,7 +8,6 @@ minetest.register_node("weapons:pickaxe", {
|
||||
range = 3,
|
||||
node_placement_prediction = "",
|
||||
|
||||
_ammo_bg = "block_bg",
|
||||
_ammo_type = "blocks",
|
||||
_kf_name = "Pickaxe",
|
||||
_alt_mode = "weapons:pickaxe_alt",
|
||||
@ -99,7 +98,6 @@ minetest.register_node("weapons:flag_red", {
|
||||
node_placement_prediction = "",
|
||||
stack_max = 1,
|
||||
|
||||
_ammo_bg = "flag_bg",
|
||||
_kf_name = "motherfuckin' Red Flag",
|
||||
_fov_mult = 0,
|
||||
_type = "flag",
|
||||
@ -143,7 +141,6 @@ minetest.register_node("weapons:flag_blue", {
|
||||
node_placement_prediction = "",
|
||||
stack_max = 1,
|
||||
|
||||
_ammo_bg = "flag_bg",
|
||||
_kf_name = "motherfuckin' Blue Flag",
|
||||
_fov_mult = 0,
|
||||
_type = "flag",
|
||||
|
@ -129,7 +129,6 @@ Range 200 nodes.]],
|
||||
-- HUD / Visual
|
||||
_tracer = "ar",
|
||||
_name = "veteran_rifle",
|
||||
_ammo_bg = "bullet_bg",
|
||||
_crosshair = "assault_crosshair.png",
|
||||
_crosshair_aim = "railgun_crosshair.png",
|
||||
_fov_mult = 0,
|
||||
|
@ -36,10 +36,9 @@ Tablet / Phone users: good luck.
|
||||
On the experimental development server. Coming soon. Ish.
|
||||
|
||||
## Badges of ~~dis~~Honour:
|
||||
![lines of code](https://img.shields.io/tokei/lines/github/jordach/SolarSail?label=lines%20of%20code%20%28including%203d%20models%29)
|
||||
![number of fucks](https://img.shields.io/github/search/jordach/SolarSail/fuck?label=number%20of%20fucks%20used%20%28including%20this%20one%29)
|
||||
![number of shits](https://img.shields.io/github/search/jordach/SolarSail/shit?label=number%20of%20shits%20used%20%28including%20this%20one%29)
|
||||
![number of cunts](https://img.shields.io/github/search/jordach/SolarSail/cunt?label=number%20of%20cunts%20used%20%28including%20this%20one%29)
|
||||
![number of locals used](https://img.shields.io/github/search/jordach/SolarSail/local?label=number%20of%20locals%20used%20used%20%28including%20this%20one%29)
|
||||
![lines of code](https://img.shields.io/tokei/lines/github/dumpster-studios/BattleForArkhos?label=lines%20of%20code%20%28including%203d%20models%29)
|
||||
![number of fucks](https://img.shields.io/github/search/dumpster-studios/BattleForArkhos/fuck?label=number%20of%20fucks%20used%20%28including%20this%20one%29)
|
||||
![number of shits](https://img.shields.io/github/search/dumpster-studios/BattleForArkhos/shit?label=number%20of%20shits%20used%20%28including%20this%20one%29)
|
||||
![number of cunts](https://img.shields.io/github/search/dumpster-studios/BattleForArkhos/cunt?label=number%20of%20cunts%20used%20%28including%20this%20one%29)
|
||||
|
||||
If you want your own, go to [shields.io](http://shields.io).
|
Loading…
x
Reference in New Issue
Block a user