mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Some uses of ismouse() replaced with isanimal()
world.time used to calculate mouse spawn timer. Spawn timer now applies to being killed via splat().
This commit is contained in:
@@ -263,8 +263,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set name = "Become mouse"
|
||||
set category = "Ghost"
|
||||
|
||||
if(client.can_spawn_as_mouse == 0)
|
||||
src << "<span class='warning'>You may only spawn again as a mouse more than [mouse_respawn_time] minutes after your death.</span>"
|
||||
var/timedifference = world.time - client.time_died_as_mouse
|
||||
if(client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600)
|
||||
var/timedifference_text
|
||||
timedifference_text = time2text(mouse_respawn_time * 600 - timedifference,"mm:ss")
|
||||
src << "<span class='warning'>You may only spawn again as a mouse more than [mouse_respawn_time] minutes after your death. You have [timedifference_text] left.</span>"
|
||||
return
|
||||
|
||||
//find a viable mouse candidate
|
||||
|
||||
@@ -461,7 +461,7 @@ It can still be worn/put on as normal.
|
||||
*/
|
||||
/obj/effect/equip_e/human/done() //TODO: And rewrite this :< ~Carn
|
||||
target.cpr_time = 1
|
||||
if(ismouse(source)) return //mice cannot strip people
|
||||
if(isanimal(source)) return //animals cannot strip people
|
||||
if(!source || !target) return //Target or source no longer exist
|
||||
if(source.loc != s_loc) return //source has moved
|
||||
if(target.loc != t_loc) return //target has moved
|
||||
|
||||
@@ -48,6 +48,8 @@
|
||||
src.stat = DEAD
|
||||
src.icon_dead = "mouse_[color]_splat"
|
||||
src.icon_state = "mouse_[color]_splat"
|
||||
if(client)
|
||||
client.time_died_as_mouse = world.time
|
||||
|
||||
//copy paste from alien/larva, if that func is updated please update this one also
|
||||
/mob/living/simple_animal/mouse/verb/ventcrawl()
|
||||
@@ -160,15 +162,9 @@
|
||||
|
||||
/mob/living/simple_animal/mouse/Die()
|
||||
if(client)
|
||||
client.mouse_respawn_timer()
|
||||
client.time_died_as_mouse = world.time
|
||||
..()
|
||||
|
||||
/client/proc/mouse_respawn_timer()
|
||||
can_spawn_as_mouse = 0
|
||||
spawn(mouse_respawn_time * 600)
|
||||
can_spawn_as_mouse = 1
|
||||
return
|
||||
|
||||
/*
|
||||
* Mouse types
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user