mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-28 07:20:09 +01:00
Medical Taperolls + Tape Improvements (#10782)
This commit is contained in:
@@ -85,6 +85,10 @@
|
||||
#define I_GRAB "grab"
|
||||
#define I_HURT "harm"
|
||||
|
||||
//movement intents
|
||||
#define M_WALK "walk"
|
||||
#define M_RUN "run"
|
||||
|
||||
// Limbs and robotic stuff.
|
||||
#define BP_L_FOOT "l_foot"
|
||||
#define BP_R_FOOT "r_foot"
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
if(hud_data.has_m_intent)
|
||||
using = new /obj/screen/movement_intent()
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.icon_state = (mymob.m_intent == M_RUN ? "running" : "walking")
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.adding += using
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
var/obj/screen/mov_intent = new /obj/screen/movement_intent()
|
||||
mov_intent.set_dir(SOUTHWEST)
|
||||
mov_intent.icon = 'icons/mob/screen/morph.dmi'
|
||||
mov_intent.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
mov_intent.icon_state = (mymob.m_intent == M_RUN ? "running" : "walking")
|
||||
move_intent = mov_intent
|
||||
|
||||
mymob.healths = new /obj/screen()
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
using = new /obj/screen/movement_intent()
|
||||
using.set_dir(SOUTHWEST)
|
||||
using.icon = 'icons/mob/screen/alien.dmi'
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.icon_state = (mymob.m_intent == M_RUN ? "running" : "walking")
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
|
||||
|
||||
@@ -417,7 +417,7 @@
|
||||
|
||||
user.stamina_bar.update(user.stamina)
|
||||
|
||||
if (user.m_intent == "run")
|
||||
if (user.m_intent == M_RUN)
|
||||
icon_state = "running"
|
||||
else
|
||||
icon_state = "walking"
|
||||
@@ -435,21 +435,21 @@
|
||||
|
||||
if(C.legcuffed)
|
||||
to_chat(C, "<span class='notice'>You are legcuffed! You cannot run until you get [C.legcuffed] removed!</span>")
|
||||
C.m_intent = "walk" //Just incase
|
||||
C.m_intent = M_WALK //Just incase
|
||||
C.hud_used.move_intent.icon_state = "walking"
|
||||
return 1
|
||||
switch(usr.m_intent)
|
||||
if("run")
|
||||
usr.m_intent = "walk"
|
||||
if("walk")
|
||||
usr.m_intent = "run"
|
||||
if(M_RUN)
|
||||
usr.m_intent = M_WALK
|
||||
if(M_WALK)
|
||||
usr.m_intent = M_RUN
|
||||
else if(istype(usr, /mob/living/simple_animal/hostile/morph))
|
||||
var/mob/living/simple_animal/hostile/morph/M = usr
|
||||
switch(usr.m_intent)
|
||||
if("run")
|
||||
usr.m_intent = "walk"
|
||||
if("walk")
|
||||
usr.m_intent = "run"
|
||||
if(M_RUN)
|
||||
usr.m_intent = M_WALK
|
||||
if(M_WALK)
|
||||
usr.m_intent = M_RUN
|
||||
M.update_speed()
|
||||
update_move_icon(usr)
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
/datum/brain_trauma/mild/muscle_weakness/on_life()
|
||||
var/fall_chance = 5
|
||||
if(owner.m_intent == "run")
|
||||
if(owner.m_intent == M_RUN)
|
||||
fall_chance += 15
|
||||
if(prob(fall_chance) && !owner.lying && !owner.buckled)
|
||||
to_chat(owner, "<span class='warning'>Your leg gives out!</span>")
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
if(owner.stat == UNCONSCIOUS || owner.sleeping > 0)
|
||||
return
|
||||
var/sleep_chance = 5
|
||||
if(owner.m_intent == "run")
|
||||
if(owner.m_intent == M_RUN)
|
||||
sleep_chance += 15
|
||||
if(owner.drowsyness)
|
||||
sleep_chance += owner.drowsyness + 5
|
||||
|
||||
@@ -320,7 +320,7 @@ var/list/mob/living/forced_ambiance_list = new
|
||||
L.lastarea = get_area(L.loc)
|
||||
var/area/newarea = get_area(L.loc)
|
||||
var/area/oldarea = L.lastarea
|
||||
if((oldarea.has_gravity() == 0) && (newarea.has_gravity() == 1) && (L.m_intent == "run")) // Being ready when you change areas gives you a chance to avoid falling all together.
|
||||
if((oldarea.has_gravity() == 0) && (newarea.has_gravity() == 1) && (L.m_intent == M_RUN)) // Being ready when you change areas gives you a chance to avoid falling all together.
|
||||
thunk(L)
|
||||
L.update_floating( L.Check_Dense_Object() )
|
||||
|
||||
@@ -375,7 +375,7 @@ var/list/mob/living/forced_ambiance_list = new
|
||||
if(H.Check_Shoegrip(FALSE))
|
||||
return
|
||||
|
||||
if(H.m_intent == "run")
|
||||
if(H.m_intent == M_RUN)
|
||||
H.AdjustStunned(2)
|
||||
H.AdjustWeakened(2)
|
||||
else
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
perp.update_inv_shoes(1)
|
||||
amount--
|
||||
if(amount > 2 && prob(perp.slip_chance(perp.m_intent == "run" ? 20 : 5)))
|
||||
if(amount > 2 && prob(perp.slip_chance(perp.m_intent == M_RUN ? 20 : 5)))
|
||||
perp.slip(src, 4)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/proc/dry()
|
||||
|
||||
@@ -504,7 +504,7 @@
|
||||
/obj/item/toy/snappop/Crossed(H as mob|obj)
|
||||
if((ishuman(H))) //i guess carp and shit shouldn't set them off
|
||||
var/mob/living/carbon/M = H
|
||||
if(M.m_intent == "run")
|
||||
if(M.m_intent == M_RUN)
|
||||
to_chat(M, SPAN_WARNING("You step on the snap pop!"))
|
||||
do_pop()
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
if(H.shoes || H.wear_suit?.body_parts_covered & FEET)
|
||||
damage_coef -= 0.1
|
||||
|
||||
if (H.m_intent == "run")
|
||||
if (H.m_intent == M_RUN)
|
||||
damage_coef += 0.4
|
||||
|
||||
|
||||
|
||||
@@ -17,9 +17,15 @@ var/list/tape_roll_applications = list()
|
||||
icon = 'icons/policetape.dmi'
|
||||
anchored = 1
|
||||
var/lifted = 0
|
||||
var/list/crumplers
|
||||
var/crumpled = 0
|
||||
var/icon_base
|
||||
|
||||
/obj/item/tape/examine(mob/user, distance)
|
||||
. = ..()
|
||||
if(LAZYLEN(crumplers) && Adjacent(user))
|
||||
to_chat(user, SPAN_WARNING("\The [initial(name)] has been crumpled by [english_list(crumplers)]."))
|
||||
|
||||
/obj/item/tape/New()
|
||||
..()
|
||||
if(!hazard_overlays)
|
||||
@@ -42,6 +48,19 @@ var/list/tape_roll_applications = list()
|
||||
req_access = list(access_security)
|
||||
icon_base = "police"
|
||||
|
||||
/obj/item/taperoll/medical
|
||||
name = "medical tape"
|
||||
desc = "A roll of medical tape used to prevent overcrowding of hallways during emergencies."
|
||||
icon_state = "medical_start"
|
||||
tape_type = /obj/item/tape/medical
|
||||
icon_base = "medical"
|
||||
|
||||
/obj/item/tape/medical
|
||||
name = "medical tape"
|
||||
desc = "A length of medical tape. Better not cross it."
|
||||
req_one_access = list(access_medical_equip)
|
||||
icon_base = "medical"
|
||||
|
||||
/obj/item/taperoll/engineering
|
||||
name = "engineering tape"
|
||||
desc = "A roll of engineering tape used to block off working areas from the public."
|
||||
@@ -137,41 +156,50 @@ var/list/tape_roll_applications = list()
|
||||
tape_roll_applications[F] |= direction
|
||||
return
|
||||
|
||||
/obj/item/tape/proc/crumple()
|
||||
/obj/item/tape/proc/crumple(var/mob/user)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/card/id/ID = H.GetIdCard(TRUE)
|
||||
if(ID && ID.registered_name)
|
||||
LAZYDISTINCTADD(crumplers, ID.registered_name)
|
||||
if(!crumpled)
|
||||
crumpled = 1
|
||||
crumpled = TRUE
|
||||
icon_state = "[icon_state]_c"
|
||||
name = "crumpled [name]"
|
||||
|
||||
/obj/item/tape/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(!lifted && ismob(mover))
|
||||
var/mob/M = mover
|
||||
add_fingerprint(M)
|
||||
if (!allowed(M)) //only select few learn art of not crumpling the tape
|
||||
to_chat(M, "<span class='warning'>You are not supposed to go past [src]...</span>")
|
||||
crumple()
|
||||
return ..(mover)
|
||||
if(!allowed(M)) //only select few learn art of not crumpling the tape
|
||||
if(M.a_intent != I_HURT && M.m_intent != M_RUN)
|
||||
return FALSE
|
||||
to_chat(M, SPAN_WARNING("You aren't supposed to go past the [initial(name)]..."))
|
||||
crumple(mover)
|
||||
return ..()
|
||||
|
||||
/obj/item/tape/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/item/tape/attackby(obj/item/W, mob/user)
|
||||
breaktape(W, user)
|
||||
|
||||
/obj/item/tape/attack_hand(mob/user as mob)
|
||||
if (user.a_intent == I_HELP && src.allowed(user))
|
||||
user.show_viewers(SPAN_NOTICE("[user] lifts [src], allowing passage."))
|
||||
crumple()
|
||||
lifted = 1
|
||||
spawn(200)
|
||||
lifted = 0
|
||||
/obj/item/tape/attack_hand(mob/user)
|
||||
if(user.a_intent == I_HELP)
|
||||
lifted = !lifted
|
||||
user.visible_message("<b>[user]</b> [lifted ? "lifts" : "drops"] the [initial(name)], [lifted ? "allowing" : "blocking"] passage.", SPAN_NOTICE("You [lifted ? "lift" : "drop"] the [initial(name)], [lifted ? "allowing" : "blocking"] passage."))
|
||||
var/shake_time = animate_shake()
|
||||
sleep(shake_time)
|
||||
if(!allowed(user))
|
||||
crumple(user)
|
||||
if(lifted)
|
||||
animate(src, 1 SECOND, alpha = 150)
|
||||
else
|
||||
animate(src, 1 SECOND, alpha = initial(alpha))
|
||||
else
|
||||
breaktape(null, user)
|
||||
|
||||
|
||||
|
||||
/obj/item/tape/proc/breaktape(obj/item/W as obj, mob/user as mob)
|
||||
if(user.a_intent == I_HELP && ((!can_puncture(W) && src.allowed(user))))
|
||||
to_chat(user, "You can't break the [src] with that!")
|
||||
to_chat(user, SPAN_NOTICE("You can't break \the [src] with that!"))
|
||||
return
|
||||
user.show_viewers(SPAN_NOTICE("[user] breaks the [src]!"))
|
||||
user.visible_message(SPAN_NOTICE("[user] breaks \the [src]!"))
|
||||
|
||||
var/dir[2]
|
||||
var/icon_dir = src.icon_state
|
||||
@@ -193,5 +221,4 @@ var/list/tape_roll_applications = list()
|
||||
qdel(P)
|
||||
cur = get_step(cur,dir[i])
|
||||
|
||||
qdel(src)
|
||||
return
|
||||
qdel(src)
|
||||
@@ -223,6 +223,7 @@
|
||||
var/shake_dir = pick(-1, 1)
|
||||
animate(src, transform = turn(matrix(), 8*shake_dir), pixel_x = init_px + 2*shake_dir, time = 1)
|
||||
animate(transform = null, pixel_x = init_px, time = 6, easing = ELASTIC_EASING)
|
||||
return 7 // how long it takes to do this
|
||||
|
||||
/obj/proc/rotate(var/mob/user, var/anchored_ignore = FALSE)
|
||||
if(use_check_and_message(user))
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
if(istype(A,/mob/living))
|
||||
var/mob/living/M = A
|
||||
if(src.wet_type && src.wet_amount)
|
||||
if(M.buckled || (src.wet_type == 1 && M.m_intent == "walk"))
|
||||
if(M.buckled || (src.wet_type == 1 && M.m_intent == M_WALK))
|
||||
return
|
||||
|
||||
//Water
|
||||
|
||||
@@ -254,7 +254,7 @@ var/const/enterloopsanity = 100
|
||||
if(H.shoes)
|
||||
var/obj/item/clothing/shoes/S = H.shoes
|
||||
if(istype(S))
|
||||
S.handle_movement(src, H.m_intent == "run" ? TRUE : FALSE)
|
||||
S.handle_movement(src, H.m_intent == M_RUN ? TRUE : FALSE)
|
||||
if(S.track_footprint)
|
||||
if(S.blood_DNA)
|
||||
footprint_DNA = S.blood_DNA
|
||||
|
||||
@@ -76,9 +76,9 @@
|
||||
/mob/living/carbon/alien/diona/movement_delay()
|
||||
. = ..()
|
||||
switch(m_intent)
|
||||
if("walk")
|
||||
if(M_WALK)
|
||||
. += 3
|
||||
if("run")
|
||||
if(M_RUN)
|
||||
species.handle_sprint_cost(src,.+config.walk_speed)
|
||||
|
||||
/mob/living/carbon/alien/diona/ex_act(severity)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
if(src.hydration)
|
||||
adjustHydrationLoss(hydration_loss*0.1)
|
||||
|
||||
if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
|
||||
if((FAT in src.mutations) && src.m_intent == M_RUN && src.bodytemperature <= 360)
|
||||
src.bodytemperature += 2
|
||||
|
||||
// Moving around increases germ_level faster
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
return
|
||||
last_x = x
|
||||
last_y = y
|
||||
if (m_intent == "run")
|
||||
if (m_intent == M_RUN)
|
||||
playsound(src, footsound, 70, 1, required_asfx_toggles = ASFX_FOOTSTEPS)
|
||||
else
|
||||
footstep++
|
||||
|
||||
@@ -567,7 +567,7 @@
|
||||
H.flash_pain(H.get_shock())
|
||||
|
||||
if ((H.get_shock() + H.getOxyLoss()) >= (exhaust_threshold * 0.8))
|
||||
H.m_intent = "walk"
|
||||
H.m_intent = M_WALK
|
||||
H.hud_used.move_intent.update_move_icon(H)
|
||||
to_chat(H, SPAN_DANGER("You're too exhausted to run anymore!"))
|
||||
H.flash_pain(H.get_shock())
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
DS.stored_energy = 0
|
||||
H.adjustHalLoss(remainder*5, 1)
|
||||
H.updatehealth()
|
||||
H.m_intent = "walk"
|
||||
H.m_intent = M_WALK
|
||||
H.hud_used.move_intent.update_move_icon(H)
|
||||
to_chat(H, SPAN_DANGER("We have expended our energy reserves, and cannot continue to move at such a pace. We must find light!"))
|
||||
return 0
|
||||
|
||||
@@ -135,7 +135,7 @@ datum/species/machine/handle_post_spawn(var/mob/living/carbon/human/H)
|
||||
H.adjustNutritionLoss(cost * sprint_charge_factor)
|
||||
if(H.nutrition <= 0 && H.max_nutrition > 0)
|
||||
H.Weaken(15)
|
||||
H.m_intent = "walk"
|
||||
H.m_intent = M_WALK
|
||||
H.hud_used.move_intent.update_move_icon(H)
|
||||
to_chat(H, SPAN_DANGER("ERROR: Power reserves depleted, emergency shutdown engaged. Backup power will come online in approximately 30 seconds, initiate charging as primary directive."))
|
||||
playsound(H.loc, 'sound/machines/buzz-two.ogg', 100, 0)
|
||||
|
||||
@@ -1139,8 +1139,8 @@ There are several things that need to be remembered:
|
||||
standing = image('icons/mob/mob.dmi', "legcuff1")
|
||||
overlays_raw[LEGCUFF_LAYER] = standing
|
||||
|
||||
if(m_intent != "walk")
|
||||
m_intent = "walk"
|
||||
if(m_intent != M_WALK)
|
||||
m_intent = M_WALK
|
||||
if(hud_used && hud_used.move_intent)
|
||||
hud_used.move_intent.icon_state = "walking"
|
||||
|
||||
|
||||
@@ -221,6 +221,7 @@ var/global/list/robot_modules = list(
|
||||
src.modules += new /obj/item/device/mass_spectrometer(src)
|
||||
src.modules += new /obj/item/autopsy_scanner(src)
|
||||
src.modules += new /obj/item/device/breath_analyzer(src)
|
||||
modules += new /obj/item/taperoll/medical(src)
|
||||
src.modules += new /obj/item/taperoll/engineering(src) // To enable 'borgs to telegraph danger visually.
|
||||
src.modules += new /obj/item/inflatable_dispenser(src) // To enable 'borgs to protect Crew from danger in direct hazards.
|
||||
src.modules += new /obj/item/device/gps(src) // For being located while disabled and coordinating with life sensor consoles.
|
||||
@@ -294,6 +295,7 @@ var/global/list/robot_modules = list(
|
||||
src.modules += new /obj/item/gripper/chemistry(src)
|
||||
src.modules += new /obj/item/tank/jetpack/carbondioxide/synthetic(src)
|
||||
src.modules += new /obj/item/borg/rescue/mobility(src)
|
||||
modules += new /obj/item/taperoll/medical(src)
|
||||
src.modules += new /obj/item/taperoll/engineering(src) // To enable 'borgs to telegraph danger visually.
|
||||
src.modules += new /obj/item/inflatable_dispenser(src) // To enable 'borgs to protect Crew from danger in direct hazards.
|
||||
src.modules += new /obj/item/device/gps(src) // For being located while disabled and coordinating with life sensor consoles.
|
||||
|
||||
@@ -111,9 +111,9 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/morph/proc/update_speed()
|
||||
switch(m_intent)
|
||||
if("run")
|
||||
if(M_RUN)
|
||||
speed = 1.5
|
||||
if("walk")
|
||||
if(M_WALK)
|
||||
speed = 2.5
|
||||
|
||||
/mob/living/simple_animal/hostile/morph/proc/allowed(atom/movable/A)
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
var/intent = null//Living
|
||||
var/shakecamera = 0
|
||||
var/a_intent = I_HELP//Living
|
||||
var/m_intent = "walk"//Living
|
||||
var/m_intent = M_WALK //Living
|
||||
var/lastKnownIP = null
|
||||
var/obj/buckled = null//Living
|
||||
var/obj/item/l_hand = null//Living
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
if (mob_is_human)
|
||||
var/mob/living/carbon/human/H = mob
|
||||
//If we're sprinting and able to continue sprinting, then apply the sprint bonus ontop of this
|
||||
if (H.m_intent == "run" && (H.status_flags & GODMODE || H.species.handle_sprint_cost(H, tally))) //This will return false if we collapse from exhaustion
|
||||
if (H.m_intent == M_RUN && (H.status_flags & GODMODE || H.species.handle_sprint_cost(H, tally))) //This will return false if we collapse from exhaustion
|
||||
tally = (tally / (1 + H.sprint_speed_factor)) * config.run_delay_multiplier
|
||||
else
|
||||
tally = max(tally * config.walk_delay_multiplier, H.min_walk_delay) //clamp walking speed if its limited
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
..()
|
||||
if(ishuman(am))
|
||||
var/mob/living/carbon/human/H = am
|
||||
if(H.a_intent != I_HELP || H.m_intent == "run")
|
||||
if(H.a_intent != I_HELP || H.m_intent == M_RUN)
|
||||
throw_things(H)
|
||||
else if(H.is_diona() || H.species.get_bodytype() == BODYTYPE_IPC_INDUSTRIAL)
|
||||
throw_things(H)
|
||||
@@ -119,7 +119,7 @@
|
||||
)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.a_intent != I_HELP || H.m_intent == "run")
|
||||
if(H.a_intent != I_HELP || H.m_intent == M_RUN)
|
||||
throw_things(H)
|
||||
else if(H.is_diona() || H.species.get_bodytype() == BODYTYPE_IPC_INDUSTRIAL)
|
||||
throw_things(H)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
author: Geeves
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- rscadd: "Added some medical taperolls to the medical sub-level equipment area and EMT room. Also gave medical borgs medical taperolls."
|
||||
- rscadd: "Crumpled tape now stores who crumpled it, provided the crumpler had an ID to track them with."
|
||||
- rscadd: "Tape now physically blocks passage, unless the mover has their intent set to harm, or their move intent set to run."
|
||||
- rscadd: "Lifting tape now actually works as you'd expect it to. It plays a little animation and goes transparent. If you don't have access, it crumples, if you do, it doesn't. People can now pass over without crumpling it or needing intents set."
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 23 KiB |
@@ -21468,6 +21468,22 @@
|
||||
name = "Station Intercom (General)";
|
||||
pixel_y = 22
|
||||
},
|
||||
/obj/item/taperoll/medical{
|
||||
pixel_x = -6;
|
||||
pixel_y = 6
|
||||
},
|
||||
/obj/item/taperoll/medical{
|
||||
pixel_x = -6;
|
||||
pixel_y = 6
|
||||
},
|
||||
/obj/item/taperoll/medical{
|
||||
pixel_x = -6;
|
||||
pixel_y = 6
|
||||
},
|
||||
/obj/item/taperoll/medical{
|
||||
pixel_x = -6;
|
||||
pixel_y = 6
|
||||
},
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/medical/medbay4)
|
||||
"aSH" = (
|
||||
|
||||
@@ -46332,6 +46332,14 @@
|
||||
pixel_y = 5
|
||||
},
|
||||
/obj/effect/floor_decal/corner/white/diagonal,
|
||||
/obj/item/taperoll/medical{
|
||||
pixel_x = -6;
|
||||
pixel_y = 6
|
||||
},
|
||||
/obj/item/taperoll/medical{
|
||||
pixel_x = -6;
|
||||
pixel_y = 6
|
||||
},
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/medical/first_responder)
|
||||
"bAO" = (
|
||||
|
||||
Reference in New Issue
Block a user