Merge remote-tracking branch 'citadel/master' into 91-files-changed-fml
This commit is contained in:
@@ -23,11 +23,7 @@
|
||||
if(!pref_species)
|
||||
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)
|
||||
features = random_features(pref_species?.id, gender)
|
||||
age = rand(AGE_MIN,AGE_MAX)
|
||||
|
||||
/datum/preferences/proc/update_preview_icon(equip_job = TRUE)
|
||||
|
||||
@@ -570,7 +570,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
views |= i
|
||||
var/new_view = input("Choose your new view", "Modify view range", 7) as null|anything in views
|
||||
if(new_view)
|
||||
client.change_view(CLAMP(new_view, 7, max_view))
|
||||
client.change_view(clamp(new_view, 7, max_view))
|
||||
else
|
||||
client.change_view(CONFIG_GET(string/default_view))
|
||||
|
||||
|
||||
@@ -333,7 +333,8 @@
|
||||
I.moveToNullspace()
|
||||
else
|
||||
I.forceMove(newloc)
|
||||
I.dropped(src)
|
||||
if(I.dropped(src) == ITEM_RELOCATED_BY_DROPPED)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
//Outdated but still in use apparently. This should at least be a human proc.
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
var/adjusted_amount
|
||||
if(amount >= 0 && maximum)
|
||||
var/brainloss = get_brain_damage()
|
||||
var/new_brainloss = CLAMP(brainloss + amount, 0, maximum)
|
||||
var/new_brainloss = clamp(brainloss + amount, 0, maximum)
|
||||
if(brainloss > new_brainloss) //brainloss is over the cap already
|
||||
return 0
|
||||
adjusted_amount = new_brainloss - brainloss
|
||||
@@ -245,23 +245,17 @@
|
||||
. = adjusted_amount
|
||||
*/
|
||||
|
||||
/obj/item/organ/brain/on_life()
|
||||
if(damage >= BRAIN_DAMAGE_DEATH) //rip
|
||||
to_chat(owner, "<span class='userdanger'>The last spark of life in your brain fizzles out...</span>")
|
||||
owner.death()
|
||||
brain_death = TRUE
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/organ/brain/on_death()
|
||||
if(damage <= BRAIN_DAMAGE_DEATH) //rip
|
||||
brain_death = FALSE
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/organ/brain/applyOrganDamage(var/d, var/maximum = maxHealth)
|
||||
..()
|
||||
|
||||
. = ..()
|
||||
if(!. || !owner)
|
||||
return
|
||||
if(damage >= BRAIN_DAMAGE_DEATH) //rip
|
||||
if(owner.stat != DEAD)
|
||||
to_chat(owner, "<span class='userdanger'>The last spark of life in your brain fizzles out...</span>")
|
||||
owner.death()
|
||||
brain_death = TRUE
|
||||
else
|
||||
brain_death = FALSE
|
||||
|
||||
/obj/item/organ/brain/check_damage_thresholds(mob/M)
|
||||
. = ..()
|
||||
|
||||
@@ -12,6 +12,13 @@
|
||||
bubble_icon = "alien"
|
||||
type_of_meat = /obj/item/reagent_containers/food/snacks/meat/slab/xeno
|
||||
|
||||
/// How much brute damage without armor piercing they do against mobs in melee
|
||||
var/meleeSlashHumanPower = 20
|
||||
/// How much power they have for DefaultCombatKnockdown when attacking humans
|
||||
var/meleeKnockdownPower = 100
|
||||
/// How much brute damage they do to simple animals
|
||||
var/meleeSlashSAPower = 35
|
||||
|
||||
var/obj/item/card/id/wear_id = null // Fix for station bounced radios -- Skie
|
||||
var/has_fine_manipulation = 0
|
||||
var/move_delay_add = 0 // movement delay to add
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
maxHealth = 125
|
||||
health = 125
|
||||
icon_state = "aliend"
|
||||
meleeKnockdownPower = 80
|
||||
|
||||
/mob/living/carbon/alien/humanoid/drone/Initialize()
|
||||
AddAbility(new/obj/effect/proc_holder/alien/evolve(null))
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
/mob/living/carbon/alien/humanoid/hunter
|
||||
name = "alien hunter"
|
||||
caste = "h"
|
||||
maxHealth = 125
|
||||
health = 125
|
||||
maxHealth = 170
|
||||
health = 170
|
||||
icon_state = "alienh"
|
||||
meleeKnockdownPower = 75
|
||||
meleeSlashHumanPower = 20
|
||||
meleeSlashSAPower = 45
|
||||
var/obj/screen/leap_icon = null
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter/create_internal_organs()
|
||||
@@ -68,6 +71,7 @@
|
||||
else
|
||||
L.visible_message("<span class ='danger'>[src] pounces on [L]!</span>", "<span class ='userdanger'>[src] pounces on you!</span>")
|
||||
L.DefaultCombatKnockdown(100)
|
||||
L.Stagger(4 SECONDS)
|
||||
sleep(2)//Runtime prevention (infinite bump() calls on hulks)
|
||||
step_towards(src,L)
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
/mob/living/carbon/alien/humanoid/sentinel
|
||||
name = "alien sentinel"
|
||||
caste = "s"
|
||||
maxHealth = 150
|
||||
health = 150
|
||||
maxHealth = 140
|
||||
health = 140
|
||||
icon_state = "aliens"
|
||||
meleeSlashHumanPower = 15
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/Initialize()
|
||||
AddAbility(new /obj/effect/proc_holder/alien/sneak)
|
||||
|
||||
@@ -112,7 +112,6 @@
|
||||
return A
|
||||
return FALSE
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/check_breath(datum/gas_mixture/breath)
|
||||
if(breath && breath.total_moles() > 0 && !sneaking)
|
||||
playsound(get_turf(src), pick('sound/voice/lowHiss2.ogg', 'sound/voice/lowHiss3.ogg', 'sound/voice/lowHiss4.ogg'), 50, 0, -5)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/mob/living/carbon/alien/humanoid/grabbedby(mob/living/carbon/user, supress_message = 0)
|
||||
if(user == src && pulling && grab_state >= GRAB_AGGRESSIVE && !pulling.anchored && iscarbon(pulling))
|
||||
devour_mob(pulling, devour_time = 60)
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/adjust_body_temperature(current, loc_temp, boost)
|
||||
var/temperature = current
|
||||
var/difference = abs(current-loc_temp) //get difference
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
pressure_resistance = 200 //Because big, stompy xenos should not be blown around like paper.
|
||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/xeno = 20, /obj/item/stack/sheet/animalhide/xeno = 3)
|
||||
|
||||
meleeKnockdownPower = 125
|
||||
meleeSlashHumanPower = 30
|
||||
meleeSlashSAPower = 60
|
||||
|
||||
var/alt_inhands_file = 'icons/mob/alienqueen.dmi'
|
||||
|
||||
/mob/living/carbon/alien/humanoid/royal/can_inject(mob/user, error_msg, target_zone, penetrate_thick = FALSE, bypass_immunity = FALSE)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
mob_size = MOB_SIZE_SMALL
|
||||
density = FALSE
|
||||
hud_type = /datum/hud/larva
|
||||
mouse_opacity = MOUSE_OPACITY_OPAQUE
|
||||
|
||||
maxHealth = 25
|
||||
health = 25
|
||||
|
||||
@@ -77,6 +77,9 @@
|
||||
alien_powers = list(/obj/effect/proc_holder/alien/transfer)
|
||||
|
||||
/obj/item/organ/alien/plasmavessel/on_life()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
//If there are alien weeds on the ground then heal if needed or give some plasma
|
||||
if(locate(/obj/structure/alien/weeds) in owner.loc)
|
||||
if(owner.health >= owner.maxHealth)
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
/obj/item/organ/body_egg/alien_embryo/on_life()
|
||||
. = ..()
|
||||
if(!owner)
|
||||
return
|
||||
switch(stage)
|
||||
if(2, 3)
|
||||
if(prob(2))
|
||||
|
||||
@@ -20,5 +20,5 @@
|
||||
/mob/living/carbon/alien/AdjustStun(amount, updating = 1, ignore_canstun = 0)
|
||||
. = ..()
|
||||
if(!.)
|
||||
move_delay_add = CLAMP(move_delay_add + round(amount/2), 0, 10)
|
||||
move_delay_add = clamp(move_delay_add + round(amount/2), 0, 10)
|
||||
*/
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
update_body_parts() //to update the carbon's new bodyparts appearance
|
||||
GLOB.carbon_list += src
|
||||
blood_volume = (BLOOD_VOLUME_NORMAL * blood_ratio)
|
||||
add_movespeed_modifier(/datum/movespeed_modifier/carbon_crawling)
|
||||
|
||||
/mob/living/carbon/Destroy()
|
||||
//This must be done first, so the mob ghosts correctly before DNA etc is nulled
|
||||
@@ -98,6 +99,8 @@
|
||||
/mob/living/carbon/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
. = ..()
|
||||
var/hurt = TRUE
|
||||
if(GetComponent(/datum/component/tackler))
|
||||
return
|
||||
if(throwingdatum?.thrower && iscyborg(throwingdatum.thrower))
|
||||
var/mob/living/silicon/robot/R = throwingdatum.thrower
|
||||
if(!R.emagged)
|
||||
@@ -572,9 +575,9 @@
|
||||
become_husk("burn")
|
||||
med_hud_set_health()
|
||||
if(stat == SOFT_CRIT)
|
||||
add_movespeed_modifier(MOVESPEED_ID_CARBON_SOFTCRIT, TRUE, multiplicative_slowdown = SOFTCRIT_ADD_SLOWDOWN)
|
||||
add_movespeed_modifier(/datum/movespeed_modifier/carbon_softcrit)
|
||||
else
|
||||
remove_movespeed_modifier(MOVESPEED_ID_CARBON_SOFTCRIT, TRUE)
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/carbon_softcrit)
|
||||
|
||||
/mob/living/carbon/update_stamina()
|
||||
var/stam = getStaminaLoss()
|
||||
|
||||
@@ -63,3 +63,4 @@
|
||||
var/damageoverlaytemp = 0
|
||||
|
||||
var/drunkenness = 0 //Overall drunkenness - check handle_alcohol() in life.dm for effects
|
||||
var/tackling = FALSE //Whether or not we are tackling, this will prevent the knock into effects for carbons
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
status_flags = GODMODE|CANPUSH
|
||||
mouse_drag_pointer = MOUSE_INACTIVE_POINTER
|
||||
var/in_use = FALSE
|
||||
no_vore = TRUE
|
||||
|
||||
INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy)
|
||||
|
||||
|
||||
@@ -768,7 +768,7 @@
|
||||
return
|
||||
else
|
||||
if(hud_used.healths)
|
||||
var/health_amount = min(health, maxHealth - CLAMP(getStaminaLoss()-50, 0, 80))//CIT CHANGE - makes staminaloss have less of an impact on the health hud
|
||||
var/health_amount = min(health, maxHealth - clamp(getStaminaLoss()-50, 0, 80))//CIT CHANGE - makes staminaloss have less of an impact on the health hud
|
||||
if(..(health_amount)) //not dead
|
||||
switch(hal_screwyhud)
|
||||
if(SCREWYHUD_CRIT)
|
||||
@@ -1041,7 +1041,7 @@
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/proc/clear_shove_slowdown()
|
||||
remove_movespeed_modifier(MOVESPEED_ID_SHOVE)
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/shove)
|
||||
var/active_item = get_active_held_item()
|
||||
if(is_type_in_typecache(active_item, GLOB.shove_disarming_types))
|
||||
visible_message("<span class='warning'>[src.name] regains their grip on \the [active_item]!</span>", "<span class='warning'>You regain your grip on \the [active_item]</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
@@ -1050,17 +1050,17 @@
|
||||
. = ..()
|
||||
|
||||
if(HAS_TRAIT(src, TRAIT_IGNORESLOWDOWN))
|
||||
remove_movespeed_modifier(MOVESPEED_ID_DAMAGE_SLOWDOWN)
|
||||
remove_movespeed_modifier(MOVESPEED_ID_DAMAGE_SLOWDOWN_FLYING)
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/damage_slowdown)
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/damage_slowdown_flying)
|
||||
return
|
||||
var/stambufferinfluence = (bufferedstam*(100/stambuffer))*0.2 //CIT CHANGE - makes stamina buffer influence movedelay
|
||||
var/health_deficiency = ((100 + stambufferinfluence) - health + (getStaminaLoss()*0.75))//CIT CHANGE - reduces the impact of staminaloss and makes stamina buffer influence it
|
||||
if(health_deficiency >= 40)
|
||||
add_movespeed_modifier(MOVESPEED_ID_DAMAGE_SLOWDOWN, override = TRUE, multiplicative_slowdown = ((health_deficiency-39) / 75), blacklisted_movetypes = FLOATING|FLYING)
|
||||
add_movespeed_modifier(MOVESPEED_ID_DAMAGE_SLOWDOWN_FLYING, override = TRUE, multiplicative_slowdown = ((health_deficiency-39) / 25), movetypes = FLYING, blacklisted_movetypes = FLOATING)
|
||||
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/damage_slowdown, TRUE, (health_deficiency-39) / 75)
|
||||
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/damage_slowdown_flying, TRUE, (health_deficiency-39) / 25)
|
||||
else
|
||||
remove_movespeed_modifier(MOVESPEED_ID_DAMAGE_SLOWDOWN)
|
||||
remove_movespeed_modifier(MOVESPEED_ID_DAMAGE_SLOWDOWN_FLYING)
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/damage_slowdown)
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/damage_slowdown_flying)
|
||||
|
||||
/mob/living/carbon/human/do_after_coefficent()
|
||||
. = ..()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/mob/living/carbon/human/get_blocking_items()
|
||||
. = ..()
|
||||
if(wear_suit)
|
||||
. += wear_suit
|
||||
. |= wear_suit
|
||||
if(w_uniform)
|
||||
. += w_uniform
|
||||
. |= w_uniform
|
||||
if(wear_neck)
|
||||
. += wear_neck
|
||||
. |= wear_neck
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
if(M.a_intent == INTENT_HARM)
|
||||
if (w_uniform)
|
||||
w_uniform.add_fingerprint(M)
|
||||
var/damage = prob(90) ? 20 : 0
|
||||
var/damage = prob(90) ? M.meleeSlashHumanPower : 0
|
||||
if(!damage)
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has lunged at [src]!</span>", \
|
||||
@@ -182,10 +182,7 @@
|
||||
"<span class='userdanger'>[M] disarmed [src]!</span>")
|
||||
else
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
|
||||
if(!lying) //CITADEL EDIT
|
||||
DefaultCombatKnockdown(100, TRUE, FALSE, 30, 25)
|
||||
else
|
||||
DefaultCombatKnockdown(100)
|
||||
DefaultCombatKnockdown(M.meleeKnockdownPower)
|
||||
log_combat(M, src, "tackled")
|
||||
visible_message("<span class='danger'>[M] has tackled down [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has tackled down [src]!</span>")
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
/mob/living/carbon/human/get_movespeed_modifiers()
|
||||
var/list/considering = ..()
|
||||
. = considering
|
||||
if(HAS_TRAIT(src, TRAIT_IGNORESLOWDOWN))
|
||||
for(var/id in .)
|
||||
var/list/data = .[id]
|
||||
if(data[MOVESPEED_DATA_INDEX_FLAGS] & IGNORE_NOSLOW)
|
||||
.[id] = data
|
||||
. = list()
|
||||
for(var/id in considering)
|
||||
var/datum/movespeed_modifier/M = considering[id]
|
||||
if(M.flags & IGNORE_NOSLOW || M.multiplicative_slowdown < 0)
|
||||
.[id] = M
|
||||
return
|
||||
return considering
|
||||
|
||||
/mob/living/carbon/human/movement_delay()
|
||||
. = ..()
|
||||
|
||||
@@ -331,7 +331,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
if(mutant_bodyparts["meat_type"]) //I can't believe it's come to the meat
|
||||
H.type_of_meat = GLOB.meat_types[H.dna.features["meat_type"]]
|
||||
|
||||
C.add_movespeed_modifier(MOVESPEED_ID_SPECIES, TRUE, 100, override=TRUE, multiplicative_slowdown=speedmod, movetypes=(~FLYING))
|
||||
C.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/species, TRUE, multiplicative_slowdown = speedmod)
|
||||
|
||||
SEND_SIGNAL(C, COMSIG_SPECIES_GAIN, src, old_species)
|
||||
|
||||
@@ -349,7 +349,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
for(var/X in inherent_traits)
|
||||
REMOVE_TRAIT(C, X, SPECIES_TRAIT)
|
||||
|
||||
C.remove_movespeed_modifier(MOVESPEED_ID_SPECIES)
|
||||
C.remove_movespeed_modifier(/datum/movespeed_modifier/species)
|
||||
|
||||
if(mutant_bodyparts["meat_type"])
|
||||
C.type_of_meat = GLOB.meat_types[C.dna.features["meat_type"]]
|
||||
@@ -1299,14 +1299,14 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
if(H.overeatduration < 100)
|
||||
to_chat(H, "<span class='notice'>You feel fit again!</span>")
|
||||
REMOVE_TRAIT(H, TRAIT_FAT, OBESITY)
|
||||
H.remove_movespeed_modifier(MOVESPEED_ID_FAT)
|
||||
H.remove_movespeed_modifier(/datum/movespeed_modifier/obesity)
|
||||
H.update_inv_w_uniform()
|
||||
H.update_inv_wear_suit()
|
||||
else
|
||||
if(H.overeatduration >= 100)
|
||||
to_chat(H, "<span class='danger'>You suddenly feel blubbery!</span>")
|
||||
ADD_TRAIT(H, TRAIT_FAT, OBESITY)
|
||||
H.add_movespeed_modifier(MOVESPEED_ID_FAT, multiplicative_slowdown = 1.5)
|
||||
H.add_movespeed_modifier(/datum/movespeed_modifier/obesity)
|
||||
H.update_inv_w_uniform()
|
||||
H.update_inv_wear_suit()
|
||||
|
||||
@@ -1362,9 +1362,9 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
if(!HAS_TRAIT(H, TRAIT_NOHUNGER))
|
||||
var/hungry = (500 - H.nutrition) / 5 //So overeat would be 100 and default level would be 80
|
||||
if(hungry >= 70)
|
||||
H.add_movespeed_modifier(MOVESPEED_ID_HUNGRY, override = TRUE, multiplicative_slowdown = (hungry / 50))
|
||||
H.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/hunger, multiplicative_slowdown = (hungry / 50))
|
||||
else
|
||||
H.remove_movespeed_modifier(MOVESPEED_ID_HUNGRY)
|
||||
H.remove_movespeed_modifier(/datum/movespeed_modifier/hunger)
|
||||
|
||||
switch(H.nutrition)
|
||||
if(NUTRITION_LEVEL_FULL to INFINITY)
|
||||
@@ -1615,7 +1615,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
"You hear a slap."
|
||||
)
|
||||
return FALSE
|
||||
|
||||
|
||||
else
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
|
||||
|
||||
@@ -1623,10 +1623,10 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
user.adjustStaminaLossBuffered(1)
|
||||
else
|
||||
user.adjustStaminaLossBuffered(3)
|
||||
|
||||
|
||||
if(attacker_style && attacker_style.disarm_act(user,target))
|
||||
return TRUE
|
||||
|
||||
|
||||
if(target.w_uniform)
|
||||
target.w_uniform.add_fingerprint(user)
|
||||
//var/randomized_zone = ran_zone(user.zone_selected) CIT CHANGE - comments out to prevent compiling errors
|
||||
@@ -1659,7 +1659,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
randn -= 25 //if you are a pugilist, you're slapping that item from them pretty reliably
|
||||
if(HAS_TRAIT(target, TRAIT_PUGILIST))
|
||||
randn += 25 //meanwhile, pugilists are less likely to get disarmed
|
||||
|
||||
|
||||
if(randn <= 35)//CIT CHANGE - changes this back to a 35% chance to accomodate for the above being commented out in favor of right-click pushing
|
||||
var/obj/item/I = null
|
||||
if(target.pulling)
|
||||
@@ -1932,8 +1932,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
var/obj/item/target_held_item = target.get_active_held_item()
|
||||
if(!is_type_in_typecache(target_held_item, GLOB.shove_disarming_types))
|
||||
target_held_item = null
|
||||
if(!target.has_movespeed_modifier(MOVESPEED_ID_SHOVE))
|
||||
target.add_movespeed_modifier(MOVESPEED_ID_SHOVE, multiplicative_slowdown = SHOVE_SLOWDOWN_STRENGTH)
|
||||
if(!target.has_movespeed_modifier(/datum/movespeed_modifier/shove))
|
||||
target.add_movespeed_modifier(/datum/movespeed_modifier/shove)
|
||||
if(target_held_item)
|
||||
if(!HAS_TRAIT(target_held_item, TRAIT_NODROP))
|
||||
target.visible_message("<span class='danger'>[target.name]'s grip on \the [target_held_item] loosens!</span>",
|
||||
@@ -2084,7 +2084,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "cold")
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "hot", /datum/mood_event/hot)
|
||||
|
||||
H.remove_movespeed_modifier(MOVESPEED_ID_COLD)
|
||||
H.remove_movespeed_modifier(/datum/movespeed_modifier/cold)
|
||||
|
||||
var/burn_damage
|
||||
var/firemodifier = H.fire_stacks / 50
|
||||
@@ -2101,8 +2101,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
else if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT && !HAS_TRAIT(H, TRAIT_RESISTCOLD))
|
||||
SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "hot")
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "cold", /datum/mood_event/cold)
|
||||
//Sorry for the nasty oneline but I don't want to assign a variable on something run pretty frequently
|
||||
H.add_movespeed_modifier(MOVESPEED_ID_COLD, override = TRUE, multiplicative_slowdown = ((BODYTEMP_COLD_DAMAGE_LIMIT - H.bodytemperature) / COLD_SLOWDOWN_FACTOR), blacklisted_movetypes = FLOATING)
|
||||
//Apply cold slowdown
|
||||
H.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/cold, multiplicative_slowdown = ((BODYTEMP_COLD_DAMAGE_LIMIT - H.bodytemperature) / COLD_SLOWDOWN_FACTOR))
|
||||
switch(H.bodytemperature)
|
||||
if(200 to BODYTEMP_COLD_DAMAGE_LIMIT)
|
||||
H.apply_damage(COLD_DAMAGE_LEVEL_1*coldmod*H.physiology.cold_mod, BURN)
|
||||
@@ -2112,7 +2112,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
H.apply_damage(COLD_DAMAGE_LEVEL_3*coldmod*H.physiology.cold_mod, BURN)
|
||||
|
||||
else
|
||||
H.remove_movespeed_modifier(MOVESPEED_ID_COLD)
|
||||
H.remove_movespeed_modifier(/datum/movespeed_modifier/cold)
|
||||
SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "cold")
|
||||
SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "hot")
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) //
|
||||
name = "Dwarf"
|
||||
id = "dwarf" //Also called Homo sapiens pumilionis
|
||||
default_color = "FFFFFF"
|
||||
species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,NO_UNDERWEAR)
|
||||
species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,NO_UNDERWEAR,TRAIT_DWARF)
|
||||
inherent_traits = list()
|
||||
limbs_id = "human"
|
||||
use_skintones = USE_SKINTONES_GRAYSCALE_CUSTOM
|
||||
@@ -36,7 +36,6 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) //
|
||||
H.transform = H.transform.Scale(1, 0.8) //We use scale, and yeah. Dwarves can become gnomes with DWARFISM.
|
||||
RegisterSignal(C, COMSIG_MOB_SAY, .proc/handle_speech) //We register handle_speech is being used.
|
||||
|
||||
|
||||
/datum/species/dwarf/on_species_loss(mob/living/carbon/H, datum/species/new_species)
|
||||
. = ..()
|
||||
H.transform = H.transform.Scale(1, 1.25) //And we undo it.
|
||||
@@ -102,12 +101,11 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) //
|
||||
|
||||
/obj/item/organ/dwarfgland/on_life() //Primary loop to hook into to start delayed loops for other loops..
|
||||
. = ..()
|
||||
dwarf_cycle_ticker()
|
||||
if(!owner || owner.stat == DEAD)
|
||||
dwarf_cycle_ticker()
|
||||
|
||||
//Handles the delayed tick cycle by just adding on increments per each on_life() tick
|
||||
/obj/item/organ/dwarfgland/proc/dwarf_cycle_ticker()
|
||||
if(owner.stat == DEAD)
|
||||
return //We make sure they are not dead, so they don't increment any tickers.
|
||||
dwarf_eth_ticker++
|
||||
dwarf_filth_ticker++
|
||||
|
||||
@@ -170,7 +168,7 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) //
|
||||
for(var/datum/reagent/R in owner.reagents.reagent_list)
|
||||
if(istype(R, /datum/reagent/consumable/ethanol))
|
||||
var/datum/reagent/consumable/ethanol/E = R
|
||||
stored_alcohol = CLAMP(stored_alcohol + E.boozepwr / 50, 0, max_alcohol)
|
||||
stored_alcohol = clamp(stored_alcohol + E.boozepwr / 50, 0, max_alcohol)
|
||||
var/heal_amt = heal_rate
|
||||
stored_alcohol -= alcohol_rate //Subtracts alcohol_Rate from stored alcohol so EX: 250 - 0.25 per each loop that occurs.
|
||||
if(stored_alcohol > 400) //If they are over 400 they start regenerating
|
||||
|
||||
@@ -74,9 +74,7 @@
|
||||
|
||||
//misc
|
||||
/mob/living/carbon/human/dummy
|
||||
no_vore = TRUE
|
||||
vore_flags = NO_VORE
|
||||
|
||||
/mob/living/carbon/human/vore
|
||||
devourable = TRUE
|
||||
digestable = TRUE
|
||||
feeding = TRUE
|
||||
vore_flags = DEVOURABLE | DIGESTABLE | FEEDING
|
||||
|
||||
@@ -397,7 +397,7 @@
|
||||
var/new_y = P.starting.y + pick(0, 0, 0, 0, 0, -1, 1, -2, 2)
|
||||
var/turf/target = get_turf(P.starting)
|
||||
// redirect the projectile
|
||||
P.preparePixelProjectile(locate(CLAMP(target.x + new_x, 1, world.maxx), CLAMP(target.y + new_y, 1, world.maxy), H.z), H)
|
||||
P.preparePixelProjectile(locate(clamp(target.x + new_x, 1, world.maxx), clamp(target.y + new_y, 1, world.maxy), H.z), H)
|
||||
return BULLET_ACT_FORCE_PIERCE
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -606,7 +606,7 @@
|
||||
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"] = CLAMP(round(new_length), min_D, max_D)
|
||||
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)
|
||||
|
||||
@@ -106,8 +106,8 @@
|
||||
to_chat(victim, "<span class='danger'>[H] is draining your blood!</span>")
|
||||
to_chat(H, "<span class='notice'>You drain some blood!</span>")
|
||||
playsound(H, 'sound/items/drink.ogg', 30, 1, -2)
|
||||
victim.blood_volume = CLAMP(victim.blood_volume - drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
|
||||
H.blood_volume = CLAMP(H.blood_volume + drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
|
||||
victim.blood_volume = clamp(victim.blood_volume - drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
|
||||
H.blood_volume = clamp(H.blood_volume + drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
|
||||
if(!victim.blood_volume)
|
||||
to_chat(H, "<span class='warning'>You finish off [victim]'s blood supply!</span>")
|
||||
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
//TOXINS/PLASMA
|
||||
if(Toxins_partialpressure > safe_tox_max)
|
||||
var/ratio = (breath_gases[/datum/gas/plasma]/safe_tox_max) * 10
|
||||
adjustToxLoss(CLAMP(ratio, MIN_TOXIC_GAS_DAMAGE, MAX_TOXIC_GAS_DAMAGE))
|
||||
adjustToxLoss(clamp(ratio, MIN_TOXIC_GAS_DAMAGE, MAX_TOXIC_GAS_DAMAGE))
|
||||
throw_alert("too_much_tox", /obj/screen/alert/too_much_tox)
|
||||
else
|
||||
clear_alert("too_much_tox")
|
||||
|
||||
@@ -65,12 +65,11 @@
|
||||
|
||||
/mob/living/carbon/monkey/on_reagent_change()
|
||||
. = ..()
|
||||
remove_movespeed_modifier(MOVESPEED_ID_MONKEY_REAGENT_SPEEDMOD, TRUE)
|
||||
var/amount
|
||||
if(reagents.has_reagent(/datum/reagent/medicine/morphine))
|
||||
amount = -1
|
||||
if(amount)
|
||||
add_movespeed_modifier(MOVESPEED_ID_MONKEY_REAGENT_SPEEDMOD, TRUE, 100, override = TRUE, multiplicative_slowdown = amount)
|
||||
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/monkey_reagent_speedmod, TRUE, amount)
|
||||
|
||||
/mob/living/carbon/monkey/updatehealth()
|
||||
. = ..()
|
||||
@@ -78,7 +77,7 @@
|
||||
var/health_deficiency = (100 - health)
|
||||
if(health_deficiency >= 45)
|
||||
slow += (health_deficiency / 25)
|
||||
add_movespeed_modifier(MOVESPEED_ID_MONKEY_HEALTH_SPEEDMOD, TRUE, 100, override = TRUE, multiplicative_slowdown = slow)
|
||||
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/monkey_health_speedmod, TRUE, slow)
|
||||
|
||||
/mob/living/carbon/monkey/adjust_bodytemperature(amount)
|
||||
. = ..()
|
||||
@@ -87,7 +86,7 @@
|
||||
slow += (283.222 - bodytemperature) / 10 * 1.75
|
||||
if(slow <= 0)
|
||||
return
|
||||
add_movespeed_modifier(MOVESPEED_ID_MONKEY_TEMPERATURE_SPEEDMOD, TRUE, 100, override = TRUE, multiplicative_slowdown = amount)
|
||||
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/monkey_temperature_speedmod, TRUE, slow)
|
||||
|
||||
/mob/living/carbon/monkey/Stat()
|
||||
..()
|
||||
@@ -99,7 +98,6 @@
|
||||
if(changeling)
|
||||
stat("Chemical Storage", "[changeling.chem_charges]/[changeling.chem_storage]")
|
||||
stat("Absorbed DNA", changeling.absorbedcount)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/verb/removeinternal()
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
clear_alert("high")
|
||||
|
||||
/mob/living/carbon/adjust_disgust(amount)
|
||||
disgust = CLAMP(disgust+amount, 0, DISGUST_LEVEL_MAXEDOUT)
|
||||
disgust = clamp(disgust+amount, 0, DISGUST_LEVEL_MAXEDOUT)
|
||||
|
||||
/mob/living/carbon/set_disgust(amount)
|
||||
disgust = CLAMP(amount, 0, DISGUST_LEVEL_MAXEDOUT)
|
||||
disgust = clamp(amount, 0, DISGUST_LEVEL_MAXEDOUT)
|
||||
|
||||
|
||||
////////////////////////////////////////TRAUMAS/////////////////////////////////////////
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
if(EFFECT_STUN)
|
||||
Stun(effect * hit_percent)
|
||||
if(EFFECT_KNOCKDOWN)
|
||||
DefaultCombatKnockdown(effect * hit_percent, override_stamdmg = knockdown_stammax ? CLAMP(knockdown_stamoverride, 0, knockdown_stammax-getStaminaLoss()) : knockdown_stamoverride)
|
||||
DefaultCombatKnockdown(effect * hit_percent, override_stamdmg = knockdown_stammax ? clamp(knockdown_stamoverride, 0, knockdown_stammax-getStaminaLoss()) : knockdown_stamoverride)
|
||||
if(EFFECT_UNCONSCIOUS)
|
||||
Unconscious(effect * hit_percent)
|
||||
if(EFFECT_IRRADIATE)
|
||||
@@ -140,7 +140,7 @@
|
||||
/mob/living/proc/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
bruteloss = CLAMP((bruteloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
bruteloss = clamp((bruteloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
@@ -151,7 +151,7 @@
|
||||
/mob/living/proc/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
oxyloss = CLAMP((oxyloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
oxyloss = clamp((oxyloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
@@ -170,7 +170,7 @@
|
||||
/mob/living/proc/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
toxloss = CLAMP((toxloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
toxloss = clamp((toxloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
@@ -189,7 +189,7 @@
|
||||
/mob/living/proc/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
fireloss = CLAMP((fireloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
fireloss = clamp((fireloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
@@ -200,7 +200,7 @@
|
||||
/mob/living/proc/adjustCloneLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
cloneloss = CLAMP((cloneloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
cloneloss = clamp((cloneloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
var/obj/O = A
|
||||
if(ObjBump(O))
|
||||
return
|
||||
if(ismovableatom(A))
|
||||
if(ismovable(A))
|
||||
var/atom/movable/AM = A
|
||||
if(PushAM(AM, move_force))
|
||||
return
|
||||
@@ -668,19 +668,22 @@
|
||||
resist_fire() //stop, drop, and roll
|
||||
// Give clickdelay
|
||||
return TRUE
|
||||
|
||||
if(resting) //cit change - allows resisting out of resting
|
||||
resist_a_rest() // ditto
|
||||
// DO NOT GIVE CLCIKDELAY - resist_a_rest() handles spam prevention. Somewhat.
|
||||
return FALSE
|
||||
if(last_special <= world.time)
|
||||
resist_restraints() //trying to remove cuffs.
|
||||
// DO NOT GIVE CLICKDELAY - last_special handles this.
|
||||
return FALSE
|
||||
|
||||
if(CHECK_MOBILITY(src, MOBILITY_USE) && resist_embedded()) //Citadel Change for embedded removal memes - requires being able to use items.
|
||||
// DO NOT GIVE DEFAULT CLICKDELAY - This is a combat action.
|
||||
changeNext_move(CLICK_CD_MELEE)
|
||||
return FALSE
|
||||
|
||||
if(last_special <= world.time)
|
||||
resist_restraints() //trying to remove cuffs.
|
||||
// DO NOT GIVE CLICKDELAY - last_special handles this.
|
||||
return FALSE
|
||||
|
||||
/// Proc to resist a grab. moving_resist is TRUE if this began by someone attempting to move. Return FALSE if still grabbed/failed to break out. Use this instead of resist_grab() directly.
|
||||
/mob/proc/attempt_resist_grab(moving_resist, forced, log = TRUE)
|
||||
if(!pulledby) //not being grabbed
|
||||
@@ -1027,7 +1030,7 @@
|
||||
update_fire()
|
||||
|
||||
/mob/living/proc/adjust_fire_stacks(add_fire_stacks) //Adjusting the amount of fire_stacks we have on person
|
||||
fire_stacks = CLAMP(fire_stacks + add_fire_stacks, -20, 20)
|
||||
fire_stacks = clamp(fire_stacks + add_fire_stacks, -20, 20)
|
||||
if(on_fire && fire_stacks <= 0)
|
||||
ExtinguishMob()
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
if(real_attack)
|
||||
for(var/obj/item/I in tocheck)
|
||||
// i don't like this too
|
||||
var/final_block_chance = I.block_chance - (CLAMP((armour_penetration-I.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example
|
||||
var/final_block_chance = I.block_chance - (clamp((armour_penetration-I.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example
|
||||
var/results = I.run_block(src, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, return_list)
|
||||
. |= results
|
||||
if((results & BLOCK_SUCCESS) && !(results & BLOCK_CONTINUE_CHAIN))
|
||||
@@ -65,12 +65,13 @@
|
||||
else
|
||||
for(var/obj/item/I in tocheck)
|
||||
// i don't like this too
|
||||
var/final_block_chance = I.block_chance - (CLAMP((armour_penetration-I.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example
|
||||
var/final_block_chance = I.block_chance - (clamp((armour_penetration-I.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example
|
||||
I.check_block(src, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, return_list)
|
||||
|
||||
/// Gets an unsortedlist of objects to run block checks on.
|
||||
/mob/living/proc/get_blocking_items()
|
||||
. = list()
|
||||
SEND_SIGNAL(src, COMSIG_LIVING_GET_BLOCKING_ITEMS, .)
|
||||
for(var/obj/item/I in held_items)
|
||||
// this is a bad check but i am not removing it until a better catchall is made
|
||||
if(istype(I, /obj/item/clothing))
|
||||
@@ -85,11 +86,13 @@
|
||||
|
||||
/// Runs block and returns flag for do_run_block to process.
|
||||
/obj/item/proc/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_RUN_BLOCK, owner, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, block_return)
|
||||
. = SEND_SIGNAL(src, COMSIG_ITEM_RUN_BLOCK, owner, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, block_return)
|
||||
if(. & BLOCK_SUCCESS)
|
||||
return
|
||||
if(prob(final_block_chance))
|
||||
owner.visible_message("<span class='danger'>[owner] blocks [attack_text] with [src]!</span>")
|
||||
return BLOCK_SUCCESS | BLOCK_PHYSICAL_EXTERNAL
|
||||
return BLOCK_NONE
|
||||
return . | BLOCK_SUCCESS | BLOCK_PHYSICAL_EXTERNAL
|
||||
return . | BLOCK_NONE
|
||||
|
||||
/// Returns block information using list/block_return. Used for check_block() on mobs.
|
||||
/obj/item/proc/check_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
|
||||
@@ -88,9 +88,9 @@
|
||||
|
||||
/obj/item/proc/get_volume_by_throwforce_and_or_w_class()
|
||||
if(throwforce && w_class)
|
||||
return CLAMP((throwforce + w_class) * 5, 30, 100)// Add the item's throwforce to its weight class and multiply by 5, then clamp the value between 30 and 100
|
||||
return clamp((throwforce + w_class) * 5, 30, 100)// Add the item's throwforce to its weight class and multiply by 5, then clamp the value between 30 and 100
|
||||
else if(w_class)
|
||||
return CLAMP(w_class * 8, 20, 100) // Multiply the item's weight class by 8, then clamp the value between 20 and 100
|
||||
return clamp(w_class * 8, 20, 100) // Multiply the item's weight class by 8, then clamp the value between 20 and 100
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
@@ -94,11 +94,13 @@
|
||||
|
||||
if(should_be_lying)
|
||||
mobility_flags &= ~MOBILITY_STAND
|
||||
setMovetype(movement_type | CRAWLING)
|
||||
if(!lying) //force them on the ground
|
||||
lying = pick(90, 270)
|
||||
if(has_gravity() && !buckled)
|
||||
playsound(src, "bodyfall", 20, 1)
|
||||
else
|
||||
setMovetype(movement_type & ~CRAWLING)
|
||||
mobility_flags |= MOBILITY_STAND
|
||||
lying = 0
|
||||
|
||||
@@ -161,8 +163,8 @@
|
||||
if(!has_legs && has_arms < 2)
|
||||
limbless_slowdown += 6 - (has_arms * 3)
|
||||
if(limbless_slowdown)
|
||||
add_movespeed_modifier(MOVESPEED_ID_LIVING_LIMBLESS, update=TRUE, priority=100, override=TRUE, multiplicative_slowdown=limbless_slowdown, blacklisted_movetypes = FLYING|FLOATING)
|
||||
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/limbless, multiplicative_slowdown = limbless_slowdown)
|
||||
else
|
||||
remove_movespeed_modifier(MOVESPEED_ID_LIVING_LIMBLESS, update=TRUE)
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/limbless)
|
||||
|
||||
return mobility_flags
|
||||
|
||||
@@ -36,38 +36,26 @@
|
||||
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
|
||||
|
||||
/mob/living/proc/update_move_intent_slowdown()
|
||||
var/mod = 0
|
||||
if(m_intent == MOVE_INTENT_WALK)
|
||||
mod = CONFIG_GET(number/movedelay/walk_delay)
|
||||
else
|
||||
mod = CONFIG_GET(number/movedelay/run_delay)
|
||||
if(!isnum(mod))
|
||||
mod = 1
|
||||
add_movespeed_modifier(MOVESPEED_ID_MOB_WALK_RUN_CONFIG_SPEED, TRUE, 100, override = TRUE, multiplicative_slowdown = mod)
|
||||
add_movespeed_modifier((m_intent == MOVE_INTENT_WALK)? /datum/movespeed_modifier/config_walk_run/walk : /datum/movespeed_modifier/config_walk_run/run)
|
||||
|
||||
/mob/living/proc/update_turf_movespeed(turf/open/T)
|
||||
if(isopenturf(T) && !is_flying())
|
||||
add_movespeed_modifier(MOVESPEED_ID_LIVING_TURF_SPEEDMOD, TRUE, 100, override = TRUE, multiplicative_slowdown = T.slowdown)
|
||||
if(isopenturf(T))
|
||||
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/turf_slowdown, multiplicative_slowdown = T.slowdown)
|
||||
else
|
||||
remove_movespeed_modifier(MOVESPEED_ID_LIVING_TURF_SPEEDMOD)
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/turf_slowdown)
|
||||
|
||||
/mob/living/proc/update_pull_movespeed()
|
||||
if(pulling && isliving(pulling))
|
||||
var/mob/living/L = pulling
|
||||
if(drag_slowdown && L.lying && !L.buckled && grab_state < GRAB_AGGRESSIVE)
|
||||
add_movespeed_modifier(MOVESPEED_ID_PRONE_DRAGGING, multiplicative_slowdown = PULL_PRONE_SLOWDOWN)
|
||||
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/bulky_drag, multiplicative_slowdown = PULL_PRONE_SLOWDOWN)
|
||||
return
|
||||
remove_movespeed_modifier(MOVESPEED_ID_PRONE_DRAGGING)
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/bulky_drag)
|
||||
|
||||
/mob/living/canZMove(dir, turf/target)
|
||||
return can_zTravel(target, dir) && (movement_type & FLYING)
|
||||
|
||||
@@ -23,5 +23,5 @@
|
||||
|
||||
if(ranged_ability)
|
||||
ranged_ability.add_ranged_ability(src, "<span class='notice'>You currently have <b>[ranged_ability]</b> active!</span>")
|
||||
if(vore_init && !vorepref_init) //Vore's been initialized, voreprefs haven't. If this triggers then that means that voreprefs failed to load due to the client being missing.
|
||||
if((vore_flags & VORE_INIT) && !(vore_flags & VOREPREF_INIT)) //Vore's been initialized, voreprefs haven't. If this triggers then that means that voreprefs failed to load due to the client being missing.
|
||||
copy_from_prefs_vr()
|
||||
|
||||
@@ -869,7 +869,7 @@
|
||||
if(istype(A, /obj/machinery/camera))
|
||||
current = A
|
||||
if(client)
|
||||
if(ismovableatom(A))
|
||||
if(ismovable(A))
|
||||
if(A != GLOB.ai_camera_room_landmark)
|
||||
end_multicam()
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
@@ -1016,7 +1016,7 @@
|
||||
if("Yes.")
|
||||
src.ghostize(FALSE, penalize = TRUE)
|
||||
var/announce_rank = "Artificial Intelligence,"
|
||||
if(GLOB.announcement_systems.len)
|
||||
if(GLOB.announcement_systems.len)
|
||||
// Sends an announcement the AI has cryoed.
|
||||
var/obj/machinery/announcement_system/announcer = pick(GLOB.announcement_systems)
|
||||
announcer.announce("CRYOSTORAGE", src.real_name, announce_rank, list())
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
/mob/living/silicon/pai/proc/process_hack()
|
||||
|
||||
if(cable && cable.machine && istype(cable.machine, /obj/machinery/door) && cable.machine == hackdoor && get_dist(src, hackdoor) <= 1)
|
||||
hackprogress = CLAMP(hackprogress + 4, 0, 100)
|
||||
hackprogress = clamp(hackprogress + 4, 0, 100)
|
||||
else
|
||||
temp = "Door Jack: Connection to airlock has been lost. Hack aborted."
|
||||
hackprogress = 0
|
||||
@@ -273,9 +273,9 @@
|
||||
/mob/living/silicon/pai/Process_Spacemove(movement_dir = 0)
|
||||
. = ..()
|
||||
if(!.)
|
||||
add_movespeed_modifier(MOVESPEED_ID_PAI_SPACEWALK_SPEEDMOD, TRUE, 100, multiplicative_slowdown = 2)
|
||||
add_movespeed_modifier(/datum/movespeed_modifier/pai_spacewalk)
|
||||
return TRUE
|
||||
remove_movespeed_modifier(MOVESPEED_ID_PAI_SPACEWALK_SPEEDMOD, TRUE)
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/pai_spacewalk)
|
||||
return TRUE
|
||||
|
||||
/mob/living/silicon/pai/examine(mob/user)
|
||||
@@ -301,7 +301,7 @@
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/pai/process()
|
||||
emitterhealth = CLAMP((emitterhealth + emitterregen), -50, emittermaxhealth)
|
||||
emitterhealth = clamp((emitterhealth + emitterregen), -50, emittermaxhealth)
|
||||
|
||||
/obj/item/paicard/attackby(obj/item/W, mob/user, params)
|
||||
..()
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
return FALSE //No we're not flammable
|
||||
|
||||
/mob/living/silicon/pai/proc/take_holo_damage(amount)
|
||||
emitterhealth = CLAMP((emitterhealth - amount), -50, emittermaxhealth)
|
||||
emitterhealth = clamp((emitterhealth - amount), -50, emittermaxhealth)
|
||||
if(emitterhealth < 0)
|
||||
fold_in(force = TRUE)
|
||||
if(amount > 0)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if(cell && cell.charge)
|
||||
if(cell.charge <= 100)
|
||||
uneq_all()
|
||||
var/amt = CLAMP((lamp_intensity - 2) * 2,1,cell.charge) //Always try to use at least one charge per tick, but allow it to completely drain the cell.
|
||||
var/amt = clamp((lamp_intensity - 2) * 2,1,cell.charge) //Always try to use at least one charge per tick, but allow it to completely drain the cell.
|
||||
cell.use(amt) //Usage table: 1/tick if off/lowest setting, 4 = 4/tick, 6 = 8/tick, 8 = 12/tick, 10 = 16/tick
|
||||
else
|
||||
uneq_all()
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
return
|
||||
|
||||
if(!CONFIG_GET(flag/disable_secborg) && GLOB.security_level < CONFIG_GET(number/minimum_secborg_alert))
|
||||
to_chat(src, "<span class='notice'>NOTICE: Due to local station regulations, the security cyborg module and its variants are only available during [num2seclevel(CONFIG_GET(number/minimum_secborg_alert))] alert and greater.</span>")
|
||||
to_chat(src, "<span class='notice'>NOTICE: Due to local station regulations, the security cyborg module and its variants are only available during [NUM2SECLEVEL(CONFIG_GET(number/minimum_secborg_alert))] alert and greater.</span>")
|
||||
|
||||
var/list/modulelist = list("Standard" = /obj/item/robot_module/standard, \
|
||||
"Engineering" = /obj/item/robot_module/engineering, \
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
speech_span = SPAN_ROBOT
|
||||
flags_1 = PREVENT_CONTENTS_EXPLOSION_1 | HEAR_1
|
||||
no_vore = TRUE
|
||||
vore_flags = NO_VORE
|
||||
/// Enable sprint system but not stamina
|
||||
combat_flags = COMBAT_FLAGS_STAMEXEMPT_YESSPRINT
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/mob/living/silicon/KnockToFloor(disarm_items = FALSE, silent = TRUE, updating = TRUE)
|
||||
return
|
||||
|
||||
/mob/living/silicon/grippedby(mob/living/user, instant = FALSE)
|
||||
return //can't upgrade a simple pull into a more aggressive grab.
|
||||
|
||||
@@ -61,11 +61,10 @@
|
||||
"<span class='userdanger'>[M] [response_disarm] [name]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
log_combat(M, src, "disarmed")
|
||||
else
|
||||
var/damage = rand(15, 30)
|
||||
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has slashed at [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
attack_threshold_check(damage)
|
||||
attack_threshold_check(M.meleeSlashSAPower)
|
||||
log_combat(M, src, "attacked")
|
||||
|
||||
/mob/living/simple_animal/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
uniform = /obj/item/clothing/under/syndicate
|
||||
suit = /obj/item/clothing/suit/armor/vest
|
||||
shoes = /obj/item/clothing/shoes/combat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat/insulated
|
||||
ears = /obj/item/radio/headset
|
||||
mask = /obj/item/clothing/mask/gas
|
||||
head = /obj/item/clothing/head/helmet/swat
|
||||
@@ -39,7 +39,7 @@
|
||||
uniform = /obj/item/clothing/under/syndicate
|
||||
suit = /obj/item/clothing/suit/space/hardsuit/syndi
|
||||
shoes = /obj/item/clothing/shoes/combat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat/insulated
|
||||
ears = /obj/item/radio/headset
|
||||
mask = /obj/item/clothing/mask/gas/syndicate
|
||||
back = /obj/item/tank/jetpack/oxygen
|
||||
@@ -59,7 +59,7 @@
|
||||
uniform = /obj/item/clothing/under/syndicate
|
||||
suit = /obj/item/clothing/suit/space/hardsuit/syndi/elite
|
||||
shoes = /obj/item/clothing/shoes/combat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat
|
||||
ears = /obj/item/radio/headset
|
||||
mask = /obj/item/clothing/mask/gas/syndicate
|
||||
back = /obj/item/tank/jetpack/oxygen/harness
|
||||
@@ -130,7 +130,7 @@
|
||||
uniform = /obj/item/clothing/under/syndicate/camo
|
||||
suit = /obj/item/clothing/suit/armor/bulletproof
|
||||
shoes = /obj/item/clothing/shoes/combat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat
|
||||
ears = /obj/item/radio/headset
|
||||
head = /obj/item/clothing/head/helmet/alt
|
||||
mask = /obj/item/clothing/mask/balaclava
|
||||
@@ -177,7 +177,7 @@
|
||||
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
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat
|
||||
ears = /obj/item/radio/headset
|
||||
mask = /obj/item/clothing/mask/gas/sechailer/swat
|
||||
head = /obj/item/clothing/head/helmet/swat/nanotrasen
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/mob/living/simple_animal/proc/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
bruteloss = round(CLAMP(bruteloss + amount, 0, maxHealth),DAMAGE_PRECISION)
|
||||
bruteloss = round(clamp(bruteloss + amount, 0, maxHealth),DAMAGE_PRECISION)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
blood_volume = 350
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/rawcrab = 1)
|
||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/rawcrab = 4)
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "stomps"
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
AddElement(/datum/element/cleaning)
|
||||
|
||||
/mob/living/simple_animal/hostile/alien/maid/AttackingTarget()
|
||||
if(ismovableatom(target))
|
||||
if(ismovable(target))
|
||||
if(istype(target, /obj/effect/decal/cleanable))
|
||||
visible_message("[src] cleans up \the [target].")
|
||||
qdel(target)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
icon_living = "carp"
|
||||
icon_dead = "carp_dead"
|
||||
icon_gib = "carp_gib"
|
||||
threat = 0.2
|
||||
threat = 0.1
|
||||
mob_biotypes = MOB_ORGANIC|MOB_BEAST
|
||||
speak_chance = 0
|
||||
turns_per_move = 5
|
||||
|
||||
@@ -186,10 +186,10 @@
|
||||
. = ..()
|
||||
if(slowed_by_webs)
|
||||
if(!(locate(/obj/structure/spider/stickyweb) in loc))
|
||||
remove_movespeed_modifier(MOVESPEED_ID_TARANTULA_WEB)
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/tarantula_web)
|
||||
slowed_by_webs = FALSE
|
||||
else if(locate(/obj/structure/spider/stickyweb) in loc)
|
||||
add_movespeed_modifier(MOVESPEED_ID_TARANTULA_WEB, priority=100, multiplicative_slowdown=3)
|
||||
add_movespeed_modifier(/datum/movespeed_modifier/tarantula_web)
|
||||
slowed_by_webs = TRUE
|
||||
|
||||
//midwives are the queen of the spiders, can send messages to all them and web faster. That rare round where you get a queen spider and turn your 'for honor' players into 'r6siege' players will be a fun one.
|
||||
|
||||
@@ -347,10 +347,11 @@
|
||||
/mob/living/simple_animal/hostile/proc/AttackingTarget()
|
||||
SEND_SIGNAL(src, COMSIG_HOSTILE_ATTACKINGTARGET, target)
|
||||
in_melee = TRUE
|
||||
/* sorry for the simplemob vore fans
|
||||
if(vore_active)
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(!client && L.Adjacent(src) && L.devourable) // aggressive check to ensure vore attacks can be made
|
||||
if(!client && L.Adjacent(src) && CHECK_BITFIELD(L.vore_flags,DEVOURABLE)) // aggressive check to ensure vore attacks can be made
|
||||
if(prob(voracious_chance))
|
||||
vore_attack(src,L,src)
|
||||
else
|
||||
@@ -361,6 +362,8 @@
|
||||
return target.attack_animal(src)
|
||||
else
|
||||
return target.attack_animal(src)
|
||||
*/
|
||||
return target.attack_animal(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/Aggro()
|
||||
vision_range = aggro_vision_range
|
||||
|
||||
@@ -65,10 +65,10 @@ Difficulty: Hard
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/Life()
|
||||
..()
|
||||
move_to_delay = CLAMP(round((health/maxHealth) * 10), 3, 10)
|
||||
move_to_delay = clamp(round((health/maxHealth) * 10), 3, 10)
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/OpenFire()
|
||||
anger_modifier = CLAMP(((maxHealth - health)/50),0,20)
|
||||
anger_modifier = clamp(((maxHealth - health)/50),0,20)
|
||||
if(charging)
|
||||
return
|
||||
ranged_cooldown = world.time + ranged_cooldown_time
|
||||
|
||||
@@ -56,7 +56,7 @@ Difficulty: Very Hard
|
||||
L.dust()
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/colossus/OpenFire()
|
||||
anger_modifier = CLAMP(((maxHealth - health)/50),0,20)
|
||||
anger_modifier = clamp(((maxHealth - health)/50),0,20)
|
||||
ranged_cooldown = world.time + 120
|
||||
|
||||
if(enrage(target))
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/mob/living/simple_animal/hostile/megafauna/dragon
|
||||
vore_active = TRUE
|
||||
no_vore = FALSE
|
||||
isPredator = TRUE
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/dragon/Initialize()
|
||||
|
||||
@@ -105,7 +105,7 @@ Difficulty: Medium
|
||||
/mob/living/simple_animal/hostile/megafauna/dragon/OpenFire()
|
||||
if(swooping)
|
||||
return
|
||||
anger_modifier = CLAMP(((maxHealth - health)/50),0,20)
|
||||
anger_modifier = clamp(((maxHealth - health)/50),0,20)
|
||||
ranged_cooldown = world.time + ranged_cooldown_time
|
||||
|
||||
if(prob(15 + anger_modifier) && !client)
|
||||
|
||||
@@ -191,7 +191,7 @@ Difficulty: Normal
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/hierophant/proc/calculate_rage() //how angry we are overall
|
||||
did_reset = FALSE //oh hey we're doing SOMETHING, clearly we might need to heal if we recall
|
||||
anger_modifier = CLAMP(((maxHealth - health) / 42),0,50)
|
||||
anger_modifier = clamp(((maxHealth - health) / 42),0,50)
|
||||
burst_range = initial(burst_range) + round(anger_modifier * 0.08)
|
||||
beam_range = initial(beam_range) + round(anger_modifier * 0.12)
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
if(!client && ranged && ranged_cooldown <= world.time)
|
||||
OpenFire()
|
||||
if(L.Adjacent(src) && (L.stat != CONSCIOUS))
|
||||
if(vore_active && L.devourable == TRUE)
|
||||
if(vore_active && CHECK_BITFIELD(L.vore_flags,DEVOURABLE))
|
||||
vore_attack(src,L,src)
|
||||
LoseTarget()
|
||||
else
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/proc/infest(mob/living/carbon/human/H)
|
||||
visible_message("<span class='warning'>[name] burrows into the flesh of [H]!</span>")
|
||||
var/mob/living/simple_animal/hostile/asteroid/hivelord/legion/L
|
||||
if(H.dna.check_mutation(DWARFISM)) //dwarf legions aren't just fluff!
|
||||
if(HAS_TRAIT(H, TRAIT_DWARF)) //dwarf legions aren't just fluff!
|
||||
L = new /mob/living/simple_animal/hostile/asteroid/hivelord/legion/dwarf(H.loc)
|
||||
else
|
||||
L = new(H.loc)
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
|
||||
|
||||
/**
|
||||
* Kudzu Flower Bud
|
||||
*
|
||||
* A flower created by flowering kudzu which spawns a venus human trap after a certain amount of time has passed.
|
||||
*
|
||||
* A flower created by kudzu with the flowering mutation. Spawns a venus human trap after 2 minutes under normal circumstances.
|
||||
* Also spawns 4 vines going out in diagonal directions from the bud. Any living creature not aligned with plants is damaged by these vines.
|
||||
* Once it grows a venus human trap, the bud itself will destroy itself.
|
||||
*
|
||||
*/
|
||||
/obj/structure/alien/resin/flower_bud_enemy //inheriting basic attack/damage stuff from alien structures
|
||||
name = "flower bud"
|
||||
desc = "A large pulsating plant..."
|
||||
@@ -9,9 +17,9 @@
|
||||
opacity = 0
|
||||
canSmoothWith = list()
|
||||
smooth = SMOOTH_FALSE
|
||||
/// The amount of time it takes to create a venus human trap, in deciseconds
|
||||
var/growth_time = 1200
|
||||
|
||||
|
||||
/obj/structure/alien/resin/flower_bud_enemy/Initialize()
|
||||
. = ..()
|
||||
var/list/anchors = list()
|
||||
@@ -25,36 +33,49 @@
|
||||
B.sleep_time = 10 //these shouldn't move, so let's slow down updates to 1 second (any slower and the deletion of the vines would be too slow)
|
||||
addtimer(CALLBACK(src, .proc/bear_fruit), growth_time)
|
||||
|
||||
/**
|
||||
* Spawns a venus human trap, then qdels itself.
|
||||
*
|
||||
* Displays a message, spawns a human venus trap, then qdels itself.
|
||||
*/
|
||||
/obj/structure/alien/resin/flower_bud_enemy/proc/bear_fruit()
|
||||
visible_message("<span class='danger'>the plant has borne fruit!</span>")
|
||||
visible_message("<span class='danger'>The plant has borne fruit!</span>")
|
||||
new /mob/living/simple_animal/hostile/venus_human_trap(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/ebeam/vine
|
||||
name = "thick vine"
|
||||
mouse_opacity = MOUSE_OPACITY_ICON
|
||||
desc = "A thick vine, painful to the touch."
|
||||
|
||||
|
||||
/obj/effect/ebeam/vine/Crossed(atom/movable/AM)
|
||||
. = ..()
|
||||
if(isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
if(!("vines" in L.faction))
|
||||
if(!isvineimmune(L))
|
||||
L.adjustBruteLoss(5)
|
||||
to_chat(L, "<span class='alert'>You cut yourself on the thorny vines.</span>")
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Venus Human Trap
|
||||
*
|
||||
* The result of a kudzu flower bud, these enemies use vines to drag prey close to them for attack.
|
||||
*
|
||||
* A carnivorious plant which uses vines to catch and ensnare prey. Spawns from kudzu flower buds.
|
||||
* Each one has a maximum of four vines, which can be attached to a variety of things. Carbons are stunned when a vine is attached to them, and movable entities are pulled closer over time.
|
||||
* Attempting to attach a vine to something with a vine already attached to it will pull all movable targets closer on command.
|
||||
* Once the prey is in melee range, melee attacks from the venus human trap heals itself for 10% of its max health, assuming the target is alive.
|
||||
* Akin to certain spiders, venus human traps can also be possessed and controlled by ghosts.
|
||||
*
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/venus_human_trap
|
||||
name = "venus human trap"
|
||||
desc = "Now you know how the fly feels."
|
||||
icon_state = "venus_human_trap"
|
||||
threat = 1
|
||||
layer = SPACEVINE_MOB_LAYER
|
||||
health = 50
|
||||
maxHealth = 50
|
||||
ranged = 1
|
||||
ranged = TRUE
|
||||
harm_intent_damage = 5
|
||||
obj_damage = 60
|
||||
melee_damage_lower = 25
|
||||
@@ -63,65 +84,110 @@
|
||||
attack_sound = 'sound/weapons/bladeslice.ogg'
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
unsuitable_atmos_damage = 0
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
faction = list("hostile","vines","plants")
|
||||
var/list/grasping = list()
|
||||
var/max_grasps = 4
|
||||
var/grasp_chance = 20
|
||||
var/grasp_pull_chance = 85
|
||||
var/grasp_range = 4
|
||||
del_on_death = 1
|
||||
initial_language_holder = /datum/language_holder/venus
|
||||
del_on_death = TRUE
|
||||
/// A list of all the plant's vines
|
||||
var/list/vines = list()
|
||||
/// The maximum amount of vines a plant can have at one time
|
||||
var/max_vines = 4
|
||||
/// How far away a plant can attach a vine to something
|
||||
var/vine_grab_distance = 5
|
||||
/// Whether or not this plant is ghost possessable
|
||||
var/playable_plant = FALSE //Normal plants can **not** have players.
|
||||
|
||||
/mob/living/simple_animal/hostile/venus_human_trap/Destroy()
|
||||
for(var/L in grasping)
|
||||
var/datum/beam/B = grasping[L]
|
||||
if(B)
|
||||
qdel(B)
|
||||
grasping = null
|
||||
return ..()
|
||||
/mob/living/simple_animal/hostile/venus_human_trap/ghost_playable
|
||||
playable_plant = TRUE //For admins that want to buss some harmless plants
|
||||
|
||||
/mob/living/simple_animal/hostile/venus_human_trap/handle_automated_action()
|
||||
if(..())
|
||||
for(var/mob/living/L in grasping)
|
||||
if(L.stat == DEAD)
|
||||
var/datum/beam/B = grasping[L]
|
||||
if(B)
|
||||
B.End()
|
||||
grasping -= L
|
||||
|
||||
//Can attack+pull multiple times per cycle
|
||||
if(L.Adjacent(src))
|
||||
L.attack_animal(src)
|
||||
else
|
||||
if(prob(grasp_pull_chance))
|
||||
setDir(get_dir(src,L) )//staaaare
|
||||
step(L,get_dir(L,src)) //reel them in
|
||||
L.DefaultCombatKnockdown(60) //you can't get away now~
|
||||
|
||||
if(grasping.len < max_grasps)
|
||||
grasping:
|
||||
for(var/mob/living/L in view(grasp_range, src))
|
||||
if(L == src || faction_check_mob(L) || (L in grasping) || L == target)
|
||||
continue
|
||||
for(var/t in getline(src,L))
|
||||
for(var/a in t)
|
||||
var/atom/A = a
|
||||
if(A.density && A != L)
|
||||
continue grasping
|
||||
if(prob(grasp_chance))
|
||||
to_chat(L, "<span class='userdanger'>\The [src] has you entangled!</span>")
|
||||
grasping[L] = Beam(L, "vine", time=INFINITY, maxdistance=5, beam_type=/obj/effect/ebeam/vine)
|
||||
|
||||
break //only take 1 new victim per cycle
|
||||
/mob/living/simple_animal/hostile/venus_human_trap/Life()
|
||||
. = ..()
|
||||
pull_vines()
|
||||
|
||||
/mob/living/simple_animal/hostile/venus_human_trap/AttackingTarget()
|
||||
. = ..()
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(L.stat != DEAD)
|
||||
adjustHealth(-maxHealth * 0.1)
|
||||
|
||||
/mob/living/simple_animal/hostile/venus_human_trap/OpenFire(atom/the_target)
|
||||
var/dist = get_dist(src,the_target)
|
||||
Beam(the_target, "vine", time=dist*2, maxdistance=dist+2, beam_type=/obj/effect/ebeam/vine)
|
||||
the_target.attack_animal(src)
|
||||
for(var/datum/beam/B in vines)
|
||||
if(B.target == the_target)
|
||||
pull_vines()
|
||||
ranged_cooldown = world.time + (ranged_cooldown_time * 0.5)
|
||||
return
|
||||
if(get_dist(src,the_target) > vine_grab_distance || vines.len == max_vines)
|
||||
return
|
||||
for(var/turf/T in getline(src,target))
|
||||
if (T.density)
|
||||
return
|
||||
for(var/obj/O in T)
|
||||
if(O.density)
|
||||
return
|
||||
|
||||
var/datum/beam/newVine = Beam(the_target, "vine", time=INFINITY, maxdistance = vine_grab_distance, beam_type=/obj/effect/ebeam/vine)
|
||||
RegisterSignal(newVine, COMSIG_PARENT_QDELETING, .proc/remove_vine, newVine)
|
||||
vines += newVine
|
||||
if(isliving(the_target))
|
||||
var/mob/living/L = the_target
|
||||
L.Paralyze(20)
|
||||
ranged_cooldown = world.time + ranged_cooldown_time
|
||||
|
||||
/mob/living/simple_animal/hostile/venus_human_trap/CanAttack(atom/the_target)
|
||||
/mob/living/simple_animal/hostile/venus_human_trap/Login()
|
||||
. = ..()
|
||||
to_chat(src, "<span class='boldwarning'>You a venus human trap! Protect the kudzu at all costs, and feast on those who oppose you!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/venus_human_trap/attack_ghost(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(the_target in grasping)
|
||||
return 0
|
||||
return
|
||||
humanize_plant(user)
|
||||
|
||||
/**
|
||||
* Sets a ghost to control the plant if the plant is eligible
|
||||
*
|
||||
* Asks the interacting ghost if they would like to control the plant.
|
||||
* If they answer yes, and another ghost hasn't taken control, sets the ghost to control the plant.
|
||||
* Arguments:
|
||||
* * mob/user - The ghost to possibly control the plant
|
||||
*/
|
||||
|
||||
/mob/living/simple_animal/hostile/venus_human_trap/proc/humanize_plant(mob/user)
|
||||
if(key || !playable_plant || stat)
|
||||
return
|
||||
var/plant_ask = alert("Become a venus human trap?", "Are you reverse vegan?", "Yes", "No")
|
||||
if(plant_ask == "No" || QDELETED(src))
|
||||
return
|
||||
if(key)
|
||||
to_chat(user, "<span class='warning'>Someone else already took this plant!</span>")
|
||||
return
|
||||
key = user.key
|
||||
log_game("[key_name(src)] took control of [name].")
|
||||
|
||||
/**
|
||||
* Manages how the vines should affect the things they're attached to.
|
||||
*
|
||||
* Pulls all movable targets of the vines closer to the plant
|
||||
* If the target is on the same tile as the plant, destroy the vine
|
||||
* Removes any QDELETED vines from the vines list.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/venus_human_trap/proc/pull_vines()
|
||||
for(var/datum/beam/B in vines)
|
||||
if(istype(B.target, /atom/movable))
|
||||
var/atom/movable/AM = B.target
|
||||
if(!AM.anchored)
|
||||
step(AM,get_dir(AM,src))
|
||||
if(get_dist(src,B.target) == 0)
|
||||
B.End()
|
||||
|
||||
/**
|
||||
* Removes a vine from the list.
|
||||
*
|
||||
* Removes the vine from our list.
|
||||
* Called specifically when the vine is about to be destroyed, so we don't have any null references.
|
||||
* Arguments:
|
||||
* * datum/beam/vine - The vine to be removed from the list.
|
||||
*/
|
||||
mob/living/simple_animal/hostile/venus_human_trap/proc/remove_vine(datum/beam/vine, force)
|
||||
vines -= vine
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
/mob/living/simple_animal/updatehealth()
|
||||
..()
|
||||
health = CLAMP(health, 0, maxHealth)
|
||||
health = clamp(health, 0, maxHealth)
|
||||
|
||||
/mob/living/simple_animal/update_stat()
|
||||
if(status_flags & GODMODE)
|
||||
@@ -292,8 +292,8 @@
|
||||
|
||||
/mob/living/simple_animal/proc/update_simplemob_varspeed()
|
||||
if(speed == 0)
|
||||
remove_movespeed_modifier(MOVESPEED_ID_SIMPLEMOB_VARSPEED, TRUE)
|
||||
add_movespeed_modifier(MOVESPEED_ID_SIMPLEMOB_VARSPEED, TRUE, 100, multiplicative_slowdown = speed, override = TRUE)
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/simplemob_varspeed)
|
||||
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/simplemob_varspeed, multiplicative_slowdown = speed)
|
||||
|
||||
/mob/living/simple_animal/Stat()
|
||||
..()
|
||||
|
||||
@@ -49,54 +49,53 @@
|
||||
|
||||
// Simple animals have only one belly. This creates it (if it isn't already set up)
|
||||
/mob/living/simple_animal/init_vore()
|
||||
vore_init = TRUE
|
||||
ENABLE_BITFIELD(vore_flags, VORE_INIT)
|
||||
if(CHECK_BITFIELD(flags_1, HOLOGRAM_1))
|
||||
return
|
||||
if(!vore_active || no_vore) //If it can't vore, let's not give it a stomach.
|
||||
if(!vore_active || CHECK_BITFIELD(vore_flags, NO_VORE)) //If it can't vore, let's not give it a stomach.
|
||||
return
|
||||
if(vore_active && !IsAdvancedToolUser()) //vore active, but doesn't have thumbs to grab people with.
|
||||
verbs |= /mob/living/simple_animal/proc/animal_nom
|
||||
|
||||
if(LAZYLEN(vore_organs))
|
||||
return
|
||||
|
||||
LAZYINITLIST(vore_organs)
|
||||
var/obj/belly/B = new (src)
|
||||
vore_selected = B
|
||||
B.immutable = TRUE
|
||||
B.name = vore_stomach_name ? vore_stomach_name : "stomach"
|
||||
B.desc = vore_stomach_flavor ? vore_stomach_flavor : "Your surroundings are warm, soft, and slimy. Makes sense, considering you're inside \the [name]."
|
||||
B.digest_mode = vore_default_mode
|
||||
B.vore_sound = vore_default_sound
|
||||
B.release_sound = vore_default_release
|
||||
B.is_wet = vore_wetness
|
||||
B.escapable = vore_escape_chance > 0
|
||||
B.escapechance = vore_escape_chance
|
||||
B.digestchance = vore_digest_chance
|
||||
B.absorbchance = vore_absorb_chance
|
||||
B.human_prey_swallow_time = swallowTime
|
||||
B.nonhuman_prey_swallow_time = swallowTime
|
||||
B.vore_verb = "swallow"
|
||||
B.emote_lists[DM_HOLD] = list( // We need more that aren't repetitive. I suck at endo. -Ace
|
||||
"The insides knead at you gently for a moment.",
|
||||
"The guts glorp wetly around you as some air shifts.",
|
||||
"The predator takes a deep breath and sighs, shifting you somewhat.",
|
||||
"The stomach squeezes you tight for a moment, then relaxes harmlessly.",
|
||||
"The predator's calm breathing and thumping heartbeat pulses around you.",
|
||||
"The warm walls kneads harmlessly against you.",
|
||||
"The liquids churn around you, though there doesn't seem to be much effect.",
|
||||
"The sound of bodily movements drown out everything for a moment.",
|
||||
"The predator's movements gently force you into a different position.")
|
||||
B.emote_lists[DM_DIGEST] = list(
|
||||
"The burning acids eat away at your form.",
|
||||
"The muscular stomach flesh grinds harshly against you.",
|
||||
"The caustic air stings your chest when you try to breathe.",
|
||||
"The slimy guts squeeze inward to help the digestive juices soften you up.",
|
||||
"The onslaught against your body doesn't seem to be letting up; you're food now.",
|
||||
"The predator's body ripples and crushes against you as digestive enzymes pull you apart.",
|
||||
"The juices pooling beneath you sizzle against your sore skin.",
|
||||
"The churning walls slowly pulverize you into meaty nutrients.",
|
||||
"The stomach glorps and gurgles as it tries to work you into slop.")
|
||||
/mob/living/simple_animal/lazy_init_belly()
|
||||
if(!LAZYLEN(vore_organs))
|
||||
LAZYINITLIST(vore_organs)
|
||||
var/obj/belly/B = new (src)
|
||||
vore_selected = B
|
||||
B.immutable = TRUE
|
||||
B.name = vore_stomach_name ? vore_stomach_name : "stomach"
|
||||
B.desc = vore_stomach_flavor ? vore_stomach_flavor : "Your surroundings are warm, soft, and slimy. Makes sense, considering you're inside \the [name]."
|
||||
B.digest_mode = vore_default_mode
|
||||
B.vore_sound = vore_default_sound
|
||||
B.release_sound = vore_default_release
|
||||
B.is_wet = vore_wetness
|
||||
B.escapable = vore_escape_chance > 0
|
||||
B.escapechance = vore_escape_chance
|
||||
B.digestchance = vore_digest_chance
|
||||
B.absorbchance = vore_absorb_chance
|
||||
B.human_prey_swallow_time = swallowTime
|
||||
B.nonhuman_prey_swallow_time = swallowTime
|
||||
B.vore_verb = "swallow"
|
||||
B.emote_lists[DM_HOLD] = list( // We need more that aren't repetitive. I suck at endo. -Ace
|
||||
"The insides knead at you gently for a moment.",
|
||||
"The guts glorp wetly around you as some air shifts.",
|
||||
"The predator takes a deep breath and sighs, shifting you somewhat.",
|
||||
"The stomach squeezes you tight for a moment, then relaxes harmlessly.",
|
||||
"The predator's calm breathing and thumping heartbeat pulses around you.",
|
||||
"The warm walls kneads harmlessly against you.",
|
||||
"The liquids churn around you, though there doesn't seem to be much effect.",
|
||||
"The sound of bodily movements drown out everything for a moment.",
|
||||
"The predator's movements gently force you into a different position.")
|
||||
B.emote_lists[DM_DIGEST] = list(
|
||||
"The burning acids eat away at your form.",
|
||||
"The muscular stomach flesh grinds harshly against you.",
|
||||
"The caustic air stings your chest when you try to breathe.",
|
||||
"The slimy guts squeeze inward to help the digestive juices soften you up.",
|
||||
"The onslaught against your body doesn't seem to be letting up; you're food now.",
|
||||
"The predator's body ripples and crushes against you as digestive enzymes pull you apart.",
|
||||
"The juices pooling beneath you sizzle against your sore skin.",
|
||||
"The churning walls slowly pulverize you into meaty nutrients.",
|
||||
"The stomach glorps and gurgles as it tries to work you into slop.")
|
||||
|
||||
//
|
||||
// Simple proc for animals to have their digestion toggled on/off externally
|
||||
@@ -134,6 +133,6 @@
|
||||
|
||||
if (stat != CONSCIOUS)
|
||||
return
|
||||
if(!T.devourable)
|
||||
if(!CHECK_BITFIELD(T.vore_flags,DEVOURABLE))
|
||||
return
|
||||
return vore_attack(src,T,src)
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
//CARBON MOBS
|
||||
/mob/living/carbon/alien
|
||||
devourable = TRUE
|
||||
digestable = TRUE
|
||||
feeding = TRUE
|
||||
vore_flags = DEVOURABLE | DIGESTABLE | FEEDING
|
||||
|
||||
/mob/living/carbon/monkey
|
||||
devourable = TRUE
|
||||
digestable = TRUE
|
||||
feeding = TRUE
|
||||
vore_flags = DEVOURABLE | DIGESTABLE | FEEDING
|
||||
|
||||
|
||||
/*
|
||||
@@ -17,121 +13,68 @@
|
||||
|
||||
//NUETRAL MOBS
|
||||
/mob/living/simple_animal/crab
|
||||
devourable = TRUE
|
||||
digestable = TRUE
|
||||
feeding = TRUE
|
||||
vore_flags = DEVOURABLE | DIGESTABLE | FEEDING
|
||||
|
||||
/mob/living/simple_animal/cow
|
||||
devourable = TRUE
|
||||
digestable = TRUE
|
||||
feeding = TRUE
|
||||
vore_active = TRUE
|
||||
isPredator = TRUE
|
||||
vore_default_mode = DM_HOLD
|
||||
vore_flags = DEVOURABLE | DIGESTABLE | FEEDING
|
||||
|
||||
/mob/living/simple_animal/chick
|
||||
devourable = TRUE
|
||||
digestable = TRUE
|
||||
vore_flags = DEVOURABLE | DIGESTABLE
|
||||
|
||||
/mob/living/simple_animal/chicken
|
||||
devourable = TRUE
|
||||
digestable = TRUE
|
||||
vore_flags = DEVOURABLE | DIGESTABLE
|
||||
|
||||
/mob/living/simple_animal/mouse
|
||||
devourable = TRUE
|
||||
digestable = TRUE
|
||||
vore_flags = DEVOURABLE | DIGESTABLE
|
||||
|
||||
/mob/living/simple_animal/kiwi
|
||||
devourable = TRUE
|
||||
digestable = TRUE
|
||||
vore_flags = DEVOURABLE | DIGESTABLE
|
||||
|
||||
//STATION PETS
|
||||
/mob/living/simple_animal/pet
|
||||
devourable = TRUE
|
||||
digestable = TRUE
|
||||
feeding = TRUE
|
||||
|
||||
/mob/living/simple_animal/pet/fox
|
||||
vore_active = TRUE
|
||||
isPredator = TRUE
|
||||
vore_default_mode = DM_HOLD
|
||||
|
||||
/mob/living/simple_animal/pet/cat
|
||||
vore_active = TRUE
|
||||
isPredator = TRUE
|
||||
vore_default_mode = DM_HOLD
|
||||
|
||||
/mob/living/simple_animal/pet/dog
|
||||
vore_active = TRUE
|
||||
isPredator = TRUE
|
||||
vore_flags = DEVOURABLE | DIGESTABLE | FEEDING
|
||||
vore_default_mode = DM_HOLD
|
||||
|
||||
/mob/living/simple_animal/sloth
|
||||
devourable = TRUE
|
||||
digestable = TRUE
|
||||
vore_flags = DEVOURABLE | DIGESTABLE
|
||||
|
||||
/mob/living/simple_animal/parrot
|
||||
devourable = TRUE
|
||||
digestable = TRUE
|
||||
vore_flags = DEVOURABLE | DIGESTABLE
|
||||
|
||||
//HOSTILE MOBS
|
||||
/mob/living/simple_animal/hostile/retaliate/goat
|
||||
devourable = TRUE
|
||||
digestable = TRUE
|
||||
feeding = TRUE
|
||||
vore_active = TRUE
|
||||
isPredator = TRUE
|
||||
vore_stomach_flavor = "You find yourself squeezed into the hollow of the goat, the smell of oats and hay thick in the tight space, all of which grinds in on you. Harmless for now..."
|
||||
vore_flags = DEVOURABLE | DIGESTABLE | FEEDING
|
||||
vore_default_mode = DM_HOLD
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/lizard
|
||||
devourable = TRUE
|
||||
digestable = TRUE
|
||||
feeding = TRUE
|
||||
vore_active = TRUE
|
||||
isPredator = TRUE
|
||||
vore_flags = DEVOURABLE | DIGESTABLE | FEEDING
|
||||
vore_default_mode = DM_DIGEST
|
||||
|
||||
/mob/living/simple_animal/hostile/alien
|
||||
feeding = TRUE
|
||||
vore_active = TRUE
|
||||
isPredator = TRUE
|
||||
vore_flags = FEEDING
|
||||
vore_default_mode = DM_DIGEST
|
||||
|
||||
/mob/living/simple_animal/hostile/bear
|
||||
feeding = TRUE
|
||||
vore_active = TRUE
|
||||
isPredator = TRUE
|
||||
vore_flags = FEEDING
|
||||
vore_default_mode = DM_DIGEST
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/giant_spider
|
||||
feeding = TRUE
|
||||
vore_active = TRUE
|
||||
isPredator = TRUE
|
||||
vore_flags = FEEDING
|
||||
vore_default_mode = DM_DIGEST
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/poison/snake
|
||||
feeding = TRUE
|
||||
vore_active = TRUE
|
||||
isPredator = TRUE
|
||||
vore_flags = FEEDING
|
||||
vore_default_mode = DM_DIGEST
|
||||
|
||||
/mob/living/simple_animal/hostile/gorilla
|
||||
feeding = TRUE
|
||||
vore_active = TRUE
|
||||
isPredator = TRUE
|
||||
vore_flags = FEEDING
|
||||
vore_default_mode = DM_DIGEST
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath
|
||||
feeding = TRUE //for pet Goliaths I guess or something.
|
||||
vore_active = TRUE
|
||||
isPredator = TRUE
|
||||
vore_flags = FEEDING
|
||||
vore_default_mode = DM_DIGEST
|
||||
|
||||
/mob/living/simple_animal/hostile/carp
|
||||
devourable = TRUE
|
||||
digestable = TRUE
|
||||
feeding = TRUE
|
||||
vore_active = TRUE
|
||||
isPredator = TRUE
|
||||
vore_flags = DEVOURABLE | DIGESTABLE | FEEDING
|
||||
vore_default_mode = DM_DIGEST
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
step_away(M,src)
|
||||
M.Friends = Friends.Copy()
|
||||
babies += M
|
||||
M.mutation_chance = CLAMP(mutation_chance+(rand(5,-5)),0,100)
|
||||
M.mutation_chance = clamp(mutation_chance+(rand(5,-5)),0,100)
|
||||
SSblackbox.record_feedback("tally", "slime_babies_born", 1, M.colour)
|
||||
|
||||
var/mob/living/simple_animal/slime/new_slime = pick(babies)
|
||||
|
||||
@@ -147,25 +147,25 @@
|
||||
|
||||
/mob/living/simple_animal/slime/on_reagent_change()
|
||||
. = ..()
|
||||
remove_movespeed_modifier(MOVESPEED_ID_SLIME_REAGENTMOD, TRUE)
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/slime_reagentmod)
|
||||
var/amount = 0
|
||||
if(reagents.has_reagent(/datum/reagent/medicine/morphine)) // morphine slows slimes down
|
||||
amount = 2
|
||||
if(reagents.has_reagent(/datum/reagent/consumable/frostoil)) // Frostoil also makes them move VEEERRYYYYY slow
|
||||
amount = 5
|
||||
if(amount)
|
||||
add_movespeed_modifier(MOVESPEED_ID_SLIME_REAGENTMOD, TRUE, 100, override = TRUE, multiplicative_slowdown = amount)
|
||||
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/slime_reagentmod, multiplicative_slowdown = amount)
|
||||
|
||||
/mob/living/simple_animal/slime/updatehealth()
|
||||
. = ..()
|
||||
remove_movespeed_modifier(MOVESPEED_ID_SLIME_HEALTHMOD, FALSE)
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/slime_healthmod)
|
||||
var/health_deficiency = (100 - health)
|
||||
var/mod = 0
|
||||
if(health_deficiency >= 45)
|
||||
mod += (health_deficiency / 25)
|
||||
if(health <= 0)
|
||||
mod += 2
|
||||
add_movespeed_modifier(MOVESPEED_ID_SLIME_HEALTHMOD, TRUE, 100, multiplicative_slowdown = mod)
|
||||
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/slime_healthmod, multiplicative_slowdown = mod)
|
||||
|
||||
/mob/living/simple_animal/slime/adjust_bodytemperature()
|
||||
. = ..()
|
||||
@@ -173,9 +173,8 @@
|
||||
if(bodytemperature >= 330.23) // 135 F or 57.08 C
|
||||
mod = -1 // slimes become supercharged at high temperatures
|
||||
else if(bodytemperature < 183.222)
|
||||
mod = (283.222 - bodytemperature) / 10 * 1.75
|
||||
if(mod)
|
||||
add_movespeed_modifier(MOVESPEED_ID_SLIME_TEMPMOD, TRUE, 100, override = TRUE, multiplicative_slowdown = mod)
|
||||
mod = min(15, (283.222 - bodytemperature) / 10 * 1.75)
|
||||
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/slime_tempmod, multiplicative_slowdown = mod)
|
||||
|
||||
/mob/living/simple_animal/slime/ObjBump(obj/O)
|
||||
if(!client && powerlevel > 0)
|
||||
|
||||
@@ -622,10 +622,40 @@
|
||||
tod = STATION_TIME_TIMESTAMP("hh:mm:ss", world.time)
|
||||
update_stat()
|
||||
|
||||
///Unignores all slowdowns that lack the IGNORE_NOSLOW flag.
|
||||
/mob/living/proc/unignore_slowdown(source)
|
||||
REMOVE_TRAIT(src, TRAIT_IGNORESLOWDOWN, source)
|
||||
update_movespeed(FALSE)
|
||||
update_movespeed()
|
||||
|
||||
///Ignores all slowdowns that lack the IGNORE_NOSLOW flag.
|
||||
/mob/living/proc/ignore_slowdown(source)
|
||||
ADD_TRAIT(src, TRAIT_IGNORESLOWDOWN, source)
|
||||
update_movespeed(FALSE)
|
||||
update_movespeed()
|
||||
|
||||
///Ignores specific slowdowns. Accepts a list of slowdowns.
|
||||
/mob/living/proc/add_movespeed_mod_immunities(source, slowdown_type, update = TRUE)
|
||||
if(islist(slowdown_type))
|
||||
for(var/listed_type in slowdown_type)
|
||||
if(ispath(listed_type))
|
||||
listed_type = "[listed_type]" //Path2String
|
||||
LAZYADDASSOC(movespeed_mod_immunities, listed_type, source)
|
||||
else
|
||||
if(ispath(slowdown_type))
|
||||
slowdown_type = "[slowdown_type]" //Path2String
|
||||
LAZYADDASSOC(movespeed_mod_immunities, slowdown_type, source)
|
||||
if(update)
|
||||
update_movespeed()
|
||||
|
||||
///Unignores specific slowdowns. Accepts a list of slowdowns.
|
||||
/mob/living/proc/remove_movespeed_mod_immunities(source, slowdown_type, update = TRUE)
|
||||
if(islist(slowdown_type))
|
||||
for(var/listed_type in slowdown_type)
|
||||
if(ispath(listed_type))
|
||||
listed_type = "[listed_type]" //Path2String
|
||||
LAZYREMOVEASSOC(movespeed_mod_immunities, listed_type, source)
|
||||
else
|
||||
if(ispath(slowdown_type))
|
||||
slowdown_type = "[slowdown_type]" //Path2String
|
||||
LAZYREMOVEASSOC(movespeed_mod_immunities, slowdown_type, source)
|
||||
if(update)
|
||||
update_movespeed()
|
||||
|
||||
+12
-7
@@ -284,7 +284,7 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA
|
||||
/mob/proc/reset_perspective(atom/A)
|
||||
if(client)
|
||||
if(A)
|
||||
if(ismovableatom(A))
|
||||
if(ismovable(A))
|
||||
//Set the the thing unless it's us
|
||||
if(A != src)
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
@@ -1033,17 +1033,22 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
|
||||
/// Updates the grab state of the mob and updates movespeed
|
||||
/mob/setGrabState(newstate)
|
||||
. = ..()
|
||||
if(grab_state == GRAB_PASSIVE)
|
||||
remove_movespeed_modifier(MOVESPEED_ID_MOB_GRAB_STATE, update=TRUE)
|
||||
else
|
||||
add_movespeed_modifier(MOVESPEED_ID_MOB_GRAB_STATE, update=TRUE, priority=100, override=TRUE, multiplicative_slowdown=grab_state*3, blacklisted_movetypes=FLOATING)
|
||||
switch(grab_state)
|
||||
if(GRAB_PASSIVE)
|
||||
remove_movespeed_modifier(MOVESPEED_ID_MOB_GRAB_STATE)
|
||||
if(GRAB_AGGRESSIVE)
|
||||
add_movespeed_modifier(/datum/movespeed_modifier/grab_slowdown/aggressive)
|
||||
if(GRAB_NECK)
|
||||
add_movespeed_modifier(/datum/movespeed_modifier/grab_slowdown/neck)
|
||||
if(GRAB_KILL)
|
||||
add_movespeed_modifier(/datum/movespeed_modifier/grab_slowdown/kill)
|
||||
|
||||
/mob/proc/update_equipment_speed_mods()
|
||||
var/speedies = equipped_speed_mods()
|
||||
if(!speedies)
|
||||
remove_movespeed_modifier(MOVESPEED_ID_MOB_EQUIPMENT, update=TRUE)
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/equipment_speedmod, update=TRUE)
|
||||
else
|
||||
add_movespeed_modifier(MOVESPEED_ID_MOB_EQUIPMENT, update=TRUE, priority=100, override=TRUE, multiplicative_slowdown=speedies, blacklisted_movetypes=FLOATING)
|
||||
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/equipment_speedmod, multiplicative_slowdown = speedies)
|
||||
|
||||
/// Gets the combined speed modification of all worn items
|
||||
/// Except base mob type doesnt really wear items
|
||||
|
||||
@@ -42,8 +42,11 @@
|
||||
var/lying_prev = 0
|
||||
var/is_shifted = FALSE
|
||||
|
||||
//MOVEMENT SPEED
|
||||
/// List of movement speed modifiers applying to this mob
|
||||
var/list/movespeed_modification //Lazy list, see mob_movespeed.dm
|
||||
/// List of movement speed modifiers ignored by this mob. List -> List (id) -> List (sources)
|
||||
var/list/movespeed_mod_immunities //Lazy list, see mob_movespeed.dm
|
||||
/// The calculated mob speed slowdown based on the modifiers list
|
||||
var/cached_multiplicative_slowdown
|
||||
/////////////////
|
||||
|
||||
|
||||
@@ -80,12 +80,12 @@
|
||||
var/oldloc = mob.loc
|
||||
|
||||
if(L.confused)
|
||||
var/newdir = 0
|
||||
if(L.confused > 40)
|
||||
var/newdir = NONE
|
||||
if((L.confused > 50) && prob(min(L.confused * 0.5, 50)))
|
||||
newdir = pick(GLOB.alldirs)
|
||||
else if(prob(L.confused * 1.5))
|
||||
else if(prob(L.confused))
|
||||
newdir = angle2dir(dir2angle(direction) + pick(90, -90))
|
||||
else if(prob(L.confused * 3))
|
||||
else if(prob(L.confused * 2))
|
||||
newdir = angle2dir(dir2angle(direction) + pick(45, -45))
|
||||
if(newdir)
|
||||
direction = newdir
|
||||
@@ -251,9 +251,9 @@
|
||||
/mob/proc/update_gravity(has_gravity, override=FALSE)
|
||||
var/speed_change = max(0, has_gravity - STANDARD_GRAVITY)
|
||||
if(!speed_change)
|
||||
remove_movespeed_modifier(MOVESPEED_ID_MOB_GRAVITY, update=TRUE)
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/gravity)
|
||||
else
|
||||
add_movespeed_modifier(MOVESPEED_ID_MOB_GRAVITY, update=TRUE, priority=100, override=TRUE, multiplicative_slowdown=speed_change, blacklisted_movetypes=FLOATING)
|
||||
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/gravity, multiplicative_slowdown = speed_change)
|
||||
|
||||
//bodypart selection - Cyberboss
|
||||
//8 toggles through head - eyes - mouth
|
||||
|
||||
@@ -1,126 +0,0 @@
|
||||
|
||||
/*Current movespeed modification list format: list(id = list(
|
||||
priority,
|
||||
flags,
|
||||
legacy slowdown/speedup amount,
|
||||
movetype_flags,
|
||||
blacklisted_movetypes,
|
||||
conflict
|
||||
))
|
||||
*/
|
||||
|
||||
//ANY ADD/REMOVE DONE IN UPDATE_MOVESPEED MUST HAVE THE UPDATE ARGUMENT SET AS FALSE!
|
||||
/mob/proc/add_movespeed_modifier(id, update=TRUE, priority=0, flags=NONE, override=FALSE, multiplicative_slowdown=0, movetypes=ALL, blacklisted_movetypes=NONE, conflict=FALSE)
|
||||
var/list/temp = list(priority, flags, multiplicative_slowdown, movetypes, blacklisted_movetypes, conflict) //build the modification list
|
||||
var/resort = TRUE
|
||||
if(LAZYACCESS(movespeed_modification, id))
|
||||
var/list/existing_data = movespeed_modification[id]
|
||||
if(movespeed_modifier_identical_check(existing_data, temp))
|
||||
return FALSE
|
||||
if(!override)
|
||||
return FALSE
|
||||
if(priority == existing_data[MOVESPEED_DATA_INDEX_PRIORITY])
|
||||
resort = FALSE // We don't need to re-sort if we're replacing something already there and it's the same priority
|
||||
LAZYSET(movespeed_modification, id, temp)
|
||||
if(update)
|
||||
update_movespeed(resort)
|
||||
return TRUE
|
||||
|
||||
/mob/proc/remove_movespeed_modifier(id, update = TRUE)
|
||||
if(!LAZYACCESS(movespeed_modification, id))
|
||||
return FALSE
|
||||
LAZYREMOVE(movespeed_modification, id)
|
||||
UNSETEMPTY(movespeed_modification)
|
||||
if(update)
|
||||
update_movespeed(FALSE)
|
||||
return TRUE
|
||||
|
||||
/mob/vv_edit_var(var_name, var_value)
|
||||
var/slowdown_edit = (var_name == NAMEOF(src, cached_multiplicative_slowdown))
|
||||
var/diff
|
||||
if(slowdown_edit && isnum(cached_multiplicative_slowdown) && isnum(var_value))
|
||||
remove_movespeed_modifier(MOVESPEED_ID_ADMIN_VAREDIT)
|
||||
diff = var_value - cached_multiplicative_slowdown
|
||||
. = ..()
|
||||
if(. && slowdown_edit && isnum(diff))
|
||||
add_movespeed_modifier(MOVESPEED_ID_ADMIN_VAREDIT, TRUE, 100, override = TRUE, multiplicative_slowdown = diff)
|
||||
|
||||
/mob/proc/has_movespeed_modifier(id)
|
||||
return LAZYACCESS(movespeed_modification, id)
|
||||
|
||||
/mob/proc/update_config_movespeed()
|
||||
add_movespeed_modifier(MOVESPEED_ID_CONFIG_SPEEDMOD, FALSE, 100, override = TRUE, multiplicative_slowdown = get_config_multiplicative_speed())
|
||||
|
||||
/mob/proc/get_config_multiplicative_speed()
|
||||
if(!islist(GLOB.mob_config_movespeed_type_lookup) || !GLOB.mob_config_movespeed_type_lookup[type])
|
||||
return 0
|
||||
else
|
||||
return GLOB.mob_config_movespeed_type_lookup[type]
|
||||
|
||||
/mob/proc/update_movespeed(resort = TRUE)
|
||||
if(resort)
|
||||
sort_movespeed_modlist()
|
||||
. = 0
|
||||
var/list/conflict_tracker = list()
|
||||
for(var/id in get_movespeed_modifiers())
|
||||
var/list/data = movespeed_modification[id]
|
||||
if(!(data[MOVESPEED_DATA_INDEX_MOVETYPE] & movement_type)) // We don't affect any of these move types, skip
|
||||
continue
|
||||
if(data[MOVESPEED_DATA_INDEX_BL_MOVETYPE] & movement_type) // There's a movetype here that disables this modifier, skip
|
||||
continue
|
||||
var/conflict = data[MOVESPEED_DATA_INDEX_CONFLICT]
|
||||
var/amt = data[MOVESPEED_DATA_INDEX_MULTIPLICATIVE_SLOWDOWN]
|
||||
if(conflict)
|
||||
// Conflicting modifiers prioritize the larger slowdown or the larger speedup
|
||||
// We purposefuly don't handle mixing speedups and slowdowns on the same id
|
||||
if(abs(conflict_tracker[conflict]) < abs(amt))
|
||||
conflict_tracker[conflict] = amt
|
||||
else
|
||||
continue
|
||||
. += amt
|
||||
cached_multiplicative_slowdown = .
|
||||
|
||||
/mob/proc/get_movespeed_modifiers()
|
||||
return movespeed_modification
|
||||
|
||||
/mob/proc/movespeed_modifier_identical_check(list/mod1, list/mod2)
|
||||
if(!islist(mod1) || !islist(mod2) || mod1.len < MOVESPEED_DATA_INDEX_MAX || mod2.len < MOVESPEED_DATA_INDEX_MAX)
|
||||
return FALSE
|
||||
for(var/i in 1 to MOVESPEED_DATA_INDEX_MAX)
|
||||
if(mod1[i] != mod2[i])
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/mob/proc/total_multiplicative_slowdown()
|
||||
. = 0
|
||||
for(var/id in get_movespeed_modifiers())
|
||||
var/list/data = movespeed_modification[id]
|
||||
. += data[MOVESPEED_DATA_INDEX_MULTIPLICATIVE_SLOWDOWN]
|
||||
|
||||
/proc/movespeed_data_null_check(list/data) //Determines if a data list is not meaningful and should be discarded.
|
||||
. = TRUE
|
||||
if(data[MOVESPEED_DATA_INDEX_MULTIPLICATIVE_SLOWDOWN])
|
||||
. = FALSE
|
||||
|
||||
/mob/proc/sort_movespeed_modlist() //Verifies it too. Sorts highest priority (first applied) to lowest priority (last applied)
|
||||
if(!movespeed_modification)
|
||||
return
|
||||
var/list/assembled = list()
|
||||
for(var/our_id in movespeed_modification)
|
||||
var/list/our_data = movespeed_modification[our_id]
|
||||
if(!islist(our_data) || (our_data.len < MOVESPEED_DATA_INDEX_PRIORITY) || movespeed_data_null_check(our_data))
|
||||
movespeed_modification -= our_id
|
||||
continue
|
||||
var/our_priority = our_data[MOVESPEED_DATA_INDEX_PRIORITY]
|
||||
var/resolved = FALSE
|
||||
for(var/their_id in assembled)
|
||||
var/list/their_data = assembled[their_id]
|
||||
if(their_data[MOVESPEED_DATA_INDEX_PRIORITY] < our_priority)
|
||||
assembled.Insert(assembled.Find(their_id), our_id)
|
||||
assembled[our_id] = our_data
|
||||
resolved = TRUE
|
||||
break
|
||||
if(!resolved)
|
||||
assembled[our_id] = our_data
|
||||
movespeed_modification = assembled
|
||||
UNSETEMPTY(movespeed_modification)
|
||||
@@ -20,7 +20,7 @@
|
||||
dizziness = max(amount, 0)
|
||||
|
||||
/**
|
||||
* Sets a mob's blindness to an amount if it was not above it already, similar to how status effects work
|
||||
* Sets a mob's blindness to an amount if it was not above it already, similar to how status effects work
|
||||
*/
|
||||
/mob/proc/blind_eyes(amount)
|
||||
var/old_blind = eye_blind || HAS_TRAIT(src, TRAIT_BLIND)
|
||||
@@ -90,8 +90,8 @@
|
||||
return
|
||||
var/obj/screen/plane_master/game_world/GW = locate(/obj/screen/plane_master/game_world) in client.screen
|
||||
var/obj/screen/plane_master/floor/F = locate(/obj/screen/plane_master/floor) in client.screen
|
||||
GW.add_filter("blurry_eyes", 2, EYE_BLUR(CLAMP(eye_blurry*0.1,0.6,3)))
|
||||
F.add_filter("blurry_eyes", 2, EYE_BLUR(CLAMP(eye_blurry*0.1,0.6,3)))
|
||||
GW.add_filter("blurry_eyes", 2, EYE_BLUR(clamp(eye_blurry*0.1,0.6,3)))
|
||||
F.add_filter("blurry_eyes", 2, EYE_BLUR(clamp(eye_blurry*0.1,0.6,3)))
|
||||
|
||||
/mob/proc/remove_eyeblur()
|
||||
if(!client)
|
||||
@@ -120,4 +120,4 @@
|
||||
///Adjust the body temperature of a mob, with min/max settings
|
||||
/mob/proc/adjust_bodytemperature(amount,min_temp=0,max_temp=INFINITY)
|
||||
if(bodytemperature >= min_temp && bodytemperature <= max_temp)
|
||||
bodytemperature = CLAMP(bodytemperature + amount,min_temp,max_temp)
|
||||
bodytemperature = clamp(bodytemperature + amount,min_temp,max_temp)
|
||||
|
||||
Reference in New Issue
Block a user