From fc4b15b830cde30b3d16c61a383ddd01ef25a1ec Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 10 Aug 2023 19:19:53 +0200 Subject: [PATCH] [MIRROR] removes dextrous_hud_type and healable var [MDB IGNORE] (#22992) * removes dextrous_hud_type and healable var (#77244) ## About The Pull Request I was working on some basic mob stuff and noticed this is a little messy, so I made these changes separately. I removed ``dextrous_hud_type`` because ``hud_type`` exists and can just be used instead. I also removed the ``healable`` var, because it was incorrectly used (with the expectation that basic mobs had it too). Instead it will rely on the mob being Organic, the check right under it, and I gave mob biotypes to mobs that were not healable and had no biotype already. I made a new biotype for slimes because I didn't find any other ones that fit it (and gave it to slimepeople), but it is not used anywhere other than to prevent them from healing from sutures, as I didn't want to just set it to NONE. Thought this may be useful for the future. ## Why It's Good For The Game ``healable`` is checked on simple animals and basic mobs, despite basic mobs not having this var. I do not want to add this var to basic mobs either, I think checking for them being organic makes much more sense and avoids having to make basic mobs less basic. ## Changelog Nothing player-facing. * removes dextrous_hud_type and healable var * Modular --------- Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com> --- code/__DEFINES/mobs.dm | 2 ++ code/_globalvars/bitfields.dm | 3 ++- code/_onclick/hud/generic_dextrous.dm | 7 ------- code/game/objects/items/stacks/medical.dm | 4 ---- code/modules/mining/minebot.dm | 2 +- code/modules/mob/living/basic/space_fauna/demon/demon.dm | 2 +- .../mob/living/carbon/human/species_types/jellypeople.dm | 1 + code/modules/mob/living/simple_animal/bot/bot.dm | 1 - .../mob/living/simple_animal/friendly/drone/_drone.dm | 3 +-- code/modules/mob/living/simple_animal/guardian/guardian.dm | 3 +-- .../mob/living/simple_animal/guardian/types/dextrous.dm | 1 + .../living/simple_animal/hostile/constructs/constructs.dm | 1 - .../mob/living/simple_animal/hostile/gorilla/gorilla.dm | 1 + .../mob/living/simple_animal/hostile/heretic_monsters.dm | 1 - code/modules/mob/living/simple_animal/hostile/morph.dm | 2 +- .../mob/living/simple_animal/hostile/retaliate/clown.dm | 1 + code/modules/mob/living/simple_animal/hostile/skeleton.dm | 1 - code/modules/mob/living/simple_animal/hostile/smspider.dm | 1 - code/modules/mob/living/simple_animal/revenant.dm | 1 - code/modules/mob/living/simple_animal/shade.dm | 1 - code/modules/mob/living/simple_animal/simple_animal.dm | 4 ---- code/modules/mob/living/simple_animal/slime/slime.dm | 2 +- code/modules/surgery/healing.dm | 4 ---- .../modules/mob/living/simple_animal/hostile/grabbagmob.dm | 1 - modular_skyrat/modules/horrorform/code/true_changeling.dm | 1 - 25 files changed, 14 insertions(+), 37 deletions(-) diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index c4aae6e3200..21529367710 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -42,6 +42,7 @@ #define VENTCRAWLER_ALWAYS 2 //Mob bio-types flags +///The mob is organic, can can heal from medical sutures. #define MOB_ORGANIC (1 << 0) #define MOB_MINERAL (1 << 1) #define MOB_ROBOTIC (1 << 2) @@ -53,6 +54,7 @@ #define MOB_REPTILE (1 << 8) #define MOB_SPIRIT (1 << 9) #define MOB_PLANT (1 << 10) +#define MOB_SLIME (1 << 11) //Lung respiration type flags #define RESPIRATION_OXYGEN (1 << 0) diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 3a7fa2857f1..3ab23827415 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -258,7 +258,8 @@ DEFINE_BITFIELD(mob_biotypes, list( "MOB_ROBOTIC" = MOB_ROBOTIC, "MOB_SPIRIT" = MOB_SPIRIT, "MOB_UNDEAD" = MOB_UNDEAD, - "MOB_PLANT" = MOB_PLANT + "MOB_PLANT" = MOB_PLANT, + "MOB_SLIME" = MOB_SLIME, )) DEFINE_BITFIELD(mob_respiration_type, list( diff --git a/code/_onclick/hud/generic_dextrous.dm b/code/_onclick/hud/generic_dextrous.dm index 29b78669d48..bf09fa33717 100644 --- a/code/_onclick/hud/generic_dextrous.dm +++ b/code/_onclick/hud/generic_dextrous.dm @@ -62,10 +62,3 @@ for(var/obj/item/I in D.held_items) I.screen_loc = null D.client.screen -= I - - -//Dextrous simple mobs can use hands! -/mob/living/simple_animal/create_mob_hud() - if(dextrous) - hud_type = dextrous_hud_type - return ..() diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 5113559cfd8..a8e9170a2b0 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -86,10 +86,6 @@ patient.balloon_alert(user, "they're dead!") return if(isanimal_or_basicmob(patient) && heal_brute) // only brute can heal - var/mob/living/simple_animal/critter = patient - if (istype(critter) && !critter.healable) - patient.balloon_alert(user, "won't work!") - return FALSE if (!(patient.mob_biotypes & MOB_ORGANIC)) patient.balloon_alert(user, "can't fix that!") return FALSE diff --git a/code/modules/mining/minebot.dm b/code/modules/mining/minebot.dm index ac797850816..f7a6c030d2c 100644 --- a/code/modules/mining/minebot.dm +++ b/code/modules/mining/minebot.dm @@ -32,7 +32,7 @@ wanted_objects = list(/obj/item/stack/ore/diamond, /obj/item/stack/ore/gold, /obj/item/stack/ore/silver, /obj/item/stack/ore/plasma, /obj/item/stack/ore/uranium, /obj/item/stack/ore/iron, /obj/item/stack/ore/bananium, /obj/item/stack/ore/titanium) - healable = 0 + mob_biotypes = MOB_ROBOTIC loot = list(/obj/effect/decal/cleanable/robot_debris) del_on_death = TRUE light_system = MOVABLE_LIGHT diff --git a/code/modules/mob/living/basic/space_fauna/demon/demon.dm b/code/modules/mob/living/basic/space_fauna/demon/demon.dm index 48868b76e46..c2d8c751cde 100644 --- a/code/modules/mob/living/basic/space_fauna/demon/demon.dm +++ b/code/modules/mob/living/basic/space_fauna/demon/demon.dm @@ -19,7 +19,7 @@ icon_state = "demon" icon_living = "demon" - mob_biotypes = MOB_UNDEAD|MOB_HUMANOID // undead is important because it means we can't be healed with sutures and the like. keep this in mind if you ever decide to change this + mob_biotypes = MOB_BEAST|MOB_HUMANOID status_flags = CANPUSH combat_mode = TRUE diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index f3f6e131255..31d42874b82 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -11,6 +11,7 @@ plural_form = "Jellypeople" id = SPECIES_JELLYPERSON examine_limb_id = SPECIES_JELLYPERSON + inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_SLIME inherent_traits = list( TRAIT_MUTANT_COLORS, TRAIT_TOXINLOVER, diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 41f9234638e..bf785954fe7 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -6,7 +6,6 @@ mob_biotypes = MOB_ROBOTIC stop_automated_movement = TRUE wander = FALSE - healable = FALSE damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0) atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_plas" = 0, "max_plas" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) hud_possible = list(DIAG_STAT_HUD, DIAG_BOT_HUD, DIAG_HUD, DIAG_BATT_HUD, DIAG_PATH_HUD = HUD_LIST_LIST) diff --git a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm index 356b6b18cba..b095016827f 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm @@ -27,7 +27,6 @@ maxbodytemp = 0 wander = 0 speed = 0 - healable = 0 density = FALSE pass_flags = PASSTABLE | PASSMOB sight = SEE_TURFS | SEE_OBJS @@ -45,7 +44,7 @@ unique_name = TRUE faction = list(FACTION_NEUTRAL,FACTION_SILICON,FACTION_TURRET) dextrous = TRUE - dextrous_hud_type = /datum/hud/dextrous/drone + hud_type = /datum/hud/dextrous/drone // Going for a sort of pale green here lighting_cutoff_red = 30 lighting_cutoff_green = 35 diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index ec4f5a7a4d9..a07bcd70e31 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -29,7 +29,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians attack_verb_simple = "punch" maxHealth = INFINITY //The spirit itself is invincible health = INFINITY - healable = FALSE //don't brusepack the guardian + mob_biotypes = MOB_BEAST damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1) //how much damage from each damage type we transfer to the owner environment_smash = ENVIRONMENT_SMASH_STRUCTURES obj_damage = 40 @@ -43,7 +43,6 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians light_range = 3 light_on = FALSE hud_type = /datum/hud/guardian - dextrous_hud_type = /datum/hud/dextrous/guardian //if we're set to dextrous, account for it. faction = list() /// The guardian's color, used for their sprite, chat, and some effects made by it. diff --git a/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm b/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm index 9d7fb55edad..798b2067c63 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm @@ -12,6 +12,7 @@ creator_desc = "Does low damage on attack, but is capable of holding items and storing a single item within it. It will drop items held in its hands when it recalls, but it will retain the stored item." creator_icon = "dextrous" dextrous = TRUE + hud_type = /datum/hud/dextrous/guardian held_items = list(null, null) var/obj/item/internal_storage //what we're storing within ourself diff --git a/code/modules/mob/living/simple_animal/hostile/constructs/constructs.dm b/code/modules/mob/living/simple_animal/hostile/constructs/constructs.dm index 3d2702530ff..124b797d0da 100644 --- a/code/modules/mob/living/simple_animal/hostile/constructs/constructs.dm +++ b/code/modules/mob/living/simple_animal/hostile/constructs/constructs.dm @@ -26,7 +26,6 @@ atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_plas" = 0, "max_plas" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) minbodytemp = 0 maxbodytemp = INFINITY - healable = 0 faction = list(FACTION_CULT) pressure_resistance = 100 unique_name = 1 diff --git a/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm b/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm index fa86cc950e5..e7a1a7b460b 100644 --- a/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm +++ b/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm @@ -30,6 +30,7 @@ attack_verb_simple = "pummel" attack_sound = 'sound/weapons/punch1.ogg' dextrous = TRUE + hud_type = /datum/hud/dextrous held_items = list(null, null) faction = list(FACTION_MONKEY, FACTION_JUNGLE) robust_searching = TRUE diff --git a/code/modules/mob/living/simple_animal/hostile/heretic_monsters.dm b/code/modules/mob/living/simple_animal/hostile/heretic_monsters.dm index 6b87eb03ffd..4269f847d92 100644 --- a/code/modules/mob/living/simple_animal/hostile/heretic_monsters.dm +++ b/code/modules/mob/living/simple_animal/hostile/heretic_monsters.dm @@ -26,7 +26,6 @@ atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_plas" = 0, "max_plas" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) minbodytemp = 0 maxbodytemp = INFINITY - healable = FALSE movement_type = GROUND pressure_resistance = 100 del_on_death = TRUE diff --git a/code/modules/mob/living/simple_animal/hostile/morph.dm b/code/modules/mob/living/simple_animal/hostile/morph.dm index da01eabb34a..c3658056280 100644 --- a/code/modules/mob/living/simple_animal/hostile/morph.dm +++ b/code/modules/mob/living/simple_animal/hostile/morph.dm @@ -16,7 +16,7 @@ minbodytemp = 0 maxHealth = 150 health = 150 - healable = 0 + mob_biotypes = MOB_BEAST obj_damage = 50 melee_damage_lower = 20 melee_damage_upper = 20 diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm index 551b4fbffed..529c3025479 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm @@ -207,6 +207,7 @@ emote_see = list("honks", "sweats", "jiggles", "contemplates its existence") speak_chance = 5 dextrous = TRUE + hud_type = /datum/hud/dextrous maxHealth = 140 health = 140 speed = -5 diff --git a/code/modules/mob/living/simple_animal/hostile/skeleton.dm b/code/modules/mob/living/simple_animal/hostile/skeleton.dm index ca22166e91b..aba636c11bf 100644 --- a/code/modules/mob/living/simple_animal/hostile/skeleton.dm +++ b/code/modules/mob/living/simple_animal/hostile/skeleton.dm @@ -16,7 +16,6 @@ melee_damage_upper = 15 minbodytemp = 0 maxbodytemp = 1500 - healable = 0 //they're skeletons how would bruise packs help them?? attack_verb_continuous = "slashes" attack_verb_simple = "slash" attack_sound = 'sound/hallucinations/growl1.ogg' diff --git a/code/modules/mob/living/simple_animal/hostile/smspider.dm b/code/modules/mob/living/simple_animal/hostile/smspider.dm index a6f14e33c9a..150180a11cf 100644 --- a/code/modules/mob/living/simple_animal/hostile/smspider.dm +++ b/code/modules/mob/living/simple_animal/hostile/smspider.dm @@ -17,7 +17,6 @@ health = 10 minbodytemp = 0 maxbodytemp = 1500 - healable = 0 attack_verb_continuous = "slices" attack_verb_simple = "slice" attack_sound = 'sound/effects/supermatter.ogg' diff --git a/code/modules/mob/living/simple_animal/revenant.dm b/code/modules/mob/living/simple_animal/revenant.dm index 97ec1d93a69..25a283a7364 100644 --- a/code/modules/mob/living/simple_animal/revenant.dm +++ b/code/modules/mob/living/simple_animal/revenant.dm @@ -19,7 +19,6 @@ health = INFINITY //Revenants don't use health, they use essence instead maxHealth = INFINITY plane = GHOST_PLANE - healable = FALSE sight = SEE_SELF throwforce = 0 diff --git a/code/modules/mob/living/simple_animal/shade.dm b/code/modules/mob/living/simple_animal/shade.dm index 87e6f536cb6..dbb795e91c5 100644 --- a/code/modules/mob/living/simple_animal/shade.dm +++ b/code/modules/mob/living/simple_animal/shade.dm @@ -9,7 +9,6 @@ mob_biotypes = MOB_SPIRIT maxHealth = 40 health = 40 - healable = 0 speak_emote = list("hisses") emote_hear = list("wails.","screeches.") response_help_continuous = "puts their hand through" diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index e1238ccdf80..041c76fac42 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -70,9 +70,6 @@ /// List of weather immunity traits that are then added on Initialize(), see traits.dm. var/list/weather_immunities - ///Healable by medical stacks? Defaults to yes. - var/healable = 1 - ///Atmos effect - Yes, you can make creatures that require plasma 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/list/atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_plas" = 0, "max_plas" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0) @@ -138,7 +135,6 @@ ///If the creature has, and can use, hands. var/dextrous = FALSE - var/dextrous_hud_type = /datum/hud/dextrous ///The Status of our AI, can be set to AI_ON (On, usual processing), AI_IDLE (Will not process, but will return to AI_ON if an enemy comes near), AI_OFF (Off, Not processing ever), AI_Z_OFF (Temporarily off due to nonpresence of players). var/AIStatus = AI_ON diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index a5aadf03849..1e2fd23a1cd 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -25,7 +25,7 @@ maxHealth = 150 health = 150 - healable = 0 + mob_biotypes = MOB_SLIME melee_damage_lower = 5 melee_damage_upper = 25 diff --git a/code/modules/surgery/healing.dm b/code/modules/surgery/healing.dm index cd54bf7252f..37441897527 100644 --- a/code/modules/surgery/healing.dm +++ b/code/modules/surgery/healing.dm @@ -18,10 +18,6 @@ /datum/surgery/healing/can_start(mob/user, mob/living/patient) . = ..() - if(isanimal(patient)) - var/mob/living/simple_animal/critter = patient - if(!critter.healable) - return FALSE if(!(patient.mob_biotypes & (MOB_ORGANIC|MOB_HUMANOID))) return FALSE diff --git a/modular_skyrat/master_files/code/modules/mob/living/simple_animal/hostile/grabbagmob.dm b/modular_skyrat/master_files/code/modules/mob/living/simple_animal/hostile/grabbagmob.dm index e77ac59318f..614c2dc6726 100644 --- a/modular_skyrat/master_files/code/modules/mob/living/simple_animal/hostile/grabbagmob.dm +++ b/modular_skyrat/master_files/code/modules/mob/living/simple_animal/hostile/grabbagmob.dm @@ -324,7 +324,6 @@ mob_biotypes = MOB_ROBOTIC health = 75 maxHealth = 75 - healable = 0 melee_damage_lower = 10 melee_damage_upper = 10 attack_verb_continuous = "claws" diff --git a/modular_skyrat/modules/horrorform/code/true_changeling.dm b/modular_skyrat/modules/horrorform/code/true_changeling.dm index 6bcc461aa33..bc51c730b7d 100644 --- a/modular_skyrat/modules/horrorform/code/true_changeling.dm +++ b/modular_skyrat/modules/horrorform/code/true_changeling.dm @@ -22,7 +22,6 @@ minbodytemp = 0 maxHealth = 750 //Very durable health = 500 - healable = FALSE lighting_cutoff_red = 0 lighting_cutoff_green = 35 lighting_cutoff_blue = 20