diff --git a/code/game/gamemodes/extended/cm_vs_upp.dm b/code/game/gamemodes/extended/cm_vs_upp.dm index 44919935ea73..5ea63ad40917 100644 --- a/code/game/gamemodes/extended/cm_vs_upp.dm +++ b/code/game/gamemodes/extended/cm_vs_upp.dm @@ -2,7 +2,7 @@ name = "Faction Clash UPP CM" config_tag = "Faction Clash UPP CM" flags_round_type = MODE_THUNDERSTORM|MODE_FACTION_CLASH - starting_round_modifiers = list(/datum/gamemode_modifier/blood_optimization, /datum/gamemode_modifier/defib_past_armor, /datum/gamemode_modifier/disable_combat_cas, /datum/gamemode_modifier/disable_ib, /datum/gamemode_modifier/disable_attacking_corpses, /datum/gamemode_modifier/disable_long_range_sentry, /datum/gamemode_modifier/disable_stripdrag_enemy, /datum/gamemode_modifier/indestructible_splints, /datum/gamemode_modifier/mortar_laser_warning) + starting_round_modifiers = list(/datum/gamemode_modifier/blood_optimization, /datum/gamemode_modifier/defib_past_armor, /datum/gamemode_modifier/disable_combat_cas, /datum/gamemode_modifier/disable_ib, /datum/gamemode_modifier/disable_attacking_corpses, /datum/gamemode_modifier/disable_long_range_sentry, /datum/gamemode_modifier/disable_stripdrag_enemy, /datum/gamemode_modifier/indestructible_splints, /datum/gamemode_modifier/mortar_laser_warning, /datum/gamemode_modifier/no_body_c4) taskbar_icon = 'icons/taskbar/gml_hvh.png' /datum/game_mode/extended/faction_clash/cm_vs_upp/get_roles_list() diff --git a/code/game/gamemodes/extended/extended_clash.dm b/code/game/gamemodes/extended/extended_clash.dm index db5ad4babcf9..1cf2c448d410 100644 --- a/code/game/gamemodes/extended/extended_clash.dm +++ b/code/game/gamemodes/extended/extended_clash.dm @@ -2,7 +2,7 @@ name = "Faction Clash" config_tag = "Faction Clash" flags_round_type = MODE_THUNDERSTORM|MODE_FACTION_CLASH - starting_round_modifiers = list(/datum/gamemode_modifier/blood_optimization, /datum/gamemode_modifier/defib_past_armor, /datum/gamemode_modifier/disable_combat_cas, /datum/gamemode_modifier/disable_long_range_sentry, /datum/gamemode_modifier/disable_stripdrag_enemy, /datum/gamemode_modifier/indestructible_splints, /datum/gamemode_modifier/mortar_laser_warning) + starting_round_modifiers = list(/datum/gamemode_modifier/blood_optimization, /datum/gamemode_modifier/defib_past_armor, /datum/gamemode_modifier/disable_combat_cas, /datum/gamemode_modifier/disable_ib, /datum/gamemode_modifier/disable_attacking_corpses, /datum/gamemode_modifier/disable_long_range_sentry, /datum/gamemode_modifier/disable_stripdrag_enemy, /datum/gamemode_modifier/indestructible_splints, /datum/gamemode_modifier/mortar_laser_warning, /datum/gamemode_modifier/no_body_c4) /datum/game_mode/extended/faction_clash/get_roles_list() return GLOB.ROLES_FACTION_CLASH diff --git a/code/game/gamemodes/round_modifiers.dm b/code/game/gamemodes/round_modifiers.dm index fae5cdc1ed65..e28c452e55a9 100644 --- a/code/game/gamemodes/round_modifiers.dm +++ b/code/game/gamemodes/round_modifiers.dm @@ -131,3 +131,7 @@ /datum/gamemode_modifier/yautja_shipside_large_sd modifier_name = "Yautja Shipside Large SD" modifier_desc = "Allows Yautja to large self destruct on the mainship z-level." + +/datum/gamemode_modifier/no_body_c4 + modifier_name = "No body c4" + modifier_desc = "Prevents c4 explosives from being planted on dead body." diff --git a/code/game/objects/items/explosives/plastic.dm b/code/game/objects/items/explosives/plastic.dm index ac02a89b1695..7096910262c0 100644 --- a/code/game/objects/items/explosives/plastic.dm +++ b/code/game/objects/items/explosives/plastic.dm @@ -212,6 +212,9 @@ return FALSE if(ishuman(target)) + if(SSticker.mode && MODE_HAS_MODIFIER(/datum/gamemode_modifier/no_body_c4)) + to_chat(user, SPAN_WARNING("This feels wrong, you do not want to do it.")) + return FALSE var/mob/living/carbon/human/H = target if(user.faction == H.faction) to_chat(user, SPAN_WARNING("ARE YOU OUT OF YOUR MIND?!")) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 50057cc746a4..bac36b38bf68 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -63,13 +63,17 @@ return 0 return 1 -/obj/structure/closet/proc/can_close() +/obj/structure/closet/proc/can_close(mob/user) for(var/obj/structure/closet/closet in get_turf(src)) if(closet != src && !closet.wall_mounted) - return 0 + return FALSE for(var/mob/living/carbon/xenomorph/xeno in get_turf(src)) - return 0 - return 1 + return FALSE + if(MODE_HAS_MODIFIER(/datum/gamemode_modifier/disable_stripdrag_enemy)) + for(var/mob/living/carbon/human/closed_mob in get_turf(src)) + if((closed_mob.stat == DEAD || closed_mob.health < HEALTH_THRESHOLD_CRIT) && !closed_mob.get_target_lock(user.faction_group) && !(closed_mob.status_flags & PERMANENTLY_DEAD)&& !(closed_mob.status_flags & PERMANENTLY_DEAD)) + return FALSE + return TRUE /obj/structure/closet/proc/dump_contents() @@ -102,10 +106,10 @@ density = FALSE return 1 -/obj/structure/closet/proc/close() +/obj/structure/closet/proc/close(mob/user) if(!src.opened) return 0 - if(!src.can_close()) + if(!src.can_close(user)) return 0 var/stored_units = 0 diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index e7739a2c8b0a..8de85a33eab1 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -107,11 +107,15 @@ . = ..() //Trying to buckle a mob -/obj/structure/bed/buckle_mob(mob/M, mob/user) +/obj/structure/bed/buckle_mob(mob/living/carbon/human/mob, mob/user) if(buckled_bodybag) return + if(ishuman(mob)) + if(MODE_HAS_MODIFIER(/datum/gamemode_modifier/disable_stripdrag_enemy) && (mob.stat == DEAD || mob.health < HEALTH_THRESHOLD_CRIT) && !mob.get_target_lock(user.faction_group) && !(mob.status_flags & PERMANENTLY_DEAD)) + to_chat(user, SPAN_WARNING("You can't buckle a crit or dead member of another faction! .")) + return FALSE ..() - if(M.loc == src.loc && buckling_sound && M.buckled) + if(mob.loc == src.loc && buckling_sound && mob.buckled) playsound(src, buckling_sound, 20) /obj/structure/bed/Move(NewLoc, direct) diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index e0925dc55e13..1072288b7157 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -295,8 +295,8 @@ if(W.isOn()) W.toggle() goes_out++ - for(var/obj/item/tool/match/M in contents) - M.burn_out(src) + for(var/obj/item/tool/match/mob in contents) + mob.burn_out(src) for(var/obj/item/tool/lighter/Z in contents) if(Z.turn_off(src)) goes_out++ @@ -414,13 +414,13 @@ /mob/living/carbon/human/proc/has_item_in_ears(item) return (item == wear_l_ear) || (item == wear_r_ear) -/mob/living/carbon/human/can_be_pulled_by(mob/M) +/mob/living/carbon/human/can_be_pulled_by(mob/mob) var/ignores_stripdrag_flag = FALSE - if(ishuman(M)) - var/mob/living/carbon/human/H = M - ignores_stripdrag_flag = H.species.ignores_stripdrag_flag - if(MODE_HAS_MODIFIER(/datum/gamemode_modifier/disable_stripdrag_enemy) && !ignores_stripdrag_flag && (stat == DEAD || health < HEALTH_THRESHOLD_CRIT) && !get_target_lock(M.faction_group)) - to_chat(M, SPAN_WARNING("You can't pull a crit or dead member of another faction!")) + if(ishuman(mob)) + var/mob/living/carbon/human/human = mob + ignores_stripdrag_flag = human.species.ignores_stripdrag_flag + if(MODE_HAS_MODIFIER(/datum/gamemode_modifier/disable_stripdrag_enemy) && !ignores_stripdrag_flag && (stat == DEAD || health < HEALTH_THRESHOLD_CRIT) && !get_target_lock(mob.faction_group) && !(mob.status_flags & PERMANENTLY_DEAD)) + to_chat(mob, SPAN_WARNING("You can't pull a crit or dead member of another faction!")) return FALSE return TRUE