mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Fix spacepod weapons
I HATE BYOND
This commit is contained in:
@@ -7,39 +7,41 @@
|
|||||||
var/turf/secondloc
|
var/turf/secondloc
|
||||||
if(!my_atom.equipment_system || !my_atom.equipment_system.weapon_system)
|
if(!my_atom.equipment_system || !my_atom.equipment_system.weapon_system)
|
||||||
usr << "<span class='warning'>Missing equipment or weapons.</span>"
|
usr << "<span class='warning'>Missing equipment or weapons.</span>"
|
||||||
my_atom.verbs -= text2path("[type]/proc/fire_weapons")
|
my_atom.verbs -= text2path("[type]/proc/fire_weapon_system")
|
||||||
return
|
return
|
||||||
my_atom.battery.use(shot_cost)
|
my_atom.battery.use(shot_cost)
|
||||||
var/olddir
|
var/olddir
|
||||||
|
dir = my_atom.dir
|
||||||
for(var/i = 0; i < shots_per; i++)
|
for(var/i = 0; i < shots_per; i++)
|
||||||
if(olddir != dir)
|
if(olddir != dir)
|
||||||
switch(dir)
|
switch(dir)
|
||||||
if(NORTH)
|
if(NORTH)
|
||||||
firstloc = get_step(src, NORTH)
|
firstloc = get_turf(my_atom)
|
||||||
|
firstloc = get_step(firstloc, NORTH)
|
||||||
secondloc = get_step(firstloc,EAST)
|
secondloc = get_step(firstloc,EAST)
|
||||||
if(SOUTH)
|
if(SOUTH)
|
||||||
firstloc = get_turf(src)
|
firstloc = get_turf(my_atom)
|
||||||
secondloc = get_step(firstloc,EAST)
|
secondloc = get_step(firstloc,EAST)
|
||||||
if(EAST)
|
if(EAST)
|
||||||
firstloc = get_turf(src)
|
firstloc = get_turf(my_atom)
|
||||||
firstloc = get_step(firstloc, EAST)
|
firstloc = get_step(firstloc, EAST)
|
||||||
secondloc = get_step(firstloc,NORTH)
|
secondloc = get_step(firstloc,NORTH)
|
||||||
if(WEST)
|
if(WEST)
|
||||||
firstloc = get_turf(src)
|
firstloc = get_turf(my_atom)
|
||||||
secondloc = get_step(firstloc,NORTH)
|
secondloc = get_step(firstloc,NORTH)
|
||||||
olddir = dir
|
olddir = dir
|
||||||
var/obj/item/projectile/projone = new projectile_type(firstloc)
|
var/obj/item/projectile/projone = new projectile_type(firstloc)
|
||||||
var/obj/item/projectile/projtwo = new projectile_type(secondloc)
|
var/obj/item/projectile/projtwo = new projectile_type(secondloc)
|
||||||
projone.starting = get_turf(src)
|
projone.starting = get_turf(firstloc)
|
||||||
projone.shot_from = src
|
projone.shot_from = my_atom
|
||||||
projone.firer = usr
|
projone.firer = usr
|
||||||
projone.def_zone = "chest"
|
projone.def_zone = "chest"
|
||||||
projtwo.starting = get_turf(src)
|
projtwo.starting = get_turf(secondloc)
|
||||||
projtwo.shot_from = src
|
projtwo.shot_from = my_atom
|
||||||
projtwo.firer = usr
|
projtwo.firer = usr
|
||||||
projtwo.def_zone = "chest"
|
projtwo.def_zone = "chest"
|
||||||
spawn()
|
spawn(0)
|
||||||
playsound(src, fire_sound, 50, 1)
|
playsound(my_atom, fire_sound, 50, 1)
|
||||||
projone.dumbfire(dir)
|
projone.dumbfire(dir)
|
||||||
projtwo.dumbfire(dir)
|
projtwo.dumbfire(dir)
|
||||||
sleep(1)
|
sleep(1)
|
||||||
@@ -76,7 +78,7 @@
|
|||||||
name = "\improper taser system"
|
name = "\improper taser system"
|
||||||
desc = "A weak taser system for space pods, fires electrodes that shock upon impact."
|
desc = "A weak taser system for space pods, fires electrodes that shock upon impact."
|
||||||
icon_state = "pod_taser"
|
icon_state = "pod_taser"
|
||||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
projectile_type = /obj/item/projectile/energy/electrode
|
||||||
shot_cost = 10
|
shot_cost = 10
|
||||||
fire_sound = "sound/weapons/Taser.ogg"
|
fire_sound = "sound/weapons/Taser.ogg"
|
||||||
|
|
||||||
@@ -85,8 +87,8 @@
|
|||||||
set name = "Fire Taser System"
|
set name = "Fire Taser System"
|
||||||
set desc = "Fire ze tasers!"
|
set desc = "Fire ze tasers!"
|
||||||
set src = usr.loc
|
set src = usr.loc
|
||||||
|
var/obj/spacepod/S = src
|
||||||
src.fire_weapons()
|
S.equipment_system.weapon_system.fire_weapons()
|
||||||
|
|
||||||
/obj/item/device/spacepod_equipment/weaponry/taser/burst
|
/obj/item/device/spacepod_equipment/weaponry/taser/burst
|
||||||
name = "\improper burst taser system"
|
name = "\improper burst taser system"
|
||||||
@@ -95,11 +97,19 @@
|
|||||||
shot_cost = 20
|
shot_cost = 20
|
||||||
shots_per = 3
|
shots_per = 3
|
||||||
|
|
||||||
|
/obj/item/device/spacepod_equipment/weaponry/taser/burst/proc/fire_weapons_system()
|
||||||
|
set category = "Spacepod"
|
||||||
|
set name = "Fire Burst Taser System"
|
||||||
|
set desc = "Fire ze tasers!"
|
||||||
|
set src = usr.loc
|
||||||
|
var/obj/spacepod/S = src
|
||||||
|
S.equipment_system.weapon_system.fire_weapons()
|
||||||
|
|
||||||
/obj/item/device/spacepod_equipment/weaponry/laser
|
/obj/item/device/spacepod_equipment/weaponry/laser
|
||||||
name = "\improper laser system"
|
name = "\improper laser system"
|
||||||
desc = "A weak laser system for space pods, fires concentrated bursts of energy"
|
desc = "A weak laser system for space pods, fires concentrated bursts of energy"
|
||||||
icon_state = "pod_w_laser"
|
icon_state = "pod_w_laser"
|
||||||
projectile_type = "/obj/item/projectile/beam"
|
projectile_type = /obj/item/projectile/beam
|
||||||
shot_cost = 15
|
shot_cost = 15
|
||||||
fire_sound = 'sound/weapons/Laser.ogg'
|
fire_sound = 'sound/weapons/Laser.ogg'
|
||||||
fire_delay = 25
|
fire_delay = 25
|
||||||
@@ -109,5 +119,5 @@
|
|||||||
set name = "Fire Laser System"
|
set name = "Fire Laser System"
|
||||||
set desc = "Fire ze lasers!"
|
set desc = "Fire ze lasers!"
|
||||||
set src = usr.loc
|
set src = usr.loc
|
||||||
|
var/obj/spacepod/S = src
|
||||||
src.fire_weapons()
|
S.equipment_system.weapon_system.fire_weapons()
|
||||||
|
|||||||
@@ -176,6 +176,7 @@
|
|||||||
user << "<span class='notice'>You remove \the [SPE] from the equipment system.</span>"
|
user << "<span class='notice'>You remove \the [SPE] from the equipment system.</span>"
|
||||||
SPE.my_atom = null
|
SPE.my_atom = null
|
||||||
equipment_system.weapon_system = null
|
equipment_system.weapon_system = null
|
||||||
|
verbs -= text2path("[SPE.type]/proc/fire_weapon_system")
|
||||||
else
|
else
|
||||||
user << "<span class='warning'>You need an open hand to do that.</span>"
|
user << "<span class='warning'>You need an open hand to do that.</span>"
|
||||||
/*
|
/*
|
||||||
@@ -474,4 +475,4 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
#undef DAMAGE
|
#undef DAMAGE
|
||||||
#undef FIRE
|
#undef FIRE
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ var/list/beam_master = list()
|
|||||||
var/reference = "\ref[src]" // So we do not have to recalculate it a ton.
|
var/reference = "\ref[src]" // So we do not have to recalculate it a ton.
|
||||||
|
|
||||||
spawn(0)
|
spawn(0)
|
||||||
var/target_dir = src.dir // TODO: remove dir arg.
|
var/target_dir = dir ? dir : src.dir// TODO: remove dir arg. Or don't because the way this was set up without it broke spacepods.
|
||||||
|
|
||||||
while(loc) // Move until we hit something.
|
while(loc) // Move until we hit something.
|
||||||
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
|
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
|
||||||
@@ -388,4 +388,4 @@ var/list/beam_master = list()
|
|||||||
var/mob/living/carbon/human/M = target
|
var/mob/living/carbon/human/M = target
|
||||||
if((istype(M.wear_suit, /obj/item/clothing/suit/bluetag))||(istype(M.wear_suit, /obj/item/clothing/suit/redtag)))
|
if((istype(M.wear_suit, /obj/item/clothing/suit/bluetag))||(istype(M.wear_suit, /obj/item/clothing/suit/redtag)))
|
||||||
M.Weaken(5)
|
M.Weaken(5)
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user