Merge branch 'master' into upstream-merge-33470

This commit is contained in:
LetterJay
2017-12-21 03:24:03 -06:00
committed by GitHub
327 changed files with 4405 additions and 3275 deletions
@@ -185,7 +185,7 @@
var/pollid = href_list["pollid"]
if(istext(pollid))
pollid = text2num(pollid)
if(isnum(pollid) && IsInteger(pollid))
if(isnum(pollid) && ISINTEGER(pollid))
src.poll_player(pollid)
return
@@ -223,7 +223,7 @@
rating = null
else
rating = text2num(href_list["o[optionid]"])
if(!isnum(rating) || !IsInteger(rating))
if(!isnum(rating) || !ISINTEGER(rating))
return
if(!vote_on_numval_poll(pollid, optionid, rating))
+2 -2
View File
@@ -462,7 +462,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))
@@ -471,7 +471,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set hidden = TRUE
var/max_view = client.prefs.unlock_content ? GHOST_MAX_VIEW_RANGE_MEMBER : GHOST_MAX_VIEW_RANGE_DEFAULT
if(input)
client.change_view(Clamp(client.view + input, 7, max_view))
client.change_view(CLAMP(client.view + input, 7, max_view))
/mob/dead/observer/verb/boo()
set category = "Ghost"
+1 -1
View File
@@ -154,7 +154,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
@@ -17,4 +17,4 @@
/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)
+6
View File
@@ -157,6 +157,8 @@
if(!throwable_mob.buckled)
thrown_thing = throwable_mob
stop_pulling()
if(disabilities & PACIFISM)
to_chat(src, "<span class='notice'>You gently let go of [throwable_mob].</span>")
var/turf/start_T = get_turf(loc) //Get the start and target tile for the descriptors
var/turf/end_T = get_turf(target)
if(start_T && end_T)
@@ -168,6 +170,10 @@
thrown_thing = I
dropItemToGround(I)
if(disabilities & PACIFISM && I.throwforce)
to_chat(src, "<span class='notice'>You set [I] down gently on the ground.</span>")
return
if(thrown_thing)
visible_message("<span class='danger'>[src] has thrown [thrown_thing].</span>")
add_logs(src, thrown_thing, "has thrown")
+10 -2
View File
@@ -185,7 +185,7 @@
/mob/living/carbon/adjustStaminaLoss(amount, updating_stamina = 1)
if(status_flags & GODMODE)
return 0
staminaloss = Clamp(staminaloss + amount, 0, maxHealth*2)
staminaloss = CLAMP(staminaloss + amount, 0, maxHealth*2)
if(updating_stamina)
update_stamina()
@@ -198,7 +198,7 @@
update_stamina()
/mob/living/carbon/getBrainLoss()
. = BRAIN_DAMAGE_DEATH
. = 0
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
if(B)
. = B.get_brain_damage()
@@ -207,6 +207,7 @@
/mob/living/carbon/adjustBrainLoss(amount, maximum = BRAIN_DAMAGE_DEATH)
if(status_flags & GODMODE)
return 0
var/prev_brainloss = getBrainLoss()
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
if(!B)
return
@@ -224,6 +225,13 @@
else
gain_trauma_type(BRAIN_TRAUMA_SEVERE)
if(prev_brainloss < 40 && brainloss >= 40)
to_chat(src, "<span class='warning'>You feel lightheaded.</span>")
else if(prev_brainloss < 120 && brainloss >= 120)
to_chat(src, "<span class='warning'>You feel less in control of your thoughts.</span>")
else if(prev_brainloss < 180 && brainloss >= 180)
to_chat(src, "<span class='warning'>You can feel your mind flickering on and off...</span>")
/mob/living/carbon/setBrainLoss(amount)
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
if(B)
+24 -23
View File
@@ -43,31 +43,32 @@
msg += "<span class='warning'>"
var/temp = getBruteLoss()
if(temp)
if (temp < 25)
msg += "[t_He] [t_has] minor bruising.\n"
else if (temp < 50)
msg += "[t_He] [t_has] <b>moderate</b> bruising!\n"
else
msg += "<B>[t_He] [t_has] severe bruising!</B>\n"
if(!(user == src && src.hal_screwyhud == SCREWYHUD_HEALTHY)) //fake healthy
if(temp)
if (temp < 25)
msg += "[t_He] [t_has] minor bruising.\n"
else if (temp < 50)
msg += "[t_He] [t_has] <b>moderate</b> bruising!\n"
else
msg += "<B>[t_He] [t_has] severe bruising!</B>\n"
temp = getFireLoss()
if(temp)
if (temp < 25)
msg += "[t_He] [t_has] minor burns.\n"
else if (temp < 50)
msg += "[t_He] [t_has] <b>moderate</b> burns!\n"
else
msg += "<B>[t_He] [t_has] severe burns!</B>\n"
temp = getFireLoss()
if(temp)
if (temp < 25)
msg += "[t_He] [t_has] minor burns.\n"
else if (temp < 50)
msg += "[t_He] [t_has] <b>moderate</b> burns!\n"
else
msg += "<B>[t_He] [t_has] severe burns!</B>\n"
temp = getCloneLoss()
if(temp)
if(temp < 25)
msg += "[t_He] [t_is] slightly deformed.\n"
else if (temp < 50)
msg += "[t_He] [t_is] <b>moderately</b> deformed!\n"
else
msg += "<b>[t_He] [t_is] severely deformed!</b>\n"
temp = getCloneLoss()
if(temp)
if(temp < 25)
msg += "[t_He] [t_is] slightly deformed.\n"
else if (temp < 50)
msg += "[t_He] [t_is] <b>moderately</b> deformed!\n"
else
msg += "<b>[t_He] [t_is] severely deformed!</b>\n"
if(disabilities & DUMB)
msg += "[t_He] seem[p_s()] to be clumsy and unable to think.\n"
+24 -23
View File
@@ -187,31 +187,32 @@
else if(l_limbs_missing >= 2 && r_limbs_missing >= 2)
msg += "[t_He] [p_do()]n't seem all there.\n"
if(temp)
if(temp < 25)
msg += "[t_He] [t_has] minor bruising.\n"
else if(temp < 50)
msg += "[t_He] [t_has] <b>moderate</b> bruising!\n"
else
msg += "<B>[t_He] [t_has] severe bruising!</B>\n"
if(!(user == src && src.hal_screwyhud == SCREWYHUD_HEALTHY)) //fake healthy
if(temp)
if(temp < 25)
msg += "[t_He] [t_has] minor bruising.\n"
else if(temp < 50)
msg += "[t_He] [t_has] <b>moderate</b> bruising!\n"
else
msg += "<B>[t_He] [t_has] severe bruising!</B>\n"
temp = getFireLoss()
if(temp)
if(temp < 25)
msg += "[t_He] [t_has] minor burns.\n"
else if (temp < 50)
msg += "[t_He] [t_has] <b>moderate</b> burns!\n"
else
msg += "<B>[t_He] [t_has] severe burns!</B>\n"
temp = getFireLoss()
if(temp)
if(temp < 25)
msg += "[t_He] [t_has] minor burns.\n"
else if (temp < 50)
msg += "[t_He] [t_has] <b>moderate</b> burns!\n"
else
msg += "<B>[t_He] [t_has] severe burns!</B>\n"
temp = getCloneLoss()
if(temp)
if(temp < 25)
msg += "[t_He] [t_has] minor cellular damage.\n"
else if(temp < 50)
msg += "[t_He] [t_has] <b>moderate</b> cellular damage!\n"
else
msg += "<b>[t_He] [t_has] severe cellular damage!</b>\n"
temp = getCloneLoss()
if(temp)
if(temp < 25)
msg += "[t_He] [t_has] minor cellular damage.\n"
else if(temp < 50)
msg += "[t_He] [t_has] <b>moderate</b> cellular damage!\n"
else
msg += "<b>[t_He] [t_has] severe cellular damage!</b>\n"
if(fire_stacks > 0)
@@ -89,15 +89,15 @@
for(var/obj/item/I in held_items)
if(!istype(I, /obj/item/clothing))
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
if(I.hit_reaction(src, AM, attack_text, final_block_chance, damage, attack_type))
return 1
if(wear_suit)
var/final_block_chance = wear_suit.block_chance - (Clamp((armour_penetration-wear_suit.armour_penetration)/2,0,100)) + block_chance_modifier
var/final_block_chance = wear_suit.block_chance - (CLAMP((armour_penetration-wear_suit.armour_penetration)/2,0,100)) + block_chance_modifier
if(wear_suit.hit_reaction(src, AM, attack_text, final_block_chance, damage, attack_type))
return 1
if(w_uniform)
var/final_block_chance = w_uniform.block_chance - (Clamp((armour_penetration-w_uniform.armour_penetration)/2,0,100)) + block_chance_modifier
var/final_block_chance = w_uniform.block_chance - (CLAMP((armour_penetration-w_uniform.armour_penetration)/2,0,100)) + block_chance_modifier
if(w_uniform.hit_reaction(src, AM, attack_text, final_block_chance, damage, attack_type))
return 1
return 0
@@ -1315,11 +1315,14 @@ GLOBAL_LIST_EMPTY(roundstart_races)
/datum/species/proc/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
if(user.disabilities & PACIFISM)
to_chat(user, "<span class='warning'>You don't want to harm [target]!</span>")
return FALSE
if(target.check_block())
target.visible_message("<span class='warning'>[target] blocks [user]'s attack!</span>")
return 0
return FALSE
if(attacker_style && attacker_style.harm_act(user,target))
return 1
return TRUE
else
var/atk_verb = user.dna.species.attack_verb
@@ -1344,7 +1347,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
playsound(target.loc, user.dna.species.miss_sound, 25, 1, -1)
target.visible_message("<span class='danger'>[user] has attempted to [atk_verb] [target]!</span>",\
"<span class='userdanger'>[user] has attempted to [atk_verb] [target]!</span>", null, COMBAT_MESSAGE_RANGE)
return 0
return FALSE
var/armor_block = target.run_armor_check(affecting, "melee")
@@ -1366,8 +1369,6 @@ GLOBAL_LIST_EMPTY(roundstart_races)
else if(target.lying)
target.forcesay(GLOB.hit_appends)
/datum/species/proc/disarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
var/aim_for_mouth = user.zone_selected == "mouth"
var/target_on_help_and_unarmed = target.a_intent == INTENT_HELP && !target.get_active_held_item()
@@ -1387,10 +1388,12 @@ GLOBAL_LIST_EMPTY(roundstart_races)
return 1
else
user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
if(target.w_uniform)
target.w_uniform.add_fingerprint(user)
var/obj/item/bodypart/affecting = target.get_bodypart(ran_zone(user.zone_selected))
var/randomized_zone = ran_zone(user.zone_selected)
target.SendSignal(COMSIG_HUMAN_DISARM_HIT, user, user.zone_selected)
var/obj/item/bodypart/affecting = target.get_bodypart(randomized_zone)
var/randn = rand(1, 100)
if(randn <= 25)
playsound(target, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
@@ -1511,8 +1514,11 @@ GLOBAL_LIST_EMPTY(roundstart_races)
H.confused = max(H.confused, 20)
H.adjustBrainLoss(20)
H.adjust_blurriness(10)
if(prob(20))
if(prob(10))
H.gain_trauma(/datum/brain_trauma/mild/concussion)
else
if(!I.is_sharp())
H.adjustBrainLoss(I.force / 5)
if(prob(I.force + ((100 - H.health)/2)) && H != user)
var/datum/antagonist/rev/rev = H.mind.has_antag_datum(/datum/antagonist/rev)
@@ -369,7 +369,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 -1
return 0
@@ -19,6 +19,11 @@
if(H)
H.endTailWag()
/datum/species/human/spec_stun(mob/living/carbon/human/H,amount)
if(H)
H.endTailWag()
. = ..()
/datum/species/human/space_move(mob/living/carbon/human/H)
var/obj/item/device/flightpack/F = H.get_flightpack()
if(istype(F) && (F.flight) && F.allow_thrust(0.01, src))
@@ -42,6 +42,11 @@
if(H)
H.endTailWag()
/datum/species/lizard/spec_stun(mob/living/carbon/human/H,amount)
if(H)
H.endTailWag()
. = ..()
/*
Lizard subspecies: ASHWALKERS
*/
@@ -94,8 +94,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
@@ -182,7 +182,7 @@
//TOXINS/PLASMA
if(Toxins_partialpressure > safe_tox_max)
var/ratio = (breath_gases[/datum/gas/plasma][MOLES]/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")
@@ -120,16 +120,19 @@
/mob/living/carbon/monkey/proc/should_target(var/mob/living/L)
if(L == src)
return 0
return FALSE
if(disabilities & PACIFISM)
return FALSE
if(enemies[L])
return 1
return TRUE
// target non-monkey mobs when aggressive, with a small probability of monkey v monkey
if(aggressive && (!istype(L, /mob/living/carbon/monkey/) || prob(MONKEY_AGGRESSIVE_MVM_PROB)))
return 1
return TRUE
return 0
return FALSE
/mob/living/carbon/monkey/proc/handle_combat()
// Don't do any AI if inside another mob (devoured)
@@ -59,10 +59,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)
/mob/living/carbon/cure_blind()
if(disabilities & BLIND)
+5 -5
View File
@@ -157,7 +157,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
@@ -168,7 +168,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
@@ -187,7 +187,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
@@ -206,7 +206,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
@@ -217,7 +217,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
+3
View File
@@ -137,6 +137,9 @@
eye_blurry = max(eye_blurry-1, 0)
if(client && !eye_blurry)
clear_fullscreen("blurry")
if(disabilities & PACIFISM && a_intent == INTENT_HARM)
to_chat(src, "<span class='notice'>You don't feel like harming anybody.</span>")
a_intent_change(INTENT_HELP)
/mob/living/proc/update_damage_hud()
return
+5 -2
View File
@@ -816,9 +816,12 @@
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
/mob/living/proc/can_use_guns(obj/item/G)
if (G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser())
if(G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser())
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
return FALSE
if(disabilities & PACIFISM)
to_chat(src, "<span class='notice'>You don't want to risk harming anyone!</span>")
return FALSE
return TRUE
/mob/living/carbon/proc/update_stamina()
@@ -925,7 +928,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()
+42 -19
View File
@@ -55,9 +55,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
@@ -127,14 +127,19 @@
/mob/living/proc/grabbedby(mob/living/carbon/user, supress_message = 0)
if(user == src || anchored || !isturf(user.loc))
return 0
return FALSE
if(!user.pulling || user.pulling != src)
user.start_pulling(src, supress_message)
return
if(!(status_flags & CANPUSH))
to_chat(user, "<span class='warning'>[src] can't be grabbed more aggressively!</span>")
return 0
return FALSE
if(user.disabilities & PACIFISM)
to_chat(user, "<span class='notice'>You don't want to risk hurting [src]!</span>")
return FALSE
grippedby(user)
//proc to upgrade a simple pull into a more aggressive grab.
@@ -188,83 +193,101 @@
M.Feedstop()
return // can't attack while eating!
if(disabilities & PACIFISM)
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
return FALSE
if (stat != DEAD)
add_logs(M, src, "attacked")
M.do_attack_animation(src)
visible_message("<span class='danger'>The [M.name] glomps [src]!</span>", \
"<span class='userdanger'>The [M.name] glomps [src]!</span>", null, COMBAT_MESSAGE_RANGE)
return 1
return TRUE
/mob/living/attack_animal(mob/living/simple_animal/M)
M.face_atom(src)
if(M.melee_damage_upper == 0)
M.visible_message("<span class='notice'>\The [M] [M.friendly] [src]!</span>")
return 0
return FALSE
else
if(M.disabilities & PACIFISM)
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
return FALSE
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
M.do_attack_animation(src)
visible_message("<span class='danger'>\The [M] [M.attacktext] [src]!</span>", \
"<span class='userdanger'>\The [M] [M.attacktext] [src]!</span>", null, COMBAT_MESSAGE_RANGE)
add_logs(M, src, "attacked")
return 1
return TRUE
/mob/living/attack_paw(mob/living/carbon/monkey/M)
if(isturf(loc) && istype(loc.loc, /area/start))
to_chat(M, "No attacking people at spawn, you jackass.")
return 0
return FALSE
if (M.a_intent == INTENT_HARM)
if(M.disabilities & PACIFISM)
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
return FALSE
if(M.is_muzzled() || (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSMOUTH))
to_chat(M, "<span class='warning'>You can't bite with your mouth covered!</span>")
return 0
return FALSE
M.do_attack_animation(src, ATTACK_EFFECT_BITE)
if (prob(75))
add_logs(M, src, "attacked")
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
"<span class='userdanger'>[M.name] bites [src]!</span>", null, COMBAT_MESSAGE_RANGE)
return 1
return TRUE
else
visible_message("<span class='danger'>[M.name] has attempted to bite [src]!</span>", \
"<span class='userdanger'>[M.name] has attempted to bite [src]!</span>", null, COMBAT_MESSAGE_RANGE)
return 0
return FALSE
/mob/living/attack_larva(mob/living/carbon/alien/larva/L)
switch(L.a_intent)
if("help")
visible_message("<span class='notice'>[L.name] rubs its head against [src].</span>")
return 0
return FALSE
else
if(L.disabilities & PACIFISM)
to_chat(L, "<span class='notice'>You don't want to hurt anyone!</span>")
return
L.do_attack_animation(src)
if(prob(90))
add_logs(L, src, "attacked")
visible_message("<span class='danger'>[L.name] bites [src]!</span>", \
"<span class='userdanger'>[L.name] bites [src]!</span>", null, COMBAT_MESSAGE_RANGE)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
return 1
return TRUE
else
visible_message("<span class='danger'>[L.name] has attempted to bite [src]!</span>", \
"<span class='userdanger'>[L.name] has attempted to bite [src]!</span>", null, COMBAT_MESSAGE_RANGE)
return 0
return FALSE
/mob/living/attack_alien(mob/living/carbon/alien/humanoid/M)
switch(M.a_intent)
if ("help")
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
return 0
return FALSE
if ("grab")
grabbedby(M)
return 0
return FALSE
if("harm")
if(M.disabilities & PACIFISM)
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
return FALSE
M.do_attack_animation(src)
return 1
return TRUE
if("disarm")
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
return 1
return TRUE
/mob/living/ex_act(severity, target, origin)
if(origin && istype(origin, /datum/spacevine_mutation) && isvineimmune(src))
+3 -3
View File
@@ -138,7 +138,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
@@ -283,8 +283,8 @@
/mob/living/silicon/pai/process()
emitterhealth = Clamp((emitterhealth + emitterregen), -50, emittermaxhealth)
hit_slowdown = Clamp((hit_slowdown - 1), 0, 100)
emitterhealth = CLAMP((emitterhealth + emitterregen), -50, emittermaxhealth)
hit_slowdown = CLAMP((hit_slowdown - 1), 0, 100)
/mob/living/silicon/pai/generateStaticOverlay()
return
@@ -57,7 +57,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)
to_chat(src, "<span class='userdanger'>The impact degrades your holochassis!</span>")
@@ -23,7 +23,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()
@@ -50,6 +50,7 @@
if(!mind.special_role)
mind.special_role = "traitor"
SSticker.mode.traitors += mind
mind.add_antag_datum(/datum/antagonist/auto_custom) // ????
/mob/living/silicon/robot/update_health_hud()
@@ -360,8 +360,14 @@
..()
/datum/action/innate/seek_master/Activate()
if(!SSticker.mode.eldergod)
the_construct.master = GLOB.blood_target
var/datum/antagonist/cult/C = owner.mind.has_antag_datum(/datum/antagonist/cult)
if(!C)
return
var/datum/objective/eldergod/summon_objective = locate() in C.cult_team.objectives
if(summon_objective.check_completion())
the_construct.master = C.cult_team.blood_target
if(!the_construct.master)
to_chat(the_construct, "<span class='cultitalic'>You have no master to seek!</span>")
the_construct.seeking = FALSE
@@ -2,7 +2,7 @@
/mob/living/simple_animal/proc/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
if(!forced && (status_flags & GODMODE))
return FALSE
bruteloss = Clamp(bruteloss + amount, 0, maxHealth)
bruteloss = CLAMP(bruteloss + amount, 0, maxHealth)
if(updating_health)
updatehealth()
return amount
@@ -152,7 +152,7 @@
/mob/living/simple_animal/drone/cogscarab/Login()
..()
add_servant_of_ratvar(src, TRUE)
add_servant_of_ratvar(src, TRUE, GLOB.servants_active)
to_chat(src,"<b>You yourself are one of these servants, and will be able to utilize almost anything they can[GLOB.ratvar_awakens ? "":", <i>excluding a clockwork slab</i>"].</b>") // this can't go with flavortext because i'm assuming it requires them to be ratvar'd
/mob/living/simple_animal/drone/cogscarab/binarycheck()
@@ -79,10 +79,10 @@ Difficulty: Hard
/mob/living/simple_animal/hostile/megafauna/bubblegum/Life()
..()
move_to_delay = Clamp((health/maxHealth) * 10, 5, 10)
move_to_delay = CLAMP((health/maxHealth) * 10, 5, 10)
/mob/living/simple_animal/hostile/megafauna/bubblegum/OpenFire()
anger_modifier = Clamp(((maxHealth - health)/60),0,20)
anger_modifier = CLAMP(((maxHealth - health)/60),0,20)
if(charging)
return
ranged_cooldown = world.time + ranged_cooldown_time
@@ -57,7 +57,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))
@@ -101,7 +101,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)
@@ -227,10 +227,10 @@ Difficulty: Medium
//ensure swoop direction continuity.
if(negative)
if(IsInRange(x, initial_x + 1, initial_x + DRAKE_SWOOP_DIRECTION_CHANGE_RANGE))
if(ISINRANGE(x, initial_x + 1, initial_x + DRAKE_SWOOP_DIRECTION_CHANGE_RANGE))
negative = FALSE
else
if(IsInRange(x, initial_x - DRAKE_SWOOP_DIRECTION_CHANGE_RANGE, initial_x - 1))
if(ISINRANGE(x, initial_x - DRAKE_SWOOP_DIRECTION_CHANGE_RANGE, initial_x - 1))
negative = TRUE
new /obj/effect/temp_visual/dragon_flight/end(loc, negative)
new /obj/effect/temp_visual/dragon_swoop(loc)
@@ -187,7 +187,7 @@ Difficulty: Hard
/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)
@@ -111,7 +111,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)
@@ -166,7 +166,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)
+4
View File
@@ -45,6 +45,10 @@
client.change_view(CONFIG_GET(string/default_view)) // Resets the client.view in case it was changed.
if(client.player_details.player_actions.len)
for(var/datum/action/A in client.player_details.player_actions)
A.Grant(src)
if(!GLOB.individual_log_list[ckey])
GLOB.individual_log_list[ckey] = logging
else
+1 -1
View File
@@ -363,7 +363,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
if(M.mind in SSticker.mode.cult)
return 2
if("nuclear")
if(M.mind in SSticker.mode.syndicates)
if(M.mind.has_antag_datum(/datum/antagonist/nukeop,TRUE))
return 2
if("changeling")
if(M.mind.has_antag_datum(/datum/antagonist/changeling,TRUE))