From 6f1e1534b4b2cfd8bee8e7479f575de428d4d182 Mon Sep 17 00:00:00 2001 From: Ben <91219575+Ben10083@users.noreply.github.com> Date: Sun, 29 Sep 2024 11:29:53 -0400 Subject: [PATCH] Schlorrgo Powercreep (#19420) Schlorrgo mob given various tweaks to increase resposiveness and QOL Eggs now process growth as intended (let me know if the way i did it wasn't the right way, far as I can tell eggs didnt process yet. Testing shows eggs in cartoons not growing even went removed.) - Look into Egg Wierdness (No longer doing since better to have that handled in own PR) - Make Schlorrgos roll down stairs (Stair PR reverted lol, maybe another time) - [x] Make Schlorrgos lay eggs (use ice tunnelers as baseline) - [x] Kill Commander Nated - [x] More Schlorrgo interactions? --------- Signed-off-by: Ben <91219575+Ben10083@users.noreply.github.com> Co-authored-by: Ben10083 --- .../living/simple_animal/friendly/adhomai.dm | 5 +- .../simple_animal/friendly/farm_animals.dm | 1 + .../simple_animal/friendly/schlorrgo.dm | 89 +++++++++-- .../mob/living/simple_animal/simple_animal.dm | 147 +++++++++++------- .../Chemistry-Reagents-Food-Drinks.dm | 4 +- code/modules/reagents/reagent_containers.dm | 2 +- .../reagent_containers/food/snacks.dm | 2 + .../reagent_containers/food/snacks/eggs.dm | 26 +++- html/changelogs/Ben10083 Schlorrgo Buffs.yml | 62 ++++++++ .../adhomai/adhomai_schlorrgo_cage.dmm | 16 +- .../adhomai/adhomai_tunneler_nest.dm | 3 +- 11 files changed, 275 insertions(+), 82 deletions(-) create mode 100644 html/changelogs/Ben10083 Schlorrgo Buffs.yml diff --git a/code/modules/mob/living/simple_animal/friendly/adhomai.dm b/code/modules/mob/living/simple_animal/friendly/adhomai.dm index 431287d8e66..254da7f49d3 100644 --- a/code/modules/mob/living/simple_animal/friendly/adhomai.dm +++ b/code/modules/mob/living/simple_animal/friendly/adhomai.dm @@ -47,7 +47,10 @@ if(!stat && prob(3) && eggsleft > 0 && (gender = FEMALE)) visible_message("[src] lays an egg.") eggsleft-- - new /obj/item/reagent_containers/food/snacks/egg/ice_tunnelers(get_turf(src)) + var/obj/item/reagent_containers/food/snacks/egg/ice_tunnelers/egg = new /obj/item/reagent_containers/food/snacks/egg/ice_tunnelers(get_turf(src)) + egg.fertilize() + egg.pixel_x = rand(-6,6) + egg.pixel_y = rand(-6,6) /mob/living/simple_animal/ice_tunneler/male icon_state = "tunneler_m" 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 d68461397d8..25a5e6a50d6 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -279,6 +279,7 @@ visible_message("[src] [pick("lays an egg.","squats down and croons.","begins making a huge racket.","begins clucking raucously.")]") eggsleft-- var/obj/item/reagent_containers/food/snacks/egg/E = new(get_turf(src)) + E.fertilize() E.pixel_x = rand(-6,6) E.pixel_y = rand(-6,6) diff --git a/code/modules/mob/living/simple_animal/friendly/schlorrgo.dm b/code/modules/mob/living/simple_animal/friendly/schlorrgo.dm index b61e41d08b0..10f63ca6ffa 100644 --- a/code/modules/mob/living/simple_animal/friendly/schlorrgo.dm +++ b/code/modules/mob/living/simple_animal/friendly/schlorrgo.dm @@ -14,12 +14,12 @@ icon_dead = "schlorrgo_dead" speak = list("Ough!") speak_emote = list("moans", "moans raucously") + speak_chance = 1 emote_hear = list("moans", "moans raucously") emote_see = list("rolls around") emote_sounds = list('sound/effects/creatures/ough.ogg') - meat_amount = 1 hunger_enabled = TRUE canbrush = TRUE @@ -30,7 +30,9 @@ milk_type = /singleton/reagent/drink/milk/schlorrgo friendly = "bumped" + response_help = "pets" + meat_amount = 1 meat_type = /obj/item/reagent_containers/food/snacks/meat/adhomai organ_names = list("head", "chest", "fatty core", "blubberous torso", "thick centre", "left leg", "right leg") butchering_products = list(/obj/item/reagent_containers/food/snacks/spreads/lard = 2) @@ -38,37 +40,73 @@ holder_type = /obj/item/holder/schlorrgo max_nutrition = 100 - stomach_size_mult = 10 - + digest_factor = 0.6 // fast eater metabolic_factor = 0.3 + forbidden_foods = list(/obj/item/reagent_containers/food/snacks/egg/schlorrgo) faction = "Hro'zamal" var/starting_nutrition = 100 + /// When this threshold is reached, grow the Schlorrgo var/nutrition_threshold = 80 + /// Current size of the Schlorrgo. var/current_size = BABY_SCHLORRGO + /// How many eggs the Schlorrgo is able to lay + var/eggs_left = 0 + /// Bigger Schlorrgos can lay more eggs. Starts to increase after schlorrgo becomes fat. When set to 0, Schlorrgo will never lay eggs + var/max_eggs = 0 + /mob/living/simple_animal/schlorrgo/Initialize() . = ..() nutrition = starting_nutrition check_wideness_change() +/mob/living/simple_animal/schlorrgo/Life(seconds_per_tick, times_fired) + . =..() + if(!.) + return + if(!stat && prob(3) && eggs_left > 0) // Only fat schlorrgos lay eggs + lay_egg() + +/mob/living/simple_animal/schlorrgo/proc/lay_egg() + if(!eggs_left) + return FALSE + // If colossal, high chance for egg to be crushed under weight..... + if(current_size >= COLOSSAL_SCHLORRGO && prob(75)) + visible_message("[src] attempts to lift up high enough to lay an egg, but fails, crushing the egg!") + audible_emote("cries out in agony!",0) + make_noise() + eggs_left-- + new /obj/effect/decal/cleanable/egg_smudge(get_turf(src)) + return + visible_message("[src] lays an egg.") + eggs_left-- + var/obj/item/reagent_containers/food/snacks/egg/schlorrgo/egg = new /obj/item/reagent_containers/food/snacks/egg/schlorrgo(get_turf(src)) + egg.fertilize() + egg.pixel_x = rand(-6,6) + egg.pixel_y = rand(-6,6) + /mob/living/simple_animal/schlorrgo/unarmed_harm_attack(mob/living/carbon/human/user) var/obj/item/organ/external/left_leg = user.get_organ(BP_L_LEG) var/obj/item/organ/external/right_leg = user.get_organ(BP_R_LEG) if(left_leg?.is_usable() && right_leg?.is_usable()) + user.do_attack_animation(src) + make_noise() + audible_emote("[pick(emote_hear)].") if(current_size >= WIDE_SCHLORRGO) - user.visible_message(SPAN_WARNING("[user] harmlessly kicks \the [src]!")) + user.visible_message(SPAN_WARNING("[user] kicks \the [src], but it doesn't move an inch!"), SPAN_DANGER("Your kick is suddenly stopped by \the [src]'s sheer fat!")) var/obj/item/organ/external/leg = pick(right_leg, left_leg) if(leg) + if(current_size >= COLOSSAL_SCHLORRGO) //break leg + leg.fracture() + leg.take_damage(10) leg.take_damage(5) else user.visible_message(SPAN_WARNING("[user] punts \the [src]!")) - user.do_attack_animation(src) - make_noise() throw_at(get_edge_target_turf(user, get_dir(user, src)), 4, 1) poke(TRUE) else @@ -77,15 +115,19 @@ /mob/living/simple_animal/schlorrgo/turf_collision(var/turf/T, var/speed = THROWFORCE_SPEED_DIVISOR) visible_message(SPAN_WARNING("[src] harmlessly bounces off \the [T]!")) playsound(T, 'sound/effects/bangtaper.ogg', 50, 1, 1) - make_noise() /mob/living/simple_animal/schlorrgo/fall_impact() visible_message(SPAN_NOTICE("\The [src] bounces after landing!")) + playsound(src, 'sound/effects/bangtaper.ogg', 50, 1, 1) + audible_emote("[pick(emote_hear)].",0) + make_noise() step(src, pick(GLOB.alldirs), 1) return FALSE /mob/living/simple_animal/schlorrgo/process_food() ..() + if(prob(6) && eggs_left < max_eggs) // Change to add egg when fat + eggs_left += 1 // only +1 since this can proc often check_wideness_change() /mob/living/simple_animal/schlorrgo/proc/check_wideness_change() @@ -96,7 +138,8 @@ switch(current_size) if(EGG_SCHLORRGO) - name = "schlorrgo hatchling" + if(!named) + name = "schlorrgo hatchling" desc = "A fat creature native to the world of Hro'zamal. This one just hatched from an egg." current_size = BABY_SCHLORRGO max_nutrition = 100 @@ -112,7 +155,8 @@ holder_type = /obj/item/holder/schlorrgo/baby if(BABY_SCHLORRGO) - name = "schlorrgo" + if(!named) + name = "schlorrgo" desc = "A fat creature native to the world of Hro'zamal." current_size = NORMAL_SCHLORRGO max_nutrition = 200 @@ -128,7 +172,8 @@ holder_type = /obj/item/holder/schlorrgo if(NORMAL_SCHLORRGO) - name = "fat schlorrgo" + if(!named) + name = "fat schlorrgo" desc = "A fat creature native to the world of Hro'zamal. This one is fatter than most schlorrgo." current_size = FAT_SCHLORRGO max_nutrition = 400 @@ -142,9 +187,11 @@ icon_living = "schlorrgo_fat" icon_dead = "schlorrgo_fat_dead" holder_type = /obj/item/holder/schlorrgo/fat + max_eggs = 3 if(FAT_SCHLORRGO) - name = "massive schlorrgo" + if(!named) + name = "massive schlorrgo" desc = "A fat creature native to the world of Hro'zamal. This one is so big it can barely walk." current_size = WIDE_SCHLORRGO max_nutrition = 1000 @@ -157,19 +204,22 @@ icon_state = "schlorrgo_wide" icon_living = "schlorrgo_wide" icon_dead = "schlorrgo_wide_dead" + response_help = "rubs [name]'s belly" melee_damage_lower = 15 melee_damage_upper = 15 attacktext = "crushed" environment_smash = 1 resistance = 2 - mob_swap_flags = HUMAN|SIMPLE_ANIMAL|SLIME|MONKEY - mob_push_flags = ALLMOBS + mob_swap_flags = HUMAN|ROBOT + mob_push_flags = HUMAN|ROBOT a_intent = I_HURT emote_sounds = list('sound/effects/creatures/schlorrgo_scream.ogg') holder_type = null + max_eggs = 6 if(WIDE_SCHLORRGO) - name = "colossal schlorrgo" + if(!named) + name = "colossal schlorrgo" desc = "A fat creature native to the world of Hro'zamal. This one has been immobilized by its massive weight." current_size = COLOSSAL_SCHLORRGO max_nutrition = 1500 @@ -182,6 +232,8 @@ icon_state = "schlorrgo_colossal" icon_living = "schlorrgo_colossal" icon_dead = "schlorrgo_colossal_dead" + response_help = "rubs a part of the [name]'s fat mass" + emote_see = list("attempts to roll") pixel_x = -8 anchored = TRUE opacity = TRUE @@ -189,11 +241,14 @@ melee_damage_upper = 25 environment_smash = 2 resistance = 3 - mob_swap_flags = HUMAN|SIMPLE_ANIMAL|SLIME|MONKEY - mob_push_flags = ALLMOBS + mob_bump_flag = HEAVY // Oh lord he comin + mob_swap_flags = HEAVY + mob_push_flags = HEAVY + can_be_buckled = FALSE a_intent = I_HURT emote_sounds = list('sound/effects/creatures/schlorrgo_scream.ogg') holder_type = null + max_eggs = 9 update_icon() @@ -278,7 +333,7 @@ emote_hear = list("beeps", "beeps maliciously") emote_sounds = list('sound/effects/creatures/evil_cybeough.ogg') - faction = "Hro'zamal" + faction = "PRA" // Evil PRA Machine maxHealth = 80 health = 80 diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 3822d7a4a5e..3aaf471abd8 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -14,50 +14,69 @@ mob_swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL mob_push_flags = MONKEY|SLIME|SIMPLE_ANIMAL - /// The type of damage this mob deals. + /// The type of damage this mob deals var/damage_type = DAMAGE_BRUTE - var/show_stat_health = 1 //does the percentage health show in the stat panel for the mob + /// Does the percentage health show in the stat panel for the mob + var/show_stat_health = 1 var/in_stasis = FALSE var/icon_living = "" var/icon_dead = "" - var/icon_gib = null //We only try to show a gibbing animation if this exists. + /// We only try to show a gibbing animation if this exists + var/icon_gib = null appearance_flags = KEEP_TOGETHER - var/blood_type = COLOR_HUMAN_BLOOD //Blood colour for impact visuals. + + /// Blood colour for impact visuals + var/blood_type = COLOR_HUMAN_BLOOD var/blood_overlay_icon = 'icons/mob/npc/blood_overlay.dmi' var/blood_state = BLOOD_NONE var/image/blood_overlay + /// If the animal is bleeding. var/bleeding = FALSE - var/blood_amount = 20 // set a limit to the amount of blood it can bleed, otherwise it will keep bleeding forever and crunk the server - var/previous_bleed_timer = 0 // they only bleed for as many seconds as force damage was applied to them - var/blood_timer_mod = 0.25 // tweak to change the amount of seconds a mob will bleed + /// Set a limit to the amount of blood it can bleed, otherwise it will keep bleeding forever and crunk the server + var/blood_amount = 20 + /// They only bleed for as many seconds as force damage was applied to them + var/previous_bleed_timer = 0 + /// Tweak to change the amount of seconds a mob will bleed + var/blood_timer_mod = 0.25 + /// What language a animal would speak by default. Try not to think about it too hard var/simple_default_language = LANGUAGE_TCB universal_speak = TRUE // since most mobs verbalize sounds, this is the better option, just set this to false on mobs that don't make noise var/list/speak = list() var/speak_chance = 0 - var/list/emote_hear = list() //Hearable emotes - var/list/emote_see = list() //Unlike speak_emote, the list of things in this variable only show by themselves with no spoken text. IE: Ian barks, Ian yaps + /// Hearable emotes + var/list/emote_hear = list() + /// Unlike speak_emote, the list of things in this variable only show by themselves with no spoken text. IE: Ian barks, Ian yaps + var/list/emote_see = list() - ///A list of sounds that this animal will randomly play, lazy list + /// A list of sounds that this animal will randomly play, lazy list var/list/emote_sounds var/sound_time = TRUE var/turns_per_move = 1 var/turns_since_move = 0 universal_speak = 0 //No, just no. + /// How much meat is provided when butchering var/meat_amount = 0 + /// What kind of meat is provided. Do not set this to non meats, use butchering_products instead var/meat_type - var/stop_thinking = FALSE // prevents them from doing any AI stuff whatsoever - var/stop_automated_movement = 0 //Use this to temporarely stop random movement or to if you write special movement code for animals. - var/wander = 1 // Does the mob wander around when idle? - var/wanders_diagonally = FALSE // does the mob move diagonally when wandering? - var/stop_automated_movement_when_pulled = 1 //When set to 1 this stops the animal from moving when someone is pulling it. - var/atom/movement_target = null//Thing we're moving towards + /// Prevents them from doing any AI stuff whatsoever + var/stop_thinking = FALSE + /// Use this to temporarely stop random movement or to if you write special movement code for animals + var/stop_automated_movement = FALSE + /// Does the mob wander around when idle? + var/wander = TRUE + /// does the mob move diagonally when wandering? + var/wanders_diagonally = FALSE + /// When set to TRUE this stops the animal from moving when someone is pulling it + var/stop_automated_movement_when_pulled = TRUE + /// Thing we're moving towards + var/atom/movement_target = null var/turns_since_scan = 0 //Interaction @@ -65,18 +84,22 @@ var/response_help = "tries to help" var/response_disarm = "tries to disarm" var/response_harm = "hurts" - var/harm_intent_damage = 3 //The maximum amount of damage this mob can take from simple unarmed attacks that don't have damage values, like punches + /// The maximum amount of damage this mob can take from simple unarmed attacks that don't have damage values, like punches + var/harm_intent_damage = 3 //Temperature effect var/minbodytemp = 250 var/maxbodytemp = 350 - var/heat_damage_per_tick = 3 //amount of damage applied if animal's body temperature is higher than maxbodytemp - var/cold_damage_per_tick = 2 //same as heat_damage_per_tick, only if the bodytemperature it's lower than minbodytemp + /// Amount of damage applied if animal's body temperature is higher than maxbodytemp + var/heat_damage_per_tick = 3 + /// Same as heat_damage_per_tick, only if the bodytemperature it's lower than minbodytemp + var/cold_damage_per_tick = 2 var/fire_alert = 0 //Atmos effect - Yes, you can make creatures that require phoron or co2 to survive. N2O is a trace gas and handled separately, hence why it isn't here. It'd be hard to add it. Hard and me don't mix (Yes, yes make all the dick jokes you want with that.) - Errorage + //Leaving something at 0 means it's off - has no maximum var/min_oxy = 5 - var/max_oxy = 0 //Leaving something at 0 means it's off - has no maximum + var/max_oxy = 0 var/min_tox = 0 var/max_tox = 1 var/min_co2 = 0 @@ -85,8 +108,10 @@ var/max_n2 = 0 var/min_h2 = 0 var/max_h2 = 5 - var/unsuitable_atoms_damage = 2 //This damage is taken when atmos doesn't fit all the requirements above - var/speed = 0 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster + /// This damage is taken when atmos doesn't fit all the requirements above + var/unsuitable_atoms_damage = 2 + /// Higher speed is slower, negative speed is faster + var/speed = 0 // LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING!!! //LETTING SIMPLE ANIMALS ATTACK? WHAT COULD GO WRONG. Defaults to zero so Ian can still be cuddly var/melee_damage_lower = 0 @@ -97,8 +122,10 @@ var/attack_sound = /singleton/sound_category/swing_hit_sound var/friendly = "nuzzles" var/environment_smash = 0 - var/resistance = 0 // Damage reduction - var/resist_mod = 1 // a multiplier for the chance the animal has to break out + /// Damage reduction + var/resistance = 0 + /// A multiplier for the chance the animal has to break out + var/resist_mod = 1 //Null rod stuff var/supernatural = 0 @@ -106,38 +133,51 @@ //Hunger/feeding vars - var/hunger_enabled = 1//If set to 0, a creature ignores hunger + /// If set to FALSE, creature ignores hunger + var/hunger_enabled = TRUE max_nutrition = 50 - var/metabolic_factor = 1//A multiplier on how fast nutrition is lost. used to tweak the rates on a per-animal basis - var/nutrition_step = 0.2 //nutrition lost per tick and per step, calculated from mob_size, 0.2 is a fallback + /// A multiplier on how fast nutrition is lost. used to tweak the rates on a per-animal basis + var/metabolic_factor = 1 + /// Nutrition lost per tick and per step, calculated from mob_size, 0.2 is a fallback + var/nutrition_step = 0.2 var/bite_factor = 0.4 - var/digest_factor = 0.2 //A multiplier on how quickly reagents are digested + /// A multiplier on how quickly reagents are digested + var/digest_factor = 0.2 var/stomach_size_mult = 5 - var/list/forbidden_foods = list() //Foods this animal should never eat + /// Foods this animal should never eat + var/list/forbidden_foods = list() //Seeking/Moving behaviour vars - var/min_scan_interval = 1//Minimum and maximum number of procs between a scan + var/min_scan_interval = 1 var/max_scan_interval = 15 - var/scan_interval = 5//current scan interval, clamped between min and max - //It gradually increases up to max when its left alone, to save performance + /// current scan interval, clamped between min and max. + /// It gradually increases up to max when its left alone, to save performance + var/scan_interval = 5 - var/seek_speed = 2//How many tiles per second the animal will move towards something + /// How many tiles per second the animal will move towards something + var/seek_speed = 2 var/seek_move_delay - var/scan_range = 6//How far around the animal will look for something + /// How far around the animal will look for something + var/scan_range = 6 - var/kitchen_tag = "animal" //Used for cooking with animals + /// Used for cooking with animals + var/kitchen_tag = "animal" //brushing - var/canbrush = FALSE //can we brush this beautiful creature? - var/brush = /obj/item/haircomb //What can we brush it with? Use a rag for things with scales/carapaces/etc + /// Can we brush this beautiful creature? + var/canbrush = FALSE + /// What can we brush it with? Use a rag for things with scales/carapaces/etc + var/brush = /obj/item/haircomb //Napping var/can_nap = 0 var/icon_rest = null - var/tameable = TRUE //if you can tame it, used by the dociler for now + /// If you can tame it, used by the dociler for now + var/tameable = TRUE - var/flying = FALSE //if they can fly, which stops them from falling down and allows z-space travel + /// If they can fly, which stops them from falling down and allows z-space travel + var/flying = FALSE /// Whether this animal can be milked or not. var/can_be_milked = FALSE @@ -151,18 +191,21 @@ /// What the animal's milking product is. var/milk_type = /singleton/reagent/drink/milk - var/list/butchering_products //if anything else is created when butchering this creature, like bones and leather + /// If anything else is created when butchering this creature, like bones and leather + var/list/butchering_products var/psi_pingable = TRUE var/armor_type = /datum/component/armor - var/list/natural_armor //what armor animal has + /// What armor animal has + var/list/natural_armor //for simple animals that reflect damage when attacked in melee var/return_damage_min var/return_damage_max - var/dead_on_map = FALSE //if true, kills the mob when it spawns (it is for mapping) + /// If true, kills the mob when it spawns (it is for mapping) + var/dead_on_map = FALSE var/vehicle_version = null /** @@ -440,9 +483,9 @@ if(food_choices.len) //Only when sufficiently hungry UnarmedAttack(pick(food_choices)) -//Simple reagent processing for simple animals -//This allows animals to digest food, and only food -//Most drugs, poisons etc, are designed to work on carbons and affect many values a simple animal doesnt have +/// Simple reagent processing for simple animals +/// This allows animals to digest food, and only food +/// Most drugs, poisons etc, are designed to work on carbons and affect many values a simple animal doesnt have /mob/living/simple_animal/proc/process_food() if (hunger_enabled) if (nutrition) @@ -489,7 +532,7 @@ if(act) ..(act, type, desc) -//This is called when an animal 'speaks'. It does nothing here, but descendants should override it to add audio +/// This is called when an animal 'speaks'. It does nothing here, but descendants should override it to add audio /mob/living/simple_animal/proc/speak_audio() if(LAZYLEN(emote_sounds)) make_noise(TRUE) @@ -813,7 +856,7 @@ named = TRUE do_nickname(M) //This is for commanded mobs who can have a short name, like guard dogs -//This is for commanded mobs who can have a short name, like guard dogs. Does nothing for other mobs for now +/// This is for commanded mobs who can have a short name, like guard dogs. Does nothing for other mobs for now /mob/living/simple_animal/proc/do_nickname(var/mob/living/M) @@ -843,7 +886,7 @@ item_to_equip.forceMove(get_turf(src)) return FALSE -// Harvest an animal's delicious byproducts +/// Harvest an animal's delicious byproducts /mob/living/simple_animal/proc/harvest(var/mob/user) var/actual_meat_amount = max(1,(meat_amount*0.75)) if(meat_type && actual_meat_amount>0 && (stat == DEAD)) @@ -866,7 +909,7 @@ user.visible_message("\The [user] butchers \the [src] messily!") gib() -//For picking up small animals +/// For picking up small animals /mob/living/simple_animal/MouseDrop(atom/over_object) if (holder_type)//we need a defined holder type in order for picking up to work var/mob/living/carbon/H = over_object @@ -879,14 +922,14 @@ //I wanted to call this proc alert but it already exists. -//Basically makes the mob pay attention to the world, resets sleep timers, awakens it from a sleeping state sometimes +/// Basically makes the mob pay attention to the world, resets sleep timers, awakens it from a sleeping state sometimes /mob/living/simple_animal/proc/poke(var/force_wake = 0) if (stat != DEAD) scan_interval = min_scan_interval if (force_wake || (!client && prob(30))) wake_up() -//Puts the mob to sleep +/// Puts the mob to sleep /mob/living/simple_animal/proc/fall_asleep() if (stat != DEAD) resting = 1 @@ -897,7 +940,7 @@ movement_target = null update_icon() -//Wakes the mob up from sleeping +/// Wakes the mob up from sleeping /mob/living/simple_animal/proc/wake_up() if (stat != DEAD) set_stat(CONSCIOUS) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm index 19ac53428d7..a4a54920067 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm @@ -1485,9 +1485,9 @@ description = "A beverage made with Fatshouters' yogurt mixed with Nm'shaan's sugar and sweet herbs." taste_description = "sweet fatty yogurt" - glass_icon_state = "mutthir_glass" glass_name = "glass of mutthir" glass_desc = "A beverage made with Fatshouters' yogurt mixed with Nm'shaan's sugar and sweet herbs." + glass_icon_state = "mutthir_glass" /singleton/reagent/drink/milk/beetle name = "Hakhma Milk" @@ -1502,7 +1502,7 @@ /singleton/reagent/drink/milk/schlorrgo name = "Schlorrgo Milk" description = "An opaque white liquid produced by the mammary glands of the Schlorrgo." - taste_description = "fatty milk" + taste_description = "bitter and fatty milk" /singleton/reagent/drink/milk/schlorrgo/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/datum/reagents/holder) ..() diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 0ab291566fe..1ec438a54c1 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -49,7 +49,7 @@ if(N) amount_per_transfer_from_this = N -/obj/item/reagent_containers/Initialize() +/obj/item/reagent_containers/Initialize(mapload) . = ..() if(!possible_transfer_amounts) src.verbs -= /obj/item/reagent_containers/verb/set_APTFT diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index fc6d5e4013c..7a12d90a875 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -70,6 +70,8 @@ if (amount_eaten) bitecount++ + shake_animation() + playsound(loc, pick('sound/effects/creatures/nibble1.ogg','sound/effects/creatures/nibble2.ogg'), 30, 1) if (amount_eaten >= m_bitesize) user.visible_message(SPAN_NOTICE("\The [user] feeds \the [target] \the [src].")) if (!istype(target.loc, /turf))//held mobs don't see visible messages diff --git a/code/modules/reagents/reagent_containers/food/snacks/eggs.dm b/code/modules/reagents/reagent_containers/food/snacks/eggs.dm index e879b8bf826..adbdcff5725 100644 --- a/code/modules/reagents/reagent_containers/food/snacks/eggs.dm +++ b/code/modules/reagents/reagent_containers/food/snacks/eggs.dm @@ -7,7 +7,18 @@ filling_color = "#FDFFD1" volume = 10 reagents_to_add = list(/singleton/reagent/nutriment/protein/egg = 3) + /// What can be hatched from this egg var/hatchling = /mob/living/simple_animal/chick + /// Tracks how much the egg has grown. At 100, egg hatches + var/amount_grown = 0 + /// If set to TRUE, egg is currently growing and will eventually spawn a hatchling if left alone on a turf. + /// Set to TRUE for eggs mapped in, but meant to be able to hatch. + var/fertile = FALSE + +/obj/item/reagent_containers/food/snacks/egg/Initialize(mapload) + . = ..() + if(fertile) + fertilize() /obj/item/reagent_containers/food/snacks/egg/afterattack(obj/O as obj, mob/user as mob, proximity) if(!(proximity && O.is_open_container())) @@ -40,9 +51,13 @@ return TRUE return ..() -/obj/item/reagent_containers/food/snacks/egg - var/amount_grown = 0 +/// Call this proc to have the given egg start growing. Should only be called if hatching is set +/obj/item/reagent_containers/food/snacks/egg/proc/fertilize() + if(hatchling) + fertile = TRUE + START_PROCESSING(SSprocessing,src) +/// Handles hatching. Eggs only grow when on a turf. /obj/item/reagent_containers/food/snacks/egg/process() if(isturf(loc)) amount_grown += rand(1,2) @@ -51,8 +66,6 @@ new hatchling(get_turf(src)) STOP_PROCESSING(SSprocessing, src) qdel(src) - else - STOP_PROCESSING(SSprocessing, src) /obj/item/reagent_containers/food/snacks/egg/blue icon_state = "egg-blue" @@ -92,8 +105,13 @@ icon_state = "schlorrgo_egg" filling_color = "#e9ffd1" volume = 20 + reagents_to_add = list(/singleton/reagent/nutriment/protein/egg = 6) // Big egg hatchling = /mob/living/simple_animal/schlorrgo/baby +/// Cursed subtype due to cargo code. A subtype like this will be needed for any cargo orders of eggs that we want to be fertilized. +/obj/item/reagent_containers/food/snacks/egg/schlorrgo/fertile + fertile = TRUE + /obj/item/reagent_containers/food/snacks/egg/ice_tunnelers name = "ice tunneler egg" desc = "An egg laid by an Adhomian animal." diff --git a/html/changelogs/Ben10083 Schlorrgo Buffs.yml b/html/changelogs/Ben10083 Schlorrgo Buffs.yml new file mode 100644 index 00000000000..255cf6b024c --- /dev/null +++ b/html/changelogs/Ben10083 Schlorrgo Buffs.yml @@ -0,0 +1,62 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: Ben10083 + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - qol: "Various tweaks to Schlorrgos to have better responses and increased density." + - rscadd: "Schlorrgos now lay eggs." + - bugfix: "Schlorrgos no longer overwrite their given name when grown." + - bugfix: "Eggs now should be able to hatch animals if fertilized." + - code_imp: "DMdoc'd simple animals code." diff --git a/maps/random_ruins/exoplanets/adhomai/adhomai_schlorrgo_cage.dmm b/maps/random_ruins/exoplanets/adhomai/adhomai_schlorrgo_cage.dmm index a0f10f67d1a..e6c51ac09b5 100644 --- a/maps/random_ruins/exoplanets/adhomai/adhomai_schlorrgo_cage.dmm +++ b/maps/random_ruins/exoplanets/adhomai/adhomai_schlorrgo_cage.dmm @@ -25,10 +25,18 @@ dir = 8 }, /obj/structure/closet/crate/freezer, -/obj/item/reagent_containers/food/snacks/egg/schlorrgo, -/obj/item/reagent_containers/food/snacks/egg/schlorrgo, -/obj/item/reagent_containers/food/snacks/egg/schlorrgo, -/obj/item/reagent_containers/food/snacks/egg/schlorrgo, +/obj/item/reagent_containers/food/snacks/egg/schlorrgo{ + fertile = 1 + }, +/obj/item/reagent_containers/food/snacks/egg/schlorrgo{ + fertile = 1 + }, +/obj/item/reagent_containers/food/snacks/egg/schlorrgo{ + fertile = 1 + }, +/obj/item/reagent_containers/food/snacks/egg/schlorrgo{ + fertile = 1 + }, /turf/simulated/floor/concrete/square, /area/adhomai_schlorrgo_cage) "f" = ( diff --git a/maps/random_ruins/exoplanets/adhomai/adhomai_tunneler_nest.dm b/maps/random_ruins/exoplanets/adhomai/adhomai_tunneler_nest.dm index a5ce1ca8293..08984e977bc 100644 --- a/maps/random_ruins/exoplanets/adhomai/adhomai_tunneler_nest.dm +++ b/maps/random_ruins/exoplanets/adhomai/adhomai_tunneler_nest.dm @@ -33,7 +33,8 @@ return if(ishuman(user)) var/mob/living/carbon/human/H = user - var/obj/item/reagent_containers/food/snacks/egg/ice_tunnelers/E = new/obj/item/reagent_containers/food/snacks/egg/ice_tunnelers (get_turf(src)) + var/obj/item/reagent_containers/food/snacks/egg/ice_tunnelers/E = new/obj/item/reagent_containers/food/snacks/egg/ice_tunnelers (get_turf(src), TRUE) H.put_in_hands(E) + E.fertilize() eggs-- update_icon()