diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 99a4b674b5f..1baba7cc67d 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -463,6 +463,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai /// Used for limbs. #define TRAIT_DISABLED_BY_WOUND "disabled-by-wound" +/// Mobs with this trait can't send the mining shuttle console when used outside the station itself +#define TRAIT_FORBID_MINING_SHUTTLE_CONSOLE_OUTSIDE_STATION "forbid_mining_shuttle_console_outside_station" //important_recursive_contents traits /* @@ -608,7 +610,6 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai /// trait denoting someone will sometimes recover out of crit #define TRAIT_UNBREAKABLE "unbreakable" - //Medical Categories for quirks #define CAT_QUIRK_ALL 0 #define CAT_QUIRK_NOTES 1 diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 709ffd60c74..e2e779053a5 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -84,7 +84,12 @@ to_chat(user, span_warning("You get a feeling that leaving the station might be a REALLY dumb idea...")) dumb_rev_heads += user.mind return - . = ..() + + if (HAS_TRAIT(user, TRAIT_FORBID_MINING_SHUTTLE_CONSOLE_OUTSIDE_STATION) && !is_station_level(user.z)) + to_chat(user, span_warning("You get the feeling you shouldn't mess with this.")) + return + + return ..() /obj/machinery/computer/shuttle/mining/common name = "lavaland shuttle console" diff --git a/code/modules/mob_spawn/ghost_roles/golem_roles.dm b/code/modules/mob_spawn/ghost_roles/golem_roles.dm index b7fe63bc170..8b50bca5ad4 100644 --- a/code/modules/mob_spawn/ghost_roles/golem_roles.dm +++ b/code/modules/mob_spawn/ghost_roles/golem_roles.dm @@ -52,10 +52,8 @@ if (policy) to_chat(new_spawn, policy) to_chat(new_spawn, "Build golem shells in the autolathe, and feed refined mineral sheets to the shells to bring them to life! You are generally a peaceful group unless provoked.") - var/static/list/allowed_areas - if(!allowed_areas) - allowed_areas = typecacheof(list(/area/icemoon, /area/lavaland, /area/ruin)) - new_spawn.AddComponent(/datum/component/hazard_area, area_whitelist=allowed_areas) + + try_keep_home(new_spawn) else new_spawn.mind.enslave_mind_to_creator(owner) log_game("[key_name(new_spawn)] possessed a golem shell enslaved to [key_name(owner)].") @@ -71,6 +69,12 @@ else new_spawn.mind.set_assigned_role(SSjob.GetJobType(/datum/job/free_golem)) +/obj/effect/mob_spawn/ghost_role/human/golem/proc/try_keep_home(mob/new_spawn) + var/static/list/allowed_areas = typecacheof(list(/area/icemoon, /area/lavaland, /area/ruin)) + + ADD_TRAIT(new_spawn, TRAIT_FORBID_MINING_SHUTTLE_CONSOLE_OUTSIDE_STATION, INNATE_TRAIT) + new_spawn.AddComponent(/datum/component/hazard_area, area_whitelist = allowed_areas) + /obj/effect/mob_spawn/ghost_role/human/golem/attack_hand(mob/user, list/modifiers) . = ..() if(.)