mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 00:21:11 +01:00
Split examine verb and function, and improve it (#17251)
* Split examine verb and function, and include adjacency and distance checking in examine function * Fix various issues * Update code/modules/mob/examinations.dm Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com> * Add required define vars * Update code/game/objects/items/stacks/wrap.dm Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com> --------- Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>
This commit is contained in:
co-authored by
SleepyGemmy
parent
39228d3a2c
commit
ce5ac79e3c
@@ -72,7 +72,15 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/railing/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(health < maxhealth)
|
||||
switch(health / maxhealth)
|
||||
if(0.0 to 0.5)
|
||||
to_chat(user, SPAN_WARNING("It looks severely damaged!"))
|
||||
if(0.25 to 0.5)
|
||||
to_chat(user, SPAN_WARNING("It looks damaged!"))
|
||||
if(0.5 to 1.0)
|
||||
to_chat(user, SPAN_NOTICE("It has a few scrapes and dents."))
|
||||
to_chat(user, FONT_SMALL(SPAN_NOTICE("\The [src] is <b>[density ? "closed" : "open"]</b> to passage.")))
|
||||
to_chat(user, FONT_SMALL(SPAN_NOTICE("\The [src] is <b>[anchored ? "" : "not"] screwed</b> to the floor.")))
|
||||
|
||||
@@ -87,17 +95,6 @@
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
/obj/structure/railing/examine(mob/user)
|
||||
..()
|
||||
if(health < maxhealth)
|
||||
switch(health / maxhealth)
|
||||
if(0.0 to 0.5)
|
||||
to_chat(user, SPAN_WARNING("It looks severely damaged!"))
|
||||
if(0.25 to 0.5)
|
||||
to_chat(user, SPAN_WARNING("It looks damaged!"))
|
||||
if(0.5 to 1.0)
|
||||
to_chat(user, SPAN_NOTICE("It has a few scrapes and dents."))
|
||||
|
||||
/obj/structure/railing/proc/take_damage(amount)
|
||||
health -= amount
|
||||
if(health <= 0)
|
||||
|
||||
Reference in New Issue
Block a user