Removes some unnecessary global variables (#16353)

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
This commit is contained in:
SabreML
2021-11-28 09:50:27 +01:00
committed by GitHub
co-authored by AffectedArc07
parent fa275ffe74
commit 5397d28c4f
31 changed files with 51 additions and 219 deletions
+6 -3
View File
@@ -1130,13 +1130,14 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
to_chat(usr, "You are not dead or you have given up your right to be respawned!")
return
#define MOUSE_RESPAWN_TIME 5 MINUTES
/mob/proc/become_mouse()
var/timedifference = world.time - client.time_died_as_mouse
if(client.time_died_as_mouse && timedifference <= GLOB.mouse_respawn_time * 600)
if(client.time_died_as_mouse && timedifference <= MOUSE_RESPAWN_TIME)
var/timedifference_text
timedifference_text = time2text(GLOB.mouse_respawn_time * 600 - timedifference,"mm:ss")
to_chat(src, "<span class='warning'>You may only spawn again as a mouse more than [GLOB.mouse_respawn_time] minutes after your death. You have [timedifference_text] left.</span>")
timedifference_text = time2text(MOUSE_RESPAWN_TIME - timedifference, "mm:ss")
to_chat(src, "<span class='warning'>You may only spawn again as a mouse more than [MOUSE_RESPAWN_TIME / 600] minutes after your death. You have [timedifference_text] left.</span>")
return
//find a viable mouse candidate
@@ -1149,6 +1150,8 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
else
to_chat(src, "<span class='warning'>Unable to find any unwelded vents to spawn mice at.</span>")
#undef MOUSE_RESPAWN_TIME
/mob/proc/assess_threat() //For sec bot threat assessment
return 5