Laser Tag Gear (#11193)

This commit is contained in:
Geeves
2021-03-07 17:14:26 +01:00
committed by GitHub
parent e002cf5240
commit b819c7878f
15 changed files with 238 additions and 147 deletions
+34 -20
View File
@@ -211,41 +211,55 @@ obj/item/gun/energy/retro
/obj/item/gun/energy/lasertag
name = "laser tag gun"
desc = "A simple low-power laser gun, outfitted for use in laser tag arenas."
item_state = "laser"
has_item_ratio = FALSE
desc = "Standard issue weapon of the Imperial Guard"
origin_tech = list(TECH_COMBAT = 1, TECH_MAGNET = 2)
self_recharge = 1
self_recharge = TRUE
recharge_time = 2
matter = list(DEFAULT_WALL_MATERIAL = 2000)
fire_sound = 'sound/weapons/laser1.ogg'
projectile_type = /obj/item/projectile/beam/lastertag/blue
var/required_vest
projectile_type = /obj/item/projectile/beam/laser_tag
pin = /obj/item/device/firing_pin/tag/red
can_turret = TRUE
turret_is_lethal = FALSE
turret_sprite_set = "red"
/obj/item/gun/energy/lasertag/special_check(var/mob/living/carbon/human/M)
if(ishuman(M))
if(!istype(M.wear_suit, required_vest))
to_chat(M, "<span class='warning'>You need to be wearing your laser tag vest!</span>")
return 0
/obj/item/gun/energy/lasertag/attackby(obj/item/I, mob/user)
if(I.ismultitool())
var/chosen_color = input(user, "Which color do you wish your gun to be?", "Color Selection") as null|anything in list("blue", "red")
if(!chosen_color)
return
get_tag_color(chosen_color)
to_chat(user, SPAN_NOTICE("\The [src] is now a [chosen_color] laser tag gun."))
return
return ..()
/obj/item/gun/energy/lasertag/proc/get_tag_color(var/set_color)
projectile_type = text2path("/obj/item/projectile/beam/laser_tag/[set_color]")
if(pin)
QDEL_NULL(pin)
var/pin_path = text2path("/obj/item/device/firing_pin/tag/[set_color]")
pin = new pin_path(src)
switch(set_color)
if("red")
icon = 'icons/obj/guns/redtag.dmi'
if("blue")
icon = 'icons/obj/guns/bluetag.dmi'
icon_state = "[set_color]tag"
item_state = icon_state
modifystate = item_state
update_held_icon()
/obj/item/gun/energy/lasertag/blue
icon = 'icons/obj/guns/bluetag.dmi'
icon_state = "bluetag"
item_state = "bluetag"
projectile_type = /obj/item/projectile/beam/lastertag/blue
required_vest = /obj/item/clothing/suit/bluetag
projectile_type = /obj/item/projectile/beam/laser_tag/blue
pin = /obj/item/device/firing_pin/tag/blue
can_turret = 1
turret_is_lethal = 0
turret_sprite_set = "blue"
/obj/item/gun/energy/lasertag/red
icon = 'icons/obj/guns/redtag.dmi'
icon_state = "redtag"
item_state = "redtag"
projectile_type = /obj/item/projectile/beam/lastertag/red
required_vest = /obj/item/clothing/suit/redtag
pin = /obj/item/device/firing_pin/tag/red
can_turret = 1
turret_is_lethal = 0
turret_sprite_set = "red"
item_state = "redtag"
@@ -365,21 +365,21 @@
/obj/item/laser_components/modulator/red
name = "red team modulator"
desc = "Modulates the beam into firing red team tagger beams."
projectile = /obj/item/projectile/beam/lastertag/red
projectile = /obj/item/projectile/beam/laser_tag
damage = 0
icon_state = "red"
/obj/item/laser_components/modulator/blue
name = "blue team modulator"
desc = "Modulates the beam into firing blue team tagger beams."
projectile = /obj/item/projectile/beam/lastertag/blue
projectile = /obj/item/projectile/beam/laser_tag/blue
damage = 0
icon_state = "blue"
/obj/item/laser_components/modulator/omni
name = "omni team modulator"
desc = "Modulates the beam into firing omni team tagger beams."
projectile = /obj/item/projectile/beam/lastertag/omni
projectile = /obj/item/projectile/beam/laser_tag/omni
damage = 0
icon_state = "omni"
+9 -11
View File
@@ -181,28 +181,26 @@ Pins Below.
name = "laser tag firing pin"
desc = "A recreational firing pin, used in laser tag units to ensure users have their vests on."
fail_message = "<span class='warning'>SUIT CHECK FAILED.</span>"
var/obj/item/clothing/suit/suit_requirement = null
var/tagcolor = ""
var/tag_color = ""
/obj/item/device/firing_pin/tag/pin_auth(mob/living/user)
if(ishuman(user))
var/mob/living/carbon/human/M = user
if(istype(M.wear_suit, suit_requirement))
return 1
to_chat(user, "<span class='warning'>You need to be wearing [tagcolor] laser tag armor!</span>")
return 0
var/mob/living/carbon/human/H = user
var/obj/item/clothing/suit/armor/riot/laser_tag/LT = H.wear_suit
if(istype(LT) && tag_color == LT.laser_tag_color)
return TRUE
to_chat(user, SPAN_WARNING("You need to be wearing [tag_color] laser tag armor!"))
return FALSE
/obj/item/device/firing_pin/tag/red
name = "red laser tag firing pin"
icon_state = "firing_pin_red"
suit_requirement = /obj/item/clothing/suit/redtag
tagcolor = "red"
tag_color = "red"
/obj/item/device/firing_pin/tag/blue
name = "blue laser tag firing pin"
icon_state = "firing_pin_blue"
suit_requirement = /obj/item/clothing/suit/bluetag
tagcolor = "blue"
tag_color = "blue"
/obj/item/device/firing_pin/Destroy()
if(gun)
+24 -38
View File
@@ -99,27 +99,7 @@
tracer_type = /obj/effect/projectile/tracer/emitter
impact_type = /obj/effect/projectile/impact/emitter
/obj/item/projectile/beam/lastertag/blue
name = "lasertag beam"
icon_state = "bluelaser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
no_attack_log = 1
damage_type = BURN
check_armor = "laser"
muzzle_type = /obj/effect/projectile/muzzle/laser/blue
tracer_type = /obj/effect/projectile/tracer/laser/blue
impact_type = /obj/effect/projectile/impact/laser/blue
/obj/item/projectile/beam/lastertag/blue/on_hit(var/atom/target, var/blocked = 0)
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/M = target
if(istype(M.wear_suit, /obj/item/clothing/suit/redtag))
M.Weaken(5)
return 1
/obj/item/projectile/beam/lastertag/red
/obj/item/projectile/beam/laser_tag
name = "lasertag beam"
icon_state = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
@@ -127,32 +107,38 @@
no_attack_log = 1
damage_type = BURN
check_armor = "laser"
var/laser_tag_color = "red"
/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
if(istype(M.wear_suit, /obj/item/clothing/suit/bluetag))
M.Weaken(5)
return 1
muzzle_type = /obj/effect/projectile/muzzle/laser
tracer_type = /obj/effect/projectile/tracer/laser
impact_type = /obj/effect/projectile/impact/laser
/obj/item/projectile/beam/lastertag/omni//A laser tag bolt that stuns EVERYONE
/obj/item/projectile/beam/laser_tag/on_hit(var/atom/target, var/blocked = 0)
if(ishuman(target))
var/mob/living/carbon/human/H = target
var/obj/item/clothing/suit/armor/riot/laser_tag/LT = H.wear_suit
if(istype(LT) && laser_tag_color != LT.laser_tag_color)
LT.laser_hit()
return TRUE
/obj/item/projectile/beam/laser_tag/blue
name = "lasertag beam"
icon_state = "bluelaser"
laser_tag_color = "blue"
muzzle_type = /obj/effect/projectile/muzzle/laser/blue
tracer_type = /obj/effect/projectile/tracer/laser/blue
impact_type = /obj/effect/projectile/impact/laser/blue
/obj/item/projectile/beam/laser_tag/omni//A laser tag bolt that stuns EVERYONE
name = "lasertag beam"
icon_state = "omnilaser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
damage_type = BURN
check_armor = "laser"
laser_tag_color = "omni"
muzzle_type = /obj/effect/projectile/muzzle/disabler
tracer_type = /obj/effect/projectile/tracer/disabler
impact_type = /obj/effect/projectile/impact/disabler
/obj/item/projectile/beam/lastertag/omni/on_hit(var/atom/target, var/blocked = 0)
if(istype(target, /mob/living/carbon/human))
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)))
M.Weaken(5)
return 1
/obj/item/projectile/beam/sniper
name = "sniper beam"