mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
@@ -1,4 +1,5 @@
|
||||
#define REGAL_RAT_CHANCE 2
|
||||
#define PLAGUE_RAT_CHANCE 5
|
||||
SUBSYSTEM_DEF(minor_mapping)
|
||||
name = "Minor Mapping"
|
||||
init_order = INIT_ORDER_MINOR_MAPPING
|
||||
@@ -21,6 +22,9 @@ SUBSYSTEM_DEF(minor_mapping)
|
||||
if(!M)
|
||||
if(regal && prob(REGAL_RAT_CHANCE))
|
||||
M = new /mob/living/simple_animal/hostile/regalrat/controlled(proposed_turf)
|
||||
else if(prob(PLAGUE_RAT_CHANCE))
|
||||
M = new /mob/living/simple_animal/hostile/rat/plaguerat(proposed_turf)
|
||||
notify_ghosts("A plague \a [M] has migrated into the station!", source = M, action=NOTIFY_ORBIT, header="Something Interesting!")
|
||||
else
|
||||
M = new /mob/living/simple_animal/mouse(proposed_turf)
|
||||
else
|
||||
@@ -64,3 +68,4 @@ SUBSYSTEM_DEF(minor_mapping)
|
||||
return shuffle(suitable)
|
||||
|
||||
#undef REGAL_RAT_CHANCE
|
||||
#undef PLAGUE_RAT_CHANCE
|
||||
@@ -7,13 +7,13 @@
|
||||
cures = list(/datum/reagent/medicine/spaceacillin)
|
||||
agent = "Plague rats"
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
cure_chance = 20
|
||||
cure_chance = 10
|
||||
desc = "A deadly disease, spread by infected animals and insects. It causes fever, weakness, headache and choking."
|
||||
required_organs = list(/obj/item/organ/lungs)
|
||||
severity = DISEASE_SEVERITY_BIOHAZARD
|
||||
bypasses_immunity = TRUE
|
||||
|
||||
/datum/disease/tuberculosis/stage_act()
|
||||
/datum/disease/plague/stage_act()
|
||||
..()
|
||||
switch(stage)
|
||||
if(2)
|
||||
@@ -45,7 +45,7 @@
|
||||
to_chat(affected_mob, span_danger("You feel hot!"))
|
||||
if(prob(2))
|
||||
to_chat(affected_mob, span_danger("You feel very weak!"))
|
||||
affected_mob.adjustStaminaLoss(100)
|
||||
affected_mob.adjustStaminaLoss(60)
|
||||
if(prob(6))
|
||||
to_chat(affected_mob, span_danger("Your lungs feel full of fluid! You're unable to breathe!"))
|
||||
affected_mob.adjustOxyLoss(35)
|
||||
|
||||
@@ -102,13 +102,13 @@ GLOBAL_VAR_INIT(mouse_killed, 0)
|
||||
var/obj/structure/cable/C = locate() in F
|
||||
if(C && prob(15))
|
||||
if(C.avail())
|
||||
visible_message("<span class='warning'>[src] chews through the [C]. It's toast!</span>")
|
||||
visible_message(span_warning("[src] chews through the [C]. It's toast!"))
|
||||
playsound(src, 'sound/effects/sparks2.ogg', 100, TRUE)
|
||||
C.deconstruct()
|
||||
death(toast=1)
|
||||
else
|
||||
C.deconstruct()
|
||||
visible_message("<span class='warning'>[src] chews through the [C].</span>")
|
||||
visible_message(span_warning("[src] chews through the [C]."))
|
||||
for(var/obj/item/reagent_containers/food/snacks/cheesewedge/cheese in range(1, src))
|
||||
if(prob(10))
|
||||
be_fruitful()
|
||||
@@ -126,18 +126,18 @@ GLOBAL_VAR_INIT(mouse_killed, 0)
|
||||
/mob/living/simple_animal/mouse/proc/be_fruitful()
|
||||
var/cap = CONFIG_GET(number/ratcap)
|
||||
if(LAZYLEN(SSmobs.cheeserats) >= cap)
|
||||
visible_message("<span class='warning'>[src] carefully eats the cheese, hiding it from the [cap] mice on the station!</span>")
|
||||
visible_message(span_warning("[src] carefully eats the cheese, hiding it from the [cap] mice on the station!"))
|
||||
return
|
||||
var/mob/living/newmouse = new /mob/living/simple_animal/mouse(loc)
|
||||
SSmobs.cheeserats += newmouse
|
||||
visible_message("<span class='notice'>[src] nibbles through the cheese, attracting another mouse!</span>")
|
||||
visible_message(span_notice("[src] nibbles through the cheese, attracting another mouse!"))
|
||||
|
||||
/**
|
||||
*Spawns a new regal rat, says some good jazz, and if sentient, transfers the relivant mind.
|
||||
*/
|
||||
/mob/living/simple_animal/mouse/proc/evolve()
|
||||
var/mob/living/simple_animal/hostile/regalrat = new /mob/living/simple_animal/hostile/regalrat(loc)
|
||||
visible_message("<span class='warning'>[src] devours the cheese! He morphs into something... greater!</span>")
|
||||
visible_message(span_warning("[src] devours the cheese! He morphs into something... greater!"))
|
||||
regalrat.say("RISE, MY SUBJECTS! SCREEEEEEE!")
|
||||
if(mind)
|
||||
mind.transfer_to(regalrat)
|
||||
@@ -176,6 +176,8 @@ GLOBAL_VAR_INIT(mouse_killed, 0)
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/mouse/attack_ghost(mob/dead/observer/user)
|
||||
if(key)
|
||||
return ..()
|
||||
user.possess_mouse(src)
|
||||
|
||||
/mob/living/simple_animal/mouse/start_pulling(atom/movable/AM, state, force, supress_message)
|
||||
@@ -227,7 +229,7 @@ GLOBAL_VAR_INIT(mouse_killed, 0)
|
||||
|
||||
GLOB.mouse_spawned += mice
|
||||
GLOB.food_for_next_mouse = max(GLOB.food_for_next_mouse - FOODPERMOUSE * mice, 0)
|
||||
SSminor_mapping.trigger_migration(mice,TRUE)
|
||||
SSminor_mapping.trigger_migration(mice, TRUE)
|
||||
|
||||
/mob/living/simple_animal/mouse/proc/cheese_up()
|
||||
regen_health(15)
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
/mob/living/simple_animal/hostile/plaguerat
|
||||
name = "rat"
|
||||
desc = "It's a large rodent, afflicted with both anger issues and a terrible disease."
|
||||
icon_state = "mouse_gray"
|
||||
icon_living = "mouse_gray"
|
||||
icon_dead = "mouse_gray_dead"
|
||||
speak = list("Skree!","SKREEE!","Squeak?")
|
||||
speak_emote = list("squeaks")
|
||||
emote_hear = list("Hisses.")
|
||||
emote_see = list("runs in a circle.", "stands on its hind legs.")
|
||||
melee_damage_lower = 5 //stronk
|
||||
melee_damage_upper = 5
|
||||
obj_damage = 5
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
see_in_dark = 6
|
||||
maxHealth = 20
|
||||
health = 20
|
||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/plagued = 1)
|
||||
density = FALSE
|
||||
ventcrawler = VENTCRAWLER_ALWAYS
|
||||
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
|
||||
mob_size = MOB_SIZE_TINY
|
||||
mob_biotypes = list(MOB_ORGANIC,MOB_BEAST)
|
||||
faction = list("rat")
|
||||
var/playstyle_string = "<span class='big bold'>You are a Plague Rat,</span></b> \
|
||||
Your goal is to spread The Plague as much as possible, by infecting anyone you can. \
|
||||
You can do this by licking their food, or by directly biting them. \
|
||||
You can also nibble on dead bodies to slightly heal yourself! \
|
||||
However, you are still very fragile! You're just are a small rat, after all.</b>"
|
||||
|
||||
/mob/living/simple_animal/hostile/plaguerat/AttackingTarget()
|
||||
..()
|
||||
var/mob/living/carbon/C = target
|
||||
if(isliving(C) && (C.stat != DEAD)) //It is for injecting plague reagent into people via biting them.
|
||||
if(C.reagents)
|
||||
var/obj/item/I = C.get_item_by_slot(ITEM_SLOT_OCLOTHING)
|
||||
if(!istype(I, /obj/item/clothing/suit/space/hardsuit) && !istype(I, /obj/item/clothing/suit/armor))
|
||||
C.reagents.add_reagent(/datum/reagent/plaguebacteria, 3)
|
||||
|
||||
if(C.stat == DEAD) //It is for biting dead bodies to heal.
|
||||
src.visible_message(span_warning("[src] starts biting into [C]!"),span_notice("You start eating [C]..."))
|
||||
if(do_mob(src, target, 3 SECONDS))
|
||||
to_chat(src, span_notice ("You finish eating [C]."))
|
||||
heal_bodypart_damage(5)
|
||||
C.adjustBruteLoss(15)
|
||||
return
|
||||
|
||||
if (!isliving(target) && target.reagents && target.is_injectable(src, allowmobs = TRUE)) //It is for injecting plague reagent into food and reagent containers by licking them. Not to be confused with biting people.
|
||||
src.visible_message(span_warning("[src] starts licking [target]!"),span_notice("You start licking [target]..."))
|
||||
if (do_mob(src, target, 2 SECONDS))
|
||||
target.reagents.add_reagent(/datum/reagent/plaguebacteria,rand(1,2),no_react = TRUE)
|
||||
to_chat(src, span_notice("You finish licking [target]."))
|
||||
return
|
||||
|
||||
//Spawn Event
|
||||
|
||||
/datum/round_event_control/plaguerat
|
||||
name = "Spawn a Plague Rat"
|
||||
typepath = /datum/round_event/ghost_role/plaguerat
|
||||
weight = 6
|
||||
max_occurrences = 1
|
||||
earliest_start = 30 MINUTES
|
||||
|
||||
/datum/round_event/ghost_role/plaguerat
|
||||
minimum_required = 1
|
||||
role_name = "plaguerat"
|
||||
|
||||
/datum/round_event/ghost_role/plaguerat/spawn_role()
|
||||
var/list/candidates = get_candidates(ROLE_SENTIENCE, null, ROLE_SENTIENCE)
|
||||
if(!candidates.len)
|
||||
return NOT_ENOUGH_PLAYERS
|
||||
|
||||
var/mob/dead/selected = pick_n_take(candidates)
|
||||
|
||||
var/datum/mind/player_mind = new /datum/mind(selected.key)
|
||||
player_mind.active = 1
|
||||
if(!GLOB.xeno_spawn)
|
||||
return MAP_ERROR
|
||||
var/mob/living/simple_animal/hostile/plaguerat/S = new /mob/living/simple_animal/hostile/plaguerat/(pick(GLOB.xeno_spawn))
|
||||
player_mind.transfer_to(S)
|
||||
player_mind.assigned_role = "Plague rat"
|
||||
player_mind.special_role = "Plague rat"
|
||||
to_chat(S, S.playstyle_string)
|
||||
SEND_SOUND(S, sound('sound/magic/mutate.ogg'))
|
||||
message_admins("[ADMIN_LOOKUPFLW(S)] has been made into a plague rat by an event.")
|
||||
log_game("[key_name(S)] was spawned as a plague rat by an event.")
|
||||
spawned_mobs += S
|
||||
return SUCCESSFUL_SPAWN
|
||||
@@ -14,6 +14,7 @@
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
see_in_dark = 6
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
maxHealth = 15
|
||||
health = 15
|
||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/mouse = 1)
|
||||
@@ -92,16 +93,20 @@
|
||||
C.deconstruct()
|
||||
|
||||
/mob/living/simple_animal/hostile/rat/attack_ghost(mob/dead/observer/user)
|
||||
if(key)
|
||||
return ..()
|
||||
|
||||
if(is_banned_from(user.key, ROLE_SENTIENCE))
|
||||
to_chat(user, span_warning("You are job banned!"))
|
||||
return FALSE
|
||||
|
||||
if(alert("Are you sure you want to become a rat? (Warning, you can no longer be cloned!)",,"Yes","No") != "Yes")
|
||||
return FALSE
|
||||
src.key = key
|
||||
|
||||
src.key = user.key
|
||||
src.faction = list("rat")
|
||||
src.layer = BELOW_OPEN_DOOR_LAYER
|
||||
src.language_holder += new /datum/language_holder/mouse(src)
|
||||
src.language_holder = new /datum/language_holder/mouse(src)
|
||||
src.pass_flags |= PASSDOOR
|
||||
src.sentience_act()
|
||||
src.health = src.maxHealth
|
||||
@@ -110,8 +115,10 @@
|
||||
face_atom(A)
|
||||
if(!isturf(loc))
|
||||
return
|
||||
|
||||
if(next_move > world.time)
|
||||
return
|
||||
|
||||
if(!A.Adjacent(src))
|
||||
return
|
||||
|
||||
@@ -124,7 +131,7 @@
|
||||
return
|
||||
visible_message(span_danger("[src] finishes eating up [A]!"),span_notice("You finish up eating [A]."))
|
||||
heal_bodypart_damage(5)
|
||||
qdel(src)
|
||||
qdel(A)
|
||||
layer = BELOW_OPEN_DOOR_LAYER
|
||||
|
||||
/mob/living/simple_animal/hostile/rat/proc/can_eat(atom/A)
|
||||
@@ -133,3 +140,60 @@
|
||||
return TRUE
|
||||
if(istype(A, /obj/item/reagent_containers/food) && !(locate(/obj/structure/table) in get_turf(A)))
|
||||
return TRUE
|
||||
|
||||
/*
|
||||
Plague Rat
|
||||
*/
|
||||
|
||||
/mob/living/simple_animal/hostile/rat/plaguerat
|
||||
desc = "It's a large rodent, afflicted with both anger issues and a terrible disease."
|
||||
icon_state = "mouse_black"
|
||||
icon_living = "mouse_black"
|
||||
icon_dead = "mouse_black_dead"
|
||||
melee_damage_lower = 5 //stronk
|
||||
melee_damage_upper = 7
|
||||
turns_per_move = 5
|
||||
see_in_dark = 8
|
||||
maxHealth = 40
|
||||
health = 40
|
||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/plagued = 1)
|
||||
body_color = "black"
|
||||
|
||||
/mob/living/simple_animal/hostile/rat/plaguerat/AttackingTarget()
|
||||
. = ..()
|
||||
if(iscarbon(target)) //It is for injecting plague reagent into people via biting them.
|
||||
var/mob/living/carbon/C = target
|
||||
if(C.stat != DEAD)
|
||||
if(C.reagents)
|
||||
var/obj/item/I = C.get_item_by_slot(ITEM_SLOT_OCLOTHING)
|
||||
if(!istype(I, /obj/item/clothing/suit/space/hardsuit) && !istype(I, /obj/item/clothing/suit/armor) && !istype(I, /obj/item/clothing/suit/bio_suit/plaguedoctorsuit))
|
||||
var/datum/reagent/plaguebacteria/plague = new /datum/reagent/plaguebacteria
|
||||
C.reagents.add_reagent(/datum/reagent/plaguebacteria, 3) //gets caught up in blood transfers
|
||||
plague.reaction_mob(C, INJECT) //making sure we stay winning
|
||||
|
||||
else //It is for biting dead bodies to heal.
|
||||
if(C.getBruteLoss_nonProsthetic() >= 100)
|
||||
return
|
||||
src.visible_message(span_warning("[src] starts biting into [C]!"),span_notice("You start eating [C]..."))
|
||||
if(!do_after(src, 3 SECONDS, FALSE, target))
|
||||
return
|
||||
to_chat(src, span_notice ("You finish eating [C]."))
|
||||
heal_bodypart_damage(5)
|
||||
C.adjustBruteLoss(15)
|
||||
|
||||
if(!isliving(target))
|
||||
if(!isitem(target))
|
||||
return
|
||||
if(target.reagents && target.is_injectable(src, allowmobs = TRUE)) //It is for injecting plague reagent into reagent containers by licking them. Not to be confused with biting people.
|
||||
if(target.reagents.has_reagent(/datum/reagent/plaguebacteria))
|
||||
to_chat(src, span_warning("[target] is already infected!"))
|
||||
return
|
||||
if(INTERACTING_WITH(src, target))
|
||||
return
|
||||
src.visible_message(span_warning("[src] starts licking [target]!"),span_notice("You start licking [target]..."))
|
||||
if(!do_after(src, 2 SECONDS, FALSE, target))
|
||||
to_chat(src, span_warning("You stop licking [target]."))
|
||||
return
|
||||
target.reagents.add_reagent(/datum/reagent/plaguebacteria, rand(1,2), no_react = TRUE)
|
||||
to_chat(src, span_notice("You finish licking [target]."))
|
||||
|
||||
|
||||
@@ -215,9 +215,9 @@
|
||||
return
|
||||
|
||||
if (target.reagents && target.is_injectable(src, allowmobs = TRUE) && !istype(target, /obj/item/reagent_containers/food/snacks/cheesewedge))
|
||||
src.visible_message(span_warning("[src] starts licking [target] passionately!"),span_notice("You start licking [target]..."))
|
||||
if (do_mob(src, target, 2 SECONDS))
|
||||
target.reagents.add_reagent(/datum/reagent/rat_spit,rand(1,3),no_react = TRUE)
|
||||
src.visible_message(span_warning("[src] starts licking [target] passionately!"), span_notice("You start licking [target]..."))
|
||||
if(do_mob(src, target, 2 SECONDS))
|
||||
target.reagents.add_reagent(/datum/reagent/rat_spit, rand(1,3), no_react = TRUE)
|
||||
to_chat(src, span_notice("You finish licking [target]."))
|
||||
else if(istype(target, /obj/item/reagent_containers/food/snacks/cheesewedge))
|
||||
to_chat(src, span_green("You eat [src], restoring some health."))
|
||||
|
||||
@@ -654,7 +654,7 @@
|
||||
* * reagtemp - Temperature of this reagent, will be equalized
|
||||
* * no_react - prevents reactions being triggered by this addition
|
||||
*/
|
||||
/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300, no_react = 0)
|
||||
/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300, no_react = FALSE)
|
||||
if(!isnum(amount) || !amount)
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -2052,5 +2052,6 @@
|
||||
taste_description = "death"
|
||||
can_synth = FALSE
|
||||
|
||||
/datum/reagent/plaguebacteria/reaction_mob(mob/living/L, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0)
|
||||
L.ForceContractDisease(new /datum/disease/plague(), FALSE, TRUE)
|
||||
/datum/reagent/plaguebacteria/reaction_mob(mob/living/L, method = TOUCH, reac_volume, show_message = TRUE, touch_protection = FALSE)
|
||||
if(method == INGEST || method == TOUCH || method == INJECT)
|
||||
L.ForceContractDisease(new /datum/disease/plague(), FALSE, TRUE)
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 255 KiB After Width: | Height: | Size: 263 KiB |
@@ -2535,7 +2535,6 @@
|
||||
#include "code\modules\mob\living\simple_animal\hostile\nanotrasen.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\netherworld.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\pirate.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\plague_rat.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\rat.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\regalrat.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\russian.dm"
|
||||
|
||||
Reference in New Issue
Block a user