[DNM][DNM][WIP] Projectile backend code port and update
Ports#54924, #65061, #59804 from /tg. adds auxiliary code from /tg to make code work.
This commit is contained in:
@@ -51,20 +51,19 @@
|
||||
name = "holo barrier"
|
||||
desc = "A short holographic barrier which can only be passed by walking."
|
||||
icon_state = "holosign_sec"
|
||||
pass_flags = LETPASSTHROW
|
||||
pass_flags_self = PASSTABLE | PASSGRILLE | PASSGLASS | LETPASSTHROW
|
||||
density = TRUE
|
||||
max_integrity = 20
|
||||
var/allow_walk = 1 //can we pass through it on walk intent
|
||||
|
||||
/obj/structure/holosign/barrier/CanPass(atom/movable/mover, turf/target)
|
||||
if(!density)
|
||||
return 1
|
||||
if(mover.pass_flags & (PASSGLASS|PASSTABLE|PASSGRILLE))
|
||||
return 1
|
||||
/obj/structure/holosign/barrier/CanAllowThrough(atom/movable/mover, turf/target)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(iscarbon(mover))
|
||||
var/mob/living/carbon/C = mover
|
||||
if(allow_walk && C.m_intent == MOVE_INTENT_WALK)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/structure/holosign/barrier/engineering
|
||||
icon_state = "holosign_engi"
|
||||
@@ -149,22 +148,27 @@
|
||||
. = ..()
|
||||
. += "<span class='notice'>The biometric scanners are <b>[force_allaccess ? "off" : "on"]</b>.</span>"
|
||||
|
||||
/obj/structure/holosign/barrier/medical/CanPass(atom/movable/mover, turf/target)
|
||||
icon_state = "holo_medical"
|
||||
/obj/structure/holosign/barrier/medical/CanAllowThrough(atom/movable/mover, turf/target)
|
||||
. = ..()
|
||||
if(force_allaccess)
|
||||
return TRUE
|
||||
if(ishuman(mover))
|
||||
var/mob/living/carbon/human/sickboi = mover
|
||||
var/threat = sickboi.check_virus()
|
||||
switch(threat)
|
||||
if(DISEASE_SEVERITY_MINOR, DISEASE_SEVERITY_MEDIUM, DISEASE_SEVERITY_HARMFUL, DISEASE_SEVERITY_DANGEROUS, DISEASE_SEVERITY_BIOHAZARD)
|
||||
if(buzzcd < world.time)
|
||||
playsound(get_turf(src),'sound/machines/buzz-sigh.ogg',65,1,4)
|
||||
buzzcd = (world.time + 60)
|
||||
icon_state = "holo_medical-deny"
|
||||
return FALSE
|
||||
else
|
||||
return TRUE //nice or benign diseases!
|
||||
|
||||
return CheckHuman(mover)
|
||||
|
||||
/obj/structure/holosign/barrier/medical/Bumped(atom/movable/AM)
|
||||
. = ..()
|
||||
icon_state = "holo_medical"
|
||||
if(ishuman(AM) && !CheckHuman(AM))
|
||||
if(buzzcd < world.time)
|
||||
playsound(get_turf(src),'sound/machines/buzz-sigh.ogg',65,TRUE,4)
|
||||
buzzcd = (world.time + 60)
|
||||
icon_state = "holo_medical-deny"
|
||||
|
||||
/obj/structure/holosign/barrier/medical/proc/CheckHuman(mob/living/carbon/human/sickboi)
|
||||
var/threat = sickboi.check_virus()
|
||||
if(get_disease_severity_value(threat) > get_disease_severity_value(DISEASE_SEVERITY_MINOR))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/holosign/barrier/medical/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
|
||||
Reference in New Issue
Block a user