Merge branch 'master' of https://github.com/PolarisSS13/Polaris into steals_more_armor

This commit is contained in:
Anewbe
2018-02-21 23:33:17 -06:00
134 changed files with 3176 additions and 1889 deletions
+3 -3
View File
@@ -39,7 +39,7 @@
var/haste // If set to 1, the mob will be 'hasted', which makes it ignore slowdown and go really fast.
var/evasion // Positive numbers reduce the odds of being hit. Negative numbers increase the odds.
var/bleeding_rate_percent // Adjusts amount of blood lost when bleeding.
var/accuracy // Positive numbers makes hitting things with guns easier, negatives make it harder. Every 15% is equal to one tile easier or harder, just like evasion.
var/accuracy // Positive numbers makes hitting things with guns easier, negatives make it harder.
var/accuracy_dispersion // Positive numbers make gun firing cover a wider tile range, and therefore more inaccurate. Negatives help negate dispersion penalties.
var/metabolism_percent // Adjusts the mob's metabolic rate, which affects reagent processing. Won't affect mobs without reagent processing.
var/icon_scale_percent // Makes the holder's icon get scaled up or down.
@@ -208,13 +208,13 @@
effects += "You move at maximum speed, and cannot be slowed by any means."
if(!isnull(evasion))
effects += "You are [abs(evasion * 15)]% [evasion > 0 ? "harder" : "easier"] to hit with weapons."
effects += "You are [abs(evasion)]% [evasion > 0 ? "harder" : "easier"] to hit with weapons."
if(!isnull(bleeding_rate_percent))
effects += "You bleed [multipler_to_percentage(bleeding_rate_percent, TRUE)] [bleeding_rate_percent > 1.0 ? "faster" : "slower"]."
if(!isnull(accuracy))
effects += "It is [abs(accuracy * 15)]% [accuracy > 0 ? "easier" : "harder"] for you to hit someone with a ranged weapon."
effects += "It is [abs(accuracy)]% [accuracy > 0 ? "easier" : "harder"] for you to hit someone with a ranged weapon."
if(!isnull(accuracy_dispersion))
effects += "Projectiles you fire are [accuracy_dispersion > 0 ? "more" : "less"] likely to stray from your intended target."
@@ -60,9 +60,9 @@ the artifact triggers the rage.
pain_immunity = TRUE // Avoid falling over from shock (at least until it expires).
// The less good stuff.
accuracy = -5 // Aiming requires focus.
accuracy = -75 // Aiming requires focus.
accuracy_dispersion = 3 // Ditto.
evasion = -3 // Too angry to dodge.
evasion = -45 // Too angry to dodge.
var/nutrition_cost = 150
var/exhaustion_duration = 2 MINUTES // How long the exhaustion modifier lasts after it expires. Set to 0 to not apply one.
@@ -157,7 +157,7 @@ the artifact triggers the rage.
attack_speed_percent = 1.5
outgoing_melee_damage_percent = 0.6
disable_duration_percent = 1.5
evasion = -2
evasion = -30
/datum/modifier/berserk_exhaustion/on_applied()
holder.visible_message("<span class='warning'>\The [holder] looks exhausted.</span>")
@@ -177,6 +177,6 @@ the artifact triggers the rage.
stacks = MODIFIER_STACK_EXTEND
// Just being mad isn't gonna overclock your body when you're a beepboop.
accuracy = -5 // Aiming requires focus.
accuracy = -75 // Aiming requires focus.
accuracy_dispersion = 3 // Ditto.
evasion = -3 // Too angry to dodge.
evasion = -45 // Too angry to dodge.
+10 -7
View File
@@ -1024,10 +1024,10 @@
return
return md5(dna.uni_identity)
/mob/living/carbon/human/clean_blood(var/clean_feet)
/mob/living/carbon/human/clean_blood(var/washshoes)
.=..()
gunshot_residue = null
if(clean_feet && !shoes && istype(feet_blood_DNA, /list) && feet_blood_DNA.len)
if(washshoes && !shoes && istype(feet_blood_DNA, /list) && feet_blood_DNA.len)
feet_blood_color = null
feet_blood_DNA.Cut()
feet_blood_DNA = null
@@ -1546,11 +1546,14 @@
permit.set_name(real_name)
equip_to_appropriate_slot(permit) // If for some reason it can't find room, it'll still be on the floor.
/mob/living/carbon/human/proc/update_icon_special() //For things such as teshari hiding and whatnot.
/mob/living/carbon/human/proc/update_icon_special(var/mutable_appearance/ma, var/update_icons = TRUE) //For things such as teshari hiding and whatnot.
if(hiding) // Hiding? Carry on.
if(stat == DEAD || paralysis || weakened || stunned) //stunned/knocked down by something that isn't the rest verb? Note: This was tried with INCAPACITATION_STUNNED, but that refused to work.
hiding = 0 //No hiding for you. Mob layer should be updated naturally, but it actually doesn't.
hiding = FALSE //No hiding for you. Mob layer should be updated naturally, but it actually doesn't.
else
layer = 2.45
else //Replace this else with other variables if added in the future. Alternatively, could make other things effect this hiding variable.
return
ma.layer = HIDING_LAYER
//Can put special species icon update proc calls here, if any are ever invented.
if(update_icons)
update_icons()
@@ -245,12 +245,13 @@
var/real_damage = rand_damage
var/hit_dam_type = attack.damage_type
real_damage += attack.get_unarmed_damage(H)
if(H.gloves && istype(H.gloves, /obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = H.gloves
real_damage += G.punch_force
hit_dam_type = G.punch_damtype
if(H.pulling_punches) //SO IT IS DECREED: PULLING PUNCHES WILL PREVENT THE ACTUAL DAMAGE FROM RINGS AND KNUCKLES, BUT NOT THE ADDED PAIN
hit_dam_type = AGONY
if(H.gloves)
if(istype(H.gloves, /obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = H.gloves
real_damage += G.punch_force
hit_dam_type = G.punch_damtype
if(H.pulling_punches) //SO IT IS DECREED: PULLING PUNCHES WILL PREVENT THE ACTUAL DAMAGE FROM RINGS AND KNUCKLES, BUT NOT THE ADDED PAIN
hit_dam_type = AGONY
real_damage *= damage_multiplier
rand_damage *= damage_multiplier
if(HULK in H.mutations)
@@ -327,7 +328,7 @@
/mob/living/carbon/human/proc/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params)
return
/mob/living/carbon/human/attack_generic(var/mob/user, var/damage, var/attack_message)
/mob/living/carbon/human/attack_generic(var/mob/user, var/damage, var/attack_message, var/armor_type = "melee", var/armor_pen = 0, var/a_sharp = 0, var/a_edge = 0)
if(!damage)
return
@@ -339,9 +340,9 @@
var/dam_zone = pick(organs_by_name)
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
var/armor_block = run_armor_check(affecting, "melee")
var/armor_soak = get_armor_soak(affecting, "melee")
apply_damage(damage, BRUTE, affecting, armor_block, armor_soak)
var/armor_block = run_armor_check(affecting, armor_type, armor_pen)
var/armor_soak = get_armor_soak(affecting, armor_type, armor_pen)
apply_damage(damage, BRUTE, affecting, armor_block, armor_soak, sharp = a_sharp, edge = a_edge)
updatehealth()
return 1
@@ -149,11 +149,14 @@ var/datum/species/shapeshifter/promethean/prometheans
H.nutrition += rand(15, 45)
// Heal remaining damage.
if(H.getBruteLoss() || H.getFireLoss() || H.getOxyLoss() || H.getToxLoss())
H.adjustBruteLoss(-heal_rate)
H.adjustFireLoss(-heal_rate)
H.adjustOxyLoss(-heal_rate)
H.adjustToxLoss(-heal_rate)
if(H.fire_stacks >= 0)
if(H.getBruteLoss() || H.getFireLoss() || H.getOxyLoss() || H.getToxLoss())
H.adjustBruteLoss(-heal_rate)
H.adjustFireLoss(-heal_rate)
H.adjustOxyLoss(-heal_rate)
H.adjustToxLoss(-heal_rate)
else
H.adjustToxLoss(2*heal_rate) // Doubled because 0.5 is miniscule, and fire_stacks are capped in both directions
/datum/species/shapeshifter/promethean/get_blood_colour(var/mob/living/carbon/human/H)
return (H ? rgb(H.r_skin, H.g_skin, H.b_skin) : ..())
@@ -159,6 +159,8 @@ Please contact me on #coderbus IRC. ~Carn x
//0: We start with their existing appearance (this contains their verbs, important to keep those!)
var/mutable_appearance/ma_compiled = new(src)
ma_compiled.plane = plane //Required because of an override on mutable_appearance/New() that sets it to FLOAT_PLANE...for some reason.
ma_compiled.layer = layer
//1: HUDs because these are hidden behind a backplane. See update_icons_huds()
ma_compiled.overlays = list_huds //The first one can set instead of add
@@ -170,17 +172,14 @@ Please contact me on #coderbus IRC. ~Carn x
ma_compiled.overlays += list_layers
//4: Apply transforms based on situation
update_transform(ma_compiled, FALSE)
update_transform(ma_compiled)
//4.5 Set layer to PLANE_WORLD to make sure its not magically FLOAT_PLANE due to byond madness
ma_compiled.plane = PLANE_WORLD
//5: Do any species specific layering updates, such as when hiding.
update_icon_special(ma_compiled, FALSE)
//5: Set appearance once
//6: Set appearance once
appearance = ma_compiled
//6: Do any species specific layering updates, such as when hiding.
update_icon_special()
/mob/living/carbon/human/update_transform(var/mutable_appearance/passed_ma)
if(QDESTROYING(src))
return
@@ -190,6 +189,8 @@ Please contact me on #coderbus IRC. ~Carn x
ma = passed_ma
else
ma = new(src)
ma.plane = plane //Required because of an override on mutable_appearance/New() that sets it to FLOAT_PLANE...for some reason.
ma.layer = layer
// First, get the correct size.
var/desired_scale = icon_scale
@@ -214,9 +215,9 @@ Please contact me on #coderbus IRC. ~Carn x
M.Translate(0, 16*(desired_scale-1))
ma.transform = M
ma.layer = MOB_LAYER // Fix for a byond bug where turf entry order no longer matters
update_icon_special() //Adjust their layer, like when they are hiding.
if(!passed_ma)
update_icon_special(ma)
appearance = ma
//Update the layers from the defines above
@@ -251,10 +252,9 @@ Please contact me on #coderbus IRC. ~Carn x
list_huds = hud_list.Copy()
list_huds += backplane // Required to mask HUDs in context menus: http://www.byond.com/forum/?post=2336679
//TYPING INDICATOR CODE.
//Typing indicator code
if(client && !stat) //They have a client & aren't dead/KO'd? Continue on!
if(typing_indicator && hud_typing) //They already have the indicator and are still typing
overlays += typing_indicator //This might not be needed? It works, so I'm leaving it.
list_huds += typing_indicator
typing_indicator.invisibility = invisibility
@@ -262,13 +262,11 @@ Please contact me on #coderbus IRC. ~Carn x
typing_indicator = new
typing_indicator.icon = 'icons/mob/talk.dmi'
typing_indicator.icon_state = "[speech_bubble_appearance()]_typing"
overlays += typing_indicator
list_huds += typing_indicator
else if(typing_indicator && !hud_typing) //Did they stop typing?
overlays -= typing_indicator
typing = 0
hud_typing = 0
typing = FALSE
hud_typing = FALSE
if(update_icons)
update_icons()
@@ -419,20 +417,24 @@ var/global/list/damage_icon_parts = list()
var/icon/temp = part.get_icon(skeleton)
//That part makes left and right legs drawn topmost and lowermost when human looks WEST or EAST
//And no change in rendering for other parts (they icon_position is 0, so goes to 'else' part)
if(part.icon_position & (LEFT | RIGHT))
if(part.icon_position == RIGHT)
var/icon/temp2 = new('icons/mob/human.dmi',"blank")
var/icon/temp3 = new('icons/mob/human.dmi',"blank")
temp2.Insert(new/icon(temp,dir=NORTH),dir=NORTH)
temp2.Insert(new/icon(temp,dir=SOUTH),dir=SOUTH)
if(!(part.icon_position & LEFT))
temp2.Insert(new/icon(temp,dir=EAST),dir=EAST)
if(!(part.icon_position & RIGHT))
temp2.Insert(new/icon(temp,dir=WEST),dir=WEST)
temp2.Insert(new/icon(temp,dir=EAST),dir=EAST)
base_icon.Blend(temp2, ICON_OVERLAY)
if(part.icon_position & LEFT)
temp2.Insert(new/icon(temp,dir=EAST),dir=EAST)
if(part.icon_position & RIGHT)
temp2.Insert(new/icon(temp,dir=WEST),dir=WEST)
base_icon.Blend(temp2, ICON_UNDERLAY)
temp3.Insert(new/icon(temp,dir=WEST),dir=WEST)
base_icon.Blend(temp3, ICON_UNDERLAY)
else if(part.icon_position == LEFT)
var/icon/temp2 = new('icons/mob/human.dmi',"blank")
var/icon/temp3 = new('icons/mob/human.dmi',"blank")
temp2.Insert(new/icon(temp,dir=NORTH),dir=NORTH)
temp2.Insert(new/icon(temp,dir=SOUTH),dir=SOUTH)
temp2.Insert(new/icon(temp,dir=WEST),dir=WEST)
base_icon.Blend(temp2, ICON_OVERLAY)
temp3.Insert(new/icon(temp,dir=EAST),dir=EAST)
base_icon.Blend(temp3, ICON_UNDERLAY)
else if(part.icon_position & UNDER)
base_icon.Blend(temp, ICON_UNDERLAY)
else
@@ -656,7 +658,7 @@ var/global/list/damage_icon_parts = list()
update_fire(0)
update_water(0)
update_surgery(0)
UpdateDamageIcon()
UpdateDamageIcon(0)
update_icons_layers(0)
update_icons_huds(0)
update_icons()
@@ -885,6 +885,18 @@
cleaned_human.update_inv_shoes(0)
cleaned_human.clean_blood(1)
cleaned_human << "<font color='red'>[src] cleans your face!</font>"
if((module_state_1 && istype(module_state_1, /obj/item/weapon/storage/bag/ore)) || (module_state_2 && istype(module_state_2, /obj/item/weapon/storage/bag/ore)) || (module_state_3 && istype(module_state_3, /obj/item/weapon/storage/bag/ore))) //Borgs and drones can use their mining bags ~automagically~ if they're deployed in a slot. Only mining bags, as they're optimized for mass use.
var/obj/item/weapon/storage/bag/ore/B = null
if(istype(module_state_1, /obj/item/weapon/storage/bag/ore)) //First orebag has priority, if they for some reason have multiple.
B = module_state_1
else if(istype(module_state_2, /obj/item/weapon/storage/bag/ore))
B = module_state_2
else if(istype(module_state_3, /obj/item/weapon/storage/bag/ore))
B = module_state_3
var/turf/tile = loc
if(isturf(tile))
B.gather_all(tile, src, 1) //Shhh, unless the bag fills, don't spam the borg's chat with stuff that's going on every time they move!
return
/mob/living/silicon/robot/proc/self_destruct()
@@ -78,6 +78,18 @@ Nurse Family
var/atom/cocoon_target
var/egg_inject_chance = 5
/mob/living/simple_animal/hostile/giant_spider/nurse/medical
desc = "Furry and beige, it makes you shudder to look at it. This one has brilliant green eyes and a tiny nurse hat."
icon_state = "nursemed"
icon_living = "nursemed"
icon_dead = "nursemed_dead"
melee_damage_lower = 8
melee_damage_upper = 16
poison_type = "tramadol"
poison_chance = 15
/mob/living/simple_animal/hostile/giant_spider/nurse/queen
desc = "Absolutely gigantic, this creature is horror itself."
icon = 'icons/mob/64x64.dmi'
@@ -18,7 +18,7 @@
melee_damage_lower = 1
melee_damage_upper = 8
attacktext = "gouged"
attacktext = list("gouged")
cold_damage_per_tick = 0
speak_chance = 5
@@ -17,7 +17,7 @@
melee_damage_lower = 15
melee_damage_upper = 25
attacktext = "mauled"
attacktext = list("mauled")
cold_damage_per_tick = 0
speak_chance = 5
@@ -17,7 +17,7 @@
melee_damage_lower = 3
melee_damage_upper = 12
attacktext = "gouged"
attacktext = list("gouged")
cold_damage_per_tick = 0
speak_chance = 5
@@ -119,6 +119,10 @@
var/melee_miss_chance = 15 // percent chance to miss a melee attack.
var/melee_attack_minDelay = 5 // How long between attacks at least
var/melee_attack_maxDelay = 10 // How long between attacks at most
var/attack_armor_type = "melee" // What armor does this check?
var/attack_armor_pen = 0 // How much armor pen this attack has.
var/attack_sharp = 0 // Is the attack sharp?
var/attack_edge = 0 // Does the attack have an edge?
//Special attacks
var/spattack_prob = 0 // Chance of the mob doing a special attack (0 for never)
@@ -642,7 +646,6 @@
if(istype(O, /obj/item/weapon/material/knife) || istype(O, /obj/item/weapon/material/knife/butch))
harvest(user)
else
O.attack(src, user, user.zone_sel.selecting)
ai_log("attackby() I was weapon'd by: [user]",2)
if(O.force)
react_to_attack(user)
@@ -1275,7 +1278,7 @@
if(H.check_shields(damage = damage_to_do, damage_source = src, attacker = src, def_zone = null, attack_text = "the attack"))
return FALSE
if(A.attack_generic(src, damage_to_do, pick(attacktext)) && attack_sound)
if(A.attack_generic(src, damage_to_do, pick(attacktext), attack_armor_type, attack_armor_pen, attack_sharp, attack_edge) && attack_sound)
playsound(src, attack_sound, 75, 1)
return TRUE
@@ -180,7 +180,7 @@
var/damage_to_do = rand(melee_damage_lower, melee_damage_upper)
var/armor_modifier = abs((L.getarmor(null, "bio") / 100) - 1)
L.attack_generic(src, damage_to_do, attacktext)
L.attack_generic(src, damage_to_do, pick(attacktext))
playsound(src, 'sound/weapons/bite.ogg', 75, 1)
// Give the slime some nutrition, if applicable.
@@ -199,7 +199,7 @@
if(istype(L,/obj/mecha))
var/obj/mecha/M = L
M.attack_generic(src, rand(melee_damage_lower, melee_damage_upper), attacktext)
M.attack_generic(src, rand(melee_damage_lower, melee_damage_upper), pick(attacktext))
/mob/living/simple_animal/slime/proc/post_attack(var/mob/living/L, var/intent = I_HURT)
if(intent != I_HELP)
+3
View File
@@ -94,6 +94,9 @@
var/invis_toggle = FALSE
var/list/sub_planes
/obj/screen/plane_master/New()
..(null) //Never be in anything ever.
/obj/screen/plane_master/proc/set_desired_alpha(var/new_alpha)
if(new_alpha != alpha && new_alpha > 0 && new_alpha <= 255)
desired_alpha = new_alpha
+12 -6
View File
@@ -26,15 +26,18 @@
if(!ishuman(src)) //If they're a mob, use the old code.
set_typing_indicator(1)
if(is_preference_enabled(/datum/client_preference/show_typing_indicator))
else if(is_preference_enabled(/datum/client_preference/show_typing_indicator))
hud_typing = 1
update_icons_huds()
var/message = input("","say (text)") as text
if(is_preference_enabled(/datum/client_preference/show_typing_indicator))
hud_typing = 0
update_icons_huds()
if(!ishuman(src)) //If they're a mob, use the old code.
set_typing_indicator(0)
else if(is_preference_enabled(/datum/client_preference/show_typing_indicator))
hud_typing = 0
update_icons_huds()
if(message)
say_verb(message)
@@ -44,14 +47,17 @@
if(!ishuman(src)) //If they're a mob, use the old code.
set_typing_indicator(1)
if(is_preference_enabled(/datum/client_preference/show_typing_indicator))
else if(is_preference_enabled(/datum/client_preference/show_typing_indicator))
hud_typing = 1
update_icons_huds()
var/message = input("","me (text)") as text
if(is_preference_enabled(/datum/client_preference/show_typing_indicator))
hud_typing = 0
update_icons_huds()
if(!ishuman(src)) //If they're a mob, use the old code.
else if(!ishuman(src)) //If they're a mob, use the old code.
set_typing_indicator(0)
if(message)
me_verb(message)