diff --git a/code/modules/mob/living/carbon/human/dummy.dm b/code/modules/mob/living/carbon/human/dummy.dm index b77aca24e39..869d64a2b55 100644 --- a/code/modules/mob/living/carbon/human/dummy.dm +++ b/code/modules/mob/living/carbon/human/dummy.dm @@ -75,33 +75,48 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy) cut_overlays(TRUE) /mob/living/carbon/human/dummy/setup_human_dna() - create_dna(src) + create_dna() randomize_human(src) dna.initialize_dna(skip_index = TRUE) //Skip stuff that requires full round init. /mob/living/carbon/human/dummy/log_mob_tag(text) return +/proc/create_consistent_human_dna(mob/living/carbon/human/target) + target.create_dna() + target.dna.initialize_dna(skip_index = TRUE) + target.dna.features["body_markings"] = "None" + target.dna.features["ears"] = "None" + target.dna.features["ethcolor"] = COLOR_WHITE + target.dna.features["frills"] = "None" + target.dna.features["horns"] = "None" + target.dna.features["mcolor"] = COLOR_VIBRANT_LIME + target.dna.features["moth_antennae"] = "Plain" + target.dna.features["moth_markings"] = "None" + target.dna.features["moth_wings"] = "Plain" + target.dna.features["snout"] = "Round" + target.dna.features["spines"] = "None" + target.dna.features["tail_cat"] = "None" + target.dna.features["tail_lizard"] = "Smooth" + target.dna.features["pod_hair"] = "Ivy" + /// Provides a dummy that is consistently bald, white, naked, etc. /mob/living/carbon/human/dummy/consistent /mob/living/carbon/human/dummy/consistent/setup_human_dna() - create_dna(src) - dna.initialize_dna(skip_index = TRUE) - dna.features["body_markings"] = "None" - dna.features["ears"] = "None" - dna.features["ethcolor"] = COLOR_WHITE - dna.features["frills"] = "None" - dna.features["horns"] = "None" - dna.features["mcolor"] = COLOR_VIBRANT_LIME - dna.features["moth_antennae"] = "Plain" - dna.features["moth_markings"] = "None" - dna.features["moth_wings"] = "Plain" - dna.features["snout"] = "Round" - dna.features["spines"] = "None" - dna.features["tail_cat"] = "None" - dna.features["tail_lizard"] = "Smooth" - dna.features["pod_hair"] = "Ivy" + create_consistent_human_dna(src) + +/// Provides a dummy for unit_tests that functions like a normal human, but with a standardized appearance +/// Copies the stock dna setup from the dummy/consistent type +/mob/living/carbon/human/consistent + +/mob/living/carbon/human/consistent/setup_human_dna() + create_consistent_human_dna(src) + +/mob/living/carbon/human/consistent/update_body(is_creating) + ..() + if(is_creating) + fully_replace_character_name(real_name, "John Doe") //Inefficient pooling/caching way. GLOBAL_LIST_EMPTY(human_dummy_list) diff --git a/code/modules/unit_tests/README.md b/code/modules/unit_tests/README.md index 5f9a62e124e..9fe97b8b16d 100644 --- a/code/modules/unit_tests/README.md +++ b/code/modules/unit_tests/README.md @@ -53,7 +53,7 @@ You can find more information about all of these from their respective doc comme `/datum/unit_test` - The base for all tests to be ran. Subtypes must override `Run()`. `New()` and `Destroy()` can be used for setup and teardown. To fail, use `TEST_FAIL(reason)`. -`/datum/unit_test/proc/allocate(type, ...)` - Allocates an instance of the provided type with the given arguments. Is automatically destroyed when the test is over. Commonly seen in the form of `var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human)`. +`/datum/unit_test/proc/allocate(type, ...)` - Allocates an instance of the provided type with the given arguments. Is automatically destroyed when the test is over. Commonly seen in the form of `var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human/consistent)`. `TEST_FAIL(reason)` - Marks a failure at this location, but does not stop the test. diff --git a/code/modules/unit_tests/ablative_hud.dm b/code/modules/unit_tests/ablative_hud.dm index b8b2efc188c..62f9501180a 100644 --- a/code/modules/unit_tests/ablative_hud.dm +++ b/code/modules/unit_tests/ablative_hud.dm @@ -2,7 +2,7 @@ /datum/unit_test/ablative_hood_hud /datum/unit_test/ablative_hood_hud/Run() - var/mob/living/carbon/human/person = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/person = allocate(/mob/living/carbon/human/consistent) var/obj/item/clothing/suit/hooded/ablative/coat = allocate(/obj/item/clothing/suit/hooded/ablative) person.equip_to_slot(coat, ITEM_SLOT_OCLOTHING) TEST_ASSERT(!HAS_TRAIT(person, TRAIT_SECURITY_HUD), "Person already had a sechud before trying to equip the ablative hood.") @@ -15,7 +15,7 @@ /datum/unit_test/ablative_hood_hud_with_helmet /datum/unit_test/ablative_hood_hud_with_helmet/Run() - var/mob/living/carbon/human/person = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/person = allocate(/mob/living/carbon/human/consistent) var/obj/item/clothing/suit/hooded/ablative/coat = allocate(/obj/item/clothing/suit/hooded/ablative) var/obj/item/clothing/head/helmet/hat = allocate(/obj/item/clothing/head/helmet) person.equip_to_slot(coat, ITEM_SLOT_OCLOTHING) diff --git a/code/modules/unit_tests/anonymous_themes.dm b/code/modules/unit_tests/anonymous_themes.dm index 5eb2a1f48f3..a58f60eab3b 100644 --- a/code/modules/unit_tests/anonymous_themes.dm +++ b/code/modules/unit_tests/anonymous_themes.dm @@ -4,7 +4,7 @@ /datum/unit_test/anonymous_themes/Run() GLOB.current_anonymous_theme = new /datum/anonymous_theme - var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human/consistent) var/datum/client_interface/client = new human.mock_client = client diff --git a/code/modules/unit_tests/bloody_footprints.dm b/code/modules/unit_tests/bloody_footprints.dm index bddad518760..76b86590861 100644 --- a/code/modules/unit_tests/bloody_footprints.dm +++ b/code/modules/unit_tests/bloody_footprints.dm @@ -3,7 +3,7 @@ /datum/unit_test/bloody_footprints /datum/unit_test/bloody_footprints/Run() - var/mob/living/carbon/human/blood_master = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/blood_master = allocate(/mob/living/carbon/human/consistent) var/obj/item/clothing/shoes/holds_blood = allocate(/obj/item/clothing/shoes) blood_master.equip_to_slot_if_possible(holds_blood, ITEM_SLOT_FEET) diff --git a/code/modules/unit_tests/breath.dm b/code/modules/unit_tests/breath.dm index 428a120511b..8451c1725a2 100644 --- a/code/modules/unit_tests/breath.dm +++ b/code/modules/unit_tests/breath.dm @@ -4,7 +4,7 @@ /datum/unit_test/breath_sanity /datum/unit_test/breath_sanity/Run() - var/mob/living/carbon/human/lab_rat = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/lab_rat = allocate(/mob/living/carbon/human/consistent) var/obj/item/clothing/mask/breath/tube = allocate(/obj/item/clothing/mask/breath) var/obj/item/tank/internals/emergency_oxygen/source = allocate(/obj/item/tank/internals/emergency_oxygen) diff --git a/code/modules/unit_tests/combat.dm b/code/modules/unit_tests/combat.dm index e1c2959dda8..3302eca9c74 100644 --- a/code/modules/unit_tests/combat.dm +++ b/code/modules/unit_tests/combat.dm @@ -1,6 +1,6 @@ /datum/unit_test/harm_punch/Run() - var/mob/living/carbon/human/puncher = allocate(/mob/living/carbon/human) - var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/puncher = allocate(/mob/living/carbon/human/consistent) + var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human/consistent) // Avoid all randomness in tests ADD_TRAIT(puncher, TRAIT_PERFECT_ATTACKER, INNATE_TRAIT) @@ -11,8 +11,8 @@ TEST_ASSERT(victim.getBruteLoss() > 0, "Victim took no brute damage after being punched") /datum/unit_test/harm_melee/Run() - var/mob/living/carbon/human/tider = allocate(/mob/living/carbon/human) - var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/tider = allocate(/mob/living/carbon/human/consistent) + var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human/consistent) var/obj/item/storage/toolbox/toolbox = allocate(/obj/item/storage/toolbox) tider.put_in_active_hand(toolbox, forced = TRUE) @@ -22,8 +22,8 @@ TEST_ASSERT(victim.getBruteLoss() > 0, "Victim took no brute damage after being hit by a toolbox") /datum/unit_test/harm_different_damage/Run() - var/mob/living/carbon/human/attacker = allocate(/mob/living/carbon/human) - var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/attacker = allocate(/mob/living/carbon/human/consistent) + var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human/consistent) var/obj/item/weldingtool/welding_tool = allocate(/obj/item/weldingtool) attacker.put_in_active_hand(welding_tool, forced = TRUE) @@ -53,8 +53,8 @@ pre_attack_hit = TRUE /datum/unit_test/attack_chain/Run() - var/mob/living/carbon/human/attacker = allocate(/mob/living/carbon/human) - var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/attacker = allocate(/mob/living/carbon/human/consistent) + var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human/consistent) var/obj/item/storage/toolbox/toolbox = allocate(/obj/item/storage/toolbox) RegisterSignal(toolbox, COMSIG_ITEM_PRE_ATTACK, PROC_REF(pre_attack_hit)) @@ -70,8 +70,8 @@ TEST_ASSERT(post_attack_hit, "Post-attack signal was not fired") /datum/unit_test/disarm/Run() - var/mob/living/carbon/human/attacker = allocate(/mob/living/carbon/human) - var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/attacker = allocate(/mob/living/carbon/human/consistent) + var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human/consistent) var/obj/item/storage/toolbox/toolbox = allocate(/obj/item/storage/toolbox) victim.put_in_active_hand(toolbox, forced = TRUE) diff --git a/code/modules/unit_tests/confusion.dm b/code/modules/unit_tests/confusion.dm index 0225303c663..086a0cc8fb3 100644 --- a/code/modules/unit_tests/confusion.dm +++ b/code/modules/unit_tests/confusion.dm @@ -1,6 +1,6 @@ // Checks that the confusion symptom correctly gives, and removes, confusion /datum/unit_test/confusion_symptom/Run() - var/mob/living/carbon/human/dummy = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/dummy = allocate(/mob/living/carbon/human/consistent) var/datum/disease/advance/confusion/disease = allocate(/datum/disease/advance/confusion) var/datum/symptom/confusion/confusion = disease.symptoms[1] disease.processing = TRUE diff --git a/code/modules/unit_tests/emoting.dm b/code/modules/unit_tests/emoting.dm index 3889e062bda..e1cb9ba8bd2 100644 --- a/code/modules/unit_tests/emoting.dm +++ b/code/modules/unit_tests/emoting.dm @@ -2,7 +2,7 @@ var/emotes_used = 0 /datum/unit_test/emoting/Run() - var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human/consistent) RegisterSignal(human, COMSIG_MOB_EMOTE, PROC_REF(on_emote_used)) human.say("*shrug") diff --git a/code/modules/unit_tests/heretic_rituals.dm b/code/modules/unit_tests/heretic_rituals.dm index 677d934d052..7298a163274 100644 --- a/code/modules/unit_tests/heretic_rituals.dm +++ b/code/modules/unit_tests/heretic_rituals.dm @@ -14,7 +14,7 @@ // Gotta create ourselves a rune and a user to start. var/obj/effect/heretic_rune/big/our_rune = allocate(/obj/effect/heretic_rune/big) - var/mob/living/carbon/human/our_heretic = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/our_heretic = allocate(/mob/living/carbon/human/consistent) // -- Note for the human dummy we create: // The user does not actually NEED a heretic antag datum for the type of rituals we're testing, // so we don't give them one here. The heretic antag datum has side effects when applied, diff --git a/code/modules/unit_tests/human_through_recycler.dm b/code/modules/unit_tests/human_through_recycler.dm index f7349ae2d81..7d554d72690 100644 --- a/code/modules/unit_tests/human_through_recycler.dm +++ b/code/modules/unit_tests/human_through_recycler.dm @@ -2,7 +2,7 @@ /datum/unit_test/human_through_recycler /datum/unit_test/human_through_recycler/Run() - var/mob/living/carbon/human/assistant = allocate(/mob/living/carbon/human, run_loc_floor_bottom_left) // we should be in the bottom_left by default, but let's be sooper dooper sure :) + var/mob/living/carbon/human/assistant = allocate(/mob/living/carbon/human/consistent, run_loc_floor_bottom_left) // we should be in the bottom_left by default, but let's be sooper dooper sure :) var/obj/machinery/recycler/chewer = allocate(/obj/machinery/recycler/deathtrap, get_step(run_loc_floor_bottom_left, EAST)) //already existing subtype that has emagged set to TRUE, so it shall CHEW. Put it directly right to the assistant to mimick a player entering the recycler. assistant.equipOutfit(/datum/outfit/job/assistant/consistent) // consistent assistant juuuust in case var/turf/open/stage = get_turf(chewer) diff --git a/code/modules/unit_tests/hydroponics_extractor_storage.dm b/code/modules/unit_tests/hydroponics_extractor_storage.dm index ea2fc36c9e7..166a0470612 100644 --- a/code/modules/unit_tests/hydroponics_extractor_storage.dm +++ b/code/modules/unit_tests/hydroponics_extractor_storage.dm @@ -4,7 +4,7 @@ /datum/unit_test/hydroponics_extractor_storage/Run() var/obj/machinery/seed_extractor/extractor = allocate(/obj/machinery/seed_extractor) - var/mob/living/carbon/human/dummy = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/dummy = allocate(/mob/living/carbon/human/consistent) var/obj/item/storage/bag/plants/storage = allocate(/obj/item/storage/bag/plants) diff --git a/code/modules/unit_tests/hydroponics_harvest.dm b/code/modules/unit_tests/hydroponics_harvest.dm index 804a4c9f70b..1e6d39a7329 100644 --- a/code/modules/unit_tests/hydroponics_harvest.dm +++ b/code/modules/unit_tests/hydroponics_harvest.dm @@ -25,7 +25,7 @@ var/obj/item/seeds/planted_not_food_seed = allocate(/obj/item/seeds/sunflower) //grown inedible var/obj/item/seeds/planted_densified_seed = allocate(/obj/item/seeds/redbeet) //grown + densified chemicals - var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human/consistent) hydroponics_tray.forceMove(run_loc_floor_bottom_left) human.forceMove(locate((run_loc_floor_bottom_left.x + 1), run_loc_floor_bottom_left.y, run_loc_floor_bottom_left.z)) diff --git a/code/modules/unit_tests/knockoff_component.dm b/code/modules/unit_tests/knockoff_component.dm index a781fb9eb0d..20990a755cd 100644 --- a/code/modules/unit_tests/knockoff_component.dm +++ b/code/modules/unit_tests/knockoff_component.dm @@ -3,8 +3,8 @@ /datum/unit_test/knockoff_component /datum/unit_test/knockoff_component/Run() - var/mob/living/carbon/human/wears_the_glasses = allocate(/mob/living/carbon/human) - var/mob/living/carbon/human/shoves_the_guy = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/wears_the_glasses = allocate(/mob/living/carbon/human/consistent) + var/mob/living/carbon/human/shoves_the_guy = allocate(/mob/living/carbon/human/consistent) // No pre-existing items have a 100% chance of being knocked off, // so we'll just apply it to a relatively generic item (glasses) diff --git a/code/modules/unit_tests/mecha_damage.dm b/code/modules/unit_tests/mecha_damage.dm index 6bc5e37069f..cc697e0a9f4 100644 --- a/code/modules/unit_tests/mecha_damage.dm +++ b/code/modules/unit_tests/mecha_damage.dm @@ -15,7 +15,7 @@ var/expected_laser_armor = demo_mech.armor.getRating(LASER) var/expected_bullet_armor = demo_mech.armor.getRating(BULLET) - var/mob/living/carbon/human/dummy = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/dummy = allocate(/mob/living/carbon/human/consistent) dummy.forceMove(locate(run_loc_floor_bottom_left.x + 1, run_loc_floor_bottom_left.y, run_loc_floor_bottom_left.z)) // The dummy needs to be targeting an arm. Left is chosen here arbitrarily. dummy.zone_selected = BODY_ZONE_L_ARM diff --git a/code/modules/unit_tests/medical_wounds.dm b/code/modules/unit_tests/medical_wounds.dm index b21deddee6f..212f0a283e8 100644 --- a/code/modules/unit_tests/medical_wounds.dm +++ b/code/modules/unit_tests/medical_wounds.dm @@ -1,6 +1,6 @@ /// This test is used to make sure a flesh-and-bone base human can suffer all the types of wounds, and that suffering more severe wounds removes and replaces the lesser wound. Also tests that [/mob/living/carbon/proc/fully_heal] removes all wounds /datum/unit_test/test_human_base/Run() - var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human/consistent) /// the limbs have no wound resistance like the chest and head do, so let's go with the r_arm var/obj/item/bodypart/tested_part = victim.get_bodypart(BODY_ZONE_R_ARM) @@ -39,7 +39,7 @@ /// This test is used for making sure species with bones but no flesh (skeletons, plasmamen) can only suffer BONE_WOUNDS, and nothing tagged with FLESH_WOUND (it's possible to require both) /datum/unit_test/test_human_bone/Run() - var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human/consistent) /// the limbs have no wound resistance like the chest and head do, so let's go with the r_arm var/obj/item/bodypart/tested_part = victim.get_bodypart(BODY_ZONE_R_ARM) diff --git a/code/modules/unit_tests/metabolizing.dm b/code/modules/unit_tests/metabolizing.dm index a1bf8610e04..47ce63bb218 100644 --- a/code/modules/unit_tests/metabolizing.dm +++ b/code/modules/unit_tests/metabolizing.dm @@ -2,7 +2,7 @@ // Pause natural mob life so it can be handled entirely by the test SSmobs.pause() - var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human/consistent) var/list/blacklisted_reagents = list( /datum/reagent/eigenstate, //Creates clones after a delay which get into other tests ) @@ -22,7 +22,7 @@ /datum/unit_test/on_mob_end_metabolize/Run() SSmobs.pause() - var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human/consistent) var/obj/item/reagent_containers/pill/pill = allocate(/obj/item/reagent_containers/pill) var/datum/reagent/drug/methamphetamine/meth = /datum/reagent/drug/methamphetamine @@ -47,9 +47,9 @@ /datum/unit_test/addictions/Run() SSmobs.pause() - var/mob/living/carbon/human/pill_user = allocate(/mob/living/carbon/human) - var/mob/living/carbon/human/syringe_user = allocate(/mob/living/carbon/human) - var/mob/living/carbon/human/pill_syringe_user = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/pill_user = allocate(/mob/living/carbon/human/consistent) + var/mob/living/carbon/human/syringe_user = allocate(/mob/living/carbon/human/consistent) + var/mob/living/carbon/human/pill_syringe_user = allocate(/mob/living/carbon/human/consistent) var/datum/mind/pill_mind = new /datum/mind("Mothcocks") pill_mind.active = TRUE diff --git a/code/modules/unit_tests/mindbound_actions.dm b/code/modules/unit_tests/mindbound_actions.dm index b4041241440..703144e2203 100644 --- a/code/modules/unit_tests/mindbound_actions.dm +++ b/code/modules/unit_tests/mindbound_actions.dm @@ -6,7 +6,7 @@ /datum/unit_test/actions_moved_on_mind_transfer/Run() - var/mob/living/carbon/human/wizard = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/wizard = allocate(/mob/living/carbon/human/consistent) var/mob/living/simple_animal/pet/dog/corgi/wizard_dog = allocate(/mob/living/simple_animal/pet/dog/corgi) wizard.mind_initialize() diff --git a/code/modules/unit_tests/mob_spawn.dm b/code/modules/unit_tests/mob_spawn.dm index 135c8dd8124..b26bb4666f9 100644 --- a/code/modules/unit_tests/mob_spawn.dm +++ b/code/modules/unit_tests/mob_spawn.dm @@ -19,7 +19,8 @@ if(ghost_role.outfit_override) TEST_FAIL("[ghost_role.type] has a defined \"outfit_override\" list, which is only for mapping. Do not set this!") - if(ghost_role.mob_type != /mob/living/carbon/human) + var/human_type = /mob/living/carbon/human // this exists to prevent being caught by checks + if(ghost_role.mob_type != human_type) //vars that must not be set if the mob type isn't human var/list/human_only_vars = list( "mob_species", diff --git a/code/modules/unit_tests/monkey_business.dm b/code/modules/unit_tests/monkey_business.dm index eb9f2f2083d..9817795696e 100644 --- a/code/modules/unit_tests/monkey_business.dm +++ b/code/modules/unit_tests/monkey_business.dm @@ -15,7 +15,7 @@ /datum/unit_test/monkey_business/Run() var/start_runtimes = GLOB.total_runtimes for(var/monkey_id in 1 to length(GLOB.the_station_areas)) - var/mob/living/carbon/human/monkey = allocate(/mob/living/carbon/human, get_first_open_turf_in_area(GLOB.the_station_areas[monkey_id])) + var/mob/living/carbon/human/monkey = allocate(/mob/living/carbon/human/consistent, get_first_open_turf_in_area(GLOB.the_station_areas[monkey_id])) monkey.set_species(/datum/species/monkey) monkey.set_name("Monkey [monkey_id]") if(monkey_id % monkey_angry_nth == 0) // BLOOD FOR THE BLOOD GODS diff --git a/code/modules/unit_tests/novaflower_burn.dm b/code/modules/unit_tests/novaflower_burn.dm index c54cb9d6d15..ae7d61b34ad 100644 --- a/code/modules/unit_tests/novaflower_burn.dm +++ b/code/modules/unit_tests/novaflower_burn.dm @@ -2,8 +2,8 @@ /datum/unit_test/novaflower_burn /datum/unit_test/novaflower_burn/Run() - var/mob/living/carbon/human/botanist = allocate(/mob/living/carbon/human) - var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/botanist = allocate(/mob/living/carbon/human/consistent) + var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human/consistent) var/obj/item/grown/novaflower/weapon = allocate(/obj/item/grown/novaflower) TEST_ASSERT(weapon.force > 0, "[weapon] spawned with zero force.") diff --git a/code/modules/unit_tests/nuke_cinematic.dm b/code/modules/unit_tests/nuke_cinematic.dm index 41430466d35..74ce38a4ab0 100644 --- a/code/modules/unit_tests/nuke_cinematic.dm +++ b/code/modules/unit_tests/nuke_cinematic.dm @@ -15,7 +15,7 @@ /datum/unit_test/nuke_cinematic/Run() var/obj/machinery/nuclearbomb/syndicate/nuke = allocate(/obj/machinery/nuclearbomb/syndicate) - var/mob/living/carbon/human/nuked = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/nuked = allocate(/mob/living/carbon/human/consistent) var/datum/client_interface/mock_client = new nuked.mock_client = mock_client mock_client.mob = nuked diff --git a/code/modules/unit_tests/operating_table.dm b/code/modules/unit_tests/operating_table.dm index fad2cbe9831..58cc0b64d93 100644 --- a/code/modules/unit_tests/operating_table.dm +++ b/code/modules/unit_tests/operating_table.dm @@ -5,9 +5,9 @@ /datum/unit_test/operating_table/Run() var/obj/structure/table/optable/table = allocate(/obj/structure/table/optable) - var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human, get_step(table, NORTH)) - var/mob/living/carbon/human/replacement_human = allocate(/mob/living/carbon/human, get_step(table, NORTH)) - + var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human/consistent, get_step(table, NORTH)) + var/mob/living/carbon/human/replacement_human = allocate(/mob/living/carbon/human/consistent, get_step(table, NORTH)) + // Resting is a bit more high level than bodypos, gets us nicer coverage. human.set_resting(new_resting = FALSE, instant = TRUE) replacement_human.set_resting(new_resting = FALSE, instant = TRUE) diff --git a/code/modules/unit_tests/outfit_sanity.dm b/code/modules/unit_tests/outfit_sanity.dm index a105bb423ae..3e85464019a 100644 --- a/code/modules/unit_tests/outfit_sanity.dm +++ b/code/modules/unit_tests/outfit_sanity.dm @@ -22,7 +22,7 @@ /datum/unit_test/outfit_sanity/Run() var/datum/outfit/prototype_outfit = /datum/outfit var/prototype_name = initial(prototype_outfit.name) - var/mob/living/carbon/human/H = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/H = allocate(/mob/living/carbon/human/consistent) for (var/outfit_type in subtypesof(/datum/outfit)) // Only make one human and keep undressing it because it's much faster @@ -30,7 +30,7 @@ qdel(I) var/datum/outfit/outfit = new outfit_type - + if(outfit.name == prototype_name) TEST_FAIL("[outfit.type]'s name is invalid! Uses default outfit name!") outfit.pre_equip(H, TRUE) diff --git a/code/modules/unit_tests/pills.dm b/code/modules/unit_tests/pills.dm index 2cabae24f9d..234abbfe1c1 100644 --- a/code/modules/unit_tests/pills.dm +++ b/code/modules/unit_tests/pills.dm @@ -1,5 +1,5 @@ /datum/unit_test/pills/Run() - var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human/consistent) var/obj/item/reagent_containers/pill/iron/pill = allocate(/obj/item/reagent_containers/pill/iron) TEST_ASSERT_EQUAL(human.has_reagent(/datum/reagent/iron), FALSE, "Human somehow has iron before taking pill") diff --git a/code/modules/unit_tests/plane_double_transform.dm b/code/modules/unit_tests/plane_double_transform.dm index 671b21581ac..f4928a8f997 100644 --- a/code/modules/unit_tests/plane_double_transform.dm +++ b/code/modules/unit_tests/plane_double_transform.dm @@ -4,7 +4,7 @@ /datum/unit_test/plane_double_transform/Run() // We're going to operate off the actual plane master setup of an actual mob // It's not perfect, but it'll help things a lot - var/mob/living/carbon/human/judger = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/judger = allocate(/mob/living/carbon/human/consistent) // Hack to account for not having an actual hud var/datum/plane_master_group/hudless/our_group = allocate(/datum/plane_master_group/hudless) our_group.our_mob = judger diff --git a/code/modules/unit_tests/preferences.dm b/code/modules/unit_tests/preferences.dm index 27389dca824..950b1dc281c 100644 --- a/code/modules/unit_tests/preferences.dm +++ b/code/modules/unit_tests/preferences.dm @@ -3,7 +3,7 @@ /datum/unit_test/preferences_implement_everything/Run() var/datum/preferences/preferences = new(new /datum/client_interface) - var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human/consistent) for (var/preference_type in GLOB.preference_entries) var/datum/preference/preference = GLOB.preference_entries[preference_type] diff --git a/code/modules/unit_tests/projectiles.dm b/code/modules/unit_tests/projectiles.dm index 98c7994bebe..8e75fed8ef4 100644 --- a/code/modules/unit_tests/projectiles.dm +++ b/code/modules/unit_tests/projectiles.dm @@ -7,8 +7,8 @@ /datum/unit_test/gun_go_bang/Run() // test is for a ballistic gun that starts loaded + chambered var/obj/item/gun/test_gun = allocate(/obj/item/gun/ballistic/automatic/pistol) - var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human) - var/mob/living/carbon/human/gunner = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human/consistent) + var/mob/living/carbon/human/gunner = allocate(/mob/living/carbon/human/consistent) ADD_TRAIT(victim, TRAIT_PIERCEIMMUNE, INNATE_TRAIT) // So the human isn't randomly affected by shrapnel var/obj/item/ammo_casing/loaded_casing = test_gun.chambered diff --git a/code/modules/unit_tests/rcd.dm b/code/modules/unit_tests/rcd.dm index b65d02312a7..27ab66fa0be 100644 --- a/code/modules/unit_tests/rcd.dm +++ b/code/modules/unit_tests/rcd.dm @@ -11,7 +11,7 @@ /datum/unit_test/frame_stacking/Run() // First test - RCDs stacking frames. var/obj/item/construction/rcd/rcd = allocate(/obj/item/construction/rcd/combat/admin) - var/mob/living/carbon/human/engineer = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/engineer = allocate(/mob/living/carbon/human/consistent) engineer.put_in_hands(rcd, forced = TRUE) diff --git a/code/modules/unit_tests/reagent_mod_expose.dm b/code/modules/unit_tests/reagent_mod_expose.dm index 5bf751a426c..b9e1314c713 100644 --- a/code/modules/unit_tests/reagent_mod_expose.dm +++ b/code/modules/unit_tests/reagent_mod_expose.dm @@ -14,7 +14,7 @@ // Life() is handled just by tests SSmobs.pause() - var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human/consistent) var/obj/item/reagent_containers/dropper/dropper = allocate(/obj/item/reagent_containers/dropper) var/obj/item/reagent_containers/cup/glass/bottle/drink = allocate(/obj/item/reagent_containers/cup/glass/bottle) var/obj/item/reagent_containers/pill/patch/patch = allocate(/obj/item/reagent_containers/pill/patch) diff --git a/code/modules/unit_tests/reagent_mod_procs.dm b/code/modules/unit_tests/reagent_mod_procs.dm index a2087f86243..b1da13c05e1 100644 --- a/code/modules/unit_tests/reagent_mod_procs.dm +++ b/code/modules/unit_tests/reagent_mod_procs.dm @@ -1,5 +1,5 @@ /datum/unit_test/reagent_mob_procs/Run() - var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human/consistent) var/obj/item/food/hotdog/debug/fooditem = allocate(/obj/item/food/hotdog/debug) TEST_ASSERT_EQUAL(human.has_reagent(/datum/reagent/consumable/ketchup), FALSE, "Human somehow has ketchup before eating") diff --git a/code/modules/unit_tests/resist.dm b/code/modules/unit_tests/resist.dm index b0acc9c8c87..2fc64a02703 100644 --- a/code/modules/unit_tests/resist.dm +++ b/code/modules/unit_tests/resist.dm @@ -1,6 +1,6 @@ /// Test that stop, drop, and roll lowers fire stacks /datum/unit_test/stop_drop_and_roll/Run() - var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human/consistent) TEST_ASSERT_EQUAL(human.fire_stacks, 0, "Human does not have 0 fire stacks pre-ignition") @@ -20,7 +20,7 @@ /// Test that you can resist out of a container /datum/unit_test/container_resist/Run() - var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human/consistent) var/obj/structure/closet/closet = allocate(/obj/structure/closet, get_turf(human)) closet.open(human) diff --git a/code/modules/unit_tests/say.dm b/code/modules/unit_tests/say.dm index 9daa5134b58..6872730999d 100644 --- a/code/modules/unit_tests/say.dm +++ b/code/modules/unit_tests/say.dm @@ -3,7 +3,7 @@ var/mob/host_mob /datum/unit_test/get_message_mods/Run() - host_mob = allocate(/mob/living/carbon/human) + host_mob = allocate(/mob/living/carbon/human/consistent) test("Hello", "Hello", list()) test(";HELP", "HELP", list(MODE_HEADSET = TRUE)) diff --git a/code/modules/unit_tests/security_officer_distribution.dm b/code/modules/unit_tests/security_officer_distribution.dm index 643cf95e4eb..67f02282b03 100644 --- a/code/modules/unit_tests/security_officer_distribution.dm +++ b/code/modules/unit_tests/security_officer_distribution.dm @@ -66,7 +66,7 @@ TEST_ASSERT(write_success, "Couldn't write department [SECURITY_OFFICER_DEPARTMENTS_TO_NAMES[preference]]") - var/mob/living/carbon/human/new_character = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/new_character = allocate(/mob/living/carbon/human/consistent) new_character.mind_initialize() new_character.mind.set_assigned_role(SSjob.GetJobType(/datum/job/security_officer)) @@ -85,7 +85,7 @@ var/list/distribution = list() for (var/officer_preference in preferences_of_others) - var/mob/officer = allocate(/mob/living/carbon/human) + var/mob/officer = allocate(/mob/living/carbon/human/consistent) distribution[officer] = officer_preference var/result = get_new_officer_distribution_from_late_join( diff --git a/code/modules/unit_tests/serving_tray.dm b/code/modules/unit_tests/serving_tray.dm index fccdc012014..d12648dca99 100644 --- a/code/modules/unit_tests/serving_tray.dm +++ b/code/modules/unit_tests/serving_tray.dm @@ -2,7 +2,7 @@ * Check that standard food items fit on the serving tray */ /datum/unit_test/servingtray/Run() - var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human/consistent) var/obj/structure/table/the_table = allocate(/obj/structure/table) var/obj/item/storage/bag/tray/test_tray = allocate(/obj/item/storage/bag/tray) var/obj/item/food/banana = allocate(/obj/item/food/rationpack) diff --git a/code/modules/unit_tests/slips.dm b/code/modules/unit_tests/slips.dm index 3728a8341b9..88e310a528f 100644 --- a/code/modules/unit_tests/slips.dm +++ b/code/modules/unit_tests/slips.dm @@ -3,13 +3,13 @@ /datum/unit_test/slips/Run() // Test just forced slipping, which calls turf slip code as well. - var/mob/living/carbon/human/mso = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/mso = allocate(/mob/living/carbon/human/consistent) TEST_ASSERT(mso.slip(100) == TRUE, "/mob/living/carbon/human/slip() returned FALSE when TRUE was expected") TEST_ASSERT(!!(mso.IsKnockdown()), "/mob/living/carbon/human/slip() failed to knockdown target when knockdown was expected") // Test the slipping component, which calls mob slip code. Just for good measure. - var/mob/living/carbon/human/msos_friend_mso = allocate(/mob/living/carbon/human, run_loc_floor_bottom_left) + var/mob/living/carbon/human/msos_friend_mso = allocate(/mob/living/carbon/human/consistent, run_loc_floor_bottom_left) var/obj/item/grown/bananapeel/specialpeel/mso_bane = allocate(/obj/item/grown/bananapeel/specialpeel, get_step(run_loc_floor_bottom_left, EAST)) msos_friend_mso.Move(get_turf(mso_bane), EAST) diff --git a/code/modules/unit_tests/species_change_organs.dm b/code/modules/unit_tests/species_change_organs.dm index 76a038ab085..7be808e3c5d 100644 --- a/code/modules/unit_tests/species_change_organs.dm +++ b/code/modules/unit_tests/species_change_organs.dm @@ -6,7 +6,7 @@ /datum/unit_test/species_change_organs /datum/unit_test/species_change_organs/Run() - var/mob/living/carbon/human/dummy = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/dummy = allocate(/mob/living/carbon/human/consistent) // Give a trauma dummy.gain_trauma(/datum/brain_trauma/severe/blindness) diff --git a/code/modules/unit_tests/spell_mindswap.dm b/code/modules/unit_tests/spell_mindswap.dm index 0f7d63440cf..133f9662d91 100644 --- a/code/modules/unit_tests/spell_mindswap.dm +++ b/code/modules/unit_tests/spell_mindswap.dm @@ -9,8 +9,8 @@ /datum/unit_test/mind_swap_spell/Run() - var/mob/living/carbon/human/swapper = allocate(/mob/living/carbon/human) - var/mob/living/carbon/human/to_swap = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/swapper = allocate(/mob/living/carbon/human/consistent) + var/mob/living/carbon/human/to_swap = allocate(/mob/living/carbon/human/consistent) swapper.forceMove(run_loc_floor_bottom_left) to_swap.forceMove(locate(run_loc_floor_bottom_left.x + 1, run_loc_floor_bottom_left.y, run_loc_floor_bottom_left.z)) diff --git a/code/modules/unit_tests/spell_shapeshift.dm b/code/modules/unit_tests/spell_shapeshift.dm index 4536cc108d4..c56c2c7393b 100644 --- a/code/modules/unit_tests/spell_shapeshift.dm +++ b/code/modules/unit_tests/spell_shapeshift.dm @@ -25,7 +25,7 @@ /datum/unit_test/shapeshift_spell/Run() - var/mob/living/carbon/human/dummy = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/dummy = allocate(/mob/living/carbon/human/consistent) dummy.mind_initialize() for(var/spell_type in subtypesof(/datum/action/cooldown/spell/shapeshift)) @@ -81,7 +81,7 @@ /datum/unit_test/shapeshift_holoparasites/Run() - var/mob/living/carbon/human/dummy = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/dummy = allocate(/mob/living/carbon/human/consistent) var/datum/action/cooldown/spell/shapeshift/wizard/shift = new(dummy) shift.shapeshift_type = shift.possible_shapes[1] diff --git a/code/modules/unit_tests/stomach.dm b/code/modules/unit_tests/stomach.dm index 144262f7175..58f143e14ae 100644 --- a/code/modules/unit_tests/stomach.dm +++ b/code/modules/unit_tests/stomach.dm @@ -3,7 +3,7 @@ // Pause natural mob life so it can be handled entirely by the test SSmobs.pause() - var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human/consistent) var/obj/item/food/hotdog/debug/fooditem = allocate(/obj/item/food/hotdog/debug) var/obj/item/organ/internal/stomach/belly = human.getorganslot(ORGAN_SLOT_STOMACH) var/obj/item/reagent_containers/pill/pill = allocate(/obj/item/reagent_containers/pill) diff --git a/code/modules/unit_tests/strange_reagent.dm b/code/modules/unit_tests/strange_reagent.dm index e84a8f40c1b..345be4befe9 100644 --- a/code/modules/unit_tests/strange_reagent.dm +++ b/code/modules/unit_tests/strange_reagent.dm @@ -11,7 +11,7 @@ strange_reagent = new var/list/types_to_check = typecacheof(list( - /mob/living/carbon/human, + /mob/living/carbon/human/consistent, /mob/living/simple_animal, /mob/living/basic, )) diff --git a/code/modules/unit_tests/strippable.dm b/code/modules/unit_tests/strippable.dm index 2fa5e4f1f2a..96a879777f2 100644 --- a/code/modules/unit_tests/strippable.dm +++ b/code/modules/unit_tests/strippable.dm @@ -3,7 +3,7 @@ var/obj/target = allocate(/obj/item/pen, run_loc_floor_bottom_left) var/datum/element/strippable/strippable = target.AddElement(/datum/element/strippable, list()) - var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human, run_loc_floor_bottom_left) + var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human/consistent, run_loc_floor_bottom_left) ADD_TRAIT(user, TRAIT_PRESERVE_UI_WITHOUT_CLIENT, TRAIT_SOURCE_UNIT_TESTS) var/datum/strip_menu/strip_menu = allocate(/datum/strip_menu, target, strippable) diff --git a/code/modules/unit_tests/surgeries.dm b/code/modules/unit_tests/surgeries.dm index 5863c740385..e33af0e2dc5 100644 --- a/code/modules/unit_tests/surgeries.dm +++ b/code/modules/unit_tests/surgeries.dm @@ -1,6 +1,6 @@ /datum/unit_test/amputation/Run() - var/mob/living/carbon/human/patient = allocate(/mob/living/carbon/human) - var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/patient = allocate(/mob/living/carbon/human/consistent) + var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human/consistent) TEST_ASSERT_EQUAL(patient.get_missing_limbs().len, 0, "Patient is somehow missing limbs before surgery") @@ -13,13 +13,13 @@ TEST_ASSERT_EQUAL(patient.get_missing_limbs()[1], BODY_ZONE_R_ARM, "Patient is missing a limb that isn't the one we operated on") /datum/unit_test/brain_surgery/Run() - var/mob/living/carbon/human/patient = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/patient = allocate(/mob/living/carbon/human/consistent) patient.gain_trauma_type(BRAIN_TRAUMA_MILD, TRAUMA_RESILIENCE_SURGERY) patient.setOrganLoss(ORGAN_SLOT_BRAIN, 20) TEST_ASSERT(patient.has_trauma_type(), "Patient does not have any traumas, despite being given one") - var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human/consistent) var/datum/surgery_step/fix_brain/fix_brain = new fix_brain.success(user, patient) @@ -28,9 +28,9 @@ TEST_ASSERT(patient.getOrganLoss(ORGAN_SLOT_BRAIN) < 20, "Patient did not heal their brain damage after brain surgery") /datum/unit_test/head_transplant/Run() - var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human) - var/mob/living/carbon/human/alice = allocate(/mob/living/carbon/human) - var/mob/living/carbon/human/bob = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human/consistent) + var/mob/living/carbon/human/alice = allocate(/mob/living/carbon/human/consistent) + var/mob/living/carbon/human/bob = allocate(/mob/living/carbon/human/consistent) alice.fully_replace_character_name(null, "Alice") bob.fully_replace_character_name(null, "Bob") @@ -55,9 +55,9 @@ TEST_ASSERT_EQUAL(alice.get_visible_name(), "Bob", "Bob's head was transplanted onto Alice's body, but their name is not Bob") /datum/unit_test/multiple_surgeries/Run() - var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human) - var/mob/living/carbon/human/patient_zero = allocate(/mob/living/carbon/human) - var/mob/living/carbon/human/patient_one = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human/consistent) + var/mob/living/carbon/human/patient_zero = allocate(/mob/living/carbon/human/consistent) + var/mob/living/carbon/human/patient_one = allocate(/mob/living/carbon/human/consistent) var/obj/item/scalpel/scalpel = allocate(/obj/item/scalpel) @@ -81,8 +81,8 @@ /datum/unit_test/start_tend_wounds /datum/unit_test/start_tend_wounds/Run() - var/mob/living/carbon/human/patient = allocate(/mob/living/carbon/human) - var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/patient = allocate(/mob/living/carbon/human/consistent) + var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human/consistent) var/datum/surgery/surgery = new /datum/surgery/healing/brute/basic @@ -92,10 +92,10 @@ qdel(surgery) /datum/unit_test/tend_wounds/Run() - var/mob/living/carbon/human/patient = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/patient = allocate(/mob/living/carbon/human/consistent) patient.take_overall_damage(100, 100) - var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human/consistent) // Test that tending wounds actually lowers damage var/datum/surgery_step/heal/brute/basic/basic_brute_heal = new @@ -107,10 +107,10 @@ TEST_ASSERT(patient.getFireLoss() < 100, "Tending burn wounds didn't lower burn damage ([patient.getFireLoss()])") // Test that wearing clothing lowers heal amount - var/mob/living/carbon/human/naked_patient = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/naked_patient = allocate(/mob/living/carbon/human/consistent) naked_patient.take_overall_damage(100) - var/mob/living/carbon/human/clothed_patient = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/clothed_patient = allocate(/mob/living/carbon/human/consistent) clothed_patient.equipOutfit(/datum/outfit/job/doctor, TRUE) clothed_patient.take_overall_damage(100) diff --git a/code/modules/unit_tests/wizard_loadout.dm b/code/modules/unit_tests/wizard_loadout.dm index 7c5dd6e6843..4f692052992 100644 --- a/code/modules/unit_tests/wizard_loadout.dm +++ b/code/modules/unit_tests/wizard_loadout.dm @@ -8,7 +8,7 @@ /datum/unit_test/wizard_loadout/Run() for(var/loadout in ALL_WIZARD_LOADOUTS) var/obj/item/spellbook/wizard_book = allocate(/obj/item/spellbook) - var/mob/living/carbon/human/wizard = allocate(/mob/living/carbon/human) + var/mob/living/carbon/human/wizard = allocate(/mob/living/carbon/human/consistent) wizard.mind_initialize() wizard.put_in_active_hand(wizard_book, forced = TRUE) wizard_book.wizard_loadout(wizard, loadout) diff --git a/tools/ci/check_grep.sh b/tools/ci/check_grep.sh index 8a2b3d18fd4..82fc75776d1 100644 --- a/tools/ci/check_grep.sh +++ b/tools/ci/check_grep.sh @@ -245,6 +245,14 @@ if $grep '^\t+ [^ *]' $code_files; then st=1 fi; +section "unit tests" +part "mob/living/carbon/human usage" +if $grep 'mob/living/carbon/human[, (){}]' $code_files; then + echo + echo -e "${RED}ERROR: Usage of mob/living/carbon/human detected in a unit test, please use mob/living/carbon/human/consistent.${NC}" + st=1 +fi; + section "common mistakes" part "global vars" if $grep '^/*var/' $code_files; then