diff --git a/code/__DEFINES/citadel_defines.dm b/code/__DEFINES/citadel_defines.dm index 7c2250ea..fdfd8110 100644 --- a/code/__DEFINES/citadel_defines.dm +++ b/code/__DEFINES/citadel_defines.dm @@ -15,7 +15,7 @@ #define ui_boxvore "EAST-5:22,SOUTH+1:6" //Filters -#define CIT_FILTER_STAMINACRIT filter(type="drop_shadow", x=0, y=0, size=-3, border=0, color="#04080F") +#define CIT_FILTER_STAMINACRIT filter(type="drop_shadow", x=0, y=0, size=-3, color="#04080F") //organ defines #define COCK_SIZE_MIN 1 diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 47920852..b1f235a0 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -92,7 +92,10 @@ if(current) // remove ourself from our old body's mind variable current.mind = null SStgui.on_transfer(current, new_character) - + if(iscarbon(current)) + var/mob/living/carbon/C = current + if(C.combatmode) + C.toggle_combat_mode(TRUE, TRUE) if(!language_holder) var/datum/language_holder/mob_holder = new_character.get_language_holder(shadow = FALSE) language_holder = mob_holder.copy(src) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index c76c3b1f..60010a92 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -813,9 +813,13 @@ if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (HAS_TRAIT(src, TRAIT_DEATHCOMA)) || (health <= HEALTH_THRESHOLD_FULLCRIT && !HAS_TRAIT(src, TRAIT_NOHARDCRIT))) stat = UNCONSCIOUS blind_eyes(1) + if(combatmode) + toggle_combat_mode(TRUE, TRUE) else if(health <= crit_threshold && !HAS_TRAIT(src, TRAIT_NOSOFTCRIT)) stat = SOFT_CRIT + if(combatmode) + toggle_combat_mode(TRUE, TRUE) else stat = CONSCIOUS adjust_blindness(-1) @@ -987,3 +991,8 @@ return TRUE if(isclothing(wear_mask) && (wear_mask.clothing_flags & SCAN_REAGENTS)) return TRUE + +/mob/living/carbon/transfer_ckey(mob/new_mob, send_signal = TRUE) + if(combatmode) + toggle_combat_mode(TRUE, TRUE) + return ..() diff --git a/code/modules/mob/living/carbon/death.dm b/code/modules/mob/living/carbon/death.dm index af1daea0..d6b8d7d7 100644 --- a/code/modules/mob/living/carbon/death.dm +++ b/code/modules/mob/living/carbon/death.dm @@ -7,6 +7,8 @@ if(!gibbed) emote("deathgasp") + if(combatmode) + toggle_combat_mode(TRUE, TRUE) . = ..() @@ -63,3 +65,8 @@ var/obj/item/bodypart/BP = X BP.drop_limb() BP.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5) + +/mob/living/carbon/ghostize(can_reenter_corpse = TRUE, special = FALSE, penalize = FALSE) + if(combatmode) + toggle_combat_mode(TRUE, TRUE) + return ..() diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index 94339b6a..60fe4d27 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -651,7 +651,7 @@ Difficulty: Very Hard L.heal_overall_damage(heal_power, heal_power) new /obj/effect/temp_visual/heal(get_turf(target), "#80F5FF") -/mob/living/simple_animal/hostile/lightgeist/ghostize() +/mob/living/simple_animal/hostile/lightgeist/ghostize(can_reenter_corpse = TRUE, special = FALSE, penalize = FALSE) . = ..() if(.) death() diff --git a/modular_citadel/code/modules/mob/living/carbon/carbon.dm b/modular_citadel/code/modules/mob/living/carbon/carbon.dm index 02b98bdb..bea9e8b1 100644 --- a/modular_citadel/code/modules/mob/living/carbon/carbon.dm +++ b/modular_citadel/code/modules/mob/living/carbon/carbon.dm @@ -18,30 +18,32 @@ return FALSE return . -/mob/living/carbon/proc/toggle_combat_mode(forced) - if(recoveringstam) - return TRUE +/mob/living/carbon/proc/toggle_combat_mode(forced, silent) if(!forced) - for(var/datum/status_effect/S in status_effects) + if(recoveringstam || stat != CONSCIOUS) + return TRUE + for(var/i in status_effects) + var/datum/status_effect/S = i if(S.blocks_combatmode) return TRUE combatmode = !combatmode if(voremode) toggle_vore_mode() - if(combatmode) - playsound_local(src, 'modular_citadel/sound/misc/ui_toggle.ogg', 50, FALSE, pressure_affected = FALSE) //Sound from interbay! - else - playsound_local(src, 'modular_citadel/sound/misc/ui_toggleoff.ogg', 50, FALSE, pressure_affected = FALSE) //Slightly modified version of the above! + if(!silent) + if(combatmode) + if(world.time >= combatmessagecooldown) + if(a_intent != INTENT_HELP) + visible_message("[src] [resting ? "tenses up" : (prob(95)? "drops into a combative stance" : (prob(95)? "poses aggressively" : "asserts dominance with their pose"))].") + else + visible_message("[src] [pick("looks","seems","goes")] [pick("alert","attentive","vigilant")].") + playsound_local(src, 'modular_citadel/sound/misc/ui_toggle.ogg', 50, FALSE, pressure_affected = FALSE) //Sound from interbay! + else + playsound_local(src, 'modular_citadel/sound/misc/ui_toggleoff.ogg', 50, FALSE, pressure_affected = FALSE) //Slightly modified version of the above! if(client) client.show_popup_menus = !combatmode // So we can right-click for alternate actions and all that other good shit. Also moves examine to shift+rightclick to make it possible to attack while sprinting if(hud_used && hud_used.static_inventory) for(var/obj/screen/combattoggle/selector in hud_used.static_inventory) selector.rebasetointerbay(src) - if(world.time >= combatmessagecooldown && combatmode) - if(a_intent != INTENT_HELP) - visible_message("[src] [resting ? "tenses up" : (prob(95)? "drops into a combative stance" : (prob(95)? "poses aggressively" : "asserts dominance with their pose"))].") - else - visible_message("[src] [pick("looks","seems","goes")] [pick("alert","attentive","vigilant")].") combatmessagecooldown = 10 SECONDS + world.time //This is set 100% of the time to make sure squeezing regen out of process cycles doesn't result in the combat mode message getting spammed SEND_SIGNAL(src, COMSIG_COMBAT_TOGGLED, src, combatmode) return TRUE