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
+1
View File
@@ -1418,6 +1418,7 @@
#include "code\modules\clothing\rings\rings.dm"
#include "code\modules\clothing\sets\acting_captain.dm"
#include "code\modules\clothing\sets\captain.dm"
#include "code\modules\clothing\sets\laser_tag.dm"
#include "code\modules\clothing\shoes\colour.dm"
#include "code\modules\clothing\shoes\jobs.dm"
#include "code\modules\clothing\shoes\magboots.dm"
@@ -43,33 +43,3 @@
new /obj/item/clothing/mask/luchador(src)
new /obj/item/clothing/mask/luchador/rudos(src)
new /obj/item/clothing/mask/luchador/tecnicos(src)
/obj/structure/closet/lasertag/red
name = "red laser tag equipment"
desc = "It's a storage unit for laser tag equipment."
icon_state = "red"
icon_closed = "red"
/obj/structure/closet/lasertag/red/fill()
new /obj/item/clothing/ears/earmuffs(src)
new /obj/item/clothing/ears/earmuffs(src)
new /obj/item/gun/energy/lasertag/red(src)
new /obj/item/gun/energy/lasertag/red(src)
new /obj/item/clothing/suit/redtag(src)
new /obj/item/clothing/suit/redtag(src)
/obj/structure/closet/lasertag/blue
name = "blue laser tag equipment"
desc = "It's a storage unit for laser tag equipment."
icon_state = "blue"
icon_closed = "blue"
/obj/structure/closet/lasertag/blue/fill()
new /obj/item/clothing/ears/earmuffs(src)
new /obj/item/clothing/ears/earmuffs(src)
new /obj/item/gun/energy/lasertag/blue(src)
new /obj/item/gun/energy/lasertag/blue(src)
new /obj/item/clothing/suit/bluetag(src)
new /obj/item/clothing/suit/bluetag(src)
+11 -8
View File
@@ -108,17 +108,20 @@
if (use_check_and_message(user))
return
do_flip(user)
update_clothing_icon()
/obj/item/clothing/head/helmet/riot/proc/do_flip(var/mob/user)
if(icon_state == initial(icon_state))
icon_state = "helm_riot_down"
item_state = "helm_riot_down"
to_chat(user, SPAN_NOTICE("You lower the visor on \the [src]."))
body_parts_covered = HEAD|FACE|EYES
else
icon_state = initial(icon_state)
item_state = initial(item_state)
icon_state = "[icon_state]-up"
item_state = icon_state
to_chat(user, SPAN_NOTICE("You raise the visor on \the [src]."))
body_parts_covered = HEAD
update_clothing_icon()
else
icon_state = initial(icon_state)
item_state = icon_state
to_chat(user, SPAN_NOTICE("You lower the visor on \the [src]."))
body_parts_covered = HEAD|FACE|EYES
/obj/item/clothing/head/helmet/ablative
+143
View File
@@ -0,0 +1,143 @@
/*
Armor
*/
/obj/item/clothing/suit/armor/riot/laser_tag
name = "laser tag armor"
desc = "A set of laser tag armor. Very swanky."
desc_info = "You can alt-click this while holding or wearing it to set how many laser tag shots you want to be able to take before going down."
icon = 'icons/clothing/kit/laser_tag.dmi'
icon_state = "vest"
item_state = "vest"
contained_sprite = TRUE
blood_overlay_type = "armor"
body_parts_covered = UPPER_TORSO
slowdown = 0
armor = list( // still somewhat sturdy, but ultimately not very
melee = ARMOR_MELEE_MINOR,
laser = ARMOR_LASER_MINOR,
energy = ARMOR_ENERGY_MINOR
)
siemens_coefficient = 1.0
var/laser_tag_color = "red"
var/set_health = 3
var/current_health
/obj/item/clothing/suit/armor/riot/laser_tag/Initialize(mapload, material_key)
. = ..()
get_tag_color(laser_tag_color)
current_health = set_health
/obj/item/clothing/suit/armor/riot/laser_tag/AltClick(mob/user)
if(loc == user)
set_health = input(user, "Set the amount of shots you want your armour to take.", "Laser Armor", 3) as null|anything in list(1, 2, 3, 4, 5)
if(!set_health)
return
current_health = set_health
var/user_name = "Unknown User"
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/card/id/ID = H.GetIdCard()
user_name = ID.registered_name
var/list/num_to_word = list("one", "two", "three", "four", "five")
visible_message("<b>[capitalize_first_letters(name)]</b> says, \"[SPAN_NOTICE("[user_name] armor health set to [num_to_word[set_health]].")]\".")
return
return ..()
/obj/item/clothing/suit/armor/riot/laser_tag/attackby(obj/item/I, mob/user)
if(I.ismultitool())
var/chosen_color = input(user, "Which color do you wish your vest to be?", "Color Selection") as null|anything in list("blue", "red")
if(!chosen_color)
return
laser_tag_color = chosen_color
get_tag_color(chosen_color)
to_chat(user, SPAN_NOTICE("\The [src] is now a [chosen_color] laser tag vest."))
return
return ..()
/obj/item/clothing/suit/armor/riot/laser_tag/proc/laser_hit()
current_health--
if(current_health <= 0 && ismob(loc))
var/mob/M = loc
M.Weaken(5)
current_health = set_health
/obj/item/clothing/suit/armor/riot/laser_tag/blue
laser_tag_color = "blue"
/obj/item/clothing/head/helmet/riot/laser_tag
name = "laser tag helmet"
desc = "A helmet in the form of a riot helm, made for high-impact laser tag gameplay."
icon = 'icons/clothing/kit/laser_tag.dmi'
icon_state = "helmet"
item_state = "helmet"
contained_sprite = TRUE
armor = list( // still somewhat sturdy, but ultimately not very
melee = ARMOR_MELEE_MINOR,
laser = ARMOR_LASER_MINOR,
energy = ARMOR_ENERGY_MINOR
)
siemens_coefficient = 1.0
var/laser_tag_color = "red"
/obj/item/clothing/head/helmet/riot/laser_tag/Initialize(mapload, material_key)
. = ..()
get_tag_color(laser_tag_color)
/obj/item/clothing/head/helmet/riot/laser_tag/attackby(obj/item/I, mob/user)
if(I.ismultitool())
var/chosen_color = input(user, "Which color do you wish your helmet to be?", "Color Selection") as null|anything in list("blue", "red")
if(!chosen_color)
return
laser_tag_color = chosen_color
get_tag_color(chosen_color)
to_chat(user, SPAN_NOTICE("\The [src] is now a [chosen_color] laser tag helmet."))
return
return ..()
/obj/item/clothing/head/helmet/riot/laser_tag/do_flip(mob/user)
if(item_state == initial(item_state))
item_state = "[item_state]-up"
else
item_state = initial(item_state)
..()
/obj/item/clothing/head/helmet/riot/laser_tag/blue
laser_tag_color = "blue"
/*
Helpers
*/
/obj/item/clothing/proc/get_tag_color(var/set_color)
var/list/color_to_color = list("red" = COLOR_RED, "blue" = COLOR_BLUE)
color = color_to_color[set_color]
update_clothing_icon()
/*
Closets
*/
/obj/structure/closet/lasertag
name = "red laser tag equipment"
desc = "It's a storage unit for laser tag equipment."
icon_state = "red"
icon_closed = "red"
var/helmet_path = /obj/item/clothing/head/helmet/riot/laser_tag
var/armor_path = /obj/item/clothing/suit/armor/riot/laser_tag
var/gun_path = /obj/item/gun/energy/lasertag/red
/obj/structure/closet/lasertag/fill()
new /obj/item/device/multitool(src)
for(var/i = 1 to 3)
new helmet_path(src)
new armor_path(src)
new gun_path(src)
new /obj/item/clothing/ears/earmuffs(src)
/obj/structure/closet/lasertag/blue
name = "blue laser tag equipment"
icon_state = "blue"
icon_closed = "blue"
helmet_path = /obj/item/clothing/head/helmet/riot/laser_tag/blue
armor_path = /obj/item/clothing/suit/armor/riot/laser_tag/blue
gun_path = /obj/item/gun/energy/lasertag/blue
@@ -1,33 +1,9 @@
/*
* Contains:
* Lasertag
* Costume
* Misc
*/
/*
* Lasertag
*/
/obj/item/clothing/suit/bluetag
name = "blue laser tag armor"
desc = "Blue Pride, Station Wide."
icon_state = "bluetag"
item_state = "bluetag"
blood_overlay_type = "armor"
body_parts_covered = UPPER_TORSO
allowed = list (/obj/item/gun/energy/lasertag/blue)
siemens_coefficient = 1.0
/obj/item/clothing/suit/redtag
name = "red laser tag armor"
desc = "Reputed to go faster."
icon_state = "redtag"
item_state = "redtag"
blood_overlay_type = "armor"
body_parts_covered = UPPER_TORSO
allowed = list (/obj/item/gun/energy/lasertag/red)
siemens_coefficient = 1.0
/*
* Costume
*/
+1 -2
View File
@@ -502,8 +502,7 @@ var/list/worths = list(
/obj/item/clothing/suit/security/hos/dnavy = 80,
/obj/item/clothing/suit/storage/hazardvest = 60,
/obj/item/clothing/suit/storage/toggle/labcoat = 55,
/obj/item/clothing/suit/bluetag = 20,
/obj/item/clothing/suit/redtag = 20,
/obj/item/clothing/suit/armor/riot/laser_tag = 125,
/obj/item/clothing/suit/fire/heavy = 600,
/obj/item/clothing/suit/fire = 500,
/obj/item/clothing/suit/radiation = 450,
+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"
+1 -1
View File
@@ -195,7 +195,7 @@
log_and_message_admins("shot a welding tank", Proj.firer)
log_game("[key_name(Proj.firer)] shot fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]).",ckey=key_name(Proj.firer))
if(!istype(Proj ,/obj/item/projectile/beam/lastertag) && !istype(Proj ,/obj/item/projectile/beam/practice) && !istype(Proj ,/obj/item/projectile/kinetic))
if(!istype(Proj ,/obj/item/projectile/beam/laser_tag) && !istype(Proj ,/obj/item/projectile/beam/practice) && !istype(Proj ,/obj/item/projectile/kinetic))
ex_act(2.0)
/obj/structure/reagent_dispensers/fueltank/ex_act(var/severity = 3.0)
@@ -0,0 +1,9 @@
author: Geeves
delete-after: True
changes:
- rscadd: "Added helmets to the laser tag gear loadout."
- rscadd: "You can now alt-click laser tag armour to be able to set how many hits it will take before flooring you."
- rscadd: "You can now use a multitool on laser tag gear to change which colour it is and works against."
- tweak: "Lowered the laser tag gun recharge rate to 4 seconds per shot, down from 8 seconds per shot."
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

+1 -9
View File
@@ -10253,7 +10253,7 @@
/turf/simulated/floor/plating,
/area/store)
"jiW" = (
/obj/structure/closet/lasertag/red,
/obj/structure/closet/lasertag,
/obj/machinery/atmospherics/unary/vent_scrubber/on{
dir = 4
},
@@ -10261,10 +10261,6 @@
dir = 4;
pixel_x = -28
},
/obj/item/gun/energy/lasertag/red,
/obj/item/gun/energy/lasertag/red,
/obj/item/clothing/suit/redtag,
/obj/item/clothing/suit/redtag,
/turf/simulated/floor/tiled/dark,
/area/crew_quarters/fitness/changing)
"jkk" = (
@@ -25005,10 +25001,6 @@
dir = 8;
icon_state = "tube1"
},
/obj/item/gun/energy/lasertag/blue,
/obj/item/gun/energy/lasertag/blue,
/obj/item/clothing/suit/bluetag,
/obj/item/clothing/suit/bluetag,
/turf/simulated/floor/tiled/dark,
/area/crew_quarters/fitness/changing)
"wcR" = (
+1 -1
View File
@@ -14218,7 +14218,7 @@
/turf/simulated/floor/tiled/dark,
/area/crew_quarters/fitness)
"aBc" = (
/obj/structure/closet/lasertag/red,
/obj/structure/closet/lasertag,
/obj/machinery/atmospherics/unary/vent_scrubber/on{
dir = 8
},