The Great Lasertag Update (#18691)

* Save~

* Fixes launch_many_projectiles having 100% miss chance

Adds laser landmines.
Makes it so portable turrets don't do janky BS for lasertag.
Gives portable lasertag turrets a fun emag/EMP effect

* emag and equipment

* cargo

* tur et

* milsim rp

* clarify

* PLEASE I HAVE A FAMILY

* cries

* signal drop

* no spawn
This commit is contained in:
Cameron Lennox
2025-11-08 03:13:33 +01:00
committed by GitHub
parent 7b656d712c
commit ee47237aa7
25 changed files with 553 additions and 229 deletions
+6 -6
View File
@@ -1533,9 +1533,9 @@
return
//get their uniform
if(istype(M.wear_suit, /obj/item/clothing/suit/redtag))
if(istype(M.wear_suit, /obj/item/clothing/suit/lasertag/redtag))
grabbing_team = "red"
else if(istype(M.wear_suit, /obj/item/clothing/suit/bluetag))
else if(istype(M.wear_suit, /obj/item/clothing/suit/lasertag/bluetag))
grabbing_team = "blue"
else
return //if they're not on a team, stop!
@@ -1661,11 +1661,11 @@
return
//get their uniform
if(istype(M.wear_suit, /obj/item/clothing/suit/redtag))
if(istype(M.wear_suit, /obj/item/clothing/suit/lasertag/redtag))
grabbing_team = "red"
icon_state = "[initial(icon_state)]_red"
item_state = "[initial(icon_state)]_red"
else if(istype(M.wear_suit, /obj/item/clothing/suit/bluetag))
else if(istype(M.wear_suit, /obj/item/clothing/suit/lasertag/bluetag))
grabbing_team = "blue"
icon_state = "[initial(icon_state)]_blue"
item_state = "[initial(icon_state)]_blue"
@@ -1724,9 +1724,9 @@
. = ..()
var/mob/living/carbon/human/M = user
var/dunking_team
if(istype(M.wear_suit, /obj/item/clothing/suit/redtag))
if(istype(M.wear_suit, /obj/item/clothing/suit/lasertag/redtag))
dunking_team = "red"
else if(istype(M.wear_suit, /obj/item/clothing/suit/bluetag))
else if(istype(M.wear_suit, /obj/item/clothing/suit/lasertag/bluetag))
dunking_team = "blue"
else
return //if they're not on a team, stop!
+186
View File
@@ -0,0 +1,186 @@
/*
* Lasertag
*/
///DO NOT USE THIS BASE VARIANT, STUFF WILL BREAK!
/obj/item/clothing/suit/lasertag
name = "laser tag armor"
desc = "An example laser tag armor. Can not actually be used and is just for demonstrations."
icon = 'icons/inventory/suit/item.dmi'
icon_state = "omnitag"
item_icons = list(slot_l_hand_str = 'icons/mob/items/lefthand_suits.dmi', slot_r_hand_str = 'icons/mob/items/righthand_suits.dmi')
item_state_slots = list(slot_r_hand_str = "tdomni", slot_l_hand_str = "tdomni")
blood_overlay_type = "armor"
body_parts_covered = UPPER_TORSO
allowed = list (/obj/item/gun/energy/lasertag)
siemens_coefficient = 3.0
description_fluff = "Laser tag armor can have its health and 'healing' time adjusted. Additionally, DonkSoft brand darts are compatible with laser tag vests, proving a projectile based alternative!"
description_antag = "Laser tag armor can be emagged, causing the user to not only have a heart attack when eliminated, but also take massive damage based on the amount of 'lives' the vest had."
var/lasertag_max_health = 3
var/lasertag_health = 3
///How long it takes for us to heal one point of health
var/time_to_heal = 10 SECONDS
///When we were last hit!
var/last_hit
///If we're emagged or not.
var/emagged
/obj/item/clothing/suit/lasertag/emag_act(remaining_charges, mob/user, emag_source)
if(!emagged)
emagged = TRUE
to_chat(user, span_warning("You disable the safeties on the lasertag vest."))
return TRUE
/obj/item/clothing/suit/lasertag/examine(mob/user)
. = ..()
. += "It currently has [lasertag_health] hits out of [lasertag_max_health] remaining!"
. += "It regenerates one hit every [time_to_heal*0.1] seconds."
/obj/item/clothing/suit/lasertag/verb/adjust_health()
set name = "Adjust Suit Health"
set category = "Object"
set src in usr
if(isliving(usr))
adjust_health_proc(usr)
/obj/item/clothing/suit/lasertag/proc/adjust_health_proc(mob/living/user)
var/max_health = 10
var/min_health = 1
var/new_health = tgui_input_number(user, "Select Suit Health (Between 1 and 10)", "Tag Health", lasertag_max_health, max_health, min_health, round_value=TRUE) //If you need to go above 10, ask admins.
if(isnull(new_health))
return null
if(new_health > max_health || new_health < min_health)
to_chat(user, span_danger("Invalid health value! Must be between [min_health] and [max_health]."))
return null
if(!Adjacent(user))
to_chat(user, span_danger("You must be adjacent to the suit to adjust its healing timer!"))
return null
lasertag_max_health = new_health
lasertag_health = lasertag_max_health
user.visible_message(user, span_notice("Set [src]'s allowed shots to [lasertag_max_health], fully healing the vest!"))
/obj/item/clothing/suit/lasertag/verb/adjust_heal_time()
set name = "Adjust Healing Timer"
set category = "Object"
set src in usr
if(isliving(usr))
adjust_heal_time_proc(usr)
/obj/item/clothing/suit/lasertag/proc/adjust_heal_time_proc(mob/living/user)
var/max_heal_time = 60
var/min_heal_time = 0
var/new_heal_timer = tgui_input_number(user, "Select Heal Timer (Between 0(off) to 60 seconds)", "Heal Timer", time_to_heal*0.1, max_heal_time, min_heal_time, round_value=TRUE) //If you need to go above 10, ask admins.
if(isnull(new_heal_timer))
return null
if(new_heal_timer > max_heal_time || new_heal_timer < min_heal_time)
to_chat(user, span_danger("Invalid health value! Must be between [min_heal_time] and [max_heal_time]."))
return null
if(!Adjacent(user))
to_chat(user, span_danger("You must be adjacent to the suit to adjust its healing timer!"))
return null
time_to_heal = (new_heal_timer*10)
if(time_to_heal)
user.visible_message(span_notice("[src]'s heal speed has been set to [new_heal_timer] seconds!"))
else
user.visible_message(span_notice("[src]'s healing function has been turned off!"))
/obj/item/clothing/suit/lasertag/dropped()
..()
STOP_PROCESSING(SSobj, src)
visible_message(span_notice("[src] is unequipped, its health going back to full!"))
lasertag_health = lasertag_max_health
/obj/item/clothing/suit/lasertag/equipped()
..()
START_PROCESSING(SSobj, src)
/obj/item/clothing/suit/lasertag/process()
if(lasertag_health >= lasertag_max_health) //If we're at or above max health(due to admemes), no need to process.
return
if(!time_to_heal) //We have healing disabled.
return
if(world.time > last_hit + time_to_heal)
if(lasertag_health < 0) //overkill protection
lasertag_health = 0
lasertag_health++
if(lasertag_health == lasertag_max_health)
if(ismob(src.loc)) //sanity check
var/mob/wearer = src.loc
to_chat(wearer, span_notice("Your [src] beeps happily as it fully recharges! You can now be hit [lasertag_health] times before you are downed!"))
/obj/item/clothing/suit/lasertag/proc/handle_hit(damage)
if(lasertag_health > 0)
if(damage)
lasertag_health -= damage
else
lasertag_health--
last_hit = world.time
if(isliving(src.loc))
var/mob/living/wearer = src.loc
if(lasertag_health > 0) //Still have HP, keep going.
wearer.visible_message(span_warning("[src] beeps as it takes a shot! [lasertag_health] shots remaining!"))
return
wearer.visible_message(span_boldwarning("[src] beeps as its health is fully depleted! [wearer] is down!"))
to_chat(wearer, span_large(span_danger("You're out!"))) //People KEEP MISSING THAT THEY'RE OUT, SO NOW THEY WON'T.
wearer.Stun(5)
wearer.Weaken(5)
if(emagged)
to_chat(wearer, span_bolddanger(span_massive("OH GOD! YOUR HEART!"))) //this is the last thing you see before you (presumably) die.
wearer.apply_damage(lasertag_max_health*50, BURN, BP_TORSO, used_weapon = "High-Voltage Electrical Shock")
if(ishuman(wearer))
var/mob/living/carbon/human/human_wearer = wearer
var/obj/item/organ/internal/heart/H = human_wearer.internal_organs_by_name[O_HEART]
if(H)
if(H.robotic)
H.break_organ()
else
H.bruise()
if(H.damage < 15)
H.damage = 14 //Below this number we won't be KO'd from a heart attack.
return
if(lasertag_health > 0)
visible_message(span_warning("[src] beeps as its health is takes a hit! [lasertag_health] shots remaining!"))
else
visible_message(span_boldwarning("[src] beeps as its health is depleted!"))
return
visible_message(span_warning("[src] beeps - its health is already depleted!"))
return
/obj/item/clothing/suit/lasertag/bluetag
name = "blue laser tag armor"
desc = "Blue Pride, Station Wide."
icon_state = "bluetag"
item_state_slots = list(slot_r_hand_str = "tdblue", slot_l_hand_str = "tdblue")
allowed = list (/obj/item/gun/energy/lasertag/blue)
/obj/item/clothing/suit/lasertag/redtag
name = "red laser tag armor"
desc = "Reputed to go faster."
icon_state = "redtag"
item_state_slots = list(slot_r_hand_str = "tdred", slot_l_hand_str = "tdred")
allowed = list (/obj/item/gun/energy/lasertag/red)
/obj/item/clothing/suit/lasertag/bluetag/sub
name = "Brigader Armor"
desc = "Replica armor commonly worn by Spacer Union Brigade members from the hit series Spacer Trail. Modified for Laser Tag (Blue Team)."
icon_state = "bluetag2"
/obj/item/clothing/suit/lasertag/redtag/dom
name = "Mu'tu'bi Armor"
desc = "Replica armor commonly worn by Dominion Of Mu'tu'bi soldiers from the hit series Spacer Trail. Modified for Laser Tag (Red Team)."
icon_state = "redtag2"
/obj/item/clothing/suit/lasertag/omni
name = "universal laser tag armour"
desc = "Laser tag armor with no allegiance. For the true renegade, or a free for all."
allowed = list (/obj/item/gun/energy/lasertag/omni)
@@ -8,46 +8,6 @@
// -S2-note- Needs categorizing and sorting.
/*
* Lasertag
*/
#define LASER_TAG_HEALTH 3 //how many strikes do we get?
/obj/item/clothing/suit/bluetag
name = "blue laser tag armor"
desc = "Blue Pride, Station Wide."
icon_state = "bluetag"
item_state_slots = list(slot_r_hand_str = "tdblue", slot_l_hand_str = "tdblue")
blood_overlay_type = "armor"
body_parts_covered = UPPER_TORSO
allowed = list (/obj/item/gun/energy/lasertag/blue)
siemens_coefficient = 3.0
var/lasertag_health = LASER_TAG_HEALTH
/obj/item/clothing/suit/bluetag/sub
name = "Brigader Armor"
desc = "Replica armor commonly worn by Spacer Union Brigade members from the hit series Spacer Trail. Modified for Laser Tag (Blue Team)."
icon_state = "bluetag2"
/obj/item/clothing/suit/redtag
name = "red laser tag armor"
desc = "Reputed to go faster."
icon_state = "redtag"
item_state_slots = list(slot_r_hand_str = "tdred", slot_l_hand_str = "tdred")
blood_overlay_type = "armor"
body_parts_covered = UPPER_TORSO
allowed = list (/obj/item/gun/energy/lasertag/red)
siemens_coefficient = 3.0
var/lasertag_health = LASER_TAG_HEALTH
/obj/item/clothing/suit/redtag/dom
name = "Mu'tu'bi Armor"
desc = "Replica armor commonly worn by Dominion Of Mu'tu'bi soldiers from the hit series Spacer Trail. Modified for Laser Tag (Red Team)."
icon_state = "redtag2"
#undef LASER_TAG_HEALTH
/*
* 80s
*/
+3
View File
@@ -354,6 +354,9 @@ var/list/organ_cache = list()
/obj/item/organ/proc/bruise()
damage = max(damage, min_bruised_damage)
/obj/item/organ/proc/break_organ() //can't name this break because it's a reserved word
damage = max(damage, min_broken_damage)
/obj/item/organ/proc/robotize() //Being used to make robutt hearts, etc
robotic = ORGAN_ROBOT
src.status &= ~ORGAN_BROKEN
+152
View File
@@ -0,0 +1,152 @@
/*
* Handles lasertag attacks. Anything can call this.
* Target can be a mob or a lasertag vest on the ground.
* Attacker can be null (if vest_override is set) or a human mob
* tag_damage is how much damage is dealt to the vest (defaults to 1 if no value given)
* vest_override allows attacking without wearing a vest (defaults to FALSE)
* required_vest is a list of what vests are required to have on to do damage
* allowed_suits are what vests the attack is able to deal damage to. Must be a LIST. If not passed, we assume all suits are valid targets.
* returns TRUE if damage was (theoretically) dealt. FALSE if not.
*
*/
/proc/handle_lasertag_attack(target, mob/living/carbon/human/attacker, tag_damage, vest_override, required_vest, list/allowed_suits)
//So, attacker should ALWAYS be true, but there's a problem. The code doesn't actually set 'thrower' which we used for thrown laser knives.
//Instead of this PR getting massively out of scope and refactoring throwing code, we're just going to have thrown knives do vest override.
if(vest_override || (attacker && istype(attacker) && (!required_vest || istype(attacker.wear_suit, required_vest))))
if(ishuman(target))
var/mob/living/carbon/human/human_target = target
if(!allowed_suits) //Wasn't fed a suit. Let's just affect everything.
allowed_suits = list(/obj/item/clothing/suit/lasertag)
if(is_type_in_list(human_target.wear_suit, allowed_suits))
var/obj/item/clothing/suit/lasertag/laser_suit = human_target.wear_suit
laser_suit.handle_hit(tag_damage)
return TRUE
//We allow allow demonstrations of shooting it while it's on the ground.
else if(is_type_in_list(target, allowed_suits))
var/obj/item/clothing/suit/lasertag/laser_suit = target
laser_suit.handle_hit(tag_damage)
return TRUE
if(attacker)
to_chat(attacker, span_warning("You need to be wearing your laser tag vest to use this!"))
return FALSE
/obj/item/gun/energy/lasertag
name = "omni laser tag gun"
desc = "A laser tag gun that works on all vests!"
icon = 'icons/obj/gun_toy.dmi'
item_state = "omnitag"
item_state = "retro"
origin_tech = list(TECH_COMBAT = 1, TECH_MAGNET = 2)
matter = list(MAT_STEEL = 2000)
projectile_type = /obj/item/projectile/beam/lasertag/omni
cell_type = /obj/item/cell/device/weapon/recharge
battery_lock = 1
var/required_vest = /obj/item/clothing/suit/lasertag/omni
///Allows firing without a vest.
var/vest_override = FALSE
/obj/item/gun/energy/lasertag/special_check(var/mob/living/carbon/human/M)
if(ishuman(M) && !vest_override)
if(!istype(M.wear_suit, required_vest))
to_chat(M, span_warning("You need to be wearing your laser tag vest!"))
return FALSE
var/obj/item/clothing/suit/lasertag/tag_vest = M.wear_suit
if(tag_vest.lasertag_health <= 0)
to_chat(M, span_warning("You're out of health!"))
return FALSE
return ..()
/obj/item/gun/energy/lasertag/blue
icon_state = "bluetag"
item_state = "bluetag"
projectile_type = /obj/item/projectile/beam/lasertag/blue
required_vest = /obj/item/clothing/suit/lasertag/bluetag
fire_delay = 10
/obj/item/gun/energy/lasertag/blue/sub
name = "Brigader Sidearm"
desc = "A laser tag replica of the standard issue weapon for the Spacer Union Brigade from the hit series Spacer Trail (Blue Team)."
icon_state = "bluetwo"
item_state = "retro"
/obj/item/gun/energy/lasertag/red
icon_state = "redtag"
item_state = "redtag"
projectile_type = /obj/item/projectile/beam/lasertag/red
required_vest = /obj/item/clothing/suit/lasertag/redtag
fire_delay = 10
/obj/item/gun/energy/lasertag/red/dom
name = "Mu'tu'bi sidearm"
desc = "A laser tag replica of the Mu'tu'bi sidearm from the hit series Spacer Trail (Red Team)."
icon_state = "redtwo"
item_state = "retro"
/obj/item/gun/energy/lasertag/omni
icon_state = "omnitag"
item_state = "omnitag"
projectile_type = /obj/item/projectile/beam/lasertag/omni
//The lasertag knives also go here because whatever, go my bullshit explanation.
/obj/item/lasertagknife
name = "universal laser tag dagger"
desc = "Rubber knife with a glowing fancy edge. It has no team allegiance!"
icon = 'icons/obj/weapons.dmi'
icon_state = "tagknifeomni"
item_icons = list(slot_l_hand_str = 'icons/mob/items/lefthand_melee.dmi',slot_r_hand_str = 'icons/mob/items/righthand_melee.dmi',)
item_state_slots = list(slot_r_hand_str = "tagknifeomni", slot_l_hand_str = "tagknifeomni")
item_state = null
hitsound = null
w_class = ITEMSIZE_SMALL
attackspeed = 1.2 SECONDS
attack_verb = list("patted", "tapped")
drop_sound = 'sound/items/drop/knife.ogg'
pickup_sound = 'sound/items/pickup/knife.ogg'
///The vest we have to wear to use the knife.
var/required_vest = /obj/item/clothing/suit/lasertag/omni
///If we need a vest on ourselves to use it or not.
var/vest_override = FALSE
///How much damage it does to the lasertag vest. Generally for oneshots.
var/tag_damage = 5
///What vests we are allowed to hit with the knife.
var/list/allowed_suits = list(/obj/item/clothing/suit/lasertag/bluetag, /obj/item/clothing/suit/lasertag/redtag, /obj/item/clothing/suit/lasertag/omni)
/obj/item/lasertagknife/blue
name = "blue laser tag dagger"
desc = "Rubber knife with a blue glowing fancy edge!"
icon_state = "tagknifeblue"
item_state_slots = list(slot_r_hand_str = "tagknifeblue", slot_l_hand_str = "tagknifeblue")
required_vest = /obj/item/clothing/suit/lasertag/bluetag
allowed_suits = list(/obj/item/clothing/suit/lasertag/redtag, /obj/item/clothing/suit/lasertag/omni)
/obj/item/lasertagknife/red
name = "red laser tag dagger"
desc = "Rubber knife with a red glowing fancy edge!"
icon_state = "tagknifered"
item_state_slots = list(slot_r_hand_str = "tagknifered", slot_l_hand_str = "tagknifered")
required_vest = /obj/item/clothing/suit/lasertag/redtag
allowed_suits = list(/obj/item/clothing/suit/lasertag/bluetag, /obj/item/clothing/suit/lasertag/omni)
//We have to do this if(user) check all over the place because for some reason someone broke thrower code. Thanks.
/obj/item/lasertagknife/attack(target, mob/user)
if(user)
user.setClickCooldown(user.get_attack_speed(src))
user.do_attack_animation(target)
var/success = handle_lasertag_attack(target, user, tag_damage, vest_override, required_vest, allowed_suits)
if(success)
user.visible_message(span_danger("[target] has been zapped with [src] by [user]!"))
playsound(src, 'sound/weapons/Egloves.ogg', 50, 1, -1)
else
user.visible_message(span_danger("[target] has been harmlessly bonked with [src] by [user]!"))
playsound(src, 'sound/weapons/punchmiss.ogg', 75, 1)
return TRUE
///go my hack
/obj/item/lasertagknife/throw_impact(atom/hit_atom, var/speed)
if(ismob(hit_atom))
//So, attacker should ALWAYS be true, but there's a problem. The code doesn't actually set 'thrower' which we used for thrown laser knives.
//Instead of this PR getting massively out of scope and refactoring throwing code, we're just going to have thrown knives do vest override.
return handle_lasertag_attack(hit_atom, thrower, tag_damage, TRUE, required_vest, allowed_suits)
..()
-61
View File
@@ -258,64 +258,3 @@
to_chat(user, "The [src] vacuums in the darts!")
else
to_chat(user, "No Donk-Soft brand foam darts detected. Aborting.")
/*
* Laser Tag
*/
/obj/item/gun/energy/lasertag
name = "laser tag gun"
desc = "Standard issue weapon of the Imperial Guard."
icon = 'icons/obj/gun_toy.dmi'
item_state = "omnitag"
item_state = "retro"
origin_tech = list(TECH_COMBAT = 1, TECH_MAGNET = 2)
matter = list(MAT_STEEL = 2000)
projectile_type = /obj/item/projectile/beam/lasertag/blue
cell_type = /obj/item/cell/device/weapon/recharge
battery_lock = 1
var/required_vest
/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_warning("You need to be wearing your laser tag vest!"))
return 0
return ..()
/obj/item/gun/energy/lasertag/blue
icon_state = "bluetag"
item_state = "bluetag"
projectile_type = /obj/item/projectile/beam/lasertag/blue
required_vest = /obj/item/clothing/suit/bluetag
fire_delay = 10
firemodes = list(
list(mode_name="instagib rules", fire_delay=10, projectile_type=/obj/item/projectile/beam/lasertag/blue, charge_cost = 240),
list(mode_name="multi-hit rules", fire_delay=5, projectile_type=/obj/item/projectile/beam/lasertag/blue/multihit, charge_cost = 120),
)
/obj/item/gun/energy/lasertag/blue/sub
name = "Brigader Sidearm"
desc = "A laser tag replica of the standard issue weapon for the Spacer Union Brigade from the hit series Spacer Trail (Blue Team)."
icon_state = "bluetwo"
item_state = "retro"
/obj/item/gun/energy/lasertag/red
icon_state = "redtag"
item_state = "redtag"
projectile_type = /obj/item/projectile/beam/lasertag/red
required_vest = /obj/item/clothing/suit/redtag
fire_delay = 10
firemodes = list(
list(mode_name="instagib rules", fire_delay=12, projectile_type=/obj/item/projectile/beam/lasertag/red, charge_cost = 240),
list(mode_name="multi-hit rules", fire_delay=5, projectile_type=/obj/item/projectile/beam/lasertag/red/multihit, charge_cost = 120),
)
/obj/item/gun/energy/lasertag/red/dom
name = "Mu'tu'bi sidearm"
desc = "A laser tag replica of the Mu'tu'bi sidearm from the hit series Spacer Trail (Red Team)."
icon_state = "redtwo"
item_state = "retro"
/obj/item/gun/energy/lasertag/omni
projectile_type = /obj/item/projectile/beam/lasertag/omni
+17 -55
View File
@@ -224,9 +224,17 @@
damage_type = BURN
check_armour = "laser"
hud_state = "monkey"
///What suits this beam can hit.
var/list/allowed_suits = list(/obj/item/clothing/suit/lasertag/omni, /obj/item/clothing/suit/lasertag/bluetag, /obj/item/clothing/suit/lasertag/redtag)
///How much damage we do to the tag vest.
var/tag_damage = 1
combustion = FALSE
/obj/item/projectile/beam/lasertag/on_hit(var/atom/target, var/blocked = 0)
return handle_lasertag_attack(target, firer, tag_damage, TRUE, allowed_suits = allowed_suits) //We can't shoot this in the first place without having the proper vest / vest_override, so we feed it vest_override = TRUE
/obj/item/projectile/beam/lasertag/blue
icon_state = "bluelaser"
light_color = "#0066FF"
@@ -234,76 +242,25 @@
muzzle_type = /obj/effect/projectile/muzzle/laser_blue
tracer_type = /obj/effect/projectile/tracer/laser_blue
impact_type = /obj/effect/projectile/impact/laser_blue
allowed_suits = list(/obj/item/clothing/suit/lasertag/redtag, /obj/item/clothing/suit/lasertag/omni)
/obj/item/projectile/beam/lasertag/blue/on_hit(var/atom/target, var/blocked = 0)
if(ishuman(target))
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/lasertag/blue/multhit
name = "blue multi-hit lasertag beam"
/obj/item/projectile/beam/lasertag/blue/multihit/on_hit(var/atom/target, var/blocked = 0)
if(ishuman(target))
var/mob/living/carbon/human/M = target
if(istype(M.wear_suit, /obj/item/clothing/suit/redtag))
var/obj/item/clothing/suit/redtag/S = M.wear_suit
if (S.lasertag_health <= 1)
M.Weaken(5)
to_chat(M,span_warning("You have been defeated!"))
S.lasertag_health = initial(S.lasertag_health)
else
S.lasertag_health--
to_chat(M,span_warning("Danger! You have [num2text(S.lasertag_health)] hits remaining!"))
return 1
/obj/item/projectile/beam/lasertag/red
icon_state = "laser"
light_color = "#FF0D00"
hud_state = "monkey"
/obj/item/projectile/beam/lasertag/red/on_hit(var/atom/target, var/blocked = 0)
if(ishuman(target))
var/mob/living/carbon/human/M = target
if(istype(M.wear_suit, /obj/item/clothing/suit/bluetag))
M.Weaken(5)
return 1
/obj/item/projectile/beam/lasertag/red/multhit
name = "red multi-hit lasertag beam"
/obj/item/projectile/beam/lasertag/red/multihit/on_hit(var/atom/target, var/blocked = 0)
if(ishuman(target))
var/mob/living/carbon/human/M = target
if(istype(M.wear_suit, /obj/item/clothing/suit/bluetag))
var/obj/item/clothing/suit/bluetag/S = M.wear_suit
if(S.lasertag_health <= 1)
M.Weaken(5)
to_chat(M,span_warning("You have been defeated!"))
S.lasertag_health = initial(S.lasertag_health)
else
S.lasertag_health--
to_chat(M,span_warning("Danger! You have [num2text(S.lasertag_health)] hits remaining!"))
return 1
allowed_suits = list(/obj/item/clothing/suit/lasertag/bluetag, /obj/item/clothing/suit/lasertag/omni)
/obj/item/projectile/beam/lasertag/omni//A laser tag bolt that stuns EVERYONE
icon_state = "omnilaser"
light_color = "#00C6FF"
light_color = "#AA24AF"
hud_state = "monkey"
allowed_suits = list(/obj/item/clothing/suit/lasertag)
muzzle_type = /obj/effect/projectile/muzzle/laser_omni
tracer_type = /obj/effect/projectile/tracer/laser_omni
impact_type = /obj/effect/projectile/impact/laser_omni
/obj/item/projectile/beam/lasertag/omni/on_hit(var/atom/target, var/blocked = 0)
if(ishuman(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)))
M.Weaken(5)
return 1
/obj/item/projectile/beam/sniper
name = "sniper beam"
icon_state = "xray"
@@ -444,6 +401,11 @@
hud_state = "laser"
damage = 20
/obj/item/projectile/beam/rainbow/non_lethal
damage = 0
agony = 50
damage_type = HALLOSS
/obj/item/projectile/beam/sparkledog
name = "rainbow"
fire_sound = 'sound/weapons/sparkle.ogg'
@@ -446,6 +446,10 @@
if(istype(T))
new /obj/item/ammo_casing/afoam_dart(get_turf(loc))
///Doesn't give a damn about what faction you're on, hits you anyway.
/obj/item/projectile/bullet/foam_dart/on_hit(var/atom/target, var/blocked = 0)
handle_lasertag_attack(target, firer, tag_damage = 1, vest_override = TRUE)
/obj/item/projectile/bullet/foam_dart/on_range(var/atom/A)
. = ..()
var/turf/T = get_turf(loc)
@@ -480,3 +484,6 @@
var/turf/T = get_turf(loc)
if(istype(T))
new /obj/item/ammo_casing/afoam_dart/riot(get_turf(loc))
/obj/item/projectile/bullet/foam_dart_riot/on_hit(var/atom/target, var/blocked = 0)
handle_lasertag_attack(target, firer, 5, vest_override = TRUE) //Insult to injury.