diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 5d6aa3823ff..8db6aa50b73 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()|| usr.small) 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..f8c71f4decf 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() && !M.small) 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..2c69b9957ef 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/time_died_as_mouse = null //when the client last died as a mouse /////////////// diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 5727e7b671e..f60a5409da9 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -151,6 +151,7 @@ metadata = sanitize_text(metadata, initial(metadata)) real_name = reject_bad_name(real_name) if(isnull(species)) species = "Human" + if(isnull(nanotrasen_relation)) nanotrasen_relation = initial(nanotrasen_relation) if(!real_name) real_name = random_name() be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name)) gender = sanitize_gender(gender) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index d8b3b9b92ca..4b4dac419d9 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -263,6 +263,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set name = "Become mouse" set category = "Ghost" + 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 << "You may only spawn again as a mouse more than [mouse_respawn_time] minutes after your death. You have [timedifference_text] left." + 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..1fa82e5778d 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(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 diff --git a/code/modules/mob/living/simple_animal/friendly/crab.dm b/code/modules/mob/living/simple_animal/friendly/crab.dm index 418e4b68582..98ab4560a3a 100644 --- a/code/modules/mob/living/simple_animal/friendly/crab.dm +++ b/code/modules/mob/living/simple_animal/friendly/crab.dm @@ -5,6 +5,7 @@ icon_state = "crab" icon_living = "crab" icon_dead = "crab_dead" + small = 1 speak_emote = list("clicks") emote_hear = list("clicks") emote_see = list("clacks") diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm index 4db364cb5a6..52f241c8681 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -167,6 +167,7 @@ health = 1 var/amount_grown = 0 pass_flags = PASSTABLE | PASSGRILLE + small = 1 /mob/living/simple_animal/chick/New() ..() @@ -208,6 +209,7 @@ var/global/chicken_count = 0 var/eggsleft = 0 var/color pass_flags = PASSTABLE + small = 1 /mob/living/simple_animal/chicken/New() ..() diff --git a/code/modules/mob/living/simple_animal/friendly/lizard.dm b/code/modules/mob/living/simple_animal/friendly/lizard.dm index 4a235c30fa7..171e96fc62b 100644 --- a/code/modules/mob/living/simple_animal/friendly/lizard.dm +++ b/code/modules/mob/living/simple_animal/friendly/lizard.dm @@ -5,6 +5,7 @@ icon_state = "lizard" icon_living = "lizard" icon_dead = "lizard-dead" + small = 1 speak_emote = list("hisses") health = 5 maxHealth = 5 diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index 837b7e24903..379ab571347 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -10,6 +10,7 @@ emote_hear = list("squeeks","squeaks","squiks") emote_see = list("runs in a circle", "shakes", "scritches at something") pass_flags = PASSTABLE + small = 1 speak_chance = 1 turns_per_move = 5 see_in_dark = 6 @@ -48,6 +49,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() @@ -84,9 +87,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 +112,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 +161,11 @@ M << 'sound/effects/mousesqueek.ogg' ..() +/mob/living/simple_animal/mouse/Die() + if(client) + client.time_died_as_mouse = world.time + ..() + /* * Mouse types */ diff --git a/code/modules/mob/living/simple_animal/friendly/mushroom.dm b/code/modules/mob/living/simple_animal/friendly/mushroom.dm index 736aeeed6be..ef2eb6cd61e 100644 --- a/code/modules/mob/living/simple_animal/friendly/mushroom.dm +++ b/code/modules/mob/living/simple_animal/friendly/mushroom.dm @@ -4,6 +4,7 @@ icon_state = "mushroom" icon_living = "mushroom" icon_dead = "mushroom_dead" + small = 1 speak_chance = 0 turns_per_move = 1 maxHealth = 5 diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 97cf632cf04..b8c5d4150bd 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -8,7 +8,7 @@ var/projectiletype var/projectilesound var/casingtype - var/move_to_delay = 2 //delay for the automated movement. + var/move_to_delay = 4 //delay for the automated movement. var/list/friends = list() var/break_stuff_probability = 10 stop_automated_movement_when_pulled = 0 diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm index dd50f3aef6c..f97e0eb8c28 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm @@ -19,7 +19,7 @@ stop_automated_movement_when_pulled = 0 health = 300 maxHealth = 300 - speed = 4 + speed = 8 projectiletype = /obj/item/projectile/beam/drone projectilesound = 'sound/weapons/laser3.ogg' destroy_surroundings = 0 @@ -35,11 +35,16 @@ var/disabled = 0 var/exploding = 0 + //Drones aren't affected by atmos. min_oxy = 0 + max_oxy = 0 + min_tox = 0 max_tox = 0 + min_co2 = 0 max_co2 = 0 + min_n2 = 0 + max_n2 = 0 minbodytemp = 0 - maxbodytemp = 600 var/has_loot = 1 faction = "malf_drone" diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 931c88587fd..756d49bbf21 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -33,6 +33,7 @@ icon_living = "parrot_fly" icon_dead = "parrot_dead" pass_flags = PASSTABLE + small = 1 speak = list("Hi","Hello!","Cracker?","BAWWWWK george mellons griffing me") speak_emote = list("squawks","says","yells") diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 3601ab3547a..4c29fff323f 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -446,7 +446,7 @@ /mob/living/simple_animal/proc/SA_attackable(target_mob) if (isliving(target_mob)) var/mob/living/L = target_mob - if(!L.stat || L.health <= 0) + if(!L.stat && L.health >= 0) return (0) if (istype(target_mob,/obj/mecha)) var/obj/mecha/M = target_mob diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index f85f989a9e3..f8960a586db 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -79,6 +79,7 @@ var/eye_stat = null//Living, potentially Carbon var/lastpuke = 0 var/unacidable = 0 + var/small = 0 var/name_archive //For admin things like possession 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..6ff62b6565b 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(isanimal(user) && target != user) return //animals cannot put mobs other than themselves into disposal src.add_fingerprint(user) var/target_loc = target.loc var/msg diff --git a/maptools/clean_map.bat b/maptools/clean_map.bat index 8ce90510b2e..804c8a41f46 100644 --- a/maptools/clean_map.bat +++ b/maptools/clean_map.bat @@ -1,2 +1 @@ -java -jar MapPatcher.jar -clean ../maps/tgstation.2.0.9.1.dmm.backup ../maps/tgstation.2.0.9.1.dmm ../maps/tgstation.2.0.9.1.dmm -del ../maps/tgstation.2.0.9.1.dmm.backup +java -jar MapPatcher.jar -clean ../maps/tgstation.2.1.0.0.1.dmm.backup ../maps/tgstation.2.1.0.0.1.dmm ../maps/tgstation.2.1.0.0.1.dmm \ No newline at end of file diff --git a/maptools/prepare_map.bat b/maptools/prepare_map.bat index 92a1aa44f7e..dec9fa9ecbc 100644 --- a/maptools/prepare_map.bat +++ b/maptools/prepare_map.bat @@ -1,2 +1,2 @@ cd ../maps -copy tgstation.2.0.9.1.dmm tgstation.2.0.9.1.dmm.backup +copy tgstation.2.1.0.0.1.dmm tgstation.2.1.0.0.1.dmm.backup