things with stuff (#6233)
* buncha things from upstream * datums globals, onclick * datums * game folder, holy shit mirror bot why * modules * icons * dme * compiles cleanly * tools purge * updates maps * double check just because. and wew lad * incidentally, this needs more work first * some things * weh * sound cleanup and icons * reeeee * compile issues * oh look, fresh code sync * cleans up some unused icons * dirty vars * reeeeeeeeeeeeeeee * wew lad. fuck off with this already
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
|
||||
/mob/living/carbon/alien/humanoid/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect)
|
||||
if(!no_effect && !visual_effect_icon)
|
||||
visual_effect_icon = ATTACK_EFFECT_CLAW
|
||||
..()
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
new /datum/forced_movement(src, get_step_away(user,src, 30), 1)
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/alien/larva/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
|
||||
/mob/living/carbon/alien/larva/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect)
|
||||
if(!no_effect && !visual_effect_icon)
|
||||
visual_effect_icon = ATTACK_EFFECT_BITE
|
||||
..()
|
||||
|
||||
@@ -53,14 +53,14 @@
|
||||
return O.attack_obj(src, user)
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attack_alien(mob/user) //can be picked up by aliens
|
||||
attack_hand(user)
|
||||
return
|
||||
return attack_hand(user)
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/clothing/mask/facehugger/attack_hand(mob/user)
|
||||
if((stat == CONSCIOUS && !sterile) && !isalien(user))
|
||||
if(Leap(user))
|
||||
return
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attack(mob/living/M, mob/user)
|
||||
..()
|
||||
|
||||
@@ -148,11 +148,11 @@
|
||||
if(istype(target, /obj/screen))
|
||||
return
|
||||
|
||||
//CIT CHANGES - makes it impossible to throw while in stamina softcrit
|
||||
if(staminaloss >= STAMINA_SOFTCRIT)
|
||||
//CIT CHANGES - makes it impossible to throw while in stamina softcrit
|
||||
if(getStaminaLoss())
|
||||
to_chat(src, "<span class='warning'>You're too exhausted.</span>")
|
||||
return
|
||||
//END OF CIT CHANGES
|
||||
//END OF CIT CHANGES
|
||||
|
||||
var/atom/movable/thrown_thing
|
||||
var/obj/item/I = src.get_active_held_item()
|
||||
@@ -421,7 +421,7 @@
|
||||
if(modifier < 100)
|
||||
dropItemToGround(I)
|
||||
//END OF CIT CHANGES
|
||||
|
||||
|
||||
switch(rand(1,100)+modifier) //91-100=Nothing special happens
|
||||
if(-INFINITY to 0) //attack yourself
|
||||
I.attack(src,src)
|
||||
@@ -521,11 +521,14 @@
|
||||
return
|
||||
var/total_burn = 0
|
||||
var/total_brute = 0
|
||||
var/total_stamina = 0
|
||||
for(var/X in bodyparts) //hardcoded to streamline things a bit
|
||||
var/obj/item/bodypart/BP = X
|
||||
total_brute += BP.brute_dam
|
||||
total_burn += BP.burn_dam
|
||||
total_stamina += BP.stamina_dam
|
||||
health = maxHealth - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute
|
||||
staminaloss = total_stamina
|
||||
update_stat()
|
||||
if(((maxHealth - total_burn) < HEALTH_THRESHOLD_DEAD) && stat == DEAD )
|
||||
become_husk("burn")
|
||||
@@ -856,6 +859,16 @@
|
||||
O.held_index = r_arm_index_next //2, 4, 6, 8...
|
||||
hand_bodyparts += O
|
||||
|
||||
/mob/living/carbon/do_after_coefficent()
|
||||
. = ..()
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, src) //Currently, only carbons or higher use mood, move this once that changes.
|
||||
if(mood)
|
||||
switch(mood.sanity) //Alters do_after delay based on how sane you are
|
||||
if(SANITY_INSANE to SANITY_DISTURBED)
|
||||
. *= 1.25
|
||||
if(SANITY_NEUTRAL to SANITY_GREAT)
|
||||
. *= 0.90
|
||||
|
||||
|
||||
/mob/living/carbon/proc/create_internal_organs()
|
||||
for(var/X in internal_organs)
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
I.SendSignal(COMSIG_ITEM_ATTACK_ZONE, src, user, affecting)
|
||||
send_item_attack_message(I, user, affecting.name)
|
||||
if(I.force)
|
||||
//CIT CHANGES START HERE - combatmode and resting checks
|
||||
//CIT CHANGES START HERE - combatmode and resting checks
|
||||
var/totitemdamage = I.force
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/tempcarb = user
|
||||
@@ -120,6 +120,7 @@
|
||||
/mob/living/carbon/attack_drone(mob/living/simple_animal/drone/user)
|
||||
return //so we don't call the carbon's attack_hand().
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/mob/living/carbon/attack_hand(mob/living/carbon/human/user)
|
||||
|
||||
for(var/thing in diseases)
|
||||
@@ -270,11 +271,18 @@
|
||||
return
|
||||
M.visible_message("<span class='notice'>[M] shakes [src] trying to get [p_them()] up!</span>", \
|
||||
"<span class='notice'>You shake [src] trying to get [p_them()] up!</span>")
|
||||
|
||||
else if(check_zone(M.zone_selected) == "head")
|
||||
M.visible_message("<span class='notice'>[M] gives [src] a pat on the head to make [p_them()] feel better!</span>", \
|
||||
"<span class='notice'>You give [src] a pat on the head to make [p_them()] feel better!</span>")
|
||||
if(dna && dna.species && ((("tail_lizard" || "tail_human" || "mam_tail") in dna.species.mutant_bodyparts && (dna.features["tail_lizard"] || dna.features["tail_human"] || dna.features["mam_tail"])!= "None")))
|
||||
if(dna && dna.species && ("tail_lizard" in dna.species.mutant_bodyparts) && (dna.features["tail_lizard"])!= "None")
|
||||
emote("wag") //lewd
|
||||
else if(dna && dna.species && ("tail_human" in dna.species.mutant_bodyparts) && (dna.features["tail_human"])!= "None")
|
||||
emote("wag")
|
||||
else if(dna && dna.species && ("mam_tail" in dna.species.mutant_bodyparts) && (dna.features["mam_tail"])!= "None")
|
||||
emote("wag")
|
||||
SendSignal(COMSIG_ADD_MOOD_EVENT, "headpat", /datum/mood_event/headpat)
|
||||
|
||||
else
|
||||
M.visible_message("<span class='notice'>[M] hugs [src] to make [p_them()] feel better!</span>", \
|
||||
"<span class='notice'>You hug [src] to make [p_them()] feel better!</span>")
|
||||
|
||||
@@ -35,13 +35,17 @@
|
||||
if(CLONE)
|
||||
adjustCloneLoss(damage * hit_percent)
|
||||
if(STAMINA)
|
||||
adjustStaminaLoss(damage * hit_percent)
|
||||
if(BP)
|
||||
if(BP.receive_damage(0, 0, damage * hit_percent))
|
||||
update_damage_overlays()
|
||||
else
|
||||
adjustStaminaLoss(damage * hit_percent)
|
||||
if(BRAIN)
|
||||
adjustBrainLoss(damage * hit_percent)
|
||||
//citadel code
|
||||
if(AROUSAL)
|
||||
adjustArousalLoss(damage * hit_percent)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
//These procs fetch a cumulative total damage from all bodyparts
|
||||
@@ -64,21 +68,20 @@
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
if(amount > 0)
|
||||
take_overall_damage(amount, 0, updating_health)
|
||||
take_overall_damage(amount, 0, 0, updating_health)
|
||||
else
|
||||
heal_overall_damage(-amount, 0, 0, 1, updating_health)
|
||||
heal_overall_damage(abs(amount), 0, 0, FALSE, TRUE, updating_health)
|
||||
return amount
|
||||
|
||||
/mob/living/carbon/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
if(amount > 0)
|
||||
take_overall_damage(0, amount, updating_health)
|
||||
take_overall_damage(0, amount, 0, updating_health)
|
||||
else
|
||||
heal_overall_damage(0, -amount, 0, 1, updating_health)
|
||||
heal_overall_damage(0, abs(amount), 0, FALSE, TRUE, updating_health)
|
||||
return amount
|
||||
|
||||
|
||||
/mob/living/carbon/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && has_trait(TRAIT_TOXINLOVER)) //damage becomes healing and healing becomes damage
|
||||
amount = -amount
|
||||
@@ -88,14 +91,36 @@
|
||||
blood_volume -= amount
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/getStaminaLoss()
|
||||
. = 0
|
||||
for(var/X in bodyparts)
|
||||
var/obj/item/bodypart/BP = X
|
||||
. += BP.stamina_dam
|
||||
|
||||
/mob/living/carbon/adjustStaminaLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
if(amount > 0)
|
||||
take_overall_damage(0, 0, amount, updating_health)
|
||||
else
|
||||
heal_overall_damage(0, 0, abs(amount), FALSE, FALSE, updating_health)
|
||||
return amount
|
||||
|
||||
/mob/living/carbon/setStaminaLoss(amount, updating = TRUE, forced = FALSE)
|
||||
var/current = getStaminaLoss()
|
||||
var/diff = amount - current
|
||||
if(!diff)
|
||||
return
|
||||
adjustStaminaLoss(diff, updating, forced)
|
||||
|
||||
////////////////////////////////////////////
|
||||
|
||||
//Returns a list of damaged bodyparts
|
||||
/mob/living/carbon/proc/get_damaged_bodyparts(brute, burn)
|
||||
/mob/living/carbon/proc/get_damaged_bodyparts(brute = FALSE, burn = FALSE, stamina = FALSE)
|
||||
var/list/obj/item/bodypart/parts = list()
|
||||
for(var/X in bodyparts)
|
||||
var/obj/item/bodypart/BP = X
|
||||
if((brute && BP.brute_dam) || (burn && BP.burn_dam))
|
||||
if((brute && BP.brute_dam) || (burn && BP.burn_dam) || (stamina && BP.stamina_dam))
|
||||
parts += BP
|
||||
return parts
|
||||
|
||||
@@ -111,90 +136,79 @@
|
||||
//Heals ONE bodypart randomly selected from damaged ones.
|
||||
//It automatically updates damage overlays if necessary
|
||||
//It automatically updates health status
|
||||
/mob/living/carbon/heal_bodypart_damage(brute, burn, only_robotic = 0, only_organic = 1)
|
||||
/mob/living/carbon/heal_bodypart_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE, only_robotic = FALSE, only_organic = TRUE)
|
||||
var/list/obj/item/bodypart/parts = get_damaged_bodyparts(brute,burn)
|
||||
if(!parts.len)
|
||||
return
|
||||
var/obj/item/bodypart/picked = pick(parts)
|
||||
if(picked.heal_damage(brute, burn, only_robotic, only_organic))
|
||||
if(picked.heal_damage(brute, burn, stamina, only_robotic, only_organic))
|
||||
update_damage_overlays()
|
||||
|
||||
//Damages ONE bodypart randomly selected from damagable ones.
|
||||
//It automatically updates damage overlays if necessary
|
||||
//It automatically updates health status
|
||||
/mob/living/carbon/take_bodypart_damage(brute, burn)
|
||||
/mob/living/carbon/take_bodypart_damage(brute = 0, burn = 0, stamina = 0)
|
||||
var/list/obj/item/bodypart/parts = get_damageable_bodyparts()
|
||||
if(!parts.len)
|
||||
return
|
||||
var/obj/item/bodypart/picked = pick(parts)
|
||||
if(picked.receive_damage(brute,burn))
|
||||
if(picked.receive_damage(brute, burn, stamina))
|
||||
update_damage_overlays()
|
||||
|
||||
|
||||
//Heal MANY bodyparts, in random order
|
||||
/mob/living/carbon/heal_overall_damage(brute, burn, only_robotic = 0, only_organic = 1, updating_health = 1)
|
||||
var/list/obj/item/bodypart/parts = get_damaged_bodyparts(brute,burn)
|
||||
/mob/living/carbon/heal_overall_damage(brute = 0, burn = 0, stamina = 0, only_robotic = FALSE, only_organic = TRUE, updating_health = TRUE)
|
||||
var/list/obj/item/bodypart/parts = get_damaged_bodyparts(brute, burn, stamina)
|
||||
|
||||
var/update = 0
|
||||
while(parts.len && (brute>0 || burn>0) )
|
||||
var/update = NONE
|
||||
while(parts.len && (brute > 0 || burn > 0 || stamina > 0))
|
||||
var/obj/item/bodypart/picked = pick(parts)
|
||||
|
||||
var/brute_was = picked.brute_dam
|
||||
var/burn_was = picked.burn_dam
|
||||
var/stamina_was = picked.stamina_dam
|
||||
|
||||
update |= picked.heal_damage(brute,burn, only_robotic, only_organic, 0)
|
||||
update |= picked.heal_damage(brute, burn, stamina, only_robotic, only_organic, FALSE)
|
||||
|
||||
brute -= (brute_was-picked.brute_dam)
|
||||
burn -= (burn_was-picked.burn_dam)
|
||||
brute -= (brute_was - picked.brute_dam)
|
||||
burn -= (burn_was - picked.burn_dam)
|
||||
stamina -= (stamina_was - picked.stamina_dam)
|
||||
|
||||
parts -= picked
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
if(update)
|
||||
update_damage_overlays()
|
||||
update_stamina() //CIT CHANGE - makes sure update_stamina() always gets called after a health update
|
||||
|
||||
// damage MANY bodyparts, in random order
|
||||
/mob/living/carbon/take_overall_damage(brute, burn, updating_health = 1)
|
||||
/mob/living/carbon/take_overall_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return //godmode
|
||||
|
||||
var/list/obj/item/bodypart/parts = get_damageable_bodyparts()
|
||||
var/update = 0
|
||||
while(parts.len && (brute>0 || burn>0) )
|
||||
while(parts.len && (brute > 0 || burn > 0 || stamina > 0))
|
||||
var/obj/item/bodypart/picked = pick(parts)
|
||||
var/brute_per_part = round(brute/parts.len, 0.01)
|
||||
var/burn_per_part = round(burn/parts.len, 0.01)
|
||||
var/stamina_per_part = round(stamina/parts.len, 0.01)
|
||||
|
||||
var/brute_was = picked.brute_dam
|
||||
var/burn_was = picked.burn_dam
|
||||
var/stamina_was = picked.stamina_dam
|
||||
|
||||
|
||||
update |= picked.receive_damage(brute_per_part,burn_per_part, 0)
|
||||
update |= picked.receive_damage(brute_per_part, burn_per_part, stamina_per_part, FALSE)
|
||||
|
||||
brute -= (picked.brute_dam - brute_was)
|
||||
burn -= (picked.burn_dam - burn_was)
|
||||
stamina -= (picked.stamina_dam - stamina_was)
|
||||
|
||||
parts -= picked
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
if(update)
|
||||
update_damage_overlays()
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/adjustStaminaLoss(amount, updating_stamina = 1)
|
||||
if(status_flags & GODMODE)
|
||||
return 0
|
||||
staminaloss = CLAMP(staminaloss + amount, 0, maxHealth*2)
|
||||
//if(updating_stamina) CIT CHANGE - makes staminaloss changes always call update_stamina
|
||||
update_stamina()
|
||||
|
||||
|
||||
/mob/living/carbon/setStaminaLoss(amount, updating_stamina = 1)
|
||||
if(status_flags & GODMODE)
|
||||
return 0
|
||||
staminaloss = amount
|
||||
//if(updating_stamina) CIT CHANGE - makes staminaloss changes always call update_stamina
|
||||
update_stamina()
|
||||
|
||||
/mob/living/carbon/getBrainLoss()
|
||||
@@ -237,3 +251,4 @@
|
||||
if(B)
|
||||
var/adjusted_amount = amount - B.get_brain_damage()
|
||||
B.adjust_brain_damage(adjusted_amount, null)
|
||||
|
||||
|
||||
@@ -23,6 +23,19 @@
|
||||
restraint_check = TRUE
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
/datum/emote/living/carbon/clap/run_emote(mob/living/user, params)
|
||||
. = ..()
|
||||
if (.)
|
||||
if (ishuman(user))
|
||||
// Need hands to clap
|
||||
if (!user.get_bodypart("l_arm") || !user.get_bodypart("r_arm"))
|
||||
return
|
||||
var/clap = pick('sound/misc/clap1.ogg',
|
||||
'sound/misc/clap2.ogg',
|
||||
'sound/misc/clap3.ogg',
|
||||
'sound/misc/clap4.ogg')
|
||||
playsound(user, clap, 50, 1, -1)
|
||||
|
||||
/datum/emote/living/carbon/gnarl
|
||||
key = "gnarl"
|
||||
key_third_person = "gnarls"
|
||||
|
||||
@@ -901,6 +901,10 @@
|
||||
else
|
||||
visible_message("<span class='warning'>[M] fails to climb onto [src]!</span>")
|
||||
|
||||
/mob/living/carbon/human/do_after_coefficent()
|
||||
. = ..()
|
||||
. *= physiology.do_after_speed
|
||||
|
||||
/mob/living/carbon/human/species
|
||||
var/race = null
|
||||
|
||||
|
||||
@@ -698,8 +698,8 @@
|
||||
|
||||
if(bleed_rate)
|
||||
to_chat(src, "<span class='danger'>You are bleeding!</span>")
|
||||
if(staminaloss)
|
||||
if(staminaloss > 30)
|
||||
if(getStaminaLoss())
|
||||
if(getStaminaLoss() > 30)
|
||||
to_chat(src, "<span class='info'>You're completely exhausted.</span>")
|
||||
else
|
||||
to_chat(src, "<span class='info'>You feel fatigued.</span>")
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
. += ..() + config_human_delay + dna.species.movement_delay(src)
|
||||
|
||||
/mob/living/carbon/human/slip(knockdown_amount, obj/O, lube)
|
||||
if(isobj(shoes) && (shoes.flags_1&NOSLIP_1) && !(lube&GALOSHES_DONT_HELP))
|
||||
if(has_trait(TRAIT_NOSLIPALL))
|
||||
return 0
|
||||
if((isobj(shoes) && (shoes.flags_1&NOSLIP_1)) || has_trait(TRAIT_NOSLIPWATER) && !(lube&GALOSHES_DONT_HELP))
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -1,27 +1,31 @@
|
||||
//Stores several modifiers in a way that isn't cleared by changing species
|
||||
|
||||
/datum/physiology
|
||||
var/brute_mod = 1 // % of brute damage taken from all sources
|
||||
var/burn_mod = 1 // % of burn damage taken from all sources
|
||||
var/tox_mod = 1 // % of toxin damage taken from all sources
|
||||
var/oxy_mod = 1 // % of oxygen damage taken from all sources
|
||||
var/clone_mod = 1 // % of clone damage taken from all sources
|
||||
var/stamina_mod = 1 // % of stamina damage taken from all sources
|
||||
var/brain_mod = 1 // % of brain damage taken from all sources
|
||||
var/brute_mod = 1 // % of brute damage taken from all sources
|
||||
var/burn_mod = 1 // % of burn damage taken from all sources
|
||||
var/tox_mod = 1 // % of toxin damage taken from all sources
|
||||
var/oxy_mod = 1 // % of oxygen damage taken from all sources
|
||||
var/clone_mod = 1 // % of clone damage taken from all sources
|
||||
var/stamina_mod = 1 // % of stamina damage taken from all sources
|
||||
var/brain_mod = 1 // % of brain damage taken from all sources
|
||||
|
||||
var/pressure_mod = 1// % of brute damage taken from low or high pressure (stacks with brute_mod)
|
||||
var/heat_mod = 1 // % of burn damage taken from heat (stacks with burn_mod)
|
||||
var/cold_mod = 1 // % of burn damage taken from cold (stacks with burn_mod)
|
||||
var/pressure_mod = 1 // % of brute damage taken from low or high pressure (stacks with brute_mod)
|
||||
var/heat_mod = 1 // % of burn damage taken from heat (stacks with burn_mod)
|
||||
var/cold_mod = 1 // % of burn damage taken from cold (stacks with burn_mod)
|
||||
|
||||
var/damage_resistance = 0 // %damage reduction from all sources
|
||||
|
||||
var/siemens_coeff = 1 // resistance to shocks
|
||||
var/siemens_coeff = 1 // resistance to shocks
|
||||
|
||||
var/stun_mod = 1 // % stun modifier
|
||||
var/bleed_mod = 1 // % bleeding modifier
|
||||
var/datum/armor/armor // internal armor datum
|
||||
var/stun_mod = 1 // % stun modifier
|
||||
var/bleed_mod = 1 // % bleeding modifier
|
||||
var/datum/armor/armor // internal armor datum
|
||||
|
||||
var/speed_mod = 0 //tick modifier for each step. Positive is slower, negative is faster.
|
||||
var/speed_mod = 0 //tick modifier for each step. Positive is slower, negative is faster.
|
||||
|
||||
var/hunger_mod = 1 //% of hunger rate taken per tick.
|
||||
|
||||
var/do_after_speed = 1 //Speed mod for do_after. Lower is better. If temporarily adjusting, please only modify using *= and /=, so you don't interrupt other calculations.
|
||||
|
||||
/datum/physiology/New()
|
||||
armor = new
|
||||
|
||||
@@ -1386,7 +1386,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if((target.stat != DEAD) && damage >= user.dna.species.punchstunthreshold)
|
||||
target.visible_message("<span class='danger'>[user] has knocked [target] down!</span>", \
|
||||
"<span class='userdanger'>[user] has knocked [target] down!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
target.apply_effect(80, KNOCKDOWN, armor_block)
|
||||
target.apply_effect(80, EFFECT_KNOCKDOWN, armor_block)
|
||||
target.forcesay(GLOB.hit_appends)
|
||||
else if(target.lying)
|
||||
target.forcesay(GLOB.hit_appends)
|
||||
@@ -1427,7 +1427,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
playsound(target, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
target.visible_message("<span class='danger'>[user] has pushed [target]!</span>",
|
||||
"<span class='userdanger'>[user] has pushed [target]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
target.apply_effect(40, KNOCKDOWN, target.run_armor_check(affecting, "melee", "Your armor prevents your fall!", "Your armor softens your fall!"))
|
||||
target.apply_effect(40, EFFECT_KNOCKDOWN, target.run_armor_check(affecting, "melee", "Your armor prevents your fall!", "Your armor softens your fall!"))
|
||||
target.forcesay(GLOB.hit_appends)
|
||||
add_logs(user, target, "disarmed", " pushing them to the ground")
|
||||
return*/
|
||||
@@ -1588,7 +1588,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(prob(I.force))
|
||||
H.visible_message("<span class='danger'>[H] has been knocked down!</span>", \
|
||||
"<span class='userdanger'>[H] has been knocked down!</span>")
|
||||
H.apply_effect(60, KNOCKDOWN, armor_block)
|
||||
H.apply_effect(60, EFFECT_KNOCKDOWN, armor_block)
|
||||
|
||||
if(bloody)
|
||||
if(H.wear_suit)
|
||||
@@ -1640,7 +1640,11 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(CLONE)
|
||||
H.adjustCloneLoss(damage * hit_percent * H.physiology.clone_mod)
|
||||
if(STAMINA)
|
||||
H.adjustStaminaLoss(damage * hit_percent * H.physiology.stamina_mod)
|
||||
if(BP)
|
||||
if(BP.receive_damage(0, 0, damage * hit_percent * H.physiology.stamina_mod))
|
||||
H.update_stamina()
|
||||
else
|
||||
H.adjustStaminaLoss(damage * hit_percent * H.physiology.stamina_mod)
|
||||
if(BRAIN)
|
||||
H.adjustBrainLoss(damage * hit_percent * H.physiology.brain_mod)
|
||||
if(AROUSAL) //Citadel edit - arousal
|
||||
|
||||
@@ -633,3 +633,51 @@ generate/load female uniform sprites matching all previously decided variables
|
||||
if(!observers.len)
|
||||
observers = null
|
||||
break
|
||||
|
||||
// Only renders the head of the human
|
||||
/mob/living/carbon/human/proc/update_body_parts_head_only()
|
||||
if (!dna)
|
||||
return
|
||||
|
||||
if (!dna.species)
|
||||
return
|
||||
|
||||
var/obj/item/bodypart/HD = get_bodypart("head")
|
||||
|
||||
if (!istype(HD))
|
||||
return
|
||||
|
||||
HD.update_limb()
|
||||
|
||||
add_overlay(HD.get_limb_icon())
|
||||
update_damage_overlays()
|
||||
|
||||
if(HD && !(has_trait(TRAIT_HUSK)))
|
||||
// lipstick
|
||||
if(lip_style && (LIPS in dna.species.species_traits))
|
||||
var/mutable_appearance/lip_overlay = mutable_appearance('icons/mob/human_face.dmi', "lips_[lip_style]", -BODY_LAYER)
|
||||
lip_overlay.color = lip_color
|
||||
if(OFFSET_FACE in dna.species.offset_features)
|
||||
lip_overlay.pixel_x += dna.species.offset_features[OFFSET_FACE][1]
|
||||
lip_overlay.pixel_y += dna.species.offset_features[OFFSET_FACE][2]
|
||||
add_overlay(lip_overlay)
|
||||
|
||||
// eyes
|
||||
if(!(NOEYES in dna.species.species_traits))
|
||||
var/has_eyes = getorganslot(ORGAN_SLOT_EYES)
|
||||
var/mutable_appearance/eye_overlay
|
||||
if(!has_eyes)
|
||||
eye_overlay = mutable_appearance('icons/mob/human_face.dmi', "eyes_missing", -BODY_LAYER)
|
||||
else
|
||||
eye_overlay = mutable_appearance('icons/mob/human_face.dmi', "eyes", -BODY_LAYER)
|
||||
if((EYECOLOR in dna.species.species_traits) && has_eyes)
|
||||
eye_overlay.color = "#" + eye_color
|
||||
if(OFFSET_FACE in dna.species.offset_features)
|
||||
eye_overlay.pixel_x += dna.species.offset_features[OFFSET_FACE][1]
|
||||
eye_overlay.pixel_y += dna.species.offset_features[OFFSET_FACE][2]
|
||||
add_overlay(eye_overlay)
|
||||
|
||||
dna.species.handle_hair(src)
|
||||
|
||||
update_inv_head()
|
||||
update_inv_wear_mask()
|
||||
@@ -119,10 +119,6 @@
|
||||
cuff_resist(I)
|
||||
|
||||
/mob/living/carbon/monkey/proc/should_target(var/mob/living/L)
|
||||
|
||||
if(L == src)
|
||||
return FALSE
|
||||
|
||||
if(has_trait(TRAIT_PACIFISM))
|
||||
return FALSE
|
||||
|
||||
@@ -136,108 +132,57 @@
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/monkey/proc/handle_combat()
|
||||
// Don't do any AI if inside another mob (devoured)
|
||||
if (ismob(loc))
|
||||
// Really no idea what needs to be returned but everything else is TRUE
|
||||
return TRUE
|
||||
|
||||
if(on_fire || buckled || restrained() || (resting && canmove)) //CIT CHANGE - adds (resting && canmove) to make monkey ai attempt to resist out of resting
|
||||
if(!resisting && prob(MONKEY_RESIST_PROB))
|
||||
resisting = TRUE
|
||||
walk_to(src,0)
|
||||
resist()
|
||||
else
|
||||
resisting = FALSE
|
||||
|
||||
|
||||
if(IsDeadOrIncap())
|
||||
return TRUE
|
||||
|
||||
// have we been disarmed
|
||||
if(!locate(/obj/item) in held_items)
|
||||
best_force = 0
|
||||
|
||||
if(restrained() || blacklistItems[pickupTarget] || (pickupTarget && (pickupTarget.flags_1 & NODROP_1)))
|
||||
pickupTarget = null
|
||||
|
||||
if(!resisting && pickupTarget)
|
||||
pickupTimer++
|
||||
|
||||
// next to target
|
||||
if(Adjacent(pickupTarget) || Adjacent(pickupTarget.loc))
|
||||
INVOKE_ASYNC(src, .proc/walk2derpless, pickupTarget.loc)
|
||||
|
||||
// who cares about these items, i want that one!
|
||||
drop_all_held_items()
|
||||
|
||||
// on floor
|
||||
if(isturf(pickupTarget.loc))
|
||||
equip_item(pickupTarget)
|
||||
pickupTarget = null
|
||||
pickupTimer = 0
|
||||
|
||||
// in someones hand
|
||||
else if(ismob(pickupTarget.loc))
|
||||
var/mob/M = pickupTarget.loc
|
||||
if(!pickpocketing)
|
||||
pickpocketing = TRUE
|
||||
M.visible_message("[src] starts trying to take [pickupTarget] from [M]", "[src] tries to take [pickupTarget]!")
|
||||
INVOKE_ASYNC(src, .proc/pickpocket, M)
|
||||
|
||||
if(pickupTarget)
|
||||
if(restrained() || blacklistItems[pickupTarget] || (pickupTarget.flags_1 & NODROP_1))
|
||||
pickupTarget = null
|
||||
else
|
||||
if(pickupTimer >= 8)
|
||||
pickupTimer++
|
||||
if(pickupTimer >= 4)
|
||||
blacklistItems[pickupTarget] ++
|
||||
pickupTarget = null
|
||||
pickupTimer = 0
|
||||
else
|
||||
INVOKE_ASYNC(src, .proc/walk2derpless, pickupTarget.loc)
|
||||
|
||||
return TRUE
|
||||
|
||||
// nuh uh you don't pull me!
|
||||
if(pulledby && (mode != MONKEY_IDLE || prob(MONKEY_PULL_AGGRO_PROB)))
|
||||
if(Adjacent(pulledby))
|
||||
a_intent = INTENT_DISARM
|
||||
monkey_attack(pulledby)
|
||||
retaliate(pulledby)
|
||||
if(Adjacent(pickupTarget) || Adjacent(pickupTarget.loc)) // next to target
|
||||
drop_all_held_items() // who cares about these items, i want that one!
|
||||
if(isturf(pickupTarget.loc)) // on floor
|
||||
equip_item(pickupTarget)
|
||||
pickupTarget = null
|
||||
pickupTimer = 0
|
||||
else if(ismob(pickupTarget.loc)) // in someones hand
|
||||
var/mob/M = pickupTarget.loc
|
||||
if(!pickpocketing)
|
||||
pickpocketing = TRUE
|
||||
M.visible_message("[src] starts trying to take [pickupTarget] from [M]", "[src] tries to take [pickupTarget]!")
|
||||
INVOKE_ASYNC(src, .proc/pickpocket, M)
|
||||
return TRUE
|
||||
|
||||
switch(mode)
|
||||
|
||||
if(MONKEY_IDLE) // idle
|
||||
|
||||
var/list/around = view(src, MONKEY_ENEMY_VISION)
|
||||
bodyDisposal = locate(/obj/machinery/disposal/) in around
|
||||
|
||||
// scan for enemies
|
||||
for(var/mob/living/L in around)
|
||||
if( should_target(L) )
|
||||
if(L.stat == CONSCIOUS)
|
||||
battle_screech()
|
||||
retaliate(L)
|
||||
return TRUE
|
||||
else if(bodyDisposal)
|
||||
target = L
|
||||
mode = MONKEY_DISPOSE
|
||||
return TRUE
|
||||
if(enemies.len)
|
||||
var/list/around = view(src, MONKEY_ENEMY_VISION) // scan for enemies
|
||||
for(var/mob/living/L in around)
|
||||
if( should_target(L) )
|
||||
if(L.stat == CONSCIOUS)
|
||||
battle_screech()
|
||||
retaliate(L)
|
||||
return TRUE
|
||||
else
|
||||
bodyDisposal = locate(/obj/machinery/disposal/) in around
|
||||
if(bodyDisposal)
|
||||
target = L
|
||||
mode = MONKEY_DISPOSE
|
||||
return TRUE
|
||||
|
||||
// pickup any nearby objects
|
||||
if(!pickupTarget && prob(MONKEY_PICKUP_PROB))
|
||||
var/obj/item/I = locate(/obj/item/) in oview(5,src)
|
||||
if(!pickupTarget)
|
||||
var/obj/item/I = locate(/obj/item/) in oview(2,src)
|
||||
if(I && !blacklistItems[I])
|
||||
pickupTarget = I
|
||||
|
||||
// I WANNA STEAL
|
||||
if(!pickupTarget && prob(MONKEY_STEAL_PROB))
|
||||
var/mob/living/carbon/human/H = locate(/mob/living/carbon/human/) in oview(5,src)
|
||||
if(H)
|
||||
pickupTarget = pick(H.held_items)
|
||||
|
||||
// clear any combat walking
|
||||
if(!resisting)
|
||||
walk_to(src,0)
|
||||
|
||||
return IsStandingStill()
|
||||
else
|
||||
var/mob/living/carbon/human/H = locate(/mob/living/carbon/human/) in oview(2,src)
|
||||
if(H)
|
||||
pickupTarget = pick(H.held_items)
|
||||
|
||||
if(MONKEY_HUNT) // hunting for attacker
|
||||
if(health < MONKEY_FLEE_HEALTH)
|
||||
@@ -250,6 +195,8 @@
|
||||
// pickup any nearby weapon
|
||||
if(!pickupTarget && prob(MONKEY_WEAPON_PROB))
|
||||
var/obj/item/W = locate(/obj/item/) in oview(2,src)
|
||||
if(!locate(/obj/item) in held_items)
|
||||
best_force = 0
|
||||
if(W && !blacklistItems[W] && W.force > best_force)
|
||||
pickupTarget = W
|
||||
|
||||
@@ -356,8 +303,6 @@
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
|
||||
return IsStandingStill()
|
||||
|
||||
/mob/living/carbon/monkey/proc/pickpocket(var/mob/M)
|
||||
@@ -423,7 +368,8 @@
|
||||
/mob/living/carbon/monkey/proc/retaliate(mob/living/L)
|
||||
mode = MONKEY_HUNT
|
||||
target = L
|
||||
enemies[L] += MONKEY_HATRED_AMOUNT
|
||||
if(L != src)
|
||||
enemies[L] += MONKEY_HATRED_AMOUNT
|
||||
|
||||
if(a_intent != INTENT_HARM)
|
||||
battle_screech()
|
||||
@@ -485,5 +431,5 @@
|
||||
monkey_attack(pulledby)
|
||||
retaliate(pulledby)
|
||||
return TRUE
|
||||
|
||||
|
||||
#undef MAX_RANGE_FIND
|
||||
|
||||
@@ -12,11 +12,18 @@
|
||||
if(..())
|
||||
|
||||
if(!client)
|
||||
if(stat == CONSCIOUS)
|
||||
if(!handle_combat())
|
||||
if(prob(33) && canmove && isturf(loc) && !pulledby)
|
||||
if(stat == CONSCIOUS)
|
||||
if(on_fire || buckled || restrained() || (resting && canmove))
|
||||
if(!resisting && prob(MONKEY_RESIST_PROB))
|
||||
resisting = TRUE
|
||||
walk_to(src,0)
|
||||
resist()
|
||||
else if(resisting)
|
||||
resisting = FALSE
|
||||
else if((mode == MONKEY_IDLE && !pickupTarget && !prob(MONKEY_SHENANIGAN_PROB)) || !handle_combat())
|
||||
if(prob(25) && canmove && isturf(loc) && !pulledby)
|
||||
step(src, pick(GLOB.cardinals))
|
||||
if(prob(1))
|
||||
else if(prob(1))
|
||||
emote(pick("scratch","jump","roll","tail"))
|
||||
else
|
||||
walk_to(src,0)
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
return getArousalLoss()
|
||||
|
||||
|
||||
/mob/living/proc/apply_damages(brute = 0, burn = 0, tox = 0, oxy = 0, clone = 0, def_zone = null, blocked = FALSE, stamina = 0, arousal = 0, brain = 0)
|
||||
/mob/living/proc/apply_damages(brute = 0, burn = 0, tox = 0, oxy = 0, clone = 0, def_zone = null, blocked = FALSE, stamina = 0, brain = 0, arousal = 0)
|
||||
if(blocked >= 100)
|
||||
return 0
|
||||
if(brute)
|
||||
@@ -97,29 +97,29 @@
|
||||
|
||||
|
||||
|
||||
/mob/living/proc/apply_effect(effect = 0,effecttype = STUN, blocked = FALSE)
|
||||
/mob/living/proc/apply_effect(effect = 0,effecttype = EFFECT_STUN, blocked = FALSE)
|
||||
var/hit_percent = (100-blocked)/100
|
||||
if(!effect || (hit_percent <= 0))
|
||||
return 0
|
||||
switch(effecttype)
|
||||
if(STUN)
|
||||
if(EFFECT_STUN)
|
||||
Stun(effect * hit_percent)
|
||||
if(KNOCKDOWN)
|
||||
if(EFFECT_KNOCKDOWN)
|
||||
Knockdown(effect * hit_percent)
|
||||
if(UNCONSCIOUS)
|
||||
if(EFFECT_UNCONSCIOUS)
|
||||
Unconscious(effect * hit_percent)
|
||||
if(IRRADIATE)
|
||||
if(EFFECT_IRRADIATE)
|
||||
radiation += max(effect * hit_percent, 0)
|
||||
if(SLUR)
|
||||
if(EFFECT_SLUR)
|
||||
slurring = max(slurring,(effect * hit_percent))
|
||||
if(STUTTER)
|
||||
if(EFFECT_STUTTER)
|
||||
if((status_flags & CANSTUN) && !has_trait(TRAIT_STUNIMMUNE)) // stun is usually associated with stutter
|
||||
stuttering = max(stuttering,(effect * hit_percent))
|
||||
if(EYE_BLUR)
|
||||
if(EFFECT_EYE_BLUR)
|
||||
blur_eyes(effect * hit_percent)
|
||||
if(DROWSY)
|
||||
if(EFFECT_DROWSY)
|
||||
drowsyness = max(drowsyness,(effect * hit_percent))
|
||||
if(JITTER)
|
||||
if(EFFECT_JITTER)
|
||||
if((status_flags & CANSTUN) && !has_trait(TRAIT_STUNIMMUNE))
|
||||
jitteriness = max(jitteriness,(effect * hit_percent))
|
||||
return 1
|
||||
@@ -129,25 +129,25 @@
|
||||
if(blocked >= 100)
|
||||
return 0
|
||||
if(stun)
|
||||
apply_effect(stun, STUN, blocked)
|
||||
apply_effect(stun, EFFECT_STUN, blocked)
|
||||
if(knockdown)
|
||||
apply_effect(knockdown, KNOCKDOWN, blocked)
|
||||
apply_effect(knockdown, EFFECT_KNOCKDOWN, blocked)
|
||||
if(unconscious)
|
||||
apply_effect(unconscious, UNCONSCIOUS, blocked)
|
||||
apply_effect(unconscious, EFFECT_UNCONSCIOUS, blocked)
|
||||
if(irradiate)
|
||||
apply_effect(irradiate, IRRADIATE, blocked)
|
||||
apply_effect(irradiate, EFFECT_IRRADIATE, blocked)
|
||||
if(slur)
|
||||
apply_effect(slur, SLUR, blocked)
|
||||
apply_effect(slur, EFFECT_SLUR, blocked)
|
||||
if(stutter)
|
||||
apply_effect(stutter, STUTTER, blocked)
|
||||
apply_effect(stutter, EFFECT_STUTTER, blocked)
|
||||
if(eyeblur)
|
||||
apply_effect(eyeblur, EYE_BLUR, blocked)
|
||||
apply_effect(eyeblur, EFFECT_EYE_BLUR, blocked)
|
||||
if(drowsy)
|
||||
apply_effect(drowsy, DROWSY, blocked)
|
||||
apply_effect(drowsy, EFFECT_DROWSY, blocked)
|
||||
if(stamina)
|
||||
apply_damage(stamina, STAMINA, null, blocked)
|
||||
if(jitter)
|
||||
apply_effect(jitter, JITTER, blocked)
|
||||
apply_effect(jitter, EFFECT_JITTER, blocked)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -248,34 +248,41 @@
|
||||
/mob/living/proc/setStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE)
|
||||
return
|
||||
|
||||
|
||||
// heal ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/heal_bodypart_damage(brute, burn, updating_health = 1)
|
||||
adjustBruteLoss(-brute, 0) //zero as argument for no instant health update
|
||||
adjustFireLoss(-burn, 0)
|
||||
/mob/living/proc/heal_bodypart_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE)
|
||||
adjustBruteLoss(-brute, FALSE) //zero as argument for no instant health update
|
||||
adjustFireLoss(-burn, FALSE)
|
||||
adjustStaminaLoss(-stamina, FALSE)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
update_stamina()
|
||||
|
||||
// damage ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/take_bodypart_damage(brute, burn, updating_health = 1)
|
||||
adjustBruteLoss(brute, 0) //zero as argument for no instant health update
|
||||
adjustFireLoss(burn, 0)
|
||||
/mob/living/proc/take_bodypart_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE)
|
||||
adjustBruteLoss(brute, FALSE) //zero as argument for no instant health update
|
||||
adjustFireLoss(burn, FALSE)
|
||||
adjustStaminaLoss(stamina, FALSE)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
update_stamina()
|
||||
|
||||
// heal MANY bodyparts, in random order
|
||||
/mob/living/proc/heal_overall_damage(brute, burn, only_robotic = 0, only_organic = 1, updating_health = 1)
|
||||
adjustBruteLoss(-brute, 0) //zero as argument for no instant health update
|
||||
adjustFireLoss(-burn, 0)
|
||||
/mob/living/proc/heal_overall_damage(brute = 0, burn = 0, stamina = 0, only_robotic = FALSE, only_organic = TRUE, updating_health = TRUE)
|
||||
adjustBruteLoss(-brute, FALSE) //zero as argument for no instant health update
|
||||
adjustFireLoss(-burn, FALSE)
|
||||
adjustStaminaLoss(-stamina, FALSE)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
update_stamina()
|
||||
|
||||
// damage MANY bodyparts, in random order
|
||||
/mob/living/proc/take_overall_damage(brute, burn, updating_health = 1)
|
||||
adjustBruteLoss(brute, 0) //zero as argument for no instant health update
|
||||
adjustFireLoss(burn, 0)
|
||||
/mob/living/proc/take_overall_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE)
|
||||
adjustBruteLoss(brute, FALSE) //zero as argument for no instant health update
|
||||
adjustFireLoss(burn, FALSE)
|
||||
adjustStaminaLoss(stamina, FALSE)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
update_stamina()
|
||||
|
||||
//heal up to amount damage, in a given order
|
||||
/mob/living/proc/heal_ordered_damage(amount, list/damage_types)
|
||||
|
||||
@@ -138,7 +138,6 @@
|
||||
if(!(world.time % 5))
|
||||
to_chat(src, "<span class='warning'>[L] is restraining [P], you cannot push past.</span>")
|
||||
return 1
|
||||
|
||||
//CIT CHANGES START HERE - makes it so resting stops you from moving through standing folks without a short delay
|
||||
if(resting && !L.resting)
|
||||
if(attemptingcrawl)
|
||||
@@ -159,7 +158,6 @@
|
||||
attemptingcrawl = FALSE
|
||||
return TRUE
|
||||
//END OF CIT CHANGES
|
||||
|
||||
if(moving_diagonally)//no mob swap during diagonal moves.
|
||||
return 1
|
||||
|
||||
@@ -397,7 +395,6 @@
|
||||
update_canmove()
|
||||
|
||||
/mob/proc/get_contents()
|
||||
|
||||
/*CIT CHANGE - comments out lay_down proc to be modified in modular_citadel
|
||||
/mob/living/proc/lay_down()
|
||||
set name = "Rest"
|
||||
@@ -407,7 +404,6 @@
|
||||
to_chat(src, "<span class='notice'>You are now [resting ? "resting" : "getting up"].</span>")
|
||||
update_canmove()
|
||||
*/
|
||||
|
||||
//Recursive function to find everything a mob is holding.
|
||||
/mob/living/get_contents(obj/item/storage/Storage = null)
|
||||
var/list/L = list()
|
||||
@@ -456,6 +452,7 @@
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
health = maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()
|
||||
staminaloss = getStaminaLoss()
|
||||
update_stat()
|
||||
med_hud_set_health()
|
||||
med_hud_set_status()
|
||||
@@ -504,7 +501,7 @@
|
||||
cure_blind()
|
||||
cure_husk()
|
||||
hallucination = 0
|
||||
heal_overall_damage(100000, 100000, 0, 0, 1) //heal brute and burn dmg on both organic and robotic limbs, and update health right away.
|
||||
heal_overall_damage(INFINITY, INFINITY, INFINITY, FALSE, FALSE, TRUE) //heal brute and burn dmg on both organic and robotic limbs, and update health right away.
|
||||
ExtinguishMob()
|
||||
fire_stacks = 0
|
||||
update_canmove()
|
||||
@@ -729,7 +726,7 @@
|
||||
clear_alert("weightless")
|
||||
else
|
||||
throw_alert("weightless", /obj/screen/alert/weightless)
|
||||
if(!override)
|
||||
if(!override && !is_flying())
|
||||
float(!has_gravity)
|
||||
|
||||
/mob/living/float(on)
|
||||
@@ -892,16 +889,19 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/*CIT CHANGE - comments out update_stamina to be modified in modular_citadel
|
||||
/mob/living/carbon/proc/update_stamina()
|
||||
if(staminaloss)
|
||||
var/total_health = (health - staminaloss)
|
||||
|
||||
/mob/living/proc/update_stamina()
|
||||
return
|
||||
/*
|
||||
/mob/living/carbon/update_stamina()
|
||||
var/stam = getStaminaLoss()
|
||||
if(stam)
|
||||
var/total_health = (health - stam)
|
||||
if(total_health <= HEALTH_THRESHOLD_CRIT && !stat)
|
||||
to_chat(src, "<span class='notice'>You're too exhausted to keep going...</span>")
|
||||
Knockdown(100)
|
||||
setStaminaLoss(health - 2)
|
||||
update_health_hud()
|
||||
*/
|
||||
setStaminaLoss(health - 2, FALSE, FALSE)
|
||||
update_health_hud() */ //CITADEL OVERRIDE
|
||||
|
||||
/mob/living/carbon/alien/update_stamina()
|
||||
return
|
||||
@@ -967,7 +967,7 @@
|
||||
if(amount > RAD_BURN_THRESHOLD)
|
||||
apply_damage((amount-RAD_BURN_THRESHOLD)/RAD_BURN_THRESHOLD, BURN, null, blocked)
|
||||
|
||||
apply_effect((amount*RAD_MOB_COEFFICIENT)/max(1, (radiation**2)*RAD_OVERDOSE_REDUCTION), IRRADIATE, blocked)
|
||||
apply_effect((amount*RAD_MOB_COEFFICIENT)/max(1, (radiation**2)*RAD_OVERDOSE_REDUCTION), EFFECT_IRRADIATE, blocked)
|
||||
|
||||
/mob/living/proc/fakefireextinguish()
|
||||
return
|
||||
@@ -1050,11 +1050,11 @@
|
||||
var/ko = IsKnockdown() || IsUnconscious() || (stat && (stat != SOFT_CRIT || pulledby)) || (has_trait(TRAIT_FAKEDEATH))
|
||||
var/move_and_fall = stat == SOFT_CRIT && !pulledby
|
||||
var/chokehold = pulledby && pulledby.grab_state >= GRAB_NECK
|
||||
var/pinned = resting && pulledby && pulledby.grab_state >= GRAB_AGGRESSIVE // Cit change - adds pinning for aggressive-grabbing people on the ground
|
||||
var/buckle_lying = !(buckled && !buckled.buckle_lying)
|
||||
var/has_legs = get_num_legs()
|
||||
var/has_arms = get_num_arms()
|
||||
var/ignore_legs = get_leg_ignore()
|
||||
var/pinned = resting && pulledby && pulledby.grab_state >= GRAB_AGGRESSIVE // Cit change - adds pinning for aggressive-grabbing people on the ground
|
||||
if(ko || move_and_fall || IsStun() || chokehold) // Cit change - makes resting not force you to drop everything
|
||||
drop_all_held_items()
|
||||
unset_machine()
|
||||
|
||||
@@ -388,9 +388,7 @@
|
||||
return
|
||||
|
||||
|
||||
/mob/living/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
|
||||
if(A != src)
|
||||
end_pixel_y = get_standard_pixel_y_offset(lying)
|
||||
/mob/living/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect)
|
||||
if(!used_item)
|
||||
used_item = get_active_held_item()
|
||||
..()
|
||||
|
||||
@@ -320,6 +320,10 @@
|
||||
if(C)
|
||||
C.post_status("shuttle")
|
||||
|
||||
/mob/living/silicon/ai/can_interact_with(atom/A)
|
||||
. = ..()
|
||||
return . || (istype(loc, /obj/item/device/aicard))? (ISINRANGE(A.x, x - interaction_range, x + interaction_range) && ISINRANGE(A.y, y - interaction_range, y + interaction_range)): GLOB.cameranet.checkTurfVis(get_turf(A))
|
||||
|
||||
/mob/living/silicon/ai/cancel_camera()
|
||||
view_core()
|
||||
|
||||
|
||||
@@ -975,4 +975,4 @@ GLOBAL_LIST_INIT(vox_sounds, list("abduction" = 'sound/vox_fem/abduction.ogg',
|
||||
"zombie" = 'sound/vox_fem/zombie.ogg',
|
||||
"zone" = 'sound/vox_fem/zone.ogg',
|
||||
"zulu" = 'sound/vox_fem/zulu.ogg'))
|
||||
#endif
|
||||
#endif
|
||||
@@ -14,7 +14,7 @@
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/silicon/apply_effect(effect = 0,effecttype = STUN, blocked = FALSE)
|
||||
/mob/living/silicon/apply_effect(effect = 0,effecttype = EFFECT_STUN, blocked = FALSE)
|
||||
return FALSE //The only effect that can hit them atm is flashes and they still directly edit so this works for now
|
||||
|
||||
/mob/living/silicon/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE) //immune to tox damage
|
||||
|
||||
@@ -90,4 +90,4 @@
|
||||
/mob/living/silicon/proc/clear_law_sixsixsix(force, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.clear_law_sixsixsix(force)
|
||||
post_lawchange(announce)
|
||||
post_lawchange(announce)
|
||||
|
||||
@@ -90,8 +90,6 @@
|
||||
/obj/item/clothing/head/sombrero,
|
||||
/obj/item/clothing/head/witchunter_hat)
|
||||
|
||||
var/remote_range = 7 //How far can you interact with machines.
|
||||
|
||||
can_buckle = TRUE
|
||||
buckle_lying = FALSE
|
||||
var/static/list/can_ride_typecache = typecacheof(/mob/living/carbon/human)
|
||||
@@ -192,6 +190,9 @@
|
||||
cell = null
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/robot/can_interact_with(atom/A)
|
||||
. = ..()
|
||||
return . || in_view_range(src, A)
|
||||
|
||||
/mob/living/silicon/robot/proc/pick_module()
|
||||
if(module.type != /obj/item/robot_module)
|
||||
@@ -355,6 +356,9 @@
|
||||
queueAlarm("--- [class] alarm in [A.name] has been cleared.", class, 0)
|
||||
return !cleared
|
||||
|
||||
/mob/living/silicon/robot/can_interact_with(atom/A)
|
||||
return !low_power_mode && ISINRANGE(A.x, x - interaction_range, x + interaction_range) && ISINRANGE(A.y, y - interaction_range, y + interaction_range)
|
||||
|
||||
/mob/living/silicon/robot/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weldingtool) && (user.a_intent != INTENT_HARM || user == src))
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
@@ -600,7 +604,6 @@
|
||||
/mob/living/silicon/robot/update_icons()
|
||||
cut_overlays()
|
||||
icon_state = module.cyborg_base_icon
|
||||
|
||||
//Citadel changes start here - Allows modules to use different icon files, and allows modules to specify a pixel offset
|
||||
icon = (module.cyborg_icon_override ? module.cyborg_icon_override : initial(icon))
|
||||
if(laser)
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
|
||||
|
||||
/mob/living/silicon/robot/attacked_by(obj/item/I, mob/living/user, def_zone)
|
||||
/mob/living/silicon/robot/attackby(obj/item/I, mob/living/user)
|
||||
if(hat_offset != INFINITY && user.a_intent == INTENT_HELP && is_type_in_typecache(I, equippable_hats))
|
||||
to_chat(user, "<span class='notice'>You begin to place [I] on [src]'s head...</span>")
|
||||
to_chat(src, "<span class='notice'>[user] is placing [I] on your head...</span>")
|
||||
if(do_after(user, 30, target = src))
|
||||
user.temporarilyRemoveItemFromInventory(I, TRUE)
|
||||
place_on_head(I)
|
||||
return
|
||||
if (user.temporarilyRemoveItemFromInventory(I, TRUE))
|
||||
place_on_head(I)
|
||||
return
|
||||
if(I.force && I.damtype != STAMINA && stat != DEAD) //only sparks if real damage is dealt.
|
||||
spark_system.start()
|
||||
return ..()
|
||||
@@ -52,6 +50,7 @@
|
||||
|
||||
return
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/mob/living/silicon/robot/attack_hand(mob/living/carbon/human/user)
|
||||
add_fingerprint(user)
|
||||
if(opened && !wiresexposed && !issilicon(user))
|
||||
|
||||
@@ -318,7 +318,7 @@
|
||||
cyborg_base_icon = "engineer"
|
||||
moduleselect_icon = "engineer"
|
||||
magpulsing = TRUE
|
||||
hat_offset = INFINITY // No hats
|
||||
hat_offset = -4
|
||||
|
||||
/obj/item/robot_module/security
|
||||
name = "Security"
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
var/updating = FALSE //portable camera camerachunk update
|
||||
|
||||
var/hack_software = FALSE //Will be able to use hacking actions
|
||||
var/interaction_range = 7 //wireless control range
|
||||
|
||||
/mob/living/silicon/Initialize()
|
||||
. = ..()
|
||||
@@ -152,17 +153,17 @@
|
||||
/mob/living/silicon/can_inject(mob/user, error_msg)
|
||||
if(error_msg)
|
||||
to_chat(user, "<span class='alert'>Their outer shell is too tough.</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/IsAdvancedToolUser()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/proc/islinked(mob/living/silicon/robot/bot, mob/living/silicon/ai/ai)
|
||||
if(!istype(bot) || !istype(ai))
|
||||
return 0
|
||||
if (bot.connected_ai == ai)
|
||||
return 1
|
||||
return 0
|
||||
return FALSE
|
||||
if(bot.connected_ai == ai)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/Topic(href, href_list)
|
||||
if (href_list["lawc"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/mob/living/silicon/attack_hand(mob/living/carbon/human/M)
|
||||
switch(M.a_intent)
|
||||
if ("help")
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
adjustBruteLoss(20)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect, end_pixel_y)
|
||||
/mob/living/simple_animal/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect)
|
||||
if(!no_effect && !visual_effect_icon && melee_damage_upper)
|
||||
if(melee_damage_upper < 10)
|
||||
visual_effect_icon = ATTACK_EFFECT_PUNCH
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
/obj/effect/decal/cleanable/flour,
|
||||
/obj/effect/decal/cleanable/ash,
|
||||
/obj/effect/decal/cleanable/greenglow,
|
||||
///obj/effect/decal/cleanable/dirt, Cit change - removes dirt from the cleanbot target list to compensate for the mass amount of dirt decals present with footdirt
|
||||
/obj/effect/decal/cleanable/dirt,
|
||||
/obj/effect/decal/cleanable/deadcockroach,
|
||||
/obj/effect/decal/remains
|
||||
)
|
||||
|
||||
@@ -234,8 +234,6 @@
|
||||
to_chat(user, "<span class='warning'>They won't fit in, as there is already stuff inside!</span>")
|
||||
return
|
||||
if(T.use(10))
|
||||
if(user.s_active)
|
||||
user.s_active.close(user)
|
||||
var/obj/item/bot_assembly/floorbot/B = new
|
||||
B.toolbox = type
|
||||
user.put_in_hands(B)
|
||||
@@ -312,7 +310,6 @@
|
||||
qdel(S)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/bot_assembly/medbot/attackby(obj/item/W, mob/user, params)
|
||||
..()
|
||||
switch(build_step)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
icon = 'icons/mob/drone.dmi'
|
||||
icon_state = "drone_maint_hat"//yes reuse the _hat state.
|
||||
layer = BELOW_MOB_LAYER
|
||||
|
||||
|
||||
var/drone_type = /mob/living/simple_animal/drone //Type of drone that will be spawned
|
||||
var/seasonal_hats = TRUE //If TRUE, and there are no default hats, different holidays will grant different hats
|
||||
var/static/list/possible_seasonal_hats //This is built automatically in build_seasonal_hats() but can also be edited by admins!
|
||||
@@ -39,6 +39,7 @@
|
||||
GLOB.poi_list -= src
|
||||
. = ..()
|
||||
|
||||
//ATTACK GHOST IGNORING PARENT RETURN VALUE
|
||||
/obj/item/drone_shell/attack_ghost(mob/user)
|
||||
if(jobban_isbanned(user,"drone"))
|
||||
return
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
if("Nothing")
|
||||
return
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/mob/living/simple_animal/drone/attack_hand(mob/user)
|
||||
if(ishuman(user))
|
||||
if(stat == DEAD || status_flags & GODMODE || !can_be_held)
|
||||
|
||||
@@ -656,11 +656,9 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
|
||||
/obj/item/storage/box/syndie_kit/guardian
|
||||
name = "holoparasite injector kit"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/guardian/Initialize()
|
||||
. = ..()
|
||||
/obj/item/storage/box/syndie_kit/guardian/PopulateContents()
|
||||
new /obj/item/guardiancreator/tech/choose/traitor(src)
|
||||
new /obj/item/paper/guides/antag/guardian(src)
|
||||
return
|
||||
|
||||
/obj/item/guardiancreator/carp
|
||||
name = "holocarp fishsticks"
|
||||
|
||||
@@ -7,17 +7,8 @@
|
||||
magic_fluff_string = "<span class='holoparasite'>..And draw the Drone, a dextrous master of construction and repair.</span>"
|
||||
tech_fluff_string = "<span class='holoparasite'>Boot sequence complete. Dextrous combat modules loaded. Holoparasite swarm online.</span>"
|
||||
carp_fluff_string = "<span class='holoparasite'>CARP CARP CARP! You caught one! It can hold stuff in its fins, sort of.</span>"
|
||||
dextrous = 1
|
||||
dextrous = TRUE
|
||||
held_items = list(null, null)
|
||||
environment_target_typecache = list(
|
||||
/obj/machinery/door/window,
|
||||
/obj/structure/window,
|
||||
/obj/structure/closet,
|
||||
/obj/structure/table,
|
||||
/obj/structure/grille,
|
||||
/obj/structure/rack,
|
||||
/obj/structure/barricade,
|
||||
/obj/machinery/camera) //so we can also attack cameras
|
||||
var/obj/item/internal_storage //what we're storing within ourself
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/dextrous/death(gibbed)
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
/obj/guardian_bomb/attackby(mob/living/user)
|
||||
detonate(user)
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/guardian_bomb/attack_hand(mob/living/user)
|
||||
detonate(user)
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
environment_smash = ENVIRONMENT_SMASH_NONE
|
||||
mouse_opacity = MOUSE_OPACITY_OPAQUE
|
||||
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
|
||||
density = FALSE
|
||||
mob_size = MOB_SIZE_TINY
|
||||
movement_type = FLYING
|
||||
gold_core_spawnable = HOSTILE_SPAWN
|
||||
@@ -56,7 +57,7 @@
|
||||
/mob/living/simple_animal/hostile/poison/bees/Initialize()
|
||||
. = ..()
|
||||
generate_bee_visuals()
|
||||
|
||||
AddComponent(/datum/component/swarming)
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/bees/Destroy()
|
||||
if(beehome)
|
||||
@@ -291,5 +292,5 @@
|
||||
if(idle >= BEE_IDLE_ROAMING && prob(BEE_PROB_GOROAM))
|
||||
toggle_ai(AI_ON)
|
||||
forceMove(beehome.drop_location())
|
||||
else
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -73,8 +73,10 @@
|
||||
to_chat(src, "<span class='spider'><b>[directive]</b></span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/giant_spider/attack_ghost(mob/user)
|
||||
if(!humanize_spider(user))
|
||||
return ..()
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
humanize_spider(user)
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/giant_spider/proc/humanize_spider(mob/user)
|
||||
if(key || !playable_spider)//Someone is in it or the fun police are shutting it down
|
||||
|
||||
@@ -14,17 +14,6 @@
|
||||
var/list/emote_taunt = list()
|
||||
var/taunt_chance = 0
|
||||
|
||||
//typecache of things this mob will attack in DestroyPathToTarget() if it has environment_smash
|
||||
var/list/environment_target_typecache = list(
|
||||
/obj/machinery/door/window,
|
||||
/obj/structure/window,
|
||||
/obj/structure/closet,
|
||||
/obj/structure/table,
|
||||
/obj/structure/grille,
|
||||
/obj/structure/girder,
|
||||
/obj/structure/rack,
|
||||
/obj/structure/barricade) //turned into a typecache in New()
|
||||
|
||||
var/ranged_message = "fires" //Fluff text for ranged mobs
|
||||
var/ranged_cooldown = 0 //What the current cooldown on ranged attacks is, generally world.time + ranged_cooldown_time
|
||||
var/ranged_cooldown_time = 30 //How long, in deciseconds, the cooldown of ranged attacks is
|
||||
@@ -38,7 +27,6 @@
|
||||
var/robust_searching = 0 //By default, mobs have a simple searching method, set this to 1 for the more scrutinous searching (stat_attack, stat_exclusive, etc), should be disabled on most mobs
|
||||
var/vision_range = 9 //How big of an area to search for targets in, a vision of 9 attempts to find targets as soon as they walk into screen view
|
||||
var/aggro_vision_range = 9 //If a mob is aggro, we search in this radius. Defaults to 9 to keep in line with original simple mob aggro radius
|
||||
var/idle_vision_range = 9 //If a mob is just idling around, it's vision range is limited to this. Defaults to 9 to keep in line with original simple mob aggro radius
|
||||
var/search_objects = 0 //If we want to consider objects when searching around, set this to 1. If you want to search for objects while also ignoring mobs until hurt, set it to 2. To completely ignore mobs, even when attacked, set it to 3
|
||||
var/search_objects_timer_id //Timer for regaining our old search_objects value after being attacked
|
||||
var/search_objects_regain_time = 30 //the delay between being attacked and gaining our old search_objects value back
|
||||
@@ -58,7 +46,6 @@
|
||||
|
||||
if(!targets_from)
|
||||
targets_from = src
|
||||
environment_target_typecache = typecacheof(environment_target_typecache)
|
||||
wanted_objects = typecacheof(wanted_objects)
|
||||
|
||||
|
||||
@@ -305,7 +292,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/LoseAggro()
|
||||
stop_automated_movement = 0
|
||||
vision_range = idle_vision_range
|
||||
vision_range = initial(vision_range)
|
||||
taunt_chance = initial(taunt_chance)
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/LoseTarget()
|
||||
@@ -385,10 +372,9 @@
|
||||
if(T.Adjacent(targets_from))
|
||||
if(CanSmashTurfs(T))
|
||||
T.attack_animal(src)
|
||||
for(var/a in T)
|
||||
var/atom/A = a
|
||||
if(is_type_in_typecache(A, environment_target_typecache) && !A.IsObscured())
|
||||
A.attack_animal(src)
|
||||
for(var/obj/O in T)
|
||||
if(O.density && environment_smash >= ENVIRONMENT_SMASH_STRUCTURES && !O.IsObscured())
|
||||
O.attack_animal(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -510,4 +496,4 @@ mob/living/simple_animal/hostile/proc/DestroySurroundings() // for use with mega
|
||||
if (isturf(M.loc))
|
||||
. += M
|
||||
else if (M.loc.type in hostile_machines)
|
||||
. += M.loc
|
||||
. += M.loc
|
||||
@@ -129,7 +129,7 @@ Difficulty: Medium
|
||||
INVOKE_ASYNC(src, .proc/quick_attack_loop)
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
|
||||
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect)
|
||||
if(!used_item && !isturf(A))
|
||||
used_item = miner_saw
|
||||
..()
|
||||
|
||||
@@ -383,7 +383,9 @@ Difficulty: Very Hard
|
||||
ActivationReaction(speaker, ACTIVATE_SPEECH)
|
||||
|
||||
/obj/machinery/anomalous_crystal/attack_hand(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
ActivationReaction(user, ACTIVATE_TOUCH)
|
||||
|
||||
/obj/machinery/anomalous_crystal/attackby(obj/item/I, mob/user, params)
|
||||
@@ -577,7 +579,9 @@ Difficulty: Very Hard
|
||||
notify_ghosts("An anomalous crystal has been activated in [get_area(src)]! This crystal can always be used by ghosts hereafter.", enter_link = "<a href=?src=[REF(src)];ghostjoin=1>(Click to enter)</a>", ghost_sound = 'sound/effects/ghost2.ogg', source = src, action = NOTIFY_ATTACK)
|
||||
|
||||
/obj/machinery/anomalous_crystal/helpers/attack_ghost(mob/dead/observer/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(ready_to_deploy)
|
||||
var/be_helper = alert("Become a Lightgeist? (Warning, You can no longer be cloned!)",,"Yes","No")
|
||||
if(be_helper == "Yes" && !QDELETED(src) && isobserver(user))
|
||||
|
||||
@@ -47,7 +47,6 @@ Difficulty: Medium
|
||||
vision_range = 13
|
||||
wander = FALSE
|
||||
elimination = 1
|
||||
idle_vision_range = 13
|
||||
appearance_flags = 0
|
||||
mouse_opacity = MOUSE_OPACITY_ICON
|
||||
|
||||
|
||||
@@ -19,22 +19,11 @@
|
||||
minbodytemp = 0
|
||||
maxbodytemp = INFINITY
|
||||
aggro_vision_range = 18
|
||||
idle_vision_range = 5
|
||||
vision_range = 5
|
||||
anchored = TRUE
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
layer = LARGE_MOB_LAYER //Looks weird with them slipping under mineral walls and cameras and shit otherwise
|
||||
mouse_opacity = MOUSE_OPACITY_OPAQUE // Easier to click on in melee, they're giant targets anyway
|
||||
environment_target_typecache = list(
|
||||
/obj/machinery/door/window,
|
||||
/obj/structure/window,
|
||||
/obj/structure/closet,
|
||||
/obj/structure/table,
|
||||
/obj/structure/grille,
|
||||
/obj/structure/girder,
|
||||
/obj/structure/rack,
|
||||
/obj/structure/barricade,
|
||||
/obj/machinery/field,
|
||||
/obj/machinery/power/emitter)
|
||||
var/list/crusher_loot
|
||||
var/medal_type
|
||||
var/score_type = BOSS_SCORE
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
a_intent = INTENT_HARM
|
||||
speak_emote = list("chitters")
|
||||
attack_sound = 'sound/weapons/bladeslice.ogg'
|
||||
vision_range = 2
|
||||
aggro_vision_range = 9
|
||||
idle_vision_range = 2
|
||||
turns_per_move = 5
|
||||
gold_core_spawnable = HOSTILE_SPAWN
|
||||
loot = list(/obj/item/stack/ore/diamond{layer = ABOVE_MOB_LAYER},
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
move_to_delay = 5
|
||||
vision_range = 20
|
||||
aggro_vision_range = 20
|
||||
idle_vision_range = 20
|
||||
maxHealth = 40 //easy to kill, but oh, will you be seeing a lot of them.
|
||||
health = 40
|
||||
melee_damage_lower = 10
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
icon_gib = "syndicate_gib"
|
||||
vision_range = 2
|
||||
aggro_vision_range = 9
|
||||
idle_vision_range = 2
|
||||
move_to_delay = 5
|
||||
friendly = "harmlessly rolls into"
|
||||
maxHealth = 45
|
||||
@@ -77,5 +76,5 @@
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goldgrub/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
|
||||
idle_vision_range = 9
|
||||
vision_range = 9
|
||||
. = ..()
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
attacktext = "pulverizes"
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
throw_message = "does nothing to the rocky hide of the"
|
||||
vision_range = 5
|
||||
aggro_vision_range = 9
|
||||
idle_vision_range = 5
|
||||
anchored = TRUE //Stays anchored until death as to be unpullable
|
||||
var/pre_attack = 0
|
||||
var/pre_attack_icon = "Goliath_preattack"
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
ranged = 1
|
||||
vision_range = 5
|
||||
aggro_vision_range = 9
|
||||
idle_vision_range = 5
|
||||
speed = 3
|
||||
maxHealth = 75
|
||||
health = 75
|
||||
@@ -241,7 +240,6 @@
|
||||
move_to_delay = 14
|
||||
vision_range = 5
|
||||
aggro_vision_range = 9
|
||||
idle_vision_range = 5
|
||||
speed = 3
|
||||
faction = list("mining")
|
||||
weather_immunities = list("lava","ash")
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
|
||||
vision_range = 12
|
||||
aggro_vision_range = 12
|
||||
idle_vision_range = 12
|
||||
|
||||
search_objects = 1 // So that it can see through walls
|
||||
|
||||
|
||||
@@ -160,7 +160,8 @@
|
||||
desc = "A small, twin-bladed machine capable of inflicting very deadly lacerations."
|
||||
icon_state = "viscerator_attack"
|
||||
icon_living = "viscerator_attack"
|
||||
pass_flags = PASSTABLE
|
||||
pass_flags = PASSTABLE | PASSMOB
|
||||
a_intent = INTENT_HARM
|
||||
health = 25
|
||||
maxHealth = 25
|
||||
melee_damage_lower = 15
|
||||
@@ -180,3 +181,7 @@
|
||||
gold_core_spawnable = HOSTILE_SPAWN
|
||||
del_on_death = 1
|
||||
deathmessage = "is smashed into pieces!"
|
||||
|
||||
/mob/living/simple_animal/hostile/viscerator/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/swarming)
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
attacktext = "chomps"
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
throw_message = "is avoided by the"
|
||||
vision_range = 5
|
||||
aggro_vision_range = 9
|
||||
idle_vision_range = 5
|
||||
mob_size = MOB_SIZE_SMALL
|
||||
environment_smash = ENVIRONMENT_SMASH_NONE
|
||||
gold_core_spawnable = HOSTILE_SPAWN
|
||||
|
||||
@@ -299,10 +299,10 @@
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/parrot/attack_paw(mob/living/carbon/monkey/M)
|
||||
attack_hand(M)
|
||||
return attack_hand(M)
|
||||
|
||||
/mob/living/simple_animal/parrot/attack_alien(mob/living/carbon/alien/M)
|
||||
attack_hand(M)
|
||||
return attack_hand(M)
|
||||
|
||||
//Simple animals
|
||||
/mob/living/simple_animal/parrot/attack_animal(mob/living/simple_animal/M)
|
||||
|
||||
@@ -74,6 +74,12 @@
|
||||
"gold", "green", "adamantine", "oil", "light pink", "bluespace",
|
||||
"cerulean", "sepia", "black", "pyrite")
|
||||
|
||||
///////////CORE-CROSSING CODE
|
||||
|
||||
var/effectmod //What core modification is being used.
|
||||
var/applied = 0 //How many extracts of the modtype have been applied.
|
||||
|
||||
|
||||
/mob/living/simple_animal/slime/Initialize(mapload, new_colour="grey", new_is_adult=FALSE)
|
||||
var/datum/action/innate/slime/feed/F = new
|
||||
F.Grant(src)
|
||||
@@ -226,7 +232,7 @@
|
||||
var/mob/living/Food = A
|
||||
if(CanFeedon(Food))
|
||||
Feedon(Food)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/slime/doUnEquip(obj/item/W)
|
||||
return
|
||||
@@ -272,8 +278,6 @@
|
||||
discipline_slime(user)
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
/mob/living/simple_animal/slime/attack_hand(mob/living/carbon/human/M)
|
||||
if(buckled)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
@@ -343,8 +347,50 @@
|
||||
force_effect = round(W.force/2)
|
||||
if(prob(10 + force_effect))
|
||||
discipline_slime(user)
|
||||
if(istype(W, /obj/item/storage/bag/bio))
|
||||
var/obj/item/storage/P = W
|
||||
if(!effectmod)
|
||||
to_chat(user, "<span class='warning'>The slime is not currently being mutated.</span>")
|
||||
return
|
||||
var/hasOutput = FALSE //Have we outputted text?
|
||||
var/hasFound = FALSE //Have we found an extract to be added?
|
||||
for(var/obj/item/slime_extract/S in P.contents)
|
||||
if(S.effectmod == effectmod)
|
||||
P.remove_from_storage(S, get_turf(src))
|
||||
qdel(S)
|
||||
applied++
|
||||
hasFound = TRUE
|
||||
if(applied >= SLIME_EXTRACT_CROSSING_REQUIRED)
|
||||
to_chat(user, "<span class='notice'>You feed the slime as many of the extracts from the bag as you can, and it mutates!</span>")
|
||||
playsound(src, 'sound/effects/attackblob.ogg', 50, 1)
|
||||
spawn_corecross()
|
||||
hasOutput = TRUE
|
||||
break
|
||||
if(!hasOutput)
|
||||
if(!hasFound)
|
||||
to_chat(user, "<span class='warning'>There are no extracts in the bag that this slime will accept!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You feed the slime some extracts from the bag.</span>")
|
||||
playsound(src, 'sound/effects/attackblob.ogg', 50, 1)
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/slime/proc/spawn_corecross()
|
||||
var/static/list/crossbreeds = subtypesof(/obj/item/slimecross)
|
||||
visible_message("<span class='danger'>[src] shudders, its mutated core consuming the rest of its body!</span>")
|
||||
playsound(src, 'sound/magic/smoke.ogg', 50, 1)
|
||||
var/crosspath
|
||||
for(var/X in crossbreeds)
|
||||
var/obj/item/slimecross/S = X
|
||||
if(initial(S.colour) == colour && initial(S.effect) == effectmod)
|
||||
crosspath = S
|
||||
break
|
||||
if(crosspath)
|
||||
new crosspath(loc)
|
||||
else
|
||||
visible_message("<span class='warning'>The mutated core shudders, and collapses into a puddle, unable to maintain its form.</span>")
|
||||
qdel(src)
|
||||
|
||||
/mob/living/simple_animal/slime/proc/apply_water()
|
||||
adjustBruteLoss(rand(15,20))
|
||||
if(!client)
|
||||
|
||||
+13
-8
@@ -207,26 +207,26 @@
|
||||
//unset redraw_mob to prevent the mob from being redrawn at the end.
|
||||
/mob/proc/equip_to_slot_if_possible(obj/item/W, slot, qdel_on_fail = FALSE, disable_warning = FALSE, redraw_mob = TRUE, bypass_equip_delay_self = FALSE)
|
||||
if(!istype(W))
|
||||
return 0
|
||||
return FALSE
|
||||
if(!W.mob_can_equip(src, null, slot, disable_warning, bypass_equip_delay_self))
|
||||
if(qdel_on_fail)
|
||||
qdel(W)
|
||||
else
|
||||
if(!disable_warning)
|
||||
to_chat(src, "<span class='warning'>You are unable to equip that!</span>" )
|
||||
return 0
|
||||
to_chat(src, "<span class='warning'>You are unable to equip that!</span>")
|
||||
return FALSE
|
||||
equip_to_slot(W, slot, redraw_mob) //This proc should not ever fail.
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
//This is an UNSAFE proc. It merely handles the actual job of equipping. All the checks on whether you can or can't eqip need to be done before! Use mob_can_equip() for that task.
|
||||
//This is an UNSAFE proc. It merely handles the actual job of equipping. All the checks on whether you can or can't equip need to be done before! Use mob_can_equip() for that task.
|
||||
//In most cases you will want to use equip_to_slot_if_possible()
|
||||
/mob/proc/equip_to_slot(obj/item/W, slot)
|
||||
return
|
||||
|
||||
//This is just a commonly used configuration for the equip_to_slot_if_possible() proc, used to equip people when the rounds tarts and when events happen and such.
|
||||
//This is just a commonly used configuration for the equip_to_slot_if_possible() proc, used to equip people when the round starts and when events happen and such.
|
||||
//Also bypasses equip delay checks, since the mob isn't actually putting it on.
|
||||
/mob/proc/equip_to_slot_or_del(obj/item/W, slot)
|
||||
return equip_to_slot_if_possible(W, slot, 1, 1, 0, 1)
|
||||
return equip_to_slot_if_possible(W, slot, TRUE, TRUE, FALSE, TRUE)
|
||||
|
||||
//puts the item "W" into an appropriate slot in a human's inventory
|
||||
//returns 0 if it cannot, 1 if successful
|
||||
@@ -369,6 +369,7 @@
|
||||
use_that_empty_hand() //CIT CHANGE - ditto
|
||||
update_inv_hands() // CIT CHANGE - ditto.
|
||||
|
||||
|
||||
/mob/verb/memory()
|
||||
set name = "Notes"
|
||||
set category = "IC"
|
||||
@@ -494,7 +495,7 @@
|
||||
return
|
||||
|
||||
/mob/MouseDrop(mob/M)
|
||||
..()
|
||||
. = ..()
|
||||
if(M != usr)
|
||||
return
|
||||
if(usr == src)
|
||||
@@ -742,6 +743,10 @@
|
||||
/mob/proc/can_unbuckle()
|
||||
return 1
|
||||
|
||||
//Can the mob interact() with an atom?
|
||||
/mob/proc/can_interact_with(atom/A)
|
||||
return IsAdminGhost(src) || Adjacent(A)
|
||||
|
||||
//Can the mob see reagents inside of containers?
|
||||
/mob/proc/can_see_reagents()
|
||||
if(stat == DEAD) //Ghosts and such can always see reagents
|
||||
|
||||
@@ -254,7 +254,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
|
||||
|
||||
/proc/shake_camera(mob/M, duration, strength=1)
|
||||
if(!M || !M.client || duration <= 0)
|
||||
if(!M || !M.client || duration < 1)
|
||||
return
|
||||
var/client/C = M.client
|
||||
var/oldx = C.pixel_x
|
||||
@@ -408,7 +408,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
else
|
||||
dam = 0
|
||||
if((brute_heal > 0 && affecting.brute_dam > 0) || (burn_heal > 0 && affecting.burn_dam > 0))
|
||||
if(affecting.heal_damage(brute_heal, burn_heal, 1, 0))
|
||||
if(affecting.heal_damage(brute_heal, burn_heal, 0, TRUE, FALSE))
|
||||
H.update_damage_overlays()
|
||||
user.visible_message("[user] has fixed some of the [dam ? "dents on" : "burnt wires in"] [H]'s [affecting.name].", \
|
||||
"<span class='notice'>You fix some of the [dam ? "dents on" : "burnt wires in"] [H]'s [affecting.name].</span>")
|
||||
|
||||
Reference in New Issue
Block a user