mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 00:53:23 +01:00
Space Pod Weapons Fix and Minor Changes
- [x]Space pods will now fire their weapons properly. - [x]Space pods now have less health (150 for regular pods, 200 for security) - [x]Space pods now have a light that can be toggled on/off. - [x]Security pod now has a regular taser rather than a burst taser by default - [x]Adjusted fire rates and energy costs for space pod weapons - [x]Tasers can fire every 2 seconds at a 250 energy cost. - [x]Lasers can fire every 3 seconds at a 300 energy cost. - [x]Burst tasers can fire every 4 seconds at a 350 energy cost.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
/obj/item/device/spacepod_equipment/weaponry/proc/fire_weapons()
|
||||
|
||||
if(my_atom.next_firetime > world.time)
|
||||
usr << "<span class='warning'>Your weapons are recharging.</span>"
|
||||
return
|
||||
@@ -12,37 +11,39 @@
|
||||
my_atom.battery.use(shot_cost)
|
||||
var/olddir
|
||||
for(var/i = 0; i < shots_per; i++)
|
||||
if(olddir != dir)
|
||||
switch(dir)
|
||||
if(olddir != my_atom.dir)
|
||||
switch(my_atom.dir)
|
||||
if(NORTH)
|
||||
firstloc = get_step(src, NORTH)
|
||||
firstloc = get_step(my_atom, NORTH)
|
||||
firstloc = get_step(firstloc, NORTH)
|
||||
secondloc = get_step(firstloc,EAST)
|
||||
if(SOUTH)
|
||||
firstloc = get_turf(src)
|
||||
firstloc = get_step(my_atom, SOUTH)
|
||||
secondloc = get_step(firstloc,EAST)
|
||||
if(EAST)
|
||||
firstloc = get_turf(src)
|
||||
firstloc = get_step(my_atom, EAST)
|
||||
firstloc = get_step(firstloc, EAST)
|
||||
secondloc = get_step(firstloc,NORTH)
|
||||
if(WEST)
|
||||
firstloc = get_turf(src)
|
||||
firstloc = get_step(my_atom, WEST)
|
||||
secondloc = get_step(firstloc,NORTH)
|
||||
olddir = dir
|
||||
var/obj/item/projectile/projone = new projectile_type(firstloc)
|
||||
var/obj/item/projectile/projtwo = new projectile_type(secondloc)
|
||||
projone.starting = get_turf(src)
|
||||
var/proj_type = text2path(projectile_type)
|
||||
var/obj/item/projectile/projone = new proj_type(firstloc)
|
||||
var/obj/item/projectile/projtwo = new proj_type(secondloc)
|
||||
projone.starting = get_turf(my_atom)
|
||||
projone.shot_from = src
|
||||
projone.firer = usr
|
||||
projone.def_zone = "chest"
|
||||
projtwo.starting = get_turf(src)
|
||||
projtwo.starting = get_turf(my_atom)
|
||||
projtwo.shot_from = src
|
||||
projtwo.firer = usr
|
||||
projtwo.def_zone = "chest"
|
||||
spawn()
|
||||
playsound(src, fire_sound, 50, 1)
|
||||
projone.dumbfire(dir)
|
||||
projtwo.dumbfire(dir)
|
||||
sleep(1)
|
||||
projone.dumbfire(my_atom.dir)
|
||||
projtwo.dumbfire(my_atom.dir)
|
||||
sleep(2)
|
||||
my_atom.next_firetime = world.time + fire_delay
|
||||
|
||||
/datum/spacepod/equipment
|
||||
@@ -70,44 +71,32 @@
|
||||
var/shot_cost = 0
|
||||
var/shots_per = 1
|
||||
var/fire_sound
|
||||
var/fire_delay = 10
|
||||
var/fire_delay = 20
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/taser
|
||||
name = "\improper taser system"
|
||||
desc = "A weak taser system for space pods, fires electrodes that shock upon impact."
|
||||
icon_state = "pod_taser"
|
||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
||||
shot_cost = 10
|
||||
shot_cost = 250
|
||||
fire_sound = "sound/weapons/Taser.ogg"
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/taser/proc/fire_weapon_system()
|
||||
set category = "Spacepod"
|
||||
set name = "Fire Taser System"
|
||||
set desc = "Fire the tasers."
|
||||
set src = usr.loc
|
||||
|
||||
fire_weapons()
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/taser/burst
|
||||
name = "\improper taser system"
|
||||
/obj/item/device/spacepod_equipment/weaponry/burst_taser
|
||||
name = "\improper burst taser system"
|
||||
desc = "A weak taser system for space pods, this one fires 3 at a time."
|
||||
icon_state = "pod_b_taser"
|
||||
shot_cost = 20
|
||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
||||
shot_cost = 350
|
||||
shots_per = 3
|
||||
fire_sound = "sound/weapons/Taser.ogg"
|
||||
fire_delay = 40
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/laser
|
||||
name = "\improper laser system"
|
||||
desc = "A weak laser system for space pods, fires concentrated bursts of energy"
|
||||
icon_state = "pod_w_laser"
|
||||
projectile_type = "/obj/item/projectile/beam"
|
||||
shot_cost = 15
|
||||
shot_cost = 300
|
||||
fire_sound = 'sound/weapons/Laser.ogg'
|
||||
fire_delay = 25
|
||||
fire_delay = 30
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/laser/proc/fire_weapon_system()
|
||||
set category = "Spacepod"
|
||||
set name = "Fire Laser System"
|
||||
set desc = "Fire the lasers."
|
||||
set src = usr.loc
|
||||
|
||||
fire_weapons()
|
||||
@@ -24,7 +24,9 @@
|
||||
var/hatch_open = 0
|
||||
var/next_firetime = 0
|
||||
var/list/pod_overlays
|
||||
var/health = 400
|
||||
var/health = 200
|
||||
var/lights = 0
|
||||
var/lights_power = 6
|
||||
|
||||
/obj/spacepod/New()
|
||||
. = ..()
|
||||
@@ -140,9 +142,6 @@
|
||||
W.loc = equipment_system
|
||||
equipment_system.weapon_system = W
|
||||
equipment_system.weapon_system.my_atom = src
|
||||
var/path = text2path("[W.type]/proc/fire_weapon_system")
|
||||
if(path)
|
||||
verbs += path//obj/spacepod/proc/fire_weapons
|
||||
return
|
||||
|
||||
|
||||
@@ -207,16 +206,14 @@
|
||||
name = "\improper security spacepod"
|
||||
desc = "An armed security spacepod."
|
||||
icon_state = "pod_mil"
|
||||
health = 150
|
||||
|
||||
/obj/spacepod/sec/New()
|
||||
..()
|
||||
var/obj/item/device/spacepod_equipment/weaponry/taser/burst/T = new /obj/item/device/spacepod_equipment/weaponry/taser/burst
|
||||
var/obj/item/device/spacepod_equipment/weaponry/taser/T = new /obj/item/device/spacepod_equipment/weaponry/taser
|
||||
T.loc = equipment_system
|
||||
equipment_system.weapon_system = T
|
||||
equipment_system.weapon_system.my_atom = T
|
||||
var/path = text2path("[T.type]/proc/fire_weapon_system")
|
||||
if(path)
|
||||
verbs += path//obj/spacepod/proc/fire_weapons
|
||||
equipment_system.weapon_system.my_atom = src
|
||||
return
|
||||
|
||||
/obj/spacepod/random/New()
|
||||
@@ -368,12 +365,12 @@
|
||||
src.occupant = null
|
||||
usr << "<span class='notice'>You climb out of the pod</span>"
|
||||
return
|
||||
|
||||
|
||||
/obj/spacepod/verb/toggleDoors()
|
||||
set name = "Toggle Nearby Pod Doors"
|
||||
set category = "Spacepod"
|
||||
set src = usr.loc
|
||||
|
||||
|
||||
for(var/obj/machinery/door/poddoor/P in oview(3,src))
|
||||
if(istype(P, /obj/machinery/door/poddoor/three_tile_hor) || istype(P, /obj/machinery/door/poddoor/three_tile_ver) || istype(P, /obj/machinery/door/poddoor/four_tile_hor) || istype(P, /obj/machinery/door/poddoor/four_tile_ver))
|
||||
var/mob/living/carbon/human/L = usr
|
||||
@@ -384,9 +381,30 @@
|
||||
else
|
||||
P.close()
|
||||
return 1
|
||||
usr << "<span class='warning'>Access denied.</span>"
|
||||
usr << "<span class='warning'>Access denied.</span>"
|
||||
return
|
||||
usr << "<span class='warning'>You are not close to any pod doors.</span>"
|
||||
usr << "<span class='warning'>You are not close to any pod doors.</span>"
|
||||
return
|
||||
|
||||
/obj/spacepod/verb/fireWeapon()
|
||||
set name = "Fire Pod Weapons"
|
||||
set desc = "Fire the weapons."
|
||||
set category = "Spacepod"
|
||||
set src = usr.loc
|
||||
equipment_system.weapon_system.fire_weapons()
|
||||
|
||||
obj/spacepod/verb/toggleLights()
|
||||
set name = "Toggle Lights"
|
||||
set category = "Spacepod"
|
||||
set src = usr.loc
|
||||
if (usr != occupant)
|
||||
return
|
||||
lights = !lights
|
||||
if(lights)
|
||||
SetLuminosity(luminosity + lights_power)
|
||||
else
|
||||
SetLuminosity(luminosity - lights_power)
|
||||
occupant << "Toggled lights [lights?"on":"off"]."
|
||||
return
|
||||
|
||||
/obj/spacepod/proc/enter_after(delay as num, var/mob/user as mob, var/numticks = 5)
|
||||
|
||||
Reference in New Issue
Block a user