mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
[MIRROR] Changes to Regal Rats (#3253)
* Changes to Regal Rats (#56145) Co-authored-by: Qustinnus <Floydje123@ hotmail.com> Co-authored-by: Paul, Sendroiu <AA2792@ student.jamk.fi> * Changes to Regal Rats Co-authored-by: eeSPee <robotdevilinside@gmail.com> Co-authored-by: Qustinnus <Floydje123@ hotmail.com> Co-authored-by: Paul, Sendroiu <AA2792@ student.jamk.fi>
This commit is contained in:
co-authored by
Qustinnus
Paul, Sendroiu <AA2792@ student.jamk.fi>
eeSPee
Paul, Sendroiu <AA2792@ student.jamk.fi>
parent
05519d4604
commit
dc76c98db2
@@ -527,6 +527,8 @@
|
||||
// /mob/living/simple_animal/hostile signals
|
||||
#define COMSIG_HOSTILE_ATTACKINGTARGET "hostile_attackingtarget"
|
||||
#define COMPONENT_HOSTILE_NO_ATTACK (1<<0)
|
||||
///from base of mob/living/simple_animal/hostile/regalrat: (mob/living/simple_animal/hostile/regalrat/king)
|
||||
#define COMSIG_RAT_INTERACT "rat_interaction"
|
||||
|
||||
// /obj signals
|
||||
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
|
||||
////////////////////////////////////////////OTHER////////////////////////////////////////////
|
||||
|
||||
/obj/item/food/cheesewheel
|
||||
|
||||
/obj/item/food/cheese/wheel
|
||||
name = "cheese wheel"
|
||||
desc = "A big wheel of delcious Cheddar."
|
||||
icon_state = "cheesewheel"
|
||||
food_reagents = list(/datum/reagent/consumable/nutriment = 10, /datum/reagent/consumable/nutriment/protein = 5, /datum/reagent/consumable/nutriment/vitamin = 5) //Hard cheeses contain about 25% protein
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
tastes = list("cheese" = 1)
|
||||
foodtypes = DAIRY
|
||||
rat_heal = 35
|
||||
|
||||
/obj/item/food/cheesewheel/Initialize()
|
||||
/obj/item/food/cheese/wheel/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/food_storage)
|
||||
|
||||
/obj/item/food/cheesewheel/MakeProcessable()
|
||||
AddElement(/datum/element/processable, TOOL_KNIFE, /obj/item/food/cheesewedge, 5, 30)
|
||||
/obj/item/food/cheese/wheel/MakeProcessable()
|
||||
AddElement(/datum/element/processable, TOOL_KNIFE, /obj/item/food/cheese, 5, 30)
|
||||
|
||||
/obj/item/food/royalcheese
|
||||
/obj/item/food/cheese/royal
|
||||
name = "royal cheese"
|
||||
desc = "Ascend the throne. Consume the wheel. Feel the POWER."
|
||||
icon_state = "royalcheese"
|
||||
food_reagents = list(/datum/reagent/consumable/nutriment = 15, /datum/reagent/consumable/nutriment/vitamin = 5, /datum/reagent/gold = 20, /datum/reagent/toxin/mutagen = 5)
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
tastes = list("cheese" = 4, "royalty" = 1)
|
||||
foodtypes = DAIRY
|
||||
tastes = list("cheese" = 4, "royalty" = 1)
|
||||
rat_heal = 70
|
||||
|
||||
/obj/item/food/cheesewedge
|
||||
/obj/item/food/cheese
|
||||
name = "cheese wedge"
|
||||
desc = "A wedge of delicious Cheddar. The cheese wheel it was cut from can't have gone far."
|
||||
icon_state = "cheesewedge"
|
||||
@@ -34,6 +34,17 @@
|
||||
tastes = list("cheese" = 1)
|
||||
foodtypes = DAIRY
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
/// used to determine how much health rats/regal rats recover when they eat it.
|
||||
var/rat_heal = 10
|
||||
|
||||
/obj/item/food/cheese/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_RAT_INTERACT, .proc/on_rat_eat)
|
||||
|
||||
/obj/item/food/cheese/proc/on_rat_eat(mob/living/simple_animal/hostile/regalrat/king)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
king.cheese_heal(src, rat_heal, "<span class='green'>You eat [src], restoring some health.</span>")
|
||||
|
||||
/obj/item/food/watermelonslice
|
||||
name = "watermelon slice"
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
/datum/chemical_reaction/cheesewheel/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
for(var/i = 1, i <= created_volume, i++)
|
||||
new /obj/item/food/cheesewheel(location)
|
||||
new /obj/item/food/cheese/wheel(location)
|
||||
|
||||
/datum/chemical_reaction/synthmeat
|
||||
required_reagents = list(/datum/reagent/blood = 5, /datum/reagent/medicine/cryoxadone = 1)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
reqs = list(
|
||||
/obj/item/food/bread/plain = 1,
|
||||
/obj/item/food/meat/cutlet/plain = 3,
|
||||
/obj/item/food/cheesewedge = 3
|
||||
/obj/item/food/cheese = 3
|
||||
)
|
||||
result = /obj/item/food/bread/meat
|
||||
subcategory = CAT_BREAD
|
||||
@@ -18,7 +18,7 @@
|
||||
reqs = list(
|
||||
/obj/item/food/bread/plain = 1,
|
||||
/obj/item/food/meat/cutlet/xeno = 3,
|
||||
/obj/item/food/cheesewedge = 3
|
||||
/obj/item/food/cheese = 3
|
||||
)
|
||||
result = /obj/item/food/bread/xenomeat
|
||||
subcategory = CAT_BREAD
|
||||
@@ -28,7 +28,7 @@
|
||||
reqs = list(
|
||||
/obj/item/food/bread/plain = 1,
|
||||
/obj/item/food/meat/cutlet/spider = 3,
|
||||
/obj/item/food/cheesewedge = 3
|
||||
/obj/item/food/cheese = 3
|
||||
)
|
||||
result = /obj/item/food/bread/spidermeat
|
||||
subcategory = CAT_BREAD
|
||||
@@ -49,7 +49,7 @@
|
||||
reqs = list(
|
||||
/obj/item/food/bread/plain = 1,
|
||||
/obj/item/food/tofu = 3,
|
||||
/obj/item/food/cheesewedge = 3
|
||||
/obj/item/food/cheese = 3
|
||||
)
|
||||
result = /obj/item/food/bread/tofu
|
||||
subcategory = CAT_BREAD
|
||||
@@ -59,7 +59,7 @@
|
||||
reqs = list(
|
||||
/datum/reagent/consumable/milk = 5,
|
||||
/obj/item/food/bread/plain = 1,
|
||||
/obj/item/food/cheesewedge = 2
|
||||
/obj/item/food/cheese = 2
|
||||
)
|
||||
result = /obj/item/food/bread/creamcheese
|
||||
subcategory = CAT_BREAD
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
reqs = list(
|
||||
/obj/item/food/fishmeat = 1,
|
||||
/obj/item/food/bun = 1,
|
||||
/obj/item/food/cheesewedge = 1
|
||||
/obj/item/food/cheese = 1
|
||||
)
|
||||
result = /obj/item/food/burger/fish
|
||||
subcategory = CAT_BURGER
|
||||
@@ -222,7 +222,7 @@
|
||||
reqs = list(
|
||||
/obj/item/food/patty/plain = 3,
|
||||
/obj/item/food/bun = 1,
|
||||
/obj/item/food/cheesewedge = 2
|
||||
/obj/item/food/cheese = 2
|
||||
)
|
||||
result = /obj/item/food/burger/bigbite
|
||||
subcategory = CAT_BURGER
|
||||
@@ -234,7 +234,7 @@
|
||||
/datum/reagent/consumable/blackpepper = 5,
|
||||
/obj/item/food/patty/plain = 5,
|
||||
/obj/item/food/grown/tomato = 4,
|
||||
/obj/item/food/cheesewedge = 3,
|
||||
/obj/item/food/cheese = 3,
|
||||
/obj/item/food/boiledegg = 1,
|
||||
/obj/item/food/meat/bacon = 1,
|
||||
/obj/item/food/bun = 1
|
||||
@@ -324,7 +324,7 @@
|
||||
reqs = list(
|
||||
/obj/item/food/patty/plain = 1,
|
||||
/obj/item/food/bun = 1,
|
||||
/obj/item/food/cheesewedge = 1,
|
||||
/obj/item/food/cheese = 1,
|
||||
)
|
||||
result = /obj/item/food/burger/cheese
|
||||
subcategory = CAT_BURGER
|
||||
@@ -334,7 +334,7 @@
|
||||
reqs = list(
|
||||
/obj/item/food/soylentgreen = 1, //two full meats worth.
|
||||
/obj/item/food/bun = 1,
|
||||
/obj/item/food/cheesewedge = 2,
|
||||
/obj/item/food/cheese = 2,
|
||||
)
|
||||
result = /obj/item/food/burger/soylent
|
||||
subcategory = CAT_BURGER
|
||||
@@ -374,7 +374,7 @@
|
||||
reqs = list(
|
||||
/obj/item/food/patty/plain = 2,
|
||||
/obj/item/food/bun = 1,
|
||||
/obj/item/food/cheesewedge = 2,
|
||||
/obj/item/food/cheese = 2,
|
||||
/obj/item/food/grown/chili = 1,
|
||||
/obj/item/food/grown/cabbage = 1,
|
||||
/obj/item/toy/crayon/green = 1,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
name = "Cheese cake"
|
||||
reqs = list(
|
||||
/obj/item/food/cake/plain = 1,
|
||||
/obj/item/food/cheesewedge = 2
|
||||
/obj/item/food/cheese = 2
|
||||
)
|
||||
result = /obj/item/food/cake/cheese
|
||||
subcategory = CAT_CAKE
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
name = "Omelette"
|
||||
reqs = list(
|
||||
/obj/item/food/egg = 2,
|
||||
/obj/item/food/cheesewedge = 2
|
||||
/obj/item/food/cheese = 2
|
||||
)
|
||||
result = /obj/item/food/omelette
|
||||
subcategory = CAT_EGG
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
reqs = list(
|
||||
/obj/item/food/meat/cutlet = 2,
|
||||
/obj/item/food/grown/tomato = 1,
|
||||
/obj/item/food/cheesewedge = 2,
|
||||
/obj/item/food/cheese = 2,
|
||||
/obj/item/food/spaghetti = 1
|
||||
)
|
||||
result = /obj/item/food/lasagna
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
time = 40
|
||||
reqs = list(
|
||||
/obj/item/food/grown/potato = 1,
|
||||
/obj/item/food/cheesewedge = 1
|
||||
/obj/item/food/cheese = 1
|
||||
)
|
||||
result = /obj/item/food/loadedbakedpotato
|
||||
subcategory = CAT_MISCFOOD
|
||||
@@ -63,7 +63,7 @@
|
||||
name = "Cheesy fries"
|
||||
reqs = list(
|
||||
/obj/item/food/fries = 1,
|
||||
/obj/item/food/cheesewedge = 1
|
||||
/obj/item/food/cheese = 1
|
||||
)
|
||||
result = /obj/item/food/cheesyfries
|
||||
subcategory = CAT_MISCFOOD
|
||||
@@ -89,7 +89,7 @@
|
||||
/datum/crafting_recipe/food/eggplantparm
|
||||
name ="Eggplant parmigiana"
|
||||
reqs = list(
|
||||
/obj/item/food/cheesewedge = 2,
|
||||
/obj/item/food/cheese = 2,
|
||||
/obj/item/food/grown/eggplant = 1
|
||||
)
|
||||
result = /obj/item/food/eggplantparm
|
||||
@@ -155,7 +155,7 @@
|
||||
/datum/crafting_recipe/food/cheesyburrito
|
||||
name ="Cheesy burrito"
|
||||
reqs = list(
|
||||
/obj/item/food/cheesewedge = 2,
|
||||
/obj/item/food/cheese = 2,
|
||||
/obj/item/food/tortilla = 1,
|
||||
/obj/item/food/grown/soybeans = 1
|
||||
)
|
||||
@@ -208,7 +208,7 @@
|
||||
name ="Cheesy nachos"
|
||||
reqs = list(
|
||||
/datum/reagent/consumable/salt = 1,
|
||||
/obj/item/food/cheesewedge = 1,
|
||||
/obj/item/food/cheese = 1,
|
||||
/obj/item/food/tortilla = 1
|
||||
)
|
||||
result = /obj/item/food/cheesynachos
|
||||
@@ -274,7 +274,7 @@
|
||||
name ="Classic Taco"
|
||||
reqs = list(
|
||||
/obj/item/food/tortilla = 1,
|
||||
/obj/item/food/cheesewedge = 1,
|
||||
/obj/item/food/cheese = 1,
|
||||
/obj/item/food/meat/cutlet = 1,
|
||||
/obj/item/food/grown/cabbage = 1,
|
||||
)
|
||||
@@ -285,7 +285,7 @@
|
||||
name ="Plain Taco"
|
||||
reqs = list(
|
||||
/obj/item/food/tortilla = 1,
|
||||
/obj/item/food/cheesewedge = 1,
|
||||
/obj/item/food/cheese = 1,
|
||||
/obj/item/food/meat/cutlet = 1,
|
||||
)
|
||||
result = /obj/item/food/taco/plain
|
||||
@@ -328,7 +328,7 @@
|
||||
reqs = list(
|
||||
/obj/item/food/doughslice = 1,
|
||||
/datum/reagent/consumable/cream = 5,
|
||||
/obj/item/food/cheesewedge = 1,
|
||||
/obj/item/food/cheese = 1,
|
||||
/obj/item/food/meat/rawcrab = 1
|
||||
)
|
||||
result = /obj/item/food/crab_rangoon
|
||||
@@ -337,10 +337,10 @@
|
||||
/datum/crafting_recipe/food/royalcheese
|
||||
name = "Royal Cheese"
|
||||
reqs = list(
|
||||
/obj/item/food/cheesewheel = 1,
|
||||
/obj/item/food/cheese/wheel = 1,
|
||||
/obj/item/clothing/head/crown = 1,
|
||||
/datum/reagent/medicine/strange_reagent = 5,
|
||||
/datum/reagent/toxin/mutagen = 5
|
||||
)
|
||||
result = /obj/item/food/royalcheese
|
||||
result = /obj/item/food/cheese/royal
|
||||
subcategory = CAT_MISCFOOD
|
||||
|
||||
@@ -470,7 +470,7 @@
|
||||
name = "Khachapuri"
|
||||
reqs = list(
|
||||
/datum/reagent/consumable/eggyolk = 5,
|
||||
/obj/item/food/cheesewedge = 1,
|
||||
/obj/item/food/cheese = 1,
|
||||
/obj/item/food/bread/plain = 1
|
||||
)
|
||||
result = /obj/item/food/khachapuri
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
name = "Margherita pizza"
|
||||
reqs = list(
|
||||
/obj/item/food/pizzabread = 1,
|
||||
/obj/item/food/cheesewedge = 4,
|
||||
/obj/item/food/cheese = 4,
|
||||
/obj/item/food/grown/tomato = 1
|
||||
)
|
||||
result = /obj/item/food/pizza/margherita
|
||||
@@ -18,7 +18,7 @@
|
||||
reqs = list(
|
||||
/obj/item/food/pizzabread = 1,
|
||||
/obj/item/food/meat/cutlet = 4,
|
||||
/obj/item/food/cheesewedge = 1,
|
||||
/obj/item/food/cheese = 1,
|
||||
/obj/item/food/grown/tomato = 1
|
||||
)
|
||||
result = /obj/item/food/pizza/meat
|
||||
@@ -30,7 +30,7 @@
|
||||
/obj/item/food/pizzabread = 1,
|
||||
/obj/item/food/meat/cutlet = 3,
|
||||
/obj/item/ammo_casing/c9mm = 8,
|
||||
/obj/item/food/cheesewedge = 1,
|
||||
/obj/item/food/cheese = 1,
|
||||
/obj/item/food/grown/tomato = 1
|
||||
)
|
||||
result = /obj/item/food/pizza/arnold
|
||||
@@ -62,7 +62,7 @@
|
||||
reqs = list(
|
||||
/obj/item/food/pizzabread = 1,
|
||||
/obj/item/food/donkpocket/warm = 3,
|
||||
/obj/item/food/cheesewedge = 1,
|
||||
/obj/item/food/cheese = 1,
|
||||
/obj/item/food/grown/tomato = 1
|
||||
)
|
||||
result = /obj/item/food/pizza/donkpocket
|
||||
@@ -73,7 +73,7 @@
|
||||
reqs = list(
|
||||
/obj/item/food/pizzabread = 1,
|
||||
/obj/item/food/grown/ambrosia/vulgaris = 3,
|
||||
/obj/item/food/cheesewedge = 1,
|
||||
/obj/item/food/cheese = 1,
|
||||
/obj/item/food/grown/tomato = 1
|
||||
)
|
||||
result = /obj/item/food/pizza/dank
|
||||
@@ -84,7 +84,7 @@
|
||||
reqs = list(
|
||||
/obj/item/food/pizzabread = 1,
|
||||
/obj/item/food/meatball = 3,
|
||||
/obj/item/food/cheesewedge = 1,
|
||||
/obj/item/food/cheese = 1,
|
||||
/obj/item/food/grown/tomato = 1
|
||||
)
|
||||
result = /obj/item/food/pizza/sassysage
|
||||
@@ -96,7 +96,7 @@
|
||||
/obj/item/food/pizzabread = 1,
|
||||
/obj/item/food/meat/cutlet = 2,
|
||||
/obj/item/food/pineappleslice = 3,
|
||||
/obj/item/food/cheesewedge = 1,
|
||||
/obj/item/food/cheese = 1,
|
||||
/obj/item/food/grown/tomato = 1
|
||||
)
|
||||
result = /obj/item/food/pizza/pineapple
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
reqs = list(
|
||||
/obj/item/food/breadslice/plain = 2,
|
||||
/obj/item/food/meat/steak = 1,
|
||||
/obj/item/food/cheesewedge = 1
|
||||
/obj/item/food/cheese = 1
|
||||
)
|
||||
result = /obj/item/food/sandwich
|
||||
subcategory = CAT_SANDWICH
|
||||
@@ -20,7 +20,7 @@
|
||||
name = "Cheese sandwich"
|
||||
reqs = list(
|
||||
/obj/item/food/breadslice/plain = 2,
|
||||
/obj/item/food/cheesewedge = 2
|
||||
/obj/item/food/cheese = 2
|
||||
)
|
||||
result = /obj/item/food/grilledcheese
|
||||
subcategory = CAT_SANDWICH
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
/obj/item/food/badrecipe = 1,
|
||||
/obj/item/food/tofu = 1,
|
||||
/obj/item/food/boiledegg = 1,
|
||||
/obj/item/food/cheesewedge = 1,
|
||||
/obj/item/food/cheese = 1,
|
||||
)
|
||||
result = /obj/item/food/soup/mystery
|
||||
subcategory = CAT_SOUP
|
||||
@@ -255,7 +255,7 @@
|
||||
/datum/reagent/water = 10,
|
||||
/obj/item/reagent_containers/glass/bowl = 1,
|
||||
/obj/item/food/grown/onion = 1,
|
||||
/obj/item/food/cheesewedge = 1,
|
||||
/obj/item/food/cheese = 1,
|
||||
)
|
||||
result = /obj/item/food/soup/onion
|
||||
subcategory = CAT_SOUP
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
if(!stat)
|
||||
var/mob/M = AM
|
||||
to_chat(M, "<span class='notice'>[icon2html(src, M)] Squeak!</span>")
|
||||
if(istype(AM, /obj/item/food/royalcheese))
|
||||
if(istype(AM, /obj/item/food/cheese/royal))
|
||||
evolve()
|
||||
qdel(AM)
|
||||
..()
|
||||
@@ -102,12 +102,12 @@
|
||||
if(powered)
|
||||
playsound(src, 'sound/effects/sparks2.ogg', 100, TRUE)
|
||||
|
||||
for(var/obj/item/food/cheesewedge/cheese in range(1, src))
|
||||
for(var/obj/item/food/cheese/cheese in range(1, src))
|
||||
if(prob(10))
|
||||
be_fruitful()
|
||||
qdel(cheese)
|
||||
return
|
||||
for(var/obj/item/food/royalcheese/bigcheese in range(1, src))
|
||||
for(var/obj/item/food/cheese/royal/bigcheese in range(1, src))
|
||||
qdel(bigcheese)
|
||||
evolve()
|
||||
return
|
||||
@@ -116,7 +116,7 @@
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
. = ..()
|
||||
if(istype(A, /obj/item/food/cheesewedge) && canUseTopic(A, BE_CLOSE, NO_DEXTERITY))
|
||||
if(istype(A, /obj/item/food/cheese) && canUseTopic(A, BE_CLOSE, NO_DEXTERITY))
|
||||
if(health == maxHealth)
|
||||
to_chat(src,"<span class='warning'>You don't need to eat or heal.</span>")
|
||||
return
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
#define MINOR_HEAL 10
|
||||
#define MEDIUM_HEAL 35
|
||||
#define MAJOR_HEAL 70
|
||||
|
||||
/mob/living/simple_animal/hostile/regalrat
|
||||
name = "feral regal rat"
|
||||
desc = "An evolved rat, created through some strange science. It leads nearby rats with deadly efficiency to protect its kingdom. Not technically a king."
|
||||
@@ -29,16 +25,16 @@
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
unique_name = TRUE
|
||||
faction = list("rat")
|
||||
///The spell that the rat uses to scrounge up junk.
|
||||
var/datum/action/cooldown/coffer
|
||||
///The spell that the rat uses to generate miasma
|
||||
var/datum/action/cooldown/domain
|
||||
///The Spell that the rat uses to recruit/convert more rats.
|
||||
var/datum/action/cooldown/riot
|
||||
|
||||
/mob/living/simple_animal/hostile/regalrat/Initialize()
|
||||
. = ..()
|
||||
coffer = new /datum/action/cooldown/coffer
|
||||
domain = new /datum/action/cooldown/domain
|
||||
riot = new /datum/action/cooldown/riot
|
||||
coffer.Grant(src)
|
||||
domain.Grant(src)
|
||||
riot.Grant(src)
|
||||
AddElement(/datum/element/waddling)
|
||||
|
||||
@@ -56,7 +52,7 @@
|
||||
if(prob(20))
|
||||
riot.Trigger()
|
||||
else if(prob(50))
|
||||
coffer.Trigger()
|
||||
domain.Trigger()
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/regalrat/CanAttack(atom/the_target)
|
||||
@@ -83,16 +79,25 @@
|
||||
else if(user != src && istype(user,/mob/living/simple_animal/hostile/regalrat))
|
||||
. += "<span class='warning'>Who is this foolish false king? This will not stand!</span>"
|
||||
|
||||
/mob/living/simple_animal/hostile/regalrat/AttackingTarget()
|
||||
/mob/living/simple_animal/hostile/regalrat/handle_environment(datum/gas_mixture/environment)
|
||||
. = ..()
|
||||
if(istype(target, /obj/item/food/cheesewedge))
|
||||
cheese_heal(target, MINOR_HEAL, "<span class='green'>You eat [target], restoring some health.</span>")
|
||||
if(stat == DEAD || !environment || !environment.gases[/datum/gas/miasma])
|
||||
return
|
||||
var/miasma_percentage = environment.gases[/datum/gas/miasma][MOLES] / environment.total_moles()
|
||||
if(miasma_percentage>=0.25)
|
||||
heal_bodypart_damage(1)
|
||||
|
||||
else if(istype(target, /obj/item/food/cheesewheel))
|
||||
cheese_heal(target, MEDIUM_HEAL, "<span class='green'>You eat [target], restoring some health.</span>")
|
||||
|
||||
else if(istype(target, /obj/item/food/royalcheese))
|
||||
cheese_heal(target, MAJOR_HEAL, "<span class='green'>You eat [target], revitalizing your royal resolve completely.</span>")
|
||||
/mob/living/simple_animal/hostile/regalrat/AttackingTarget()
|
||||
if (DOING_INTERACTION(src, "regalrat"))
|
||||
return
|
||||
. = ..()
|
||||
if (target.reagents && target.is_injectable(src, allowmobs = TRUE))
|
||||
src.visible_message("<span class='warning'>[src] starts licking [target] passionately!</span>","<span class='notice'>You start licking [target]...</span>")
|
||||
if (do_mob(src, target, 2 SECONDS, interaction_key = "regalrat"))
|
||||
target.reagents.add_reagent(/datum/reagent/rat_spit,rand(1,3),no_react = TRUE)
|
||||
to_chat(src, "<span class='notice'>You finish licking [target].</span>")
|
||||
else
|
||||
SEND_SIGNAL(target, COMSIG_RAT_INTERACT, src)
|
||||
|
||||
/**
|
||||
* Conditionally "eat" cheese object and heal, if injured.
|
||||
@@ -110,55 +115,38 @@
|
||||
else
|
||||
to_chat(src, "<span class='warning'>You feel fine, no need to eat anything!</span>")
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/regalrat/controlled
|
||||
name = "regal rat"
|
||||
|
||||
/mob/living/simple_animal/hostile/regalrat/controlled/Initialize()
|
||||
. = ..()
|
||||
INVOKE_ASYNC(src, .proc/get_player)
|
||||
var/kingdom = pick("Plague","Miasma","Maintenance","Trash","Garbage","Rat","Vermin","Cheese")
|
||||
var/title = pick("King","Lord","Prince","Emperor","Supreme","Overlord","Master","Shogun","Bojar","Tsar")
|
||||
name = "[kingdom] [title]"
|
||||
|
||||
|
||||
/**
|
||||
*This action creates trash, money, dirt, and cheese.
|
||||
*Increase the rat king's domain
|
||||
*/
|
||||
/datum/action/cooldown/coffer
|
||||
name = "Fill Coffers"
|
||||
desc = "Your newly granted regality and poise let you scavenge for lost junk, but more importantly, cheese."
|
||||
|
||||
/datum/action/cooldown/domain
|
||||
name = "Rat King's Domain"
|
||||
desc = "Corrupts this area to be more suitable for your rat army."
|
||||
cooldown_time = 60
|
||||
icon_icon = 'icons/mob/actions/actions_animal.dmi'
|
||||
background_icon_state = "bg_clock"
|
||||
button_icon_state = "coffer"
|
||||
cooldown_time = 50
|
||||
|
||||
/datum/action/cooldown/coffer/Trigger()
|
||||
/datum/action/cooldown/domain/Trigger()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/turf/T = get_turf(owner)
|
||||
var/loot = rand(1,100)
|
||||
switch(loot)
|
||||
if(1 to 5)
|
||||
to_chat(owner, "<span class='notice'>Score! You find some cheese!</span>")
|
||||
new /obj/item/food/cheesewedge(T)
|
||||
if(6 to 10)
|
||||
var/pickedcoin = pick(GLOB.ratking_coins)
|
||||
to_chat(owner, "<span class='notice'>You find some leftover coins. More for the royal treasury!</span>")
|
||||
for(var/i = 1 to rand(1,3))
|
||||
new pickedcoin(T)
|
||||
if(11)
|
||||
to_chat(owner, "<span class='notice'>You find a... Hunh. This coin doesn't look right.</span>")
|
||||
var/rarecoin = rand(1,2)
|
||||
if (rarecoin == 1)
|
||||
new /obj/item/coin/twoheaded(T)
|
||||
else
|
||||
new /obj/item/coin/antagtoken(T)
|
||||
if(12 to 40)
|
||||
var/pickedtrash = pick(GLOB.ratking_trash)
|
||||
to_chat(owner, "<span class='notice'>You just find more garbage and dirt. Lovely, but beneath you now.</span>")
|
||||
new /obj/effect/decal/cleanable/dirt(T)
|
||||
new pickedtrash(T)
|
||||
if(41 to 100)
|
||||
to_chat(owner, "<span class='notice'>Drat. Nothing.</span>")
|
||||
T.atmos_spawn_air("miasma=4;TEMP=[T20C]")
|
||||
switch (rand(1,10))
|
||||
if (8)
|
||||
new /obj/effect/decal/cleanable/vomit(T)
|
||||
if (9)
|
||||
new /obj/effect/decal/cleanable/vomit/old(T)
|
||||
if (10)
|
||||
new /obj/effect/decal/cleanable/oil/slippery(T)
|
||||
else
|
||||
new /obj/effect/decal/cleanable/dirt(T)
|
||||
StartCooldown()
|
||||
|
||||
@@ -305,14 +293,50 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/rat/AttackingTarget()
|
||||
. = ..()
|
||||
if(istype(target, /obj/item/food/cheesewedge))
|
||||
if(istype(target, /obj/item/food/cheese))
|
||||
if (health >= maxHealth)
|
||||
to_chat(src, "<span class='warning'>You feel fine, no need to eat anything!</span>")
|
||||
return
|
||||
to_chat(src, "<span class='green'>You eat \the [src], restoring some health.</span>")
|
||||
heal_bodypart_damage(MINOR_HEAL)
|
||||
heal_bodypart_damage(maxHealth)
|
||||
qdel(target)
|
||||
|
||||
#undef MINOR_HEAL
|
||||
#undef MEDIUM_HEAL
|
||||
#undef MAJOR_HEAL
|
||||
|
||||
/**
|
||||
*Spittle; harmless reagent that is added by rat king, and makes you disgusted.
|
||||
*/
|
||||
|
||||
/datum/reagent/rat_spit
|
||||
name = "Rat Spit"
|
||||
description = "Something coming from a rat. Dear god! Who knows where it's been!"
|
||||
reagent_state = LIQUID
|
||||
color = "#C8C8C8"
|
||||
metabolization_rate = 0.03 * REAGENTS_METABOLISM
|
||||
taste_description = "something funny"
|
||||
overdose_threshold = 20
|
||||
|
||||
/datum/reagent/rat_spit/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
if(HAS_TRAIT(L, TRAIT_AGEUSIA))
|
||||
return
|
||||
to_chat(L, "<span class='notice'>This food has a funny taste!</span>")
|
||||
|
||||
/datum/reagent/rat_spit/overdose_start(mob/living/M)
|
||||
..()
|
||||
var/mob/living/carbon/victim = M
|
||||
if (istype(victim))
|
||||
to_chat(victim, "<span class='userdanger'>With this last sip, you feel your body convulsing horribly from the contents you've ingested. As you contemplate your actions, you sense an awakened kinship with rat-kind and their newly risen leader!</span>")
|
||||
victim.faction |= "rat"
|
||||
victim.vomit()
|
||||
metabolization_rate = 10 * REAGENTS_METABOLISM
|
||||
|
||||
/datum/reagent/rat_spit/on_mob_life(mob/living/carbon/C)
|
||||
if(prob(15))
|
||||
to_chat(C, "<span class='notice'>You feel queasy!</span>")
|
||||
C.adjust_disgust(3)
|
||||
else if(prob(10))
|
||||
to_chat(C, "<span class='warning'>That food does not sit up well!</span>")
|
||||
C.adjust_disgust(5)
|
||||
else if(prob(5))
|
||||
C.vomit()
|
||||
..()
|
||||
|
||||
@@ -46,7 +46,15 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri
|
||||
GLOB.cable_list += src //add it to the global cable list
|
||||
Connect_cable()
|
||||
AddElement(/datum/element/undertile, TRAIT_T_RAY_VISIBLE)
|
||||
RegisterSignal(src, COMSIG_RAT_INTERACT, .proc/on_rat_eat)
|
||||
|
||||
/obj/structure/cable/proc/on_rat_eat(mob/living/simple_animal/hostile/regalrat/king)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(avail())
|
||||
king.apply_damage(10)
|
||||
playsound(king, 'sound/effects/sparks2.ogg', 100, TRUE)
|
||||
deconstruct()
|
||||
|
||||
///Set the linked indicator bitflags
|
||||
/obj/structure/cable/proc/Connect_cable(clear_before_updating = FALSE)
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
air_contents = new /datum/gas_mixture()
|
||||
//gas.volume = 1.05 * CELLSTANDARD
|
||||
update_icon()
|
||||
RegisterSignal(src, COMSIG_RAT_INTERACT, .proc/on_rat_rummage)
|
||||
|
||||
return INITIALIZE_HINT_LATELOAD //we need turfs to have air
|
||||
|
||||
@@ -107,6 +108,25 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/disposal/proc/rat_rummage(mob/living/simple_animal/hostile/regalrat/king)
|
||||
king.visible_message("<span class='warning'>[king] starts rummaging through [src].</span>","<span class='notice'>You rummage through [src]...</span>")
|
||||
if (do_mob(king, src, 2 SECONDS, interaction_key = "regalrat"))
|
||||
var/loot = rand(1,100)
|
||||
switch(loot)
|
||||
if(1 to 5)
|
||||
to_chat(king, "<span class='notice'>You find some leftover coins. More for the royal treasury!</span>")
|
||||
var/pickedcoin = pick(GLOB.ratking_coins)
|
||||
for(var/i = 1 to rand(1,3))
|
||||
new pickedcoin(get_turf(king))
|
||||
if(6 to 33)
|
||||
say(pick("Treasure!","Our precious!","Cheese!"))
|
||||
to_chat(king, "<span class='notice'>Score! You find some cheese!</span>")
|
||||
new /obj/item/food/cheese(get_turf(king))
|
||||
else
|
||||
var/pickedtrash = pick(GLOB.ratking_trash)
|
||||
to_chat(king, "<span class='notice'>You just find more garbage and dirt. Lovely, but beneath you now.</span>")
|
||||
new pickedtrash(get_turf(king))
|
||||
|
||||
/obj/machinery/disposal/proc/place_item_in_disposal(obj/item/I, mob/user)
|
||||
I.forceMove(src)
|
||||
user.visible_message("<span class='notice'>[user.name] places \the [I] into \the [src].</span>", "<span class='notice'>You place \the [I] into \the [src].</span>")
|
||||
@@ -498,3 +518,10 @@
|
||||
|
||||
/obj/machinery/disposal/delivery_chute/newHolderDestination(obj/structure/disposalholder/H)
|
||||
H.destinationTag = 1
|
||||
|
||||
|
||||
/obj/machinery/disposal/proc/on_rat_rummage(mob/living/simple_animal/hostile/regalrat/king)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
INVOKE_ASYNC(src, /obj/machinery/disposal/.proc/rat_rummage, king)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user