Merge pull request #5526 from VOREStation/upstream-merge-6324

[MIRROR] Adds Laser Tag Turrets Plus Changes
This commit is contained in:
Novacat
2019-07-27 16:26:30 -04:00
committed by GitHub
9 changed files with 539 additions and 446 deletions

View File

@@ -87,4 +87,14 @@
contains = list( contains = list(
/obj/item/weapon/storage/box/wormcan, /obj/item/weapon/storage/box/wormcan,
/obj/item/weapon/storage/box/wormcan/deluxe /obj/item/weapon/storage/box/wormcan/deluxe
)
/datum/supply_pack/recreation/ltagturrets
name = "Laser Tag Turrets"
cost = 40
containername = "laser tag turret crate"
containertype = /obj/structure/closet/crate
contains = list(
/obj/machinery/porta_turret/lasertag/blue,
/obj/machinery/porta_turret/lasertag/red
) )

View File

@@ -36,83 +36,73 @@
name = "turret" name = "turret"
catalogue_data = list(/datum/category_item/catalogue/technology/turret) catalogue_data = list(/datum/category_item/catalogue/technology/turret)
icon = 'icons/obj/turrets.dmi' icon = 'icons/obj/turrets.dmi'
icon_state = "turret_cover" icon_state = "turret_cover_normal"
anchored = 1 anchored = TRUE
density = 0 density = FALSE
use_power = 1 //this turret uses and requires power use_power = TRUE //this turret uses and requires power
idle_power_usage = 50 //when inactive, this turret takes up constant 50 Equipment power idle_power_usage = 50 //when inactive, this turret takes up constant 50 Equipment power
active_power_usage = 300 //when active, this turret takes up constant 300 Equipment power active_power_usage = 300 //when active, this turret takes up constant 300 Equipment power
power_channel = EQUIP //drains power from the EQUIPMENT channel power_channel = EQUIP //drains power from the EQUIPMENT channel
req_one_access = list(access_security, access_heads) req_one_access = list(access_security, access_heads)
// icon_states for turrets. var/raised = FALSE //if the turret cover is "open" and the turret is raised
// These are for the turret covers. var/raising= FALSE //if the turret is currently opening or closing its cover
var/closed_state = "turret_cover" // For when it is closed. var/health = 80 //the turret's health
var/raising_state = "popup" // When turret is opening. var/maxhealth = 80 //turrets maximal health.
var/opened_state = "open" // When fully opened. var/auto_repair = FALSE //if 1 the turret slowly repairs itself.
var/lowering_state = "popdown" // When closing. var/locked = TRUE //if the turret's behaviour control access is locked
var/gun_active_state = "target_prism" // The actual gun's icon_state when active. var/controllock = FALSE //if the turret responds to control panels
var/gun_disabled_state = "grey_target_prism" // Gun sprite when depowered/disabled.
var/gun_destroyed_state = "destroyed_target_prism" // Turret sprite for when the turret dies.
var/raised = 0 //if the turret cover is "open" and the turret is raised
var/raising= 0 //if the turret is currently opening or closing its cover
var/health = 80 //the turret's health
var/maxhealth = 80 //turrets maximal health.
var/auto_repair = 0 //if 1 the turret slowly repairs itself.
var/locked = 1 //if the turret's behaviour control access is locked
var/controllock = 0 //if the turret responds to control panels
var/installation = /obj/item/weapon/gun/energy/gun //the type of weapon installed var/installation = /obj/item/weapon/gun/energy/gun //the type of weapon installed
var/gun_charge = 0 //the charge of the gun inserted var/gun_charge = 0 //the charge of the gun inserted
var/projectile = null //holder for bullettype var/projectile = null //holder for bullettype
var/eprojectile = null //holder for the shot when emagged var/lethal_projectile = null //holder for the shot when emagged
var/reqpower = 500 //holder for power needed var/reqpower = 500 //holder for power needed
var/iconholder = null //holder for the icon_state. 1 for sprite based on icon_color, null for blue. var/turret_type = "normal"
var/icon_color = "orange" // When iconholder is set to 1, the icon_state changes based on what is in this variable. var/icon_color = "blue"
var/egun = null //holder to handle certain guns switching bullettypes var/lethal_icon_color = "blue"
var/last_fired = 0 //1: if the turret is cooling down from a shot, 0: turret is ready to fire var/last_fired = FALSE //TRUE: if the turret is cooling down from a shot, FALSE: turret is ready to fire
var/shot_delay = 1.5 SECONDS //1.5 seconds between each shot var/shot_delay = 1.5 SECONDS //1.5 seconds between each shot
var/check_arrest = 1 //checks if the perp is set to arrest var/check_arrest = TRUE //checks if the perp is set to arrest
var/check_records = 1 //checks if a security record exists at all var/check_records = TRUE //checks if a security record exists at all
var/check_weapons = 0 //checks if it can shoot people that have a weapon they aren't authorized to have var/check_weapons = FALSE //checks if it can shoot people that have a weapon they aren't authorized to have
var/check_access = 1 //if this is active, the turret shoots everything that does not meet the access requirements var/check_access = TRUE //if this is active, the turret shoots everything that does not meet the access requirements
var/check_anomalies = 1 //checks if it can shoot at unidentified lifeforms (ie xenos) var/check_anomalies = TRUE //checks if it can shoot at unidentified lifeforms (ie xenos)
var/check_synth = 0 //if active, will shoot at anything not an AI or cyborg var/check_synth = FALSE //if active, will shoot at anything not an AI or cyborg
var/check_all = 0 //If active, will fire on anything, including synthetics. var/check_all = FALSE //If active, will fire on anything, including synthetics.
var/ailock = 0 // AI cannot use this var/ailock = FALSE // AI cannot use this
var/faction = null //if set, will not fire at people in the same faction for any reason. var/faction = null //if set, will not fire at people in the same faction for any reason.
var/attacked = 0 //if set to 1, the turret gets pissed off and shoots at people nearby (unless they have sec access!) var/attacked = FALSE //if set to TRUE, the turret gets pissed off and shoots at people nearby (unless they have sec access!)
var/enabled = 1 //determines if the turret is on var/enabled = TRUE //determines if the turret is on
var/lethal = 0 //whether in lethal or stun mode var/lethal = FALSE //whether in lethal or stun mode
var/disabled = 0 var/disabled = FALSE
var/shot_sound //what sound should play when the turret fires var/shot_sound //what sound should play when the turret fires
var/eshot_sound //what sound should play when the emagged turret fires var/lethal_shot_sound //what sound should play when the emagged turret fires
var/datum/effect/effect/system/spark_spread/spark_system //the spark system, used for generating... sparks? var/datum/effect/effect/system/spark_spread/spark_system //the spark system, used for generating... sparks?
var/wrenching = 0 var/wrenching = FALSE
var/last_target //last target fired at, prevents turrets from erratically firing at all valid targets in range var/last_target //last target fired at, prevents turrets from erratically firing at all valid targets in range
var/timeout = 10 // When a turret pops up, then finds nothing to shoot at, this number decrements until 0, when it pops down. var/timeout = 10 // When a turret pops up, then finds nothing to shoot at, this number decrements until 0, when it pops down.
var/can_salvage = TRUE // If false, salvaging doesn't give you anything. var/can_salvage = TRUE // If false, salvaging doesn't give you anything.
/obj/machinery/porta_turret/crescent /obj/machinery/porta_turret/crescent
req_one_access = list(access_cent_specops) req_one_access = list(access_cent_specops)
enabled = 0 enabled = FALSE
ailock = 1 ailock = TRUE
check_synth = 0 check_synth = FALSE
check_access = 1 check_access = TRUE
check_arrest = 1 check_arrest = TRUE
check_records = 1 check_records = TRUE
check_weapons = 1 check_weapons = TRUE
check_anomalies = 1 check_anomalies = TRUE
check_all = 0 check_all = FALSE
/obj/machinery/porta_turret/can_catalogue(mob/user) // Dead turrets can't be scanned. /obj/machinery/porta_turret/can_catalogue(mob/user) // Dead turrets can't be scanned.
if(stat & BROKEN) if(stat & BROKEN)
@@ -121,8 +111,8 @@
return ..() return ..()
/obj/machinery/porta_turret/stationary /obj/machinery/porta_turret/stationary
ailock = 1 ailock = TRUE
lethal = 1 lethal = TRUE
installation = /obj/item/weapon/gun/energy/laser installation = /obj/item/weapon/gun/energy/laser
/obj/machinery/porta_turret/stationary/syndie // Generic turrets for POIs that need to not shoot their buddies. /obj/machinery/porta_turret/stationary/syndie // Generic turrets for POIs that need to not shoot their buddies.
@@ -155,7 +145,7 @@
name = "interior anti-boarding turret" name = "interior anti-boarding turret"
desc = "A very tough looking turret made by alien hands." desc = "A very tough looking turret made by alien hands."
catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_turret) catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_turret)
icon_state = "alien_turret_cover" icon_state = "turret_cover_alien"
req_one_access = list(access_alien) req_one_access = list(access_alien)
installation = /obj/item/weapon/gun/energy/alien installation = /obj/item/weapon/gun/energy/alien
enabled = TRUE enabled = TRUE
@@ -164,19 +154,12 @@
check_all = TRUE check_all = TRUE
health = 250 // Similar to the AI turrets. health = 250 // Similar to the AI turrets.
maxhealth = 250 maxhealth = 250
turret_type = "alien"
closed_state = "alien_turret_cover"
raising_state = "alien_popup"
opened_state = "alien_open"
lowering_state = "alien_popdown"
gun_active_state = "alien_gun"
gun_disabled_state = "alien_gun_disabled"
gun_destroyed_state = "alien_gun_destroyed"
/obj/machinery/porta_turret/alien/destroyed // Turrets that are already dead, to act as a warning of what the rest of the submap contains. /obj/machinery/porta_turret/alien/destroyed // Turrets that are already dead, to act as a warning of what the rest of the submap contains.
name = "broken interior anti-boarding turret" name = "broken interior anti-boarding turret"
desc = "A very tough looking turret made by alien hands. This one looks destroyed, thankfully." desc = "A very tough looking turret made by alien hands. This one looks destroyed, thankfully."
icon_state = "alien_gun_destroyed" icon_state = "destroyed_target_prism_alien"
stat = BROKEN stat = BROKEN
can_salvage = FALSE // So you need to actually kill a turret to get the alien gun. can_salvage = FALSE // So you need to actually kill a turret to get the alien gun.
@@ -184,18 +167,11 @@
name = "industrial turret" name = "industrial turret"
desc = "This variant appears to be much more rugged." desc = "This variant appears to be much more rugged."
req_one_access = list(access_heads) req_one_access = list(access_heads)
icon_state = "turret_cover_industrial"
installation = /obj/item/weapon/gun/energy/phasegun installation = /obj/item/weapon/gun/energy/phasegun
health = 200 health = 200
maxhealth = 200 maxhealth = 200
turret_type = "industrial"
icon_state = "turret_cover_industrial"
closed_state = "turret_cover_industrial"
raising_state = "popup_industrial"
opened_state = "open_industrial"
lowering_state = "popdown_industrial"
gun_active_state = "target_prism_industrial"
gun_disabled_state = "grey_target_prism_industrial"
gun_destroyed_state = "destroyed_target_prism_industrial"
/obj/machinery/porta_turret/industrial/bullet_act(obj/item/projectile/Proj) /obj/machinery/porta_turret/industrial/bullet_act(obj/item/projectile/Proj)
var/damage = round(Proj.get_structure_damage() * 1.33) var/damage = round(Proj.get_structure_damage() * 1.33)
@@ -205,10 +181,10 @@
if(enabled) if(enabled)
if(!attacked && !emagged) if(!attacked && !emagged)
attacked = 1 attacked = TRUE
spawn() spawn()
sleep(60) sleep(60)
attacked = 0 attacked = FALSE
take_damage(damage) take_damage(damage)
@@ -230,6 +206,97 @@
check_all = TRUE check_all = TRUE
can_salvage = FALSE // So you can't just twoshot a turret and get a fancy gun can_salvage = FALSE // So you can't just twoshot a turret and get a fancy gun
/obj/machinery/porta_turret/lasertag
name = "lasertag turret"
turret_type = "normal"
req_one_access = list()
installation = /obj/item/weapon/gun/energy/lasertag/omni
locked = FALSE
enabled = FALSE
anchored = FALSE
//These two are used for lasertag
check_synth = FALSE
check_weapons = FALSE
//These vars aren't used
check_access = FALSE
check_arrest = FALSE
check_records = FALSE
check_anomalies = FALSE
check_all = FALSE
/obj/machinery/porta_turret/lasertag/red
turret_type = "red"
installation = /obj/item/weapon/gun/energy/lasertag/red
check_weapons = TRUE // Used to target blue players
/obj/machinery/porta_turret/lasertag/blue
turret_type = "blue"
installation = /obj/item/weapon/gun/energy/lasertag/blue
check_synth = TRUE // Used to target red players
/obj/machinery/porta_turret/lasertag/assess_living(var/mob/living/L)
if(!ishuman(L))
return TURRET_NOT_TARGET
if(L.invisibility >= INVISIBILITY_LEVEL_ONE) // Cannot see him. see_invisible is a mob-var
return TURRET_NOT_TARGET
if(get_dist(src, L) > 7) //if it's too far away, why bother?
return TURRET_NOT_TARGET
if(!(L in check_trajectory(L, src))) //check if we have true line of sight
return TURRET_NOT_TARGET
if(L.lying) //Don't need to stun-lock the players
return TURRET_NOT_TARGET
if(ishuman(L))
var/mob/living/carbon/human/M = L
if(istype(M.wear_suit, /obj/item/clothing/suit/redtag) && check_synth) // Checks if they are a red player
return TURRET_PRIORITY_TARGET
if(istype(M.wear_suit, /obj/item/clothing/suit/bluetag) && check_weapons) // Checks if they are a blue player
return TURRET_PRIORITY_TARGET
/obj/machinery/porta_turret/lasertag/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]
data["access"] = !isLocked(user)
data["locked"] = locked
data["enabled"] = enabled
data["is_lethal"] = 1
data["lethal"] = lethal
if(data["access"])
var/settings[0]
settings[++settings.len] = list("category" = "Target Red", "setting" = "check_synth", "value" = check_synth) // Could not get the UI to work with new vars specifically for lasertag turrets -Nalarac
settings[++settings.len] = list("category" = "Target Blue", "setting" = "check_weapons", "value" = check_weapons) // So I'm using these variables since they don't do anything else in this case
data["settings"] = settings
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
/obj/machinery/porta_turret/lasertag/Topic(href, href_list)
if(..())
return 1
if(href_list["command"] && href_list["value"])
var/value = text2num(href_list["value"])
if(href_list["command"] == "enable")
enabled = value
else if(href_list["command"] == "lethal")
lethal = value
else if(href_list["command"] == "check_synth")
check_synth = value
else if(href_list["command"] == "check_weapons")
check_weapons = value
return 1
/obj/machinery/porta_turret/Initialize() /obj/machinery/porta_turret/Initialize()
//Sets up a spark system //Sets up a spark system
spark_system = new /datum/effect/effect/system/spark_spread spark_system = new /datum/effect/effect/system/spark_spread
@@ -239,7 +306,7 @@
setup() setup()
// If turrets ever switch overlays, this will need to be cached and reapplied each time overlays_cut() is called. // If turrets ever switch overlays, this will need to be cached and reapplied each time overlays_cut() is called.
var/image/turret_opened_overlay = image(icon, opened_state) var/image/turret_opened_overlay = image(icon, "open_[turret_type]")
turret_opened_overlay.layer = layer-0.1 turret_opened_overlay.layer = layer-0.1
add_overlay(turret_opened_overlay) add_overlay(turret_opened_overlay)
return ..() return ..()
@@ -251,99 +318,85 @@
/obj/machinery/porta_turret/update_icon() /obj/machinery/porta_turret/update_icon()
if(stat & BROKEN) // Turret is dead. if(stat & BROKEN) // Turret is dead.
icon_state = gun_destroyed_state icon_state = "destroyed_target_prism_[turret_type]"
else if(raised || raising) else if(raised || raising)
// Turret is open. // Turret is open.
if(powered() && enabled) if(powered() && enabled)
// Trying to shoot someone. // Trying to shoot someone.
icon_state = gun_active_state if(lethal)
icon_state = "[lethal_icon_color]_target_prism_[turret_type]"
else
icon_state = "[icon_color]_target_prism_[turret_type]"
else else
// Disabled. // Disabled.
icon_state = gun_disabled_state icon_state = "grey_target_prism_[turret_type]"
else else
// Its closed. // Its closed.
icon_state = closed_state icon_state = "turret_cover_[turret_type]"
/obj/machinery/porta_turret/proc/setup() /obj/machinery/porta_turret/proc/setup()
var/obj/item/weapon/gun/energy/E = installation //All energy-based weapons are applicable var/obj/item/weapon/gun/energy/E = installation //All energy-based weapons are applicable
var/obj/item/projectile/P = initial(E.projectile_type)
//var/obj/item/ammo_casing/shottype = E.projectile_type //var/obj/item/ammo_casing/shottype = E.projectile_type
projectile = initial(E.projectile_type) projectile = P
eprojectile = projectile lethal_projectile = projectile
shot_sound = initial(E.fire_sound) shot_sound = initial(P.fire_sound)
eshot_sound = shot_sound lethal_shot_sound = shot_sound
if(istype(P, /obj/item/projectile/energy))
icon_color = "orange"
else if(istype(P, /obj/item/projectile/beam/stun))
icon_color = "blue"
else if(istype(P, /obj/item/projectile/beam/lasertag))
icon_color = "blue"
else if(istype(P, /obj/item/projectile/beam))
icon_color = "red"
else
icon_color = "blue"
lethal_icon_color = icon_color
weapon_setup(installation) weapon_setup(installation)
/obj/machinery/porta_turret/proc/weapon_setup(var/guntype) /obj/machinery/porta_turret/proc/weapon_setup(var/guntype)
switch(guntype) switch(guntype)
if(/obj/item/weapon/gun/energy/laser/practice)
iconholder = 1
eprojectile = /obj/item/projectile/beam
// if(/obj/item/weapon/gun/energy/laser/practice/sc_laser)
// iconholder = 1
// eprojectile = /obj/item/projectile/beam
if(/obj/item/weapon/gun/energy/gun/burst) if(/obj/item/weapon/gun/energy/gun/burst)
iconholder = 1 lethal_icon_color = "red"
eprojectile = /obj/item/projectile/beam/burstlaser lethal_projectile = /obj/item/projectile/beam/burstlaser
eshot_sound = 'sound/weapons/Laser.ogg' lethal_shot_sound = 'sound/weapons/Laser.ogg'
icon_color = "red"
projectile = /obj/item/projectile/beam/stun/weak
shot_sound = 'sound/weapons/Taser.ogg'
shot_delay = 1 SECOND shot_delay = 1 SECOND
if(/obj/item/weapon/gun/energy/phasegun) if(/obj/item/weapon/gun/energy/phasegun)
iconholder = 1
eprojectile = /obj/item/projectile/energy/phase/heavy
eshot_sound = 'sound/weapons/gunshot_pathetic.ogg'
icon_color = "orange" icon_color = "orange"
projectile = /obj/item/projectile/energy/phase lethal_icon_color = "orange"
shot_sound = 'sound/weapons/gunshot_pathetic.ogg' lethal_projectile = /obj/item/projectile/energy/phase/heavy
shot_delay = 1 SECOND shot_delay = 1 SECOND
if(/obj/item/weapon/gun/energy/retro)
iconholder = 1
// if(/obj/item/weapon/gun/energy/retro/sc_retro)
// iconholder = 1
if(/obj/item/weapon/gun/energy/captain)
iconholder = 1
if(/obj/item/weapon/gun/energy/lasercannon)
iconholder = 1
if(/obj/item/weapon/gun/energy/taser)
eprojectile = /obj/item/projectile/beam
eshot_sound = 'sound/weapons/Laser.ogg'
if(/obj/item/weapon/gun/energy/stunrevolver)
eprojectile = /obj/item/projectile/beam
eshot_sound = 'sound/weapons/Laser.ogg'
if(/obj/item/weapon/gun/energy/gun) if(/obj/item/weapon/gun/energy/gun)
eprojectile = /obj/item/projectile/beam //If it has, going to kill mode lethal_icon_color = "red"
eshot_sound = 'sound/weapons/Laser.ogg' lethal_projectile = /obj/item/projectile/beam //If it has, going to kill mode
egun = 1 lethal_shot_sound = 'sound/weapons/Laser.ogg'
if(/obj/item/weapon/gun/energy/gun/nuclear) if(/obj/item/weapon/gun/energy/gun/nuclear)
eprojectile = /obj/item/projectile/beam //If it has, going to kill mode lethal_icon_color = "red"
eshot_sound = 'sound/weapons/Laser.ogg' lethal_projectile = /obj/item/projectile/beam //If it has, going to kill mode
egun = 1 lethal_shot_sound = 'sound/weapons/Laser.ogg'
if(/obj/item/weapon/gun/energy/xray) if(/obj/item/weapon/gun/energy/xray)
eprojectile = /obj/item/projectile/beam/xray lethal_icon_color = "green"
lethal_projectile = /obj/item/projectile/beam/xray
projectile = /obj/item/projectile/beam/stun // Otherwise we fire xrays on both modes. projectile = /obj/item/projectile/beam/stun // Otherwise we fire xrays on both modes.
eshot_sound = 'sound/weapons/eluger.ogg' lethal_shot_sound = 'sound/weapons/eluger.ogg'
shot_sound = 'sound/weapons/Taser.ogg' shot_sound = 'sound/weapons/Taser.ogg'
iconholder = 1
icon_color = "green"
/obj/machinery/porta_turret/proc/isLocked(mob/user) /obj/machinery/porta_turret/proc/isLocked(mob/user)
if(ailock && issilicon(user)) if(ailock && issilicon(user))
@@ -486,20 +539,20 @@
"<span class='notice'>You begin [anchored ? "un" : ""]securing the turret.</span>" \ "<span class='notice'>You begin [anchored ? "un" : ""]securing the turret.</span>" \
) )
wrenching = 1 wrenching = TRUE
if(do_after(user, 50 * I.toolspeed)) if(do_after(user, 50 * I.toolspeed))
//This code handles moving the turret around. After all, it's a portable turret! //This code handles moving the turret around. After all, it's a portable turret!
if(!anchored) if(!anchored)
playsound(loc, I.usesound, 100, 1) playsound(loc, I.usesound, 100, 1)
anchored = 1 anchored = TRUE
update_icon() update_icon()
to_chat(user, "<span class='notice'>You secure the exterior bolts on the turret.</span>") to_chat(user, "<span class='notice'>You secure the exterior bolts on the turret.</span>")
else if(anchored) else if(anchored)
playsound(loc, I.usesound, 100, 1) playsound(loc, I.usesound, 100, 1)
anchored = 0 anchored = FALSE
to_chat(user, "<span class='notice'>You unsecure the exterior bolts on the turret.</span>") to_chat(user, "<span class='notice'>You unsecure the exterior bolts on the turret.</span>")
update_icon() update_icon()
wrenching = 0 wrenching = FALSE
else if(istype(I, /obj/item/weapon/card/id)||istype(I, /obj/item/device/pda)) else if(istype(I, /obj/item/weapon/card/id)||istype(I, /obj/item/device/pda))
//Behavior lock/unlock mangement //Behavior lock/unlock mangement
@@ -540,12 +593,11 @@
//the turret shoot much, much faster. //the turret shoot much, much faster.
to_chat(user, "<span class='warning'>You short out [src]'s threat assessment circuits.</span>") to_chat(user, "<span class='warning'>You short out [src]'s threat assessment circuits.</span>")
visible_message("[src] hums oddly...") visible_message("[src] hums oddly...")
emagged = 1 emagged = TRUE
iconholder = 1 controllock = TRUE
controllock = 1 enabled = FALSE //turns off the turret temporarily
enabled = 0 //turns off the turret temporarily
sleep(60) //6 seconds for the traitor to gtfo of the area before the turret decides to ruin his shit sleep(60) //6 seconds for the traitor to gtfo of the area before the turret decides to ruin his shit
enabled = 1 //turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here enabled = TRUE //turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here
return 1 return 1
/obj/machinery/porta_turret/proc/take_damage(var/force) /obj/machinery/porta_turret/proc/take_damage(var/force)
@@ -571,7 +623,7 @@
attacked = 1 attacked = 1
spawn() spawn()
sleep(60) sleep(60)
attacked = 0 attacked = FALSE
..() ..()
@@ -587,12 +639,12 @@
check_access = prob(20) // check_access is a pretty big deal, so it's least likely to get turned on check_access = prob(20) // check_access is a pretty big deal, so it's least likely to get turned on
check_anomalies = prob(50) check_anomalies = prob(50)
if(prob(5)) if(prob(5))
emagged = 1 emagged = TRUE
enabled=0 enabled=0
spawn(rand(60,600)) spawn(rand(60,600))
if(!enabled) if(!enabled)
enabled=1 enabled = TRUE
..() ..()
@@ -677,7 +729,7 @@
if(faction && L.faction == faction) if(faction && L.faction == faction)
return TURRET_NOT_TARGET return TURRET_NOT_TARGET
if(!emagged && issilicon(L) && check_all == 0) // Don't target silica, unless told to neutralize everything. if(!emagged && issilicon(L) && check_all == FALSE) // Don't target silica, unless told to neutralize everything.
return TURRET_NOT_TARGET return TURRET_NOT_TARGET
if(L.stat && !emagged) //if the perp is dead/dying, no need to bother really if(L.stat && !emagged) //if the perp is dead/dying, no need to bother really
@@ -703,7 +755,7 @@
if(iscuffed(L)) // If the target is handcuffed, leave it alone if(iscuffed(L)) // If the target is handcuffed, leave it alone
return TURRET_NOT_TARGET return TURRET_NOT_TARGET
if(isanimal(L) || issmall(L)) // Animals are not so dangerous if(isanimal(L)) // Animals are not so dangerous
return check_anomalies ? TURRET_SECONDARY_TARGET : TURRET_NOT_TARGET return check_anomalies ? TURRET_SECONDARY_TARGET : TURRET_NOT_TARGET
if(isxenomorph(L) || isalien(L)) // Xenos are dangerous if(isxenomorph(L) || isalien(L)) // Xenos are dangerous
@@ -750,7 +802,7 @@
var/atom/flick_holder = new /atom/movable/porta_turret_cover(loc) var/atom/flick_holder = new /atom/movable/porta_turret_cover(loc)
flick_holder.layer = layer + 0.1 flick_holder.layer = layer + 0.1
flick(raising_state, flick_holder) flick("popup_[turret_type]", flick_holder)
sleep(10) sleep(10)
qdel(flick_holder) qdel(flick_holder)
@@ -771,7 +823,7 @@
var/atom/flick_holder = new /atom/movable/porta_turret_cover(loc) var/atom/flick_holder = new /atom/movable/porta_turret_cover(loc)
flick_holder.layer = layer + 0.1 flick_holder.layer = layer + 0.1
flick(lowering_state, flick_holder) flick("popdown_[turret_type]", flick_holder)
sleep(10) sleep(10)
qdel(flick_holder) qdel(flick_holder)
@@ -802,10 +854,10 @@
if(!(emagged || attacked)) //if it hasn't been emagged or attacked, it has to obey a cooldown rate if(!(emagged || attacked)) //if it hasn't been emagged or attacked, it has to obey a cooldown rate
if(last_fired || !raised) //prevents rapid-fire shooting, unless it's been emagged if(last_fired || !raised) //prevents rapid-fire shooting, unless it's been emagged
return return
last_fired = 1 last_fired = TRUE
spawn() spawn()
sleep(shot_delay) sleep(shot_delay)
last_fired = 0 last_fired = FALSE
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
var/turf/U = get_turf(target) var/turf/U = get_turf(target)
@@ -818,8 +870,8 @@
update_icon() update_icon()
var/obj/item/projectile/A var/obj/item/projectile/A
if(emagged || lethal) if(emagged || lethal)
A = new eprojectile(loc) A = new lethal_projectile(loc)
playsound(loc, eshot_sound, 75, 1) playsound(loc, lethal_shot_sound, 75, 1)
else else
A = new projectile(loc) A = new projectile(loc)
playsound(loc, shot_sound, 75, 1) playsound(loc, shot_sound, 75, 1)
@@ -862,7 +914,6 @@
return return
enabled = TC.enabled enabled = TC.enabled
lethal = TC.lethal lethal = TC.lethal
iconholder = TC.lethal
check_synth = TC.check_synth check_synth = TC.check_synth
check_access = TC.check_access check_access = TC.check_access
@@ -898,7 +949,7 @@
if(I.is_wrench() && !anchored) if(I.is_wrench() && !anchored)
playsound(loc, I.usesound, 100, 1) playsound(loc, I.usesound, 100, 1)
to_chat(user, "<span class='notice'>You secure the external bolts.</span>") to_chat(user, "<span class='notice'>You secure the external bolts.</span>")
anchored = 1 anchored = TRUE
build_step = 1 build_step = 1
return return
@@ -923,7 +974,7 @@
else if(I.is_wrench()) else if(I.is_wrench())
playsound(loc, I.usesound, 75, 1) playsound(loc, I.usesound, 75, 1)
to_chat(user, "<span class='notice'>You unfasten the external bolts.</span>") to_chat(user, "<span class='notice'>You unfasten the external bolts.</span>")
anchored = 0 anchored = FALSE
build_step = 0 build_step = 0
return return

View File

@@ -693,7 +693,7 @@
if (istype(in_chamber)) if (istype(in_chamber))
user.visible_message("<span class = 'warning'>[user] pulls the trigger.</span>") user.visible_message("<span class = 'warning'>[user] pulls the trigger.</span>")
play_fire_sound() play_fire_sound()
if(istype(in_chamber, /obj/item/projectile/beam/lastertag)) if(istype(in_chamber, /obj/item/projectile/beam/lasertag))
user.show_message("<span class = 'warning'>You feel rather silly, trying to commit suicide with a toy.</span>") user.show_message("<span class = 'warning'>You feel rather silly, trying to commit suicide with a toy.</span>")
mouthshoot = 0 mouthshoot = 0
return return

View File

@@ -1,261 +1,261 @@
/obj/item/weapon/gun/energy/laser /obj/item/weapon/gun/energy/laser
name = "laser rifle" name = "laser rifle"
desc = "A Hephaestus Industries G40E rifle, designed to kill with concentrated energy blasts. This variant has the ability to \ desc = "A Hephaestus Industries G40E rifle, designed to kill with concentrated energy blasts. This variant has the ability to \
switch between standard fire and a more efficent but weaker 'suppressive' fire." switch between standard fire and a more efficent but weaker 'suppressive' fire."
icon_state = "laser" icon_state = "laser"
item_state = "laser" item_state = "laser"
wielded_item_state = "laser-wielded" wielded_item_state = "laser-wielded"
fire_delay = 8 fire_delay = 8
slot_flags = SLOT_BELT|SLOT_BACK slot_flags = SLOT_BELT|SLOT_BACK
w_class = ITEMSIZE_LARGE w_class = ITEMSIZE_LARGE
force = 10 force = 10
origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 2) origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 2)
matter = list(DEFAULT_WALL_MATERIAL = 2000) matter = list(DEFAULT_WALL_MATERIAL = 2000)
projectile_type = /obj/item/projectile/beam/midlaser projectile_type = /obj/item/projectile/beam/midlaser
// one_handed_penalty = 30 // one_handed_penalty = 30
firemodes = list( firemodes = list(
list(mode_name="normal", fire_delay=8, projectile_type=/obj/item/projectile/beam/midlaser, charge_cost = 240), list(mode_name="normal", fire_delay=8, projectile_type=/obj/item/projectile/beam/midlaser, charge_cost = 240),
list(mode_name="suppressive", fire_delay=5, projectile_type=/obj/item/projectile/beam/weaklaser, charge_cost = 60), list(mode_name="suppressive", fire_delay=5, projectile_type=/obj/item/projectile/beam/weaklaser, charge_cost = 60),
) )
/obj/item/weapon/gun/energy/laser/mounted /obj/item/weapon/gun/energy/laser/mounted
self_recharge = 1 self_recharge = 1
use_external_power = 1 use_external_power = 1
one_handed_penalty = 0 // Not sure if two-handing gets checked for mounted weapons, but better safe than sorry. one_handed_penalty = 0 // Not sure if two-handing gets checked for mounted weapons, but better safe than sorry.
/obj/item/weapon/gun/energy/laser/practice /obj/item/weapon/gun/energy/laser/practice
name = "practice laser carbine" name = "practice laser carbine"
desc = "A modified version of the HI G40E, this one fires less concentrated energy bolts designed for target practice." desc = "A modified version of the HI G40E, this one fires less concentrated energy bolts designed for target practice."
projectile_type = /obj/item/projectile/beam/practice projectile_type = /obj/item/projectile/beam/practice
charge_cost = 48 charge_cost = 48
cell_type = /obj/item/weapon/cell/device cell_type = /obj/item/weapon/cell/device
firemodes = list( firemodes = list(
list(mode_name="normal", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 48), list(mode_name="normal", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 48),
list(mode_name="suppressive", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 12), list(mode_name="suppressive", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 12),
) )
/obj/item/weapon/gun/energy/retro /obj/item/weapon/gun/energy/retro
name = "retro laser" name = "retro laser"
icon_state = "retro" icon_state = "retro"
item_state = "retro" item_state = "retro"
desc = "An older model of the basic lasergun. Nevertheless, it is still quite deadly and easy to maintain, making it a favorite amongst pirates and other outlaws." desc = "An older model of the basic lasergun. Nevertheless, it is still quite deadly and easy to maintain, making it a favorite amongst pirates and other outlaws."
slot_flags = SLOT_BELT slot_flags = SLOT_BELT
w_class = ITEMSIZE_NORMAL w_class = ITEMSIZE_NORMAL
projectile_type = /obj/item/projectile/beam projectile_type = /obj/item/projectile/beam
fire_delay = 10 //old technology fire_delay = 10 //old technology
/obj/item/weapon/gun/energy/retro/mounted /obj/item/weapon/gun/energy/retro/mounted
self_recharge = 1 self_recharge = 1
use_external_power = 1 use_external_power = 1
/obj/item/weapon/gun/energy/retro/empty /obj/item/weapon/gun/energy/retro/empty
icon_state = "retro" icon_state = "retro"
cell_type = null cell_type = null
/datum/category_item/catalogue/anomalous/precursor_a/alien_pistol /datum/category_item/catalogue/anomalous/precursor_a/alien_pistol
name = "Precursor Alpha Weapon - Appendageheld Laser" name = "Precursor Alpha Weapon - Appendageheld Laser"
desc = "This object strongly resembles a weapon, and if one were to pull the \ desc = "This object strongly resembles a weapon, and if one were to pull the \
trigger located on the handle of the object, it would fire a deadly \ trigger located on the handle of the object, it would fire a deadly \
laser at whatever it was pointed at. The beam fired appears to cause too \ laser at whatever it was pointed at. The beam fired appears to cause too \
much damage to whatever it would hit to have served as a long ranged repair tool, \ much damage to whatever it would hit to have served as a long ranged repair tool, \
therefore this object was most likely designed to be a deadly weapon. If so, this \ therefore this object was most likely designed to be a deadly weapon. If so, this \
has several implications towards its creators;\ has several implications towards its creators;\
<br><br>\ <br><br>\
Firstly, it implies that these precursors, at some point during their development, \ Firstly, it implies that these precursors, at some point during their development, \
had needed to defend themselves, or otherwise had a need to utilize violence, and \ had needed to defend themselves, or otherwise had a need to utilize violence, and \
as such created better tools to do so. It is unclear if violence was employed against \ as such created better tools to do so. It is unclear if violence was employed against \
themselves as a form of in-fighting, or if violence was exclusive to outside species.\ themselves as a form of in-fighting, or if violence was exclusive to outside species.\
<br><br>\ <br><br>\
Secondly, the shape and design of the weapon implies that the creators of this \ Secondly, the shape and design of the weapon implies that the creators of this \
weapon were able to grasp objects, and be able to manipulate the trigger independently \ weapon were able to grasp objects, and be able to manipulate the trigger independently \
from merely holding onto the weapon, making certain types of appendages like tentacles be \ from merely holding onto the weapon, making certain types of appendages like tentacles be \
unlikely.\ unlikely.\
<br><br>\ <br><br>\
An interesting note about this weapon, when compared to contemporary energy weapons, is \ An interesting note about this weapon, when compared to contemporary energy weapons, is \
that this gun appears to be inferior to modern laser weapons. The beam fired has less \ that this gun appears to be inferior to modern laser weapons. The beam fired has less \
of an ability to harm, and the power consumption appears to be higher than average for \ of an ability to harm, and the power consumption appears to be higher than average for \
a human-made energy side-arm. One possible explaination is that the creators of this \ a human-made energy side-arm. One possible explaination is that the creators of this \
weapon, in their later years, had less of a need to optimize their capability for war, \ weapon, in their later years, had less of a need to optimize their capability for war, \
and instead focused on other endeavors. Another explaination is that vast age of the weapon \ and instead focused on other endeavors. Another explaination is that vast age of the weapon \
may have caused it to degrade, yet still remain functional at a reduced capability." may have caused it to degrade, yet still remain functional at a reduced capability."
value = CATALOGUER_REWARD_MEDIUM value = CATALOGUER_REWARD_MEDIUM
/obj/item/weapon/gun/energy/alien /obj/item/weapon/gun/energy/alien
name = "alien pistol" name = "alien pistol"
desc = "A weapon that works very similarly to a traditional energy weapon. How this came to be will likely be a mystery for the ages." desc = "A weapon that works very similarly to a traditional energy weapon. How this came to be will likely be a mystery for the ages."
catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_pistol) catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_pistol)
icon_state = "alienpistol" icon_state = "alienpistol"
item_state = "alienpistol" item_state = "alienpistol"
fire_sound = 'sound/weapons/eLuger.ogg' fire_delay = 10 // Handguns should be inferior to two-handed weapons. Even alien ones I suppose.
fire_delay = 10 // Handguns should be inferior to two-handed weapons. Even alien ones I suppose. charge_cost = 480 // Five shots.
charge_cost = 480 // Five shots.
projectile_type = /obj/item/projectile/beam/cyan
projectile_type = /obj/item/projectile/beam/cyan cell_type = /obj/item/weapon/cell/device/weapon/recharge/alien // Self charges.
cell_type = /obj/item/weapon/cell/device/weapon/recharge/alien // Self charges. origin_tech = list(TECH_COMBAT = 8, TECH_MAGNET = 7)
origin_tech = list(TECH_COMBAT = 8, TECH_MAGNET = 7) modifystate = "alienpistol"
modifystate = "alienpistol"
/obj/item/weapon/gun/energy/captain
/obj/item/weapon/gun/energy/captain name = "antique laser gun"
name = "antique laser gun" icon_state = "caplaser"
icon_state = "caplaser" item_state = "caplaser"
item_state = "caplaser" desc = "A rare weapon, handcrafted by a now defunct specialty manufacturer on Luna for a small fortune. It's certainly aged well."
desc = "A rare weapon, handcrafted by a now defunct specialty manufacturer on Luna for a small fortune. It's certainly aged well." force = 5
force = 5 slot_flags = SLOT_BELT
slot_flags = SLOT_BELT w_class = ITEMSIZE_NORMAL
w_class = ITEMSIZE_NORMAL projectile_type = /obj/item/projectile/beam
projectile_type = /obj/item/projectile/beam origin_tech = null
origin_tech = null fire_delay = 10 //Old pistol
fire_delay = 10 //Old pistol charge_cost = 480 //to compensate a bit for self-recharging
charge_cost = 480 //to compensate a bit for self-recharging cell_type = /obj/item/weapon/cell/device/weapon/recharge/captain
cell_type = /obj/item/weapon/cell/device/weapon/recharge/captain battery_lock = 1
battery_lock = 1
/obj/item/weapon/gun/energy/lasercannon
/obj/item/weapon/gun/energy/lasercannon name = "laser cannon"
name = "laser cannon" desc = "With the laser cannon, the lasing medium is enclosed in a tube lined with uranium-235 and subjected to high neutron \
desc = "With the laser cannon, the lasing medium is enclosed in a tube lined with uranium-235 and subjected to high neutron \ flux in a nuclear reactor core. This incredible technology may help YOU achieve high excitation rates with small laser volumes!"
flux in a nuclear reactor core. This incredible technology may help YOU achieve high excitation rates with small laser volumes!" icon_state = "lasercannon"
icon_state = "lasercannon" item_state = null
item_state = null origin_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 3, TECH_POWER = 3)
origin_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 3, TECH_POWER = 3) slot_flags = SLOT_BELT|SLOT_BACK
slot_flags = SLOT_BELT|SLOT_BACK projectile_type = /obj/item/projectile/beam/heavylaser/cannon
projectile_type = /obj/item/projectile/beam/heavylaser/cannon battery_lock = 1
battery_lock = 1 fire_delay = 20
fire_delay = 20 w_class = ITEMSIZE_LARGE
w_class = ITEMSIZE_LARGE // one_handed_penalty = 90 // The thing's heavy and huge.
// one_handed_penalty = 90 // The thing's heavy and huge. accuracy = 45
accuracy = 45 charge_cost = 600
charge_cost = 600
/obj/item/weapon/gun/energy/lasercannon/mounted
/obj/item/weapon/gun/energy/lasercannon/mounted name = "mounted laser cannon"
name = "mounted laser cannon" self_recharge = 1
self_recharge = 1 use_external_power = 1
use_external_power = 1 recharge_time = 10
recharge_time = 10 accuracy = 0 // Mounted cannons are just fine the way they are.
accuracy = 0 // Mounted cannons are just fine the way they are. one_handed_penalty = 0 // Not sure if two-handing gets checked for mounted weapons, but better safe than sorry.
one_handed_penalty = 0 // Not sure if two-handing gets checked for mounted weapons, but better safe than sorry. projectile_type = /obj/item/projectile/beam/heavylaser
projectile_type = /obj/item/projectile/beam/heavylaser charge_cost = 400
charge_cost = 400 fire_delay = 20
fire_delay = 20
/obj/item/weapon/gun/energy/xray
/obj/item/weapon/gun/energy/xray name = "xray laser gun"
name = "xray laser gun" desc = "A high-power laser gun capable of expelling concentrated xray blasts, which are able to penetrate matter easier than \
desc = "A high-power laser gun capable of expelling concentrated xray blasts, which are able to penetrate matter easier than \ standard photonic beams, resulting in an effective 'anti-armor' energy weapon."
standard photonic beams, resulting in an effective 'anti-armor' energy weapon." icon_state = "xray"
icon_state = "xray" item_state = "xray"
item_state = "xray" origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 3, TECH_MAGNET = 2)
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 3, TECH_MAGNET = 2) projectile_type = /obj/item/projectile/beam/xray
projectile_type = /obj/item/projectile/beam/xray charge_cost = 200
charge_cost = 200
/obj/item/weapon/gun/energy/sniperrifle
/obj/item/weapon/gun/energy/sniperrifle name = "marksman energy rifle"
name = "marksman energy rifle" desc = "The HI DMR 9E is an older design of Hephaestus Industries. A designated marksman rifle capable of shooting powerful \
desc = "The HI DMR 9E is an older design of Hephaestus Industries. A designated marksman rifle capable of shooting powerful \ ionized beams, this is a weapon to kill from a distance."
ionized beams, this is a weapon to kill from a distance." icon_state = "sniper"
icon_state = "sniper" item_state = "sniper"
item_state = "sniper" item_state_slots = list(slot_r_hand_str = "z8carbine", slot_l_hand_str = "z8carbine") //placeholder
item_state_slots = list(slot_r_hand_str = "z8carbine", slot_l_hand_str = "z8carbine") //placeholder origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 5, TECH_POWER = 4)
origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 5, TECH_POWER = 4) projectile_type = /obj/item/projectile/beam/sniper
projectile_type = /obj/item/projectile/beam/sniper slot_flags = SLOT_BACK
slot_flags = SLOT_BACK battery_lock = 1
battery_lock = 1 charge_cost = 600
charge_cost = 600 fire_delay = 35
fire_delay = 35 force = 10
force = 10 w_class = ITEMSIZE_HUGE // So it can't fit in a backpack.
w_class = ITEMSIZE_HUGE // So it can't fit in a backpack. accuracy = -45 //shooting at the hip
accuracy = -45 //shooting at the hip scoped_accuracy = 0
scoped_accuracy = 0 // requires_two_hands = 1
// requires_two_hands = 1 // one_handed_penalty = 60 // The weapon itself is heavy, and the long barrel makes it hard to hold steady with just one hand.
// one_handed_penalty = 60 // The weapon itself is heavy, and the long barrel makes it hard to hold steady with just one hand.
/obj/item/weapon/gun/energy/sniperrifle/verb/scope()
/obj/item/weapon/gun/energy/sniperrifle/verb/scope() set category = "Object"
set category = "Object" set name = "Use Scope"
set name = "Use Scope" set popup_menu = 1
set popup_menu = 1
toggle_scope(2.0)
toggle_scope(2.0)
/obj/item/weapon/gun/energy/monorifle
/obj/item/weapon/gun/energy/monorifle name = "antique mono-rifle"
name = "antique mono-rifle" desc = "An old laser rifle. This one can only fire once before requiring recharging."
desc = "An old laser rifle. This one can only fire once before requiring recharging." description_fluff = "Modeled after ancient hunting rifles, this rifle was dubbed the 'Rainy Day Special' by some, due to its use as some barmens' fight-stopper of choice. One shot is all it takes, or so they say."
description_fluff = "Modeled after ancient hunting rifles, this rifle was dubbed the 'Rainy Day Special' by some, due to its use as some barmens' fight-stopper of choice. One shot is all it takes, or so they say." icon_state = "eshotgun"
icon_state = "eshotgun" item_state = "shotgun"
item_state = "shotgun" origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 4, TECH_POWER = 3)
origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 4, TECH_POWER = 3) projectile_type = /obj/item/projectile/beam/sniper
projectile_type = /obj/item/projectile/beam/sniper slot_flags = SLOT_BACK
slot_flags = SLOT_BACK charge_cost = 1300
charge_cost = 1300 fire_delay = 20
fire_delay = 20 force = 8
force = 8 w_class = ITEMSIZE_LARGE
w_class = ITEMSIZE_LARGE accuracy = 10
accuracy = 10 scoped_accuracy = 15
scoped_accuracy = 15 var/scope_multiplier = 1.5
var/scope_multiplier = 1.5
/obj/item/weapon/gun/energy/monorifle/verb/sights()
/obj/item/weapon/gun/energy/monorifle/verb/sights() set category = "Object"
set category = "Object" set name = "Aim Down Sights"
set name = "Aim Down Sights" set popup_menu = 1
set popup_menu = 1
toggle_scope(scope_multiplier)
toggle_scope(scope_multiplier)
/obj/item/weapon/gun/energy/monorifle/combat
/obj/item/weapon/gun/energy/monorifle/combat name = "combat mono-rifle"
name = "combat mono-rifle" desc = "A modernized version of the mono-rifle. This one can fire twice before requiring recharging."
desc = "A modernized version of the mono-rifle. This one can fire twice before requiring recharging." description_fluff = "A modern design produced by a company once working from Saint Columbia, based on the antique mono-rifle 'Rainy Day Special' design."
description_fluff = "A modern design produced by a company once working from Saint Columbia, based on the antique mono-rifle 'Rainy Day Special' design." icon_state = "ecshotgun"
icon_state = "ecshotgun" item_state = "cshotgun"
item_state = "cshotgun" charge_cost = 1000
charge_cost = 1000 force = 12
force = 12 accuracy = 0
accuracy = 0 scoped_accuracy = 20
scoped_accuracy = 20
////////Laser Tag////////////////////
////////Laser Tag////////////////////
/obj/item/weapon/gun/energy/lasertag
/obj/item/weapon/gun/energy/lasertag name = "laser tag gun"
name = "laser tag gun" item_state = "laser"
item_state = "laser" desc = "Standard issue weapon of the Imperial Guard"
desc = "Standard issue weapon of the Imperial Guard" origin_tech = list(TECH_COMBAT = 1, TECH_MAGNET = 2)
origin_tech = list(TECH_COMBAT = 1, TECH_MAGNET = 2) matter = list(DEFAULT_WALL_MATERIAL = 2000)
matter = list(DEFAULT_WALL_MATERIAL = 2000) projectile_type = /obj/item/projectile/beam/lasertag/blue
projectile_type = /obj/item/projectile/beam/lastertag/blue cell_type = /obj/item/weapon/cell/device/weapon/recharge
cell_type = /obj/item/weapon/cell/device/weapon/recharge battery_lock = 1
battery_lock = 1 var/required_vest
var/required_vest
/obj/item/weapon/gun/energy/lasertag/special_check(var/mob/living/carbon/human/M)
/obj/item/weapon/gun/energy/lasertag/special_check(var/mob/living/carbon/human/M) if(ishuman(M))
if(ishuman(M)) if(!istype(M.wear_suit, required_vest))
if(!istype(M.wear_suit, required_vest)) M << "<span class='warning'>You need to be wearing your laser tag vest!</span>"
M << "<span class='warning'>You need to be wearing your laser tag vest!</span>" return 0
return 0 return ..()
return ..()
/obj/item/weapon/gun/energy/lasertag/blue
/obj/item/weapon/gun/energy/lasertag/blue icon_state = "bluetag"
icon_state = "bluetag" item_state = "bluetag"
item_state = "bluetag" projectile_type = /obj/item/projectile/beam/lasertag/blue
projectile_type = /obj/item/projectile/beam/lastertag/blue required_vest = /obj/item/clothing/suit/bluetag
required_vest = /obj/item/clothing/suit/bluetag
/obj/item/weapon/gun/energy/lasertag/red
/obj/item/weapon/gun/energy/lasertag/red icon_state = "redtag"
icon_state = "redtag" item_state = "redtag"
item_state = "redtag" projectile_type = /obj/item/projectile/beam/lasertag/red
projectile_type = /obj/item/projectile/beam/lastertag/red required_vest = /obj/item/clothing/suit/redtag
required_vest = /obj/item/clothing/suit/redtag
/obj/item/weapon/gun/energy/lasertag/omni
/* projectile_type = /obj/item/projectile/beam/lasertag/omni
* Laser scattergun, proof of concept.
*/ // Laser scattergun, proof of concept.
/obj/item/weapon/gun/energy/lasershotgun /obj/item/weapon/gun/energy/lasershotgun
name = "laser scattergun" name = "laser scattergun"
icon = 'icons/obj/energygun.dmi' icon = 'icons/obj/energygun.dmi'
item_state = "laser" item_state = "laser"
icon_state = "scatter" icon_state = "scatter"
desc = "A strange Almachi weapon, utilizing a refracting prism to turn a single laser blast into a diverging cluster." desc = "A strange Almachi weapon, utilizing a refracting prism to turn a single laser blast into a diverging cluster."
origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 1, TECH_MATERIAL = 4) origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 1, TECH_MATERIAL = 4)
projectile_type = /obj/item/projectile/scatter/laser projectile_type = /obj/item/projectile/scatter/laser

View File

@@ -89,6 +89,7 @@
/obj/item/projectile/beam/cyan /obj/item/projectile/beam/cyan
name = "cyan beam" name = "cyan beam"
icon_state = "cyan" icon_state = "cyan"
fire_sound = 'sound/weapons/eluger.ogg'
damage = 40 damage = 40
light_color = "#00C6FF" light_color = "#00C6FF"
@@ -125,62 +126,52 @@
tracer_type = /obj/effect/projectile/tracer/emitter tracer_type = /obj/effect/projectile/tracer/emitter
impact_type = /obj/effect/projectile/impact/emitter impact_type = /obj/effect/projectile/impact/emitter
/obj/item/projectile/beam/lastertag/blue /obj/item/projectile/beam/lasertag
name = "lasertag beam" name = "lasertag beam"
icon_state = "bluelaser"
damage = 0 damage = 0
eyeblur = 0
no_attack_log = 1 no_attack_log = 1
damage_type = BURN damage_type = BURN
check_armour = "laser" check_armour = "laser"
light_color = "#0066FF"
combustion = FALSE combustion = FALSE
/obj/item/projectile/beam/lasertag/blue
icon_state = "bluelaser"
light_color = "#0066FF"
muzzle_type = /obj/effect/projectile/muzzle/laser_blue muzzle_type = /obj/effect/projectile/muzzle/laser_blue
tracer_type = /obj/effect/projectile/tracer/laser_blue tracer_type = /obj/effect/projectile/tracer/laser_blue
impact_type = /obj/effect/projectile/impact/laser_blue impact_type = /obj/effect/projectile/impact/laser_blue
/obj/item/projectile/beam/lastertag/blue/on_hit(var/atom/target, var/blocked = 0) /obj/item/projectile/beam/lasertag/blue/on_hit(var/atom/target, var/blocked = 0)
if(istype(target, /mob/living/carbon/human)) if(ishuman(target))
var/mob/living/carbon/human/M = target var/mob/living/carbon/human/M = target
if(istype(M.wear_suit, /obj/item/clothing/suit/redtag)) if(istype(M.wear_suit, /obj/item/clothing/suit/redtag))
M.Weaken(5) M.Weaken(5)
return 1 return 1
/obj/item/projectile/beam/lastertag/red /obj/item/projectile/beam/lasertag/red
name = "lasertag beam"
icon_state = "laser" icon_state = "laser"
damage = 0
no_attack_log = 1
damage_type = BURN
check_armour = "laser"
light_color = "#FF0D00" light_color = "#FF0D00"
combustion = FALSE /obj/item/projectile/beam/lasertag/red/on_hit(var/atom/target, var/blocked = 0)
if(ishuman(target))
/obj/item/projectile/beam/lastertag/red/on_hit(var/atom/target, var/blocked = 0)
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/M = target var/mob/living/carbon/human/M = target
if(istype(M.wear_suit, /obj/item/clothing/suit/bluetag)) if(istype(M.wear_suit, /obj/item/clothing/suit/bluetag))
M.Weaken(5) M.Weaken(5)
return 1 return 1
/obj/item/projectile/beam/lastertag/omni//A laser tag bolt that stuns EVERYONE /obj/item/projectile/beam/lasertag/omni//A laser tag bolt that stuns EVERYONE
name = "lasertag beam"
icon_state = "omnilaser" icon_state = "omnilaser"
damage = 0
damage_type = BURN
check_armour = "laser"
light_color = "#00C6FF" light_color = "#00C6FF"
combustion = FALSE
muzzle_type = /obj/effect/projectile/muzzle/laser_omni muzzle_type = /obj/effect/projectile/muzzle/laser_omni
tracer_type = /obj/effect/projectile/tracer/laser_omni tracer_type = /obj/effect/projectile/tracer/laser_omni
impact_type = /obj/effect/projectile/impact/laser_omni impact_type = /obj/effect/projectile/impact/laser_omni
/obj/item/projectile/beam/lastertag/omni/on_hit(var/atom/target, var/blocked = 0) /obj/item/projectile/beam/lasertag/omni/on_hit(var/atom/target, var/blocked = 0)
if(istype(target, /mob/living/carbon/human)) if(ishuman(target))
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)

View File

@@ -158,7 +158,7 @@
message_admins("[key_name_admin(Proj.firer)] shot fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>JMP</a>).") message_admins("[key_name_admin(Proj.firer)] shot fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>JMP</a>).")
log_game("[key_name(Proj.firer)] shot fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]).") log_game("[key_name(Proj.firer)] shot fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]).")
if(!istype(Proj ,/obj/item/projectile/beam/lastertag) && !istype(Proj ,/obj/item/projectile/beam/practice) ) if(!istype(Proj ,/obj/item/projectile/beam/lasertag) && !istype(Proj ,/obj/item/projectile/beam/practice) )
explode() explode()
/obj/structure/reagent_dispensers/fueltank/ex_act() /obj/structure/reagent_dispensers/fueltank/ex_act()

View File

@@ -11,7 +11,7 @@
/obj/structure/reagent_dispensers/coolanttank/bullet_act(var/obj/item/projectile/Proj) /obj/structure/reagent_dispensers/coolanttank/bullet_act(var/obj/item/projectile/Proj)
if(Proj.get_structure_damage()) if(Proj.get_structure_damage())
if(!istype(Proj ,/obj/item/projectile/beam/lastertag) && !istype(Proj ,/obj/item/projectile/beam/practice) ) // TODO: make this not terrible if(!istype(Proj ,/obj/item/projectile/beam/lasertag) && !istype(Proj ,/obj/item/projectile/beam/practice) ) // TODO: make this not terrible
explode() explode()
/obj/structure/reagent_dispensers/coolanttank/ex_act() /obj/structure/reagent_dispensers/coolanttank/ex_act()

View File

@@ -0,0 +1,41 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
#################################
# Your name.
author: Nalarac
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "Adds laser tag turrets orderable from cargo."
- bugfix: "Turrets will shoot people laying down if emagged or set to lethal."
- bugfix: "Turrets can not be lethal if built with non-lethal weapon."
- bugfix: "Alien pistol fire noise moved to projectile. Now the turret will use the proper noise."
- tweak: "Turrets will have new colors based on projectile used."
- tweak: "Projectile lastertag is no more. It is now properly lasertag."

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 94 KiB