This commit is contained in:
Ghommie
2020-03-23 21:02:47 +01:00
410 changed files with 168105 additions and 14293 deletions
@@ -23,6 +23,10 @@
var/rando_race = pick(GLOB.roundstart_races)
pref_species = new rando_race()
features = random_features(pref_species?.id)
if(gender == MALE || gender != FEMALE)
features["body_model"] = gender
else if(gender == PLURAL)
features["body_model"] = pick(MALE,FEMALE)
age = rand(AGE_MIN,AGE_MAX)
/datum/preferences/proc/update_preview_icon(equip_job = TRUE)
@@ -653,6 +653,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return 0
transfer_ckey(target, FALSE)
target.AddElement(/datum/element/ghost_role_eligibility)
target.faction = list("neutral")
return 1
@@ -21,7 +21,7 @@ In all, this is a lot like the monkey code. /N
return
switch(M.a_intent)
if (INTENT_HELP)
if(!recoveringstam)
if(!(combat_flags & COMBAT_FLAG_HARD_STAMCRIT))
set_resting(FALSE, TRUE, FALSE)
AdjustAllImmobility(-60, FALSE)
AdjustUnconscious(-60, FALSE)
@@ -27,7 +27,7 @@
else
if(stat == UNCONSCIOUS)
stat = CONSCIOUS
if(!recoveringstam)
if(!(combat_flags & COMBAT_FLAG_HARD_STAMCRIT))
set_resting(FALSE, TRUE)
adjust_blindness(-1)
update_mobility()
+21 -8
View File
@@ -153,7 +153,7 @@
return
//CIT CHANGES - makes it impossible to throw while in stamina softcrit
if(getStaminaLoss() >= STAMINA_SOFTCRIT)
if(IS_STAMCRIT(src))
to_chat(src, "<span class='warning'>You're too exhausted.</span>")
return
var/random_turn = a_intent == INTENT_HARM
@@ -448,7 +448,7 @@
modifier -= 40 //Clumsy people are more likely to hit themselves -Honk!
//CIT CHANGES START HERE
else if(combatmode)
else if(combat_flags & COMBAT_FLAG_COMBAT_ACTIVE)
modifier += 50
if(modifier < 100)
@@ -820,15 +820,13 @@
return
if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (HAS_TRAIT(src, TRAIT_DEATHCOMA)) || (health <= HEALTH_THRESHOLD_FULLCRIT && !HAS_TRAIT(src, TRAIT_NOHARDCRIT)))
stat = UNCONSCIOUS
disable_intentional_combat_mode(FALSE, FALSE)
if(!eye_blind)
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)
disable_intentional_combat_mode(FALSE, FALSE)
else
stat = CONSCIOUS
adjust_blindness(-1)
@@ -1011,8 +1009,7 @@
return TRUE
/mob/living/carbon/transfer_ckey(mob/new_mob, send_signal = TRUE)
if(combatmode)
toggle_combat_mode(TRUE, TRUE)
disable_intentional_combat_mode(TRUE, FALSE)
return ..()
/mob/living/carbon/can_see_reagents()
@@ -1028,3 +1025,19 @@
/mob/living/carbon/can_hold_items()
return TRUE
/mob/living/carbon/set_gender(ngender = NEUTER, silent = FALSE, update_icon = TRUE, forced = FALSE)
var/bender = gender != ngender
. = ..()
if(!.)
return
if(dna && bender)
if(ngender == MALE || ngender == FEMALE)
dna.features["body_model"] = ngender
if(!silent)
var/adj = ngender == MALE ? "masculine" : "feminine"
visible_message("<span class='boldnotice'>[src] suddenly looks more [adj]!</span>", "<span class='boldwarning'>You suddenly feel more [adj]!</span>")
else if(ngender == NEUTER)
dna.features["body_model"] = MALE
if(update_icon)
update_body()
@@ -0,0 +1,6 @@
/mob/living/carbon/enable_intentional_combat_mode()
. = ..()
if(.)
if(voremode)
toggle_vore_mode()
@@ -79,13 +79,11 @@
/mob/living/carbon/attacked_by(obj/item/I, mob/living/user)
//CIT CHANGES START HERE - combatmode and resting checks
var/totitemdamage = I.force
if(iscarbon(user))
var/mob/living/carbon/tempcarb = user
if(!tempcarb.combatmode)
totitemdamage *= 0.5
if(!(user.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE))
totitemdamage *= 0.5
if(!CHECK_MOBILITY(user, MOBILITY_STAND))
totitemdamage *= 0.5
if(!combatmode)
if(!(combat_flags & COMBAT_FLAG_COMBAT_ACTIVE))
totitemdamage *= 1.5
//CIT CHANGES END HERE
if(user != src && check_shields(I, totitemdamage, "the [I.name]", MELEE_ATTACK, I.armour_penetration))
@@ -330,7 +328,7 @@
AdjustAllImmobility(-60, FALSE)
AdjustUnconscious(-60, FALSE)
AdjustSleeping(-100, FALSE)
if(recoveringstam)
if(combat_flags & COMBAT_FLAG_HARD_STAMCRIT)
adjustStaminaLoss(-15)
else
set_resting(FALSE, FALSE)
@@ -0,0 +1,18 @@
/// Sprint buffer ///
/mob/living/carbon/doSprintLossTiles(tiles)
doSprintBufferRegen(FALSE) //first regen.
if(sprint_buffer)
var/use = min(tiles, sprint_buffer)
sprint_buffer -= use
tiles -= use
update_hud_sprint_bar()
if(!tiles) //we had enough, we're done!
return
adjustStaminaLoss(tiles * sprint_stamina_cost) //use stamina to cover deficit.
/mob/living/carbon/proc/doSprintBufferRegen(updating = TRUE)
var/diff = world.time - sprint_buffer_regen_last
sprint_buffer_regen_last = world.time
sprint_buffer = min(sprint_buffer_max, sprint_buffer + sprint_buffer_regen_ds * diff)
if(updating)
update_hud_sprint_bar()
+3 -4
View File
@@ -7,8 +7,8 @@
if(!gibbed)
emote("deathgasp")
if(combatmode)
toggle_combat_mode(TRUE, TRUE)
disable_intentional_combat_mode(TRUE, FALSE)
. = ..()
@@ -67,6 +67,5 @@
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, voluntary = FALSE)
if(combatmode)
toggle_combat_mode(TRUE, TRUE)
disable_intentional_combat_mode(TRUE, FALSE)
return ..()
+1 -1
View File
@@ -90,7 +90,7 @@
if(digitalcamo)
. += "[t_He] [t_is] moving [t_his] body in an unnatural and blatantly unsimian manner."
if(combatmode)
if(combat_flags & COMBAT_FLAG_COMBAT_ACTIVE)
. += "[t_He] [t_is] visibly tense[CHECK_MOBILITY(src, MOBILITY_STAND) ? "." : ", and [t_is] standing in combative stance."]"
var/trait_exam = common_trait_examine()
+17 -6
View File
@@ -29,7 +29,7 @@
. = ..()
if(CONFIG_GET(flag/disable_stambuffer))
togglesprint()
enable_intentional_sprint_mode()
RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, /atom.proc/clean_blood)
@@ -621,13 +621,14 @@
//Used for new human mobs created by cloning/goleming/podding
/mob/living/carbon/human/proc/set_cloned_appearance()
if(gender == MALE)
if(dna.features["body_model"] == MALE)
facial_hair_style = "Full Beard"
else
facial_hair_style = "Shaved"
hair_style = pick("Bedhead", "Bedhead 2", "Bedhead 3")
underwear = "Nude"
undershirt = "Nude"
socks = "Nude"
update_body()
update_hair()
update_genitals()
@@ -880,10 +881,20 @@
return (ishuman(target) && !CHECK_MOBILITY(target, MOBILITY_STAND))
/mob/living/carbon/human/proc/fireman_carry(mob/living/carbon/target)
if(can_be_firemanned(target))
visible_message("<span class='notice'>[src] starts lifting [target] onto their back...</span>",
"<span class='notice'>You start lifting [target] onto your back...</span>")
if(do_after(src, 30, TRUE, target))
var/carrydelay = 50 //if you have latex you are faster at grabbing
var/skills_space = "" //cobby told me to do this
if(HAS_TRAIT(src, TRAIT_QUICKER_CARRY))
carrydelay = 30
skills_space = "expertly"
else if(HAS_TRAIT(src, TRAIT_QUICK_CARRY))
carrydelay = 40
skills_space = "quickly"
if(can_be_firemanned(target) && !incapacitated(FALSE, TRUE))
visible_message("<span class='notice'>[src] starts [skills_space] lifting [target] onto their back..</span>",
//Joe Medic starts quickly/expertly lifting Grey Tider onto their back..
"<span class='notice'>[carrydelay < 35 ? "Using your gloves' nanochips, you" : "You"] [skills_space] start to lift [target] onto your back[carrydelay == 40 ? ", while assisted by the nanochips in your gloves.." : "..."]</span>")
//(Using your gloves' nanochips, you/You) ( /quickly/expertly) start to lift Grey Tider onto your back(, while assisted by the nanochips in your gloves../...)
if(do_after(src, carrydelay, TRUE, target))
//Second check to make sure they're still valid to be carried
if(can_be_firemanned(target) && !incapacitated(FALSE, TRUE))
target.set_resting(FALSE, TRUE)
@@ -6,6 +6,9 @@
can_buckle = TRUE
buckle_lying = FALSE
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
/// Enable stamina combat
combat_flags = COMBAT_FLAGS_DEFAULT
//Hair colour and style
var/hair_color = "000"
var/hair_style = "Bald"
@@ -1,5 +1,5 @@
/mob/living/carbon/human/resist_a_rest(automatic = FALSE, ignoretimer = FALSE)
if(!resting || stat || attemptingstandup)
if(!resting || stat || (combat_flags & COMBAT_FLAG_RESISTING_REST))
return FALSE
if(ignoretimer)
set_resting(FALSE, FALSE)
@@ -13,10 +13,10 @@
return FALSE
else
var/totaldelay = 3 //A little bit less than half of a second as a baseline for getting up from a rest
if(getStaminaLoss() >= STAMINA_SOFTCRIT)
if(IS_STAMCRIT(src))
to_chat(src, "<span class='warning'>You're too exhausted to get up!")
return FALSE
attemptingstandup = TRUE
combat_flags |= COMBAT_FLAG_RESISTING_REST
var/health_deficiency = max((maxHealth - (health - getStaminaLoss()))*0.5, 0)
if(!has_gravity())
health_deficiency = health_deficiency*0.2
@@ -37,10 +37,11 @@
visible_message("<span class='notice'>[standupwarning]</span>", usernotice, vision_distance = 5)
if(do_after(src, totaldelay, target = src, required_mobility_flags = MOBILITY_RESIST))
set_resting(FALSE, TRUE)
attemptingstandup = FALSE
combat_flags &= ~COMBAT_FLAG_RESISTING_REST
return TRUE
else
attemptingstandup = FALSE
combat_flags &= ~COMBAT_FLAG_RESISTING_REST
if(resting) //we didn't shove ourselves up or something
visible_message("<span class='notice'>[src] falls right back down.</span>", "<span class='notice'>You fall right back down.</span>")
if(has_gravity())
@@ -9,6 +9,13 @@
/mob/living/carbon/human/movement_delay()
. = ..()
if(CHECK_MOBILITY(src, MOBILITY_STAND) && m_intent == MOVE_INTENT_RUN && (combat_flags & COMBAT_FLAG_SPRINT_ACTIVE))
var/static/datum/config_entry/number/movedelay/sprint_speed_increase/SSI
if(!SSI)
SSI = CONFIG_GET_ENTRY(number/movedelay/sprint_speed_increase)
. -= SSI.config_entry_value
if(wrongdirmovedelay)
. += 1
if (m_intent == MOVE_INTENT_WALK && HAS_TRAIT(src, TRAIT_SPEEDY_STEP))
. -= 1.5
@@ -42,10 +49,18 @@
return ((shoes && shoes.negates_gravity()) || (dna.species.negates_gravity(src)))
/mob/living/carbon/human/Move(NewLoc, direct)
var/oldpseudoheight = pseudo_z_axis
. = ..()
for(var/datum/mutation/human/HM in dna.mutations)
HM.on_move(src, NewLoc)
HM.on_move(NewLoc)
if(. && (combat_flags & COMBAT_FLAG_SPRINT_ACTIVE) && !(movement_type & FLYING) && CHECK_ALL_MOBILITY(src, MOBILITY_MOVE|MOBILITY_STAND) && m_intent == MOVE_INTENT_RUN && has_gravity(loc) && !pulledby)
if(!HAS_TRAIT(src, TRAIT_FREESPRINT))
doSprintLossTiles(1)
if((oldpseudoheight - pseudo_z_axis) >= 8)
to_chat(src, "<span class='warning'>You trip off of the elevated surface!</span>")
for(var/obj/item/I in held_items)
accident(I)
DefaultCombatKnockdown(80)
if(shoes)
if(!lying && !buckled)
if(loc == NewLoc)
+7 -1
View File
@@ -13,7 +13,7 @@
/mob/living/carbon/human/GetVoice()
if(istype(wear_mask, /obj/item/clothing/mask/chameleon))
var/obj/item/clothing/mask/chameleon/V = wear_mask
if(V.vchange && wear_id)
if(V.voice_change && wear_id)
var/obj/item/card/id/idcard = wear_id.GetID()
if(istype(idcard))
return idcard.registered_name
@@ -21,6 +21,12 @@
return real_name
else
return real_name
if(istype(wear_mask, /obj/item/clothing/mask/infiltrator))
var/obj/item/clothing/mask/infiltrator/V = wear_mask
if(V.voice_unknown)
return ("Unknown")
else
return real_name
if(mind)
var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling)
if(changeling && changeling.mimicing )
+19 -22
View File
@@ -584,7 +584,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if(T)
var/state = "[T.icon_state][((DIGITIGRADE in species_traits) && T.has_digitigrade) ? "_d" : ""]"
var/mutable_appearance/MA
if(H.dna.species.sexes && H.gender == FEMALE)
if(H.dna.species.sexes && H.dna.features["body_model"] == FEMALE)
MA = wear_female_version(state, T.icon, BODY_LAYER)
else
MA = mutable_appearance(T.icon, state, -BODY_LAYER)
@@ -745,7 +745,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if(!bodyparts_to_add)
return
var/g = (H.gender == FEMALE) ? "f" : "m"
var/g = (H.dna.features["body_model"] == FEMALE) ? "f" : "m"
for(var/layer in relevent_layers)
var/layertext = mutant_bodyparts_layertext(layer)
@@ -1449,15 +1449,11 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
target.grabbedby(user)
return 1
/datum/species/proc/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
if(!attacker_style && HAS_TRAIT(user, TRAIT_PACIFISM))
to_chat(user, "<span class='warning'>You don't want to harm [target]!</span>")
return FALSE
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT) //CITADEL CHANGE - makes it impossible to punch while in stamina softcrit
if(IS_STAMCRIT(user)) //CITADEL CHANGE - makes it impossible to punch while in stamina softcrit
to_chat(user, "<span class='warning'>You're too exhausted.</span>") //CITADEL CHANGE - ditto
return FALSE //CITADEL CHANGE - ditto
if(target.check_block())
@@ -1486,11 +1482,11 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
var/damage = rand(user.dna.species.punchdamagelow, user.dna.species.punchdamagehigh)
//CITADEL CHANGES - makes resting and disabled combat mode reduce punch damage, makes being out of combat mode result in you taking more damage
if(!target.combatmode && damage < user.dna.species.punchstunthreshold)
if(!(target.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE) && damage < user.dna.species.punchstunthreshold)
damage = user.dna.species.punchstunthreshold - 1
if(!CHECK_MOBILITY(user, MOBILITY_STAND))
damage *= 0.5
if(!user.combatmode)
if(!(user.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE))
damage *= 0.25
//END OF CITADEL CHANGES
@@ -1539,12 +1535,12 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
var/aim_for_groin = user.zone_selected == "groin"
var/target_aiming_for_groin = target.zone_selected == "groin"
if(target.check_block()) //END EDIT
target.visible_message("<span class='warning'>[target] blocks [user]'s disarm attempt!</span>")
return 0
else if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)
if(IS_STAMCRIT(user))
to_chat(user, "<span class='warning'>You're too exhausted!</span>")
return FALSE
else if(target.check_block())
target.visible_message("<span class='warning'>[target] blocks [user]'s disarm attempt!</span>")
return FALSE
else if(aim_for_mouth && ( target_on_help || target_restrained || target_aiming_for_mouth))
playsound(target.loc, 'sound/weapons/slap.ogg', 50, 1, -1)
@@ -1604,11 +1600,11 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
target.forcesay(GLOB.hit_appends)
log_combat(user, target, "pushed over")
return*/
if(!target.combatmode) // CITADEL CHANGE
if(!(target.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE)) // CITADEL CHANGE
randn += -10 //CITADEL CHANGE - being out of combat mode makes it easier for you to get disarmed
if(!CHECK_MOBILITY(user, MOBILITY_STAND)) //CITADEL CHANGE
randn += 100 //CITADEL CHANGE - No kosher disarming if you're resting
if(!user.combatmode) //CITADEL CHANGE
if(!(target.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE)) //CITADEL CHANGE
randn += 25 //CITADEL CHANGE - Makes it harder to disarm outside of combat mode
if(user.pulling == target)
randn += -20 //If you have the time to get someone in a grab, you should have a greater chance at snatching the thing in their hand. Will be made completely obsolete by the grab rework but i've got a poor track record for releasing big projects on time so w/e i guess
@@ -1685,14 +1681,12 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
var/Iforce = I.force //to avoid runtimes on the forcesay checks at the bottom. Some items might delete themselves if you drop them. (stunning yourself, ninja swords)
//CIT CHANGES START HERE - combatmode and resting checks
var/totitemdamage = I.force
if(iscarbon(user))
var/mob/living/carbon/tempcarb = user
if(!tempcarb.combatmode)
totitemdamage *= 0.5
if(!(user.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE))
totitemdamage *= 0.5
if(!CHECK_MOBILITY(user, MOBILITY_STAND))
totitemdamage *= 0.5
if(istype(H))
if(!H.combatmode)
if(!(H.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE))
totitemdamage *= 1.5
//CIT CHANGES END HERE
var/weakness = H.check_weakness(I, user)
@@ -1802,9 +1796,12 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
/datum/species/proc/althelp(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
if(user == target && istype(user))
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)
if(IS_STAMCRIT(user))
to_chat(user, "<span class='warning'>You're too exhausted for that.</span>")
return
if(!(user.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE))
to_chat(user, "<span class='warning'>You need combat mode to be active to that!</span>")
return
if(user.IsKnockdown() || user.IsParalyzed() || user.IsStun())
to_chat(user, "<span class='warning'>You can't seem to force yourself up right now!</span>")
return
@@ -1817,7 +1814,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
playsound(user, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
/datum/species/proc/altdisarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)
if(IS_STAMCRIT(user))
to_chat(user, "<span class='warning'>You're too exhausted.</span>")
return FALSE
if(target.check_block())
@@ -602,10 +602,11 @@
else if (select_alteration == "Penis Length")
for(var/obj/item/organ/genital/penis/X in H.internal_organs)
qdel(X)
var/new_length
new_length = input(owner, "Penis length in inches:\n([COCK_SIZE_MIN]-[COCK_SIZE_MAX])", "Genital Alteration") as num|null
var/min_D = CONFIG_GET(number/penis_min_inches_prefs)
var/max_D = CONFIG_GET(number/penis_max_inches_prefs)
var/new_length = input(owner, "Penis length in inches:\n([min_D]-[max_D])", "Genital Alteration") as num|null
if(new_length)
H.dna.features["cock_length"] = max(min( round(text2num(new_length)), COCK_SIZE_MAX),COCK_SIZE_MIN)
H.dna.features["cock_length"] = CLAMP(round(new_length), min_D, max_D)
H.update_genitals()
H.apply_overlay()
H.give_genital(/obj/item/organ/genital/testicles)
@@ -614,8 +615,7 @@
else if (select_alteration == "Breast Size")
for(var/obj/item/organ/genital/breasts/X in H.internal_organs)
qdel(X)
var/new_size
new_size = input(owner, "Breast Size", "Genital Alteration") as null|anything in GLOB.breasts_size_list
var/new_size = input(owner, "Breast Size", "Genital Alteration") as null|anything in CONFIG_GET(keyed_list/breasts_cups_prefs)
if(new_size)
H.dna.features["breasts_size"] = new_size
H.update_genitals()
@@ -132,7 +132,7 @@ There are several things that need to be remembered:
var/mutable_appearance/uniform_overlay
if(dna && dna.species.sexes)
var/G = (gender == FEMALE) ? "f" : "m"
var/G = (dna.features["body_model"] == FEMALE) ? "f" : "m"
if(G == "f" && U.fitted != NO_FEMALE_UNIFORM)
uniform_overlay = U.build_worn_icon(t_color, UNIFORM_LAYER, alt_worn, FALSE, U.fitted, variant_flag, FALSE)
@@ -648,12 +648,11 @@ generate/load female uniform sprites matching all previously decided variables
else
. += "-not_coloured"
. += "-[gender]"
. += "-[dna.features["body_model"]]"
var/is_taur = FALSE
var/mob/living/carbon/human/H = src
if(H.dna.species.mutant_bodyparts["taur"] && H.dna.features["taur"] != "None")
if(dna.species.mutant_bodyparts["taur"] && dna.features["taur"] != "None")
is_taur = TRUE
+3 -3
View File
@@ -507,10 +507,10 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put
//this updates all special effects: stun, sleeping, knockdown, druggy, stuttering, etc..
/mob/living/carbon/handle_status_effects()
..()
if(getStaminaLoss() && !combatmode)//CIT CHANGE - prevents stamina regen while combat mode is active
adjustStaminaLoss(!CHECK_MOBILITY(src, MOBILITY_STAND) ? (recoveringstam ? -7.5 : -6) : -3)//CIT CHANGE - decreases adjuststaminaloss to stop stamina damage from being such a joke
if(getStaminaLoss() && !(combat_flags & COMBAT_FLAG_COMBAT_ACTIVE)) //CIT CHANGE - prevents stamina regen while combat mode is active
adjustStaminaLoss(!CHECK_MOBILITY(src, MOBILITY_STAND) ? ((combat_flags & COMBAT_FLAG_HARD_STAMCRIT) ? -7.5 : -6) : -3)//CIT CHANGE - decreases adjuststaminaloss to stop stamina damage from being such a joke
if(!recoveringstam && incomingstammult != 1)
if(!(combat_flags & COMBAT_FLAG_HARD_STAMCRIT) && incomingstammult != 1)
incomingstammult = max(0.01, incomingstammult)
incomingstammult = min(1, incomingstammult*2)
@@ -35,7 +35,7 @@
gorillize()
return
if(radiation > RAD_MOB_KNOCKDOWN && prob(RAD_MOB_KNOCKDOWN_PROB))
if(!recoveringstam)
if(!(combat_flags & COMBAT_FLAG_HARD_STAMCRIT))
emote("collapse")
DefaultCombatKnockdown(RAD_MOB_KNOCKDOWN_AMOUNT)
to_chat(src, "<span class='danger'>You feel weak.</span>")
+12 -7
View File
@@ -118,22 +118,22 @@
if(!CHECK_MOBILITY(src, MOBILITY_STAND) && CHECK_MOBILITY(L, MOBILITY_STAND))
var/origtargetloc = L.loc
if(!pulledby)
if(attemptingcrawl)
if(combat_flags & COMBAT_FLAG_ATTEMPTING_CRAWL)
return TRUE
if(getStaminaLoss() >= STAMINA_SOFTCRIT)
if(IS_STAMCRIT(src))
to_chat(src, "<span class='warning'>You're too exhausted to crawl under [L].</span>")
return TRUE
attemptingcrawl = TRUE
ENABLE_BITFIELD(combat_flags, COMBAT_FLAG_ATTEMPTING_CRAWL)
visible_message("<span class='notice'>[src] is attempting to crawl under [L].</span>", "<span class='notice'>You are now attempting to crawl under [L].</span>")
if(!do_after(src, CRAWLUNDER_DELAY, target = src) || CHECK_MOBILITY(src, MOBILITY_STAND))
attemptingcrawl = FALSE
DISABLE_BITFIELD(combat_flags, COMBAT_FLAG_ATTEMPTING_CRAWL)
return TRUE
var/src_passmob = (pass_flags & PASSMOB)
pass_flags |= PASSMOB
Move(origtargetloc)
if(!src_passmob)
pass_flags &= ~PASSMOB
attemptingcrawl = FALSE
DISABLE_BITFIELD(combat_flags, COMBAT_FLAG_ATTEMPTING_CRAWL)
return TRUE
//END OF CIT CHANGES
@@ -368,9 +368,8 @@
to_chat(src, "<span class='notice'>You have given up life and succumbed to death.</span>")
death()
/mob/living/incapacitated(ignore_restraints = FALSE, ignore_grab = FALSE, check_immobilized = FALSE)
if(stat || IsUnconscious() || IsStun() || IsParalyzed() || recoveringstam || (check_immobilized && IsImmobilized()) || (!ignore_restraints && restrained(ignore_grab)))
if(stat || IsUnconscious() || IsStun() || IsParalyzed() || (combat_flags & COMBAT_FLAG_HARD_STAMCRIT) || (check_immobilized && IsImmobilized()) || (!ignore_restraints && restrained(ignore_grab)))
return TRUE
/mob/living/canUseStorage()
@@ -1193,3 +1192,9 @@
/mob/living/canface()
return ..() && CHECK_MOBILITY(src, MOBILITY_MOVE)
/mob/living/proc/set_gender(ngender = NEUTER, silent = FALSE, update_icon = TRUE, forced = FALSE)
if(forced || (!ckey || client?.prefs.cit_toggles & (ngender == FEMALE ? FORCED_FEM : FORCED_MASC)))
gender = ngender
return TRUE
return FALSE
+88
View File
@@ -0,0 +1,88 @@
/mob/living/ComponentInitialize()
. = ..()
RegisterSignal(src, SIGNAL_TRAIT(TRAIT_COMBAT_MODE_LOCKED), .proc/update_combat_lock)
/mob/living/proc/update_combat_lock()
var/locked = HAS_TRAIT(src, TRAIT_COMBAT_MODE_LOCKED)
var/desired = (combat_flags & COMBAT_FLAG_COMBAT_TOGGLED)
var/actual = (combat_flags & COMBAT_FLAG_COMBAT_ACTIVE)
if(actual)
if(locked)
disable_combat_mode(FALSE, TRUE, FALSE, FALSE)
else if(!desired)
disable_combat_mode(TRUE, TRUE, FALSE, FALSE)
else
if(desired && !locked)
enable_combat_mode(FALSE, TRUE, FALSE, FALSE)
update_combat_mode_icon()
/mob/living/proc/disable_combat_mode(silent = TRUE, was_forced = FALSE, visible = FALSE, update_icon = TRUE)
if(!(combat_flags & COMBAT_FLAG_COMBAT_ACTIVE))
return
DISABLE_BITFIELD(combat_flags, COMBAT_FLAG_COMBAT_ACTIVE)
SEND_SIGNAL(src, COMSIG_LIVING_COMBAT_DISABLED, was_forced)
if(visible)
visible_message("<span class='warning'>[src] goes limp.</span>", "<span class='warning'>Your muscles are forcibly relaxed!</span>")
else if(!silent)
to_chat(src, was_forced? "<span class='warning'>Your muscles are forcibly relaxed!</span>" : "<span class='warning'>You relax your muscles.</span>")
if(update_icon)
update_combat_mode_icon()
/mob/living/proc/enable_combat_mode(silent = TRUE, was_forced = FALSE, visible = FALSE, update_icon = TRUE)
if(combat_flags & COMBAT_FLAG_COMBAT_ACTIVE)
return
ENABLE_BITFIELD(combat_flags, COMBAT_FLAG_COMBAT_ACTIVE)
SEND_SIGNAL(src, COMSIG_LIVING_COMBAT_ENABLED, was_forced)
if(visible)
visible_message("<span class='warning'>[src] drops into a combative stance!</span>", "<span class='warning'>You drop into a combative stance!</span>")
else if(!silent)
to_chat(src, was_forced? "<span class='warning'>Your muscles reflexively tighten!</span>" : "<span class='warning'>You tighten your muscles.</span>")
if(update_icon)
update_combat_mode_icon()
/// Updates the combat mode HUD icon.
/mob/living/proc/update_combat_mode_icon()
var/obj/screen/combattoggle/T = locate() in hud_used?.static_inventory
T?.update_icon_state()
/// Enables intentionally being in combat mode. Please try not to use this proc for feedback whenever possible.
/mob/living/proc/enable_intentional_combat_mode(silent = TRUE, visible = FALSE)
if((combat_flags & COMBAT_FLAG_COMBAT_TOGGLED) && (combat_flags & COMBAT_FLAG_COMBAT_ACTIVE))
return
ENABLE_BITFIELD(combat_flags, COMBAT_FLAG_COMBAT_TOGGLED)
if(!HAS_TRAIT(src, TRAIT_COMBAT_MODE_LOCKED) && !(combat_flags & COMBAT_FLAG_COMBAT_ACTIVE))
enable_combat_mode(silent, FALSE, visible, FALSE)
update_combat_mode_icon()
client?.show_popup_menus = FALSE
return TRUE
/// Disables intentionally being in combat mode. Please try not to use this proc for feedback whenever possible.
/mob/living/proc/disable_intentional_combat_mode(silent = TRUE, visible = FALSE)
if(!(combat_flags & COMBAT_FLAG_COMBAT_TOGGLED) && !(combat_flags & COMBAT_FLAG_COMBAT_ACTIVE))
return
DISABLE_BITFIELD(combat_flags, COMBAT_FLAG_COMBAT_TOGGLED)
if(combat_flags & COMBAT_FLAG_COMBAT_ACTIVE)
disable_combat_mode(silent, FALSE, visible, FALSE)
update_combat_mode_icon()
client?.show_popup_menus = TRUE
return TRUE
/// Toggles whether the user is intentionally in combat mode. THIS should be the proc you generally use! Has built in visual/to other player feedback, as well as an audible cue to ourselves.
/mob/living/proc/user_toggle_intentional_combat_mode(visible = TRUE)
var/old = (combat_flags & COMBAT_FLAG_COMBAT_TOGGLED)
if(old)
disable_intentional_combat_mode()
playsound_local(src, 'sound/misc/ui_toggleoff.ogg', 50, FALSE, pressure_affected = FALSE) //Slightly modified version of the above!
else if(CAN_TOGGLE_COMBAT_MODE(src))
enable_intentional_combat_mode()
var/current = (combat_flags & COMBAT_FLAG_COMBAT_ACTIVE) //because we could be locked
if(current != old) //only sound effect if you succeeded. Could have the feedback system be better but shrug, someone else can do it.
if(current)
playsound_local(src, 'sound/misc/ui_toggle.ogg', 50, FALSE, pressure_affected = FALSE) //Sound from interbay!
if(visible)
if(world.time >= combatmessagecooldown)
combatmessagecooldown = world.time + 10 SECONDS
if(a_intent != INTENT_HELP)
visible_message("<span class='warning'>[src] [resting ? "tenses up" : (prob(95)? "drops into a combative stance" : (prob(95)? "poses aggressively" : "asserts dominance with their pose"))].</span>")
else
visible_message("<span class='notice'>[src] [pick("looks","seems","goes")] [pick("alert","attentive","vigilant")].</span>")
+19
View File
@@ -118,3 +118,22 @@
/// Next world.time when we can get the "you can't move while buckled to [thing]" message.
var/buckle_message_cooldown = 0
//// CITADEL STATION COMBAT ////
/// See __DEFINES/combat.dm
var/combat_flags = COMBAT_FLAGS_STAMSYSTEM_EXEMPT
/// Next world.time when we will show a visible message on entering combat mode voluntarily again.
var/combatmessagecooldown = 0
var/incomingstammult = 1
var/bufferedstam = 0
var/stambuffer = 20
var/stambufferregentime
//Sprint buffer---
var/sprint_buffer = 42 //Tiles
var/sprint_buffer_max = 42
var/sprint_buffer_regen_ds = 0.3 //Tiles per world.time decisecond
var/sprint_buffer_regen_last = 0 //last world.time this was regen'd for math.
var/sprint_stamina_cost = 0.70 //stamina loss per tile while insufficient sprint buffer.
//---End
+8 -8
View File
@@ -33,9 +33,9 @@
set name = "Rest"
set category = "IC"
if(client?.prefs?.autostand)
intentionalresting = !intentionalresting
to_chat(src, "<span class='notice'>You are now attempting to [intentionalresting ? "[!resting ? "lay down and ": ""]stay down" : "[resting ? "get up and ": ""]stay up"].</span>")
if(intentionalresting && !resting)
TOGGLE_BITFIELD(combat_flags, COMBAT_FLAG_INTENTIONALLY_RESTING)
to_chat(src, "<span class='notice'>You are now attempting to [(combat_flags & COMBAT_FLAG_INTENTIONALLY_RESTING) ? "[!resting ? "lay down and ": ""]stay down" : "[resting ? "get up and ": ""]stay up"].</span>")
if((combat_flags & COMBAT_FLAG_INTENTIONALLY_RESTING) && !resting)
set_resting(TRUE, FALSE)
else
resist_a_rest()
@@ -71,8 +71,8 @@
var/restrained = restrained()
var/pinned = resting && pulledby && pulledby.grab_state >= GRAB_AGGRESSIVE // Cit change - adds pinning for aggressive-grabbing people on the ground
var/has_limbs = has_arms || ignore_legs || has_legs
var/canmove = !immobilize && !stun && conscious && !paralyze && (!stat_softcrit || !pulledby) && !chokehold && !IsFrozen() && has_limbs && !pinned && !recoveringstam
var/canresist = !stun && conscious && !stat_softcrit && !paralyze && has_limbs && !recoveringstam
var/canmove = !immobilize && !stun && conscious && !paralyze && (!stat_softcrit || !pulledby) && !chokehold && !IsFrozen() && has_limbs && !pinned && !(combat_flags & COMBAT_FLAG_HARD_STAMCRIT)
var/canresist = !stun && conscious && !stat_softcrit && !paralyze && has_limbs && !(combat_flags & COMBAT_FLAG_HARD_STAMCRIT)
if(canmove)
mobility_flags |= MOBILITY_MOVE
@@ -84,7 +84,7 @@
else
mobility_flags &= ~MOBILITY_RESIST
var/canstand_involuntary = conscious && !stat_softcrit && !knockdown && !chokehold && !paralyze && (ignore_legs || has_legs) && !(buckled && buckled.buckle_lying) && !recoveringstam
var/canstand_involuntary = conscious && !stat_softcrit && !knockdown && !chokehold && !paralyze && (ignore_legs || has_legs) && !(buckled && buckled.buckle_lying) && !(combat_flags & COMBAT_FLAG_HARD_STAMCRIT)
var/canstand = canstand_involuntary && !resting
var/should_be_lying = !canstand
@@ -107,7 +107,7 @@
else
mobility_flags |= MOBILITY_UI|MOBILITY_PULL
var/canitem_general = !paralyze && !stun && conscious && !(stat_softcrit) && !chokehold && !restrained && has_arms && !recoveringstam
var/canitem_general = !paralyze && !stun && conscious && !(stat_softcrit) && !chokehold && !restrained && has_arms && !(combat_flags & COMBAT_FLAG_HARD_STAMCRIT)
if(canitem_general)
mobility_flags |= (MOBILITY_USE | MOBILITY_PICKUP | MOBILITY_STORAGE | MOBILITY_HOLD)
else
@@ -149,7 +149,7 @@
lying_prev = lying
//Handle citadel autoresist
if(CHECK_MOBILITY(src, MOBILITY_MOVE) && !intentionalresting && canstand_involuntary && iscarbon(src) && client?.prefs?.autostand)//CIT CHANGE - adds autostanding as a preference
if(CHECK_MOBILITY(src, MOBILITY_MOVE) && !(combat_flags & COMBAT_FLAG_INTENTIONALLY_RESTING) && canstand_involuntary && iscarbon(src) && client?.prefs?.autostand)//CIT CHANGE - adds autostanding as a preference
addtimer(CALLBACK(src, .proc/resist_a_rest, TRUE), 0) //CIT CHANGE - ditto
// Movespeed mods based on arms/legs quantity
@@ -31,8 +31,16 @@
/mob/living/update_config_movespeed()
update_move_intent_slowdown()
sprint_buffer_max = CONFIG_GET(number/movedelay/sprint_buffer_max)
sprint_buffer_regen_ds = CONFIG_GET(number/movedelay/sprint_buffer_regen_per_ds)
sprint_stamina_cost = CONFIG_GET(number/movedelay/sprint_stamina_cost)
return ..()
/mob/living/movement_delay(ignorewalk = 0)
. = ..()
if(!CHECK_MOBILITY(src, MOBILITY_STAND))
. += 6
/// whether or not we can slide under another living mob. defaults to if we're not dense. CanPass should check "overriding circumstances" like buckled mobs/having PASSMOB flag, etc.
/mob/living/proc/can_move_under_living(mob/living/other)
return !density
+79
View File
@@ -0,0 +1,79 @@
/mob/living/ComponentInitialize()
. = ..()
RegisterSignal(src, SIGNAL_TRAIT(TRAIT_SPRINT_LOCKED), .proc/update_sprint_lock)
/mob/living/proc/update_sprint_icon()
var/obj/screen/sprintbutton/S = locate() in hud_used?.static_inventory
S?.update_icon_state()
/mob/living/proc/update_hud_sprint_bar()
hud_used?.sprint_buffer?.update_to_mob(src)
/mob/living/proc/update_sprint_lock()
var/locked = HAS_TRAIT(src, TRAIT_SPRINT_LOCKED)
var/current = (combat_flags & COMBAT_FLAG_SPRINT_ACTIVE)
var/desired = (combat_flags & COMBAT_FLAG_SPRINT_TOGGLED)
if(locked)
if(current)
disable_sprint_mode(FALSE)
else
if(current)
if(!desired)
disable_sprint_mode(FALSE)
else
if(desired)
enable_sprint_mode(FALSE)
update_sprint_icon()
/mob/living/proc/enable_sprint_mode(update_icon = TRUE)
if(combat_flags & COMBAT_FLAG_SPRINT_ACTIVE)
return
ENABLE_BITFIELD(combat_flags, COMBAT_FLAG_SPRINT_ACTIVE)
if(update_icon)
update_sprint_icon()
/mob/living/proc/disable_sprint_mode(update_icon = TRUE)
if(!(combat_flags & COMBAT_FLAG_SPRINT_ACTIVE))
return
DISABLE_BITFIELD(combat_flags, COMBAT_FLAG_SPRINT_ACTIVE)
if(update_icon)
update_sprint_icon()
/mob/living/proc/enable_intentional_sprint_mode()
if((combat_flags & COMBAT_FLAG_SPRINT_TOGGLED) && (combat_flags & COMBAT_FLAG_SPRINT_ACTIVE))
return
ENABLE_BITFIELD(combat_flags, COMBAT_FLAG_SPRINT_TOGGLED)
if(!HAS_TRAIT(src, TRAIT_SPRINT_LOCKED) && !(combat_flags & COMBAT_FLAG_SPRINT_ACTIVE))
enable_sprint_mode(FALSE)
update_sprint_icon()
return TRUE
/mob/living/proc/disable_intentional_sprint_mode()
if(!(combat_flags & COMBAT_FLAG_SPRINT_TOGGLED) && !(combat_flags & COMBAT_FLAG_SPRINT_ACTIVE))
return
DISABLE_BITFIELD(combat_flags, COMBAT_FLAG_SPRINT_TOGGLED)
if(combat_flags & COMBAT_FLAG_SPRINT_ACTIVE)
disable_sprint_mode(FALSE)
update_sprint_icon()
/mob/living/proc/user_toggle_intentional_sprint_mode()
var/old = (combat_flags & COMBAT_FLAG_SPRINT_TOGGLED)
if(old)
disable_intentional_sprint_mode()
if((m_intent == MOVE_INTENT_RUN) && CHECK_ALL_MOBILITY(src, MOBILITY_STAND|MOBILITY_MOVE))
playsound_local(src, 'sound/misc/sprintdeactivate.ogg', 50, FALSE, pressure_affected = FALSE)
else
enable_intentional_sprint_mode()
if((m_intent == MOVE_INTENT_RUN) && CHECK_ALL_MOBILITY(src, MOBILITY_STAND|MOBILITY_MOVE))
playsound_local(src, 'sound/misc/sprintactivate.ogg', 50, FALSE, pressure_affected = FALSE)
/mob/living/proc/sprint_hotkey(targetstatus)
if(targetstatus != FORCE_BOOLEAN(combat_flags & COMBAT_FLAG_SPRINT_ACTIVE))
default_toggle_sprint()
/mob/living/proc/doSprintLossTiles(amount)
return
// Silicons have snowflake behavior.
/mob/living/proc/default_toggle_sprint()
return user_toggle_intentional_sprint_mode()
@@ -913,8 +913,8 @@
/obj/item/crowbar/cyborg,
/obj/item/reagent_containers/borghypo/syndicate,
/obj/item/twohanded/shockpaddles/syndicate,
/obj/item/healthanalyzer,
/obj/item/surgical_drapes,
/obj/item/healthanalyzer/advanced,
/obj/item/surgical_drapes/advanced,
/obj/item/retractor,
/obj/item/hemostat,
/obj/item/cautery,
@@ -12,3 +12,15 @@
/mob/living/silicon/robot/experience_pressure_difference(pressure_difference, direction)
if(!magpulse)
return ..()
/mob/living/silicon/robot/Move(NewLoc, direct)
. = ..()
if(. && (combat_flags & COMBAT_FLAG_SPRINT_ACTIVE) && !(movement_type & FLYING) && CHECK_ALL_MOBILITY(src, MOBILITY_STAND | MOBILITY_MOVE))
if(!(cell?.use(25)))
default_toggle_sprint(TRUE)
/mob/living/silicon/robot/movement_delay()
. = ..()
if(!resting && !(combat_flags & COMBAT_FLAG_SPRINT_ACTIVE))
. += 1
. += speed
@@ -0,0 +1,12 @@
/mob/living/silicon/robot/default_toggle_sprint(shutdown = FALSE)
var/current = (combat_flags & COMBAT_FLAG_SPRINT_ACTIVE)
if(current || shutdown || !cell || (cell.charge < 25) || !cansprint)
disable_intentional_sprint_mode()
if(CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND|MOBILITY_MOVE))
if(shutdown)
playsound_local(src, 'sound/effects/light_flicker.ogg', 50, FALSE, pressure_affected = FALSE)
playsound_local(src, 'sound/misc/sprintdeactivate.ogg', 50, FALSE, pressure_affected = FALSE)
else
enable_intentional_sprint_mode()
if(CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND|MOBILITY_MOVE))
playsound_local(src, 'sound/misc/sprintactivate.ogg', 50, FALSE, pressure_affected = FALSE)
@@ -15,6 +15,8 @@
speech_span = SPAN_ROBOT
flags_1 = PREVENT_CONTENTS_EXPLOSION_1 | HEAR_1
no_vore = TRUE
/// Enable sprint system but not stamina
combat_flags = COMBAT_FLAGS_STAMEXEMPT_YESSPRINT
var/datum/ai_laws/laws = null//Now... THEY ALL CAN ALL HAVE LAWS
var/last_lawchange_announce = 0
@@ -276,7 +276,7 @@ Auto Patrol[]"},
if(BOT_PREP_ARREST) // preparing to arrest target
// see if he got away. If he's no no longer adjacent or inside a closet or about to get up, we hunt again.
if(!Adjacent(target) || !isturf(target.loc) || !target.recoveringstam || target.getStaminaLoss() <= 120) // CIT CHANGE - replaces amountknockdown with recoveringstam and staminaloss checks
if(!Adjacent(target) || !isturf(target.loc) || !(target.combat_flags & COMBAT_FLAG_HARD_STAMCRIT) || target.getStaminaLoss() <= 120) // CIT CHANGE - replaces amountknockdown with recoveringstam and staminaloss checks
back_to_hunt()
return
@@ -303,7 +303,7 @@ Auto Patrol[]"},
back_to_idle()
return
if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && !target.recoveringstam && target.getStaminaLoss() <= 120)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again. CIT CHANGE - replaces amountknockdown with recoveringstam and staminaloss checks
if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && !(target.combat_flags & COMBAT_FLAG_HARD_STAMCRIT) && target.getStaminaLoss() <= 120)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again. CIT CHANGE - replaces amountknockdown with recoveringstam and staminaloss checks
back_to_hunt()
return
else
@@ -312,7 +312,7 @@ Auto Patrol: []"},
if(BOT_PREP_ARREST) // preparing to arrest target
// see if he got away. If he's no no longer adjacent or inside a closet or about to get up, we hunt again.
if( !Adjacent(target) || !isturf(target.loc) || target.getStaminaLoss() <= 120 || !target.recoveringstam) //CIT CHANGE - replaces amountknockdown with checks for stamina so secbots dont run into an infinite loop
if( !Adjacent(target) || !isturf(target.loc) || target.getStaminaLoss() <= 120 || !(target.combat_flags & COMBAT_FLAG_HARD_STAMCRIT)) //CIT CHANGE - replaces amountknockdown with checks for stamina so secbots dont run into an infinite loop
back_to_hunt()
return
@@ -339,7 +339,7 @@ Auto Patrol: []"},
back_to_idle()
return
if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && !target.recoveringstam && target.getStaminaLoss() <= 120)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again. CIT CHANGE - replaces amountknockdown with recoveringstam and staminaloss check
if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && !(target.combat_flags & COMBAT_FLAG_HARD_STAMCRIT) && target.getStaminaLoss() <= 120)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again. CIT CHANGE - replaces amountknockdown with recoveringstam and staminaloss check
back_to_hunt()
return
else //Try arresting again if the target escapes.
@@ -82,7 +82,7 @@
/datum/outfit/piratecorpse
name = "Pirate Corpse"
uniform = /obj/item/clothing/under/pirate
uniform = /obj/item/clothing/under/costume/pirate
shoes = /obj/item/clothing/shoes/jackboots
glasses = /obj/item/clothing/glasses/eyepatch
head = /obj/item/clothing/head/bandana
@@ -106,7 +106,7 @@
/datum/outfit/russiancorpse
name = "Russian Corpse"
uniform = /obj/item/clothing/under/soviet
uniform = /obj/item/clothing/under/costume/soviet
shoes = /obj/item/clothing/shoes/jackboots
head = /obj/item/clothing/head/bearpelt
gloves = /obj/item/clothing/gloves/color/black
@@ -142,7 +142,7 @@
/datum/outfit/russiancorpse/officer
name = "Russian Officer Corpse"
uniform = /obj/item/clothing/under/rank/security/navyblue/russian
uniform = /obj/item/clothing/under/costume/russian_officer
suit = /obj/item/clothing/suit/armor/navyblue/russian
shoes = /obj/item/clothing/shoes/combat
ears = /obj/item/radio/headset
@@ -174,7 +174,7 @@
/datum/outfit/nanotrasensoldiercorpse2
name = "NT Private Security Officer Corpse"
uniform = /obj/item/clothing/under/rank/security
uniform = /obj/item/clothing/under/rank/security/officer
suit = /obj/item/clothing/suit/armor/vest
shoes = /obj/item/clothing/shoes/combat
gloves = /obj/item/clothing/gloves/combat
@@ -195,7 +195,7 @@
/datum/outfit/cat_butcher
name = "Cat Butcher Uniform"
uniform = /obj/item/clothing/under/rank/medical/green
uniform = /obj/item/clothing/under/rank/medical/doctor/green
suit = /obj/item/clothing/suit/apron/surgical
shoes = /obj/item/clothing/shoes/sneakers/white
gloves = /obj/item/clothing/gloves/color/latex/nitrile
@@ -5,10 +5,10 @@
icon_living = "bumbles"
icon_dead = "bumbles_dead"
turns_per_move = 1
response_help = "shoos"
response_help = "pets"
response_disarm = "brushes aside"
response_harm = "squashes"
speak_emote = list("bzzzs")
speak_emote = list("buzzes")
maxHealth = 100
health = 100
harm_intent_damage = 1
@@ -20,10 +20,12 @@
mob_size = MOB_SIZE_TINY
mob_biotypes = MOB_ORGANIC|MOB_BEAST
gold_core_spawnable = FRIENDLY_SPAWN
verb_say = "bzzs"
verb_ask = "bzzs inquisitively"
verb_exclaim = "bzzs intensely"
verb_yell = "bzzs intensely"
verb_say = "buzzs"
verb_ask = "buzzes inquisitively"
verb_exclaim = "buzzes intensely"
verb_yell = "buzzes intensely"
emote_see = list("buzzes.", "makes a loud buzz.", "rolls several times.", "buzzes happily.")
speak_chance = 1
/mob/living/simple_animal/pet/bumbles/Initialize()
. = ..()
@@ -44,3 +46,22 @@
/mob/living/simple_animal/pet/bumbles/bee_friendly()
return TRUE //treaty signed at the Beeneeva convention
/mob/living/simple_animal/pet/bumbles/handle_automated_movement()
. = ..()
if(!isturf(loc) || !CHECK_MOBILITY(src, MOBILITY_MOVE) || buckled)
return
if(!resting && prob(1))
emote("me", EMOTE_VISIBLE, pick("curls up on the surface below ", "is looking very sleepy.", "buzzes softly ", "looks around for a flower nap "))
set_resting(TRUE)
else if (resting && prob(1))
emote("me", EMOTE_VISIBLE, pick("wakes up with a smiling buzz.", "rolls upside down before waking up.", "stops resting."))
set_resting(FALSE)
/mob/living/simple_animal/pet/bumbles/update_mobility()
. = ..()
if(stat != DEAD)
if(!CHECK_MOBILITY(src, MOBILITY_STAND))
icon_state = "[icon_living]_rest"
else
icon_state = "[icon_living]"
regenerate_icons()
@@ -14,8 +14,8 @@ The colossus' true danger lies in its ranged capabilities. It fires immensely da
At 33% health, the colossus gains an additional attack:
4. The colossus fires two spirals of death bolts, spinning in opposite directions.
When a colossus dies, it leaves behind a chunk of glowing crystal known as a black box. Anything placed inside will carry over into future rounds.
For instance, you could place a bag of holding into the black box, and then kill another colossus next round and retrieve the bag of holding from inside.
When a colossus dies, it leaves behind an anomalous crystal structure. This crystal can be activated in one of multiple ways and has an effect randomly chosen from a list.
It also drops its vocal cords, which, when inserted into someone's mouth, allow them to activate some specific phrases that cause effects, such as sleeping to people nearby.
Difficulty: Very Hard
@@ -161,7 +161,7 @@ While using this makes the system rely on OnFire, it still gives options for tim
INVOKE_ASYNC(src, .proc/arena_checks)
if(TUMOR_INACTIVE)
activity = TUMOR_ACTIVE
var/mob/dead/observer/elitemind = null
var/mob/elitemind = null
visible_message("<span class='boldwarning'>[src] begins to convulse. Your instincts tell you to step back.</span>")
activator = user
if(!boosted)
@@ -39,7 +39,8 @@
animal_species = /mob/living/simple_animal/hostile/asteroid/gutlunch
childtype = list(/mob/living/simple_animal/hostile/asteroid/gutlunch/gubbuck = 45, /mob/living/simple_animal/hostile/asteroid/gutlunch/guthen = 55)
wanted_objects = list(/obj/effect/decal/cleanable/blood/gibs/xeno, /obj/effect/decal/cleanable/blood/gibs/)
wanted_objects = list(/obj/effect/decal/cleanable/blood/gibs/xeno, /obj/effect/decal/cleanable/blood/gibs/, /obj/item/bodypart, /obj/item/organ/appendix, /obj/item/organ/ears, /obj/item/organ/eyes, /obj/item/organ/heart, /obj/item/organ/liver, \
/obj/item/organ/lungs, /obj/item/organ/stomach, /obj/item/organ/tongue) // So we dont eat implants or brains. Still can eat robotic stuff thats subtyped of base line but thats a issue for a nother day.
var/obj/item/udder/gutlunch/udder = null
/mob/living/simple_animal/hostile/asteroid/gutlunch/Initialize()
@@ -287,7 +287,7 @@
head = /obj/item/clothing/head/helmet/space/plasmaman
belt = /obj/item/tank/internals/plasmaman/belt
else
uniform = /obj/item/clothing/under/rank/miner/lavaland
uniform = /obj/item/clothing/under/rank/cargo/miner/lavaland
if (prob(4))
belt = pickweight(list(/obj/item/storage/belt/mining = 2, /obj/item/storage/belt/mining/alt = 2))
else if(prob(10))
@@ -306,7 +306,7 @@
l_pocket = pickweight(list(/obj/item/stack/spacecash/c1000 = 7, /obj/item/reagent_containers/hypospray/medipen/survival = 2, /obj/item/borg/upgrade/modkit/cooldown = 1 ))
if("Ashwalker")
mob_species = /datum/species/lizard/ashwalker
uniform = /obj/item/clothing/under/gladiator/ash_walker
uniform = /obj/item/clothing/under/costume/gladiator/ash_walker
if(prob(95))
head = /obj/item/clothing/head/helmet/gladiator
else
@@ -346,7 +346,7 @@
l_pocket = pick(list(/obj/item/crowbar/power, /obj/item/wrench/power, /obj/item/weldingtool/experimental))
if("YeOlde")
mob_gender = FEMALE
uniform = /obj/item/clothing/under/maid
uniform = /obj/item/clothing/under/costume/maid
gloves = /obj/item/clothing/gloves/color/white
shoes = /obj/item/clothing/shoes/laceup
head = /obj/item/clothing/head/helmet/knight
@@ -369,7 +369,7 @@
back = /obj/item/tank/internals/oxygen
mask = /obj/item/clothing/mask/breath
if("Cultist")
uniform = /obj/item/clothing/under/roman
uniform = /obj/item/clothing/under/costume/roman
suit = /obj/item/clothing/suit/cultrobes
head = /obj/item/clothing/head/culthood
suit_store = /obj/item/tome
@@ -378,7 +378,7 @@
glasses = /obj/item/clothing/glasses/hud/health/night/cultblind
backpack_contents = list(/obj/item/reagent_containers/glass/beaker/unholywater = 1, /obj/item/cult_shift = 1, /obj/item/flashlight/flare/culttorch = 1, /obj/item/stack/sheet/runed_metal = 15)
if("Lavaknight")
uniform = /obj/item/clothing/under/assistantformal
uniform = /obj/item/clothing/under/misc/assistantformal
mask = /obj/item/clothing/mask/breath
shoes = /obj/item/clothing/shoes/sneakers/black
r_pocket = /obj/item/melee/transforming/energy/sword/cx/broken
+224 -148
View File
@@ -30,45 +30,48 @@
/mob/living/proc/Stun(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_STUN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/stun/S = IsStun()
if(S)
S.duration = max(world.time + amount, S.duration)
else if(amount > 0)
S = apply_status_effect(STATUS_EFFECT_STUN, amount, updating)
return S
if(!ignore_canstun && (!(status_flags & CANSTUN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE)))
return
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/stun/S = IsStun()
if(S)
S.duration = max(world.time + amount, S.duration)
else if(amount > 0)
S = apply_status_effect(STATUS_EFFECT_STUN, amount, updating)
return S
/mob/living/proc/SetStun(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_STUN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
var/datum/status_effect/incapacitating/stun/S = IsStun()
if(amount <= 0)
if(S)
qdel(S)
if(!ignore_canstun && (!(status_flags & CANSTUN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE)))
return
var/datum/status_effect/incapacitating/stun/S = IsStun()
if(amount <= 0)
if(S)
qdel(S)
else
if(absorb_stun(amount, ignore_canstun))
return
if(S)
S.duration = world.time + amount
else
if(absorb_stun(amount, ignore_canstun))
return
if(S)
S.duration = world.time + amount
else
S = apply_status_effect(STATUS_EFFECT_STUN, amount, updating)
return S
S = apply_status_effect(STATUS_EFFECT_STUN, amount, updating)
return S
/mob/living/proc/AdjustStun(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_STUN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/stun/S = IsStun()
if(S)
S.duration += amount
else if(amount > 0)
S = apply_status_effect(STATUS_EFFECT_STUN, amount, updating)
return S
if(!ignore_canstun && (!(status_flags & CANSTUN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE)))
return
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/stun/S = IsStun()
if(S)
S.duration += amount
else if(amount > 0)
S = apply_status_effect(STATUS_EFFECT_STUN, amount, updating)
return S
///////////////////////////////// KNOCKDOWN /////////////////////////////////////
@@ -84,45 +87,48 @@
/mob/living/proc/Knockdown(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_KNOCKDOWN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
if(K)
K.duration = max(world.time + amount, K.duration)
else if(amount > 0)
K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, amount, updating)
return K
if(!ignore_canstun && (!(status_flags & CANKNOCKDOWN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE)))
return
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
if(K)
K.duration = max(world.time + amount, K.duration)
else if(amount > 0)
K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, amount, updating)
return K
/mob/living/proc/SetKnockdown(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_KNOCKDOWN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
if(amount <= 0)
if(K)
qdel(K)
if(!ignore_canstun && (!(status_flags & CANKNOCKDOWN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE)))
return
var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
if(amount <= 0)
if(K)
qdel(K)
else
if(absorb_stun(amount, ignore_canstun))
return
if(K)
K.duration = world.time + amount
else
if(absorb_stun(amount, ignore_canstun))
return
if(K)
K.duration = world.time + amount
else
K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, amount, updating)
return K
K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, amount, updating)
return K
/mob/living/proc/AdjustKnockdown(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_KNOCKDOWN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
if(K)
K.duration += amount
else if(amount > 0)
K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, amount, updating)
return K
if(!ignore_canstun && (!(status_flags & CANKNOCKDOWN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE)))
return
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
if(K)
K.duration += amount
else if(amount > 0)
K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, amount, updating)
return K
///////////////////////////////// IMMOBILIZED ////////////////////////////////////
/mob/living/proc/IsImmobilized() //If we're immobilized
@@ -137,45 +143,48 @@
/mob/living/proc/Immobilize(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_IMMOBILIZE, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/immobilized/I = IsImmobilized()
if(I)
I.duration = max(world.time + amount, I.duration)
else if(amount > 0)
I = apply_status_effect(STATUS_EFFECT_IMMOBILIZED, amount, updating)
return I
if(!ignore_canstun && (!(status_flags & CANKNOCKDOWN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE)))
return
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/immobilized/I = IsImmobilized()
if(I)
I.duration = max(world.time + amount, I.duration)
else if(amount > 0)
I = apply_status_effect(STATUS_EFFECT_IMMOBILIZED, amount, updating)
return I
/mob/living/proc/SetImmobilized(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_IMMOBILIZE, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
var/datum/status_effect/incapacitating/immobilized/I = IsImmobilized()
if(amount <= 0)
if(I)
qdel(I)
if(!ignore_canstun && (!(status_flags & CANKNOCKDOWN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE)))
return
var/datum/status_effect/incapacitating/immobilized/I = IsImmobilized()
if(amount <= 0)
if(I)
qdel(I)
else
if(absorb_stun(amount, ignore_canstun))
return
if(I)
I.duration = world.time + amount
else
if(absorb_stun(amount, ignore_canstun))
return
if(I)
I.duration = world.time + amount
else
I = apply_status_effect(STATUS_EFFECT_IMMOBILIZED, amount, updating)
return I
I = apply_status_effect(STATUS_EFFECT_IMMOBILIZED, amount, updating)
return I
/mob/living/proc/AdjustImmobilized(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_IMMOBILIZE, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/immobilized/I = IsImmobilized()
if(I)
I.duration += amount
else if(amount > 0)
I = apply_status_effect(STATUS_EFFECT_IMMOBILIZED, amount, updating)
return I
if(!ignore_canstun && (!(status_flags & CANKNOCKDOWN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE)))
return
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/immobilized/I = IsImmobilized()
if(I)
I.duration += amount
else if(amount > 0)
I = apply_status_effect(STATUS_EFFECT_IMMOBILIZED, amount, updating)
return I
///////////////////////////////// PARALYZED //////////////////////////////////
/mob/living/proc/IsParalyzed() //If we're immobilized
@@ -190,45 +199,48 @@
/mob/living/proc/Paralyze(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_PARALYZE, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/paralyzed/P = IsParalyzed(FALSE)
if(P)
P.duration = max(world.time + amount, P.duration)
else if(amount > 0)
P = apply_status_effect(STATUS_EFFECT_PARALYZED, amount, updating)
return P
if(!ignore_canstun && (!(status_flags & CANKNOCKDOWN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE)))
return
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/paralyzed/P = IsParalyzed(FALSE)
if(P)
P.duration = max(world.time + amount, P.duration)
else if(amount > 0)
P = apply_status_effect(STATUS_EFFECT_PARALYZED, amount, updating)
return P
/mob/living/proc/SetParalyzed(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_PARALYZE, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
var/datum/status_effect/incapacitating/paralyzed/P = IsParalyzed(FALSE)
if(amount <= 0)
if(P)
qdel(P)
if(!ignore_canstun && (!(status_flags & CANKNOCKDOWN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE)))
return
var/datum/status_effect/incapacitating/paralyzed/P = IsParalyzed(FALSE)
if(amount <= 0)
if(P)
qdel(P)
else
if(absorb_stun(amount, ignore_canstun))
return
if(P)
P.duration = world.time + amount
else
if(absorb_stun(amount, ignore_canstun))
return
if(P)
P.duration = world.time + amount
else
P = apply_status_effect(STATUS_EFFECT_PARALYZED, amount, updating)
return P
P = apply_status_effect(STATUS_EFFECT_PARALYZED, amount, updating)
return P
/mob/living/proc/AdjustParalyzed(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_PARALYZE, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/paralyzed/P = IsParalyzed(FALSE)
if(P)
P.duration += amount
else if(amount > 0)
P = apply_status_effect(STATUS_EFFECT_PARALYZED, amount, updating)
return P
if(!ignore_canstun && (!(status_flags & CANKNOCKDOWN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE)))
return
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/paralyzed/P = IsParalyzed(FALSE)
if(P)
P.duration += amount
else if(amount > 0)
P = apply_status_effect(STATUS_EFFECT_PARALYZED, amount, updating)
return P
///////////////////////////////// DAZED ////////////////////////////////////
/mob/living/proc/IsDazed() //If we're Dazed
@@ -243,45 +255,104 @@
/mob/living/proc/Daze(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_DAZE, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/dazed/I = IsDazed()
if(I)
I.duration = max(world.time + amount, I.duration)
else if(amount > 0)
I = apply_status_effect(STATUS_EFFECT_DAZED, amount, updating)
return I
if(!ignore_canstun && (!(status_flags & CANKNOCKDOWN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE)))
return
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/dazed/I = IsDazed()
if(I)
I.duration = max(world.time + amount, I.duration)
else if(amount > 0)
I = apply_status_effect(STATUS_EFFECT_DAZED, amount, updating)
return I
/mob/living/proc/SetDazed(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_DAZE, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
var/datum/status_effect/incapacitating/dazed/I = IsDazed()
if(amount <= 0)
if(I)
qdel(I)
if(!ignore_canstun && (!(status_flags & CANKNOCKDOWN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE)))
return
var/datum/status_effect/incapacitating/dazed/I = IsDazed()
if(amount <= 0)
if(I)
qdel(I)
else
if(absorb_stun(amount, ignore_canstun))
return
if(I)
I.duration = world.time + amount
else
if(absorb_stun(amount, ignore_canstun))
return
if(I)
I.duration = world.time + amount
else
I = apply_status_effect(STATUS_EFFECT_DAZED, amount, updating)
return I
I = apply_status_effect(STATUS_EFFECT_DAZED, amount, updating)
return I
/mob/living/proc/AdjustDazed(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_DAZE, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
if(!ignore_canstun && (!(status_flags & CANKNOCKDOWN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE)))
return
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/dazed/I = IsDazed()
if(I)
I.duration += amount
else if(amount > 0)
I = apply_status_effect(STATUS_EFFECT_DAZED, amount, updating)
return I
///////////////////////////////// STAGGERED ////////////////////////////////////
/mob/living/proc/IsStaggered() //If we're Staggered
return has_status_effect(STATUS_EFFECT_STAGGERED)
/mob/living/proc/AmountStaggered() //How many deciseconds remain in our Staggered status effect
var/datum/status_effect/staggered/I = IsStaggered()
if(I)
return I.duration - world.time
return 0
/mob/living/proc/Stagger(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_STAGGER, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(!ignore_canstun && (!(status_flags & CANKNOCKDOWN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE)))
return
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/staggered/I = IsStaggered()
if(I)
I.duration = max(world.time + amount, I.duration)
else if(amount > 0)
I = apply_status_effect(STATUS_EFFECT_STAGGERED, amount, updating)
return I
/mob/living/proc/SetStaggered(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_STAGGER, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(!ignore_canstun && (!(status_flags & CANKNOCKDOWN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE)))
return
var/datum/status_effect/staggered/I = IsStaggered()
if(amount <= 0)
if(I)
qdel(I)
else
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/dazed/I = IsDazed()
if(I)
I.duration += amount
else if(amount > 0)
I = apply_status_effect(STATUS_EFFECT_DAZED, amount, updating)
return I
I.duration = world.time + amount
else
I = apply_status_effect(STATUS_EFFECT_STAGGERED, amount, updating)
return I
/mob/living/proc/AdjustStaggered(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_STAGGER, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(!ignore_canstun && (!(status_flags & CANKNOCKDOWN) || HAS_TRAIT(src, TRAIT_STUNIMMUNE)))
return
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/staggered/I = IsStaggered()
if(I)
I.duration += amount
else if(amount > 0)
I = apply_status_effect(STATUS_EFFECT_STAGGERED, amount, updating)
return I
//Blanket
/mob/living/proc/AllImmobility(amount, updating, ignore_canstun = FALSE)
@@ -290,6 +361,7 @@
Stun(amount, FALSE, ignore_canstun)
Immobilize(amount, FALSE, ignore_canstun)
Daze(amount, FALSE, ignore_canstun)
Stagger(amount, FALSE, ignore_canstun)
if(updating)
update_mobility()
@@ -299,6 +371,7 @@
SetStun(amount, FALSE, ignore_canstun)
SetImmobilized(amount, FALSE, ignore_canstun)
SetDazed(amount, FALSE, ignore_canstun)
SetStaggered(amount, FALSE, ignore_canstun)
if(updating)
update_mobility()
@@ -308,6 +381,7 @@
AdjustStun(amount, FALSE, ignore_canstun)
AdjustImmobilized(amount, FALSE, ignore_canstun)
AdjustDazed(amount, FALSE, ignore_canstun)
AdjustStaggered(amount, FALSE, ignore_canstun)
if(updating)
update_mobility()
@@ -323,11 +397,13 @@
SetImmobilized(amount, FALSE, ignore_canstun)
if(AmountDazed() > amount)
SetImmobilized(amount, FALSE, ignore_canstun)
if(AmountStaggered() > amount)
SetStaggered(amount, FALSE, ignore_canstun)
if(updating)
update_mobility()
/mob/living/proc/HighestImmobilityAmount()
return max(max(max(max(AmountStun(), AmountKnockdown()), AmountParalyzed()), AmountImmobilized()), AmountDazed())
return max(AmountStun(), AmountKnockdown(), AmountParalyzed(), AmountImmobilized(), AmountDazed(), AmountStaggered())
//////////////////UNCONSCIOUS
/mob/living/proc/IsUnconscious() //If we're unconscious
+2 -2
View File
@@ -443,10 +443,10 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
var/datum/antagonist/A = M.mind.has_antag_datum(/datum/antagonist/)
if(A)
poll_message = "[poll_message] Status:[A.name]."
var/list/mob/dead/observer/candidates = pollCandidatesForMob(poll_message, ROLE_PAI, null, FALSE, 100, M)
var/list/mob/candidates = pollCandidatesForMob(poll_message, ROLE_PAI, null, FALSE, 100, M)
if(LAZYLEN(candidates))
var/mob/dead/observer/C = pick(candidates)
var/mob/C = pick(candidates)
to_chat(M, "Your mob has been taken over by a ghost!")
message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(M)])")
M.ghostize(FALSE, TRUE)