diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 5d6aa3823ff..f945a1576be 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -910,7 +910,7 @@ About the new airlock wires panel: /obj/machinery/door/airlock/Topic(href, href_list, var/nowindow = 0) if(!nowindow) ..() - if(usr.stat || usr.restrained()) + if(usr.stat || usr.restrained()|| ismouse(usr)) return add_fingerprint(usr) if(href_list["close"]) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 9405732d940..4aafbe667fa 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -47,7 +47,7 @@ var/mob/M = AM if(world.time - M.last_bumped <= 10) return //Can bump-open one airlock per second. This is to prevent shock spam. M.last_bumped = world.time - if(!M.restrained()) + if(!M.restrained() && !ismouse(M)) bumpopen(M) return diff --git a/code/global.dm b/code/global.dm index c7b2404e0ab..3a81f7bac43 100644 --- a/code/global.dm +++ b/code/global.dm @@ -103,6 +103,7 @@ var/list/shuttles = list( ) var/list/reg_dna = list( ) // list/traitobj = list( ) +var/mouse_respawn_time = 5 //Amount of time that must pass between a player dying as a mouse and repawning as a mouse. In minutes. var/CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second) var/CHARGELEVEL = 0.001 // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second) diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm index 2675436c33a..6fbb741b990 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -16,6 +16,7 @@ var/moving = null var/adminobs = null var/area = null + var/can_spawn_as_mouse = 1 /////////////// diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index d8b3b9b92ca..68a9a834809 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -263,6 +263,10 @@ 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 << "You may only spawn again as a mouse more than [mouse_respawn_time] minutes after your death." + return + //find a viable mouse candidate var/mob/living/simple_animal/mouse/host var/obj/machinery/atmospherics/unary/vent_pump/vent_found diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 24c03f57445..8c22808fdef 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -461,6 +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(!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 diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index 837b7e24903..9e5648005f1 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -84,9 +84,11 @@ if(loc==startloc) var/obj/target_vent = vents[selection_position] if(target_vent) + /* for(var/mob/O in oviewers(src, null)) if ((O.client && !( O.blinded ))) O.show_message(text("[src] scrambles into the ventillation ducts!"), 1) + */ loc = target_vent.loc else src << "\blue You need to remain still while entering a vent." @@ -107,15 +109,19 @@ if (layer != TURF_LAYER+0.2) layer = TURF_LAYER+0.2 src << text("\blue You are now hiding.") + /* for(var/mob/O in oviewers(src, null)) if ((O.client && !( O.blinded ))) O << text("[] scurries to the ground!", src) + */ else layer = MOB_LAYER src << text("\blue You have stopped hiding.") + /* for(var/mob/O in oviewers(src, null)) if ((O.client && !( O.blinded ))) O << text("[] slowly peaks up from the ground...", src) + */ //make mice fit under tables etc? this was hacky, and not working /* @@ -152,6 +158,17 @@ M << 'sound/effects/mousesqueek.ogg' ..() +/mob/living/simple_animal/mouse/Die() + if(client) + client.mouse_respawn_timer() + ..() + +/client/proc/mouse_respawn_timer() + can_spawn_as_mouse = 0 + spawn(mouse_respawn_time * 600) + can_spawn_as_mouse = 1 + return + /* * Mouse types */ diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 49c6aac75d6..c20091e4c30 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -198,7 +198,10 @@ del(src) if(ismouse(M)) var/mob/living/simple_animal/mouse/N = M - N.emote("nibbles away at the [src]") + N << text("\blue You nibble away at [src].") + if(prob(50)) + N.visible_message("[N] nibbles away at [src].", "") + //N.emote("nibbles away at the [src]") N.health = min(N.health + 1, N.maxHealth) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 51a44003ed3..f4e53667a2e 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -136,6 +136,7 @@ MouseDrop_T(mob/target, mob/user) if (!istype(target) || target.buckled || get_dist(user, src) > 1 || get_dist(user, target) > 1 || user.stat || istype(user, /mob/living/silicon/ai)) return + if(ismouse(user) && target != user) return //mice cannot put mobs other than themselves into disposal src.add_fingerprint(user) var/target_loc = target.loc var/msg