Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into fix-story-storyteller

This commit is contained in:
Putnam
2020-04-24 16:07:38 -07:00
395 changed files with 5704 additions and 3346 deletions
+1 -1
View File
@@ -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))
+1 -1
View File
@@ -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
@@ -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)
*/
+2
View File
@@ -98,6 +98,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)
@@ -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)
@@ -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
@@ -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.
@@ -170,7 +169,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>")
+1 -1
View File
@@ -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")
@@ -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/////////////////////////////////////////
+6 -6
View File
@@ -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
+9 -6
View File
@@ -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()
+8 -5
View File
@@ -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)
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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()
+2 -2
View File
@@ -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())
+2 -2
View File
@@ -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
@@ -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()
+1 -1
View File
@@ -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
@@ -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)
@@ -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)
@@ -87,7 +87,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)
@@ -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)
@@ -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)
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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)