Merge branch 'dev' into vv

This commit is contained in:
GinjaNinja32
2015-09-11 08:06:44 +01:00
37 changed files with 214 additions and 154 deletions

View File

@@ -1,6 +1,6 @@
/obj/item/clothing/head/helmet/space/rig/merc
light_overlay = "helmet_light_dual_green"
camera_networks = list("NUKE")
camera_networks = list(NETWORK_MERCENARY)
/obj/item/weapon/rig/merc
name = "crimson hardsuit control module"

View File

@@ -7,7 +7,7 @@
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 60)
siemens_coefficient = 0.6
species_restricted = list("Human")
camera_networks = list("NUKE")
camera_networks = list(NETWORK_MERCENARY)
light_overlay = "helmet_light_green" //todo: species-specific light overlays
/obj/item/clothing/suit/space/void/merc

View File

@@ -16,6 +16,7 @@
for(var/i in 1 to codelen)
code += pick(digits)
digits -= code[code.len]
generate_loot()
@@ -166,7 +167,7 @@
user << "<span class='danger'>The crate's anti-tamper system activates!</span>"
var/turf/T = get_turf(src.loc)
explosion(T, 0, 0, 1, 2)
del(src)
qdel(src)
/obj/structure/closet/crate/secure/loot/emag_act(var/remaining_charges, var/mob/user)
if (locked)

View File

@@ -183,6 +183,7 @@
if(!Adjacent(target))
awaiting_surrender = 5 // I'm done playing nice
mode = SECBOT_HUNT
return
var/threat = check_threat(target)
if(threat < 4)
target = null

View File

@@ -696,6 +696,28 @@
number += 2
return number
//Used by various things that knock people out by applying blunt trauma to the head.
//Checks that the species has a "head" (brain containing organ) and that hit_zone refers to it.
/mob/living/carbon/human/proc/headcheck(var/target_zone, var/brain_tag = "brain")
if(!species.has_organ[brain_tag])
return 0
var/obj/item/organ/affecting = internal_organs_by_name[brain_tag]
target_zone = check_zone(target_zone)
if(!affecting || affecting.parent_organ != target_zone)
return 0
//if the parent organ is significantly larger than the brain organ, then hitting it is not guaranteed
var/obj/item/organ/parent = get_organ(target_zone)
if(!parent)
return 0
if(parent.w_class > affecting.w_class + 1)
return prob(100 / 2**(parent.w_class - affecting.w_class - 1))
return 1
/mob/living/carbon/human/IsAdvancedToolUser(var/silent)
if(species.has_fine_manipulation)
return 1

View File

@@ -219,29 +219,32 @@ emp_act
H.bloody_hands(src)
if(!stat)
if(headcheck(hit_area))
//Harder to score a stun but if you do it lasts a bit longer
if(prob(effective_force))
apply_effect(20, PARALYZE, armor)
visible_message("<span class='danger'>[src] [species.knockout_message]</span>")
else
//Easier to score a stun but lasts less time
if(prob(effective_force + 10))
apply_effect(6, WEAKEN, armor)
visible_message("<span class='danger'>[src] has been knocked down!</span>")
//Apply blood
if(bloody)
switch(hit_area)
if("head")//Harder to score a stun but if you do it lasts a bit longer
if(prob(effective_force))
apply_effect(20, PARALYZE, armor)
visible_message("\red <B>[src] has been knocked unconscious!</B>")
if(bloody)//Apply blood
if(wear_mask)
wear_mask.add_blood(src)
update_inv_wear_mask(0)
if(head)
head.add_blood(src)
update_inv_head(0)
if(glasses && prob(33))
glasses.add_blood(src)
update_inv_glasses(0)
if("chest")//Easier to score a stun but lasts less time
if(prob((effective_force + 10)))
apply_effect(6, WEAKEN, armor)
visible_message("\red <B>[src] has been knocked down!</B>")
if(bloody)
bloody_body(src)
if("head")
if(wear_mask)
wear_mask.add_blood(src)
update_inv_wear_mask(0)
if(head)
head.add_blood(src)
update_inv_head(0)
if(glasses && prob(33))
glasses.add_blood(src)
update_inv_glasses(0)
if("chest")
bloody_body(src)
if(Iforce > 10 || Iforce >= 5 && prob(33))
forcesay(hit_appends) //forcesay checks stat already

View File

@@ -66,6 +66,7 @@
var/dusted_anim = "dust-h"
var/death_sound
var/death_message = "seizes up and falls limp, their eyes dead and lifeless..."
var/knockout_message = "has been knocked unconscious!"
// Environment tolerance/life processes vars.
var/reagent_tag //Used for metabolizing reagents.

View File

@@ -279,6 +279,8 @@
brute_mod = 1.875 // 100% * 1.875 * 0.8 (robolimbs) ~= 150%
burn_mod = 1.875 // So they take 50% extra damage from brute/burn overall.
show_ssd = "flashing a 'system offline' glyph on their monitor"
death_message = "gives one shrill beep before falling lifeless."
knockout_message = "encounters a hardware fault and suddenly reboots!"
warning_low_pressure = 50
hazard_low_pressure = 0

View File

@@ -2,7 +2,7 @@
/mob/living/carbon/process_resist()
//drop && roll
if(on_fire)
if(on_fire && !buckled)
fire_stacks -= 1.2
Weaken(3)
spin(32,2)

View File

@@ -573,21 +573,12 @@ default behaviour is:
set name = "Resist"
set category = "IC"
if(can_resist())
if(!(stat || next_move > world.time))
setClickCooldown(20)
resist_grab()
if(!weakened && !restrained())
if(!weakened)
process_resist()
/mob/living/proc/can_resist()
//need to allow !canmove, or otherwise neck grabs can't be resisted
//similar thing with weakened and pinning
if(stat)
return 0
if(!canClick())
return 0
return 1
/mob/living/proc/process_resist()
//Getting out of someone's inventory.
if(istype(src.loc, /obj/item/weapon/holder))

View File

@@ -136,6 +136,5 @@
// Cleaner proc for creating powersupply for an AI.
/mob/living/silicon/ai/proc/create_powersupply()
if(psupply)
del(psupply)
qdel(psupply)
psupply = new/obj/machinery/ai_powersupply(src)

View File

@@ -34,9 +34,6 @@
/mob/living/captive_brain/emote(var/message)
return
/mob/living/captive_brain/can_resist()
return !(stat || !canClick())
/mob/living/captive_brain/process_resist()
//Resisting control by an alien mind.
if(istype(src.loc,/mob/living/simple_animal/borer))

View File

@@ -91,15 +91,15 @@
var/damage = 20
var/obj/item/clothing/hat = attacker.head
if(istype(hat))
damage += hat.force * 10
damage += hat.force * 3
var/armor = target.run_armor_check("head", "melee")
target.apply_damage(damage*rand(90, 110)/100, BRUTE, "head", armor)
attacker.apply_damage(10*rand(90, 110)/100, BRUTE, "head", attacker.run_armor_check("head", "melee"))
target.apply_damage(damage, BRUTE, "head", armor)
attacker.apply_damage(10, BRUTE, "head", attacker.run_armor_check("head", "melee"))
if(!armor && prob(damage))
if(!armor && target.headcheck("head") && prob(damage))
target.apply_effect(20, PARALYZE)
target.visible_message("<span class='danger'>[target] has been knocked unconscious!</span>")
target.visible_message("<span class='danger'>[target] [target.species.knockout_message]</span>")
playsound(attacker.loc, "swing_hit", 25, 1, -1)
attacker.attack_log += text("\[[time_stamp()]\] <font color='red'>Headbutted [target.name] ([target.ckey])</font>")

View File

@@ -626,6 +626,12 @@ proc/is_blind(A)
return 0
/mob/living/carbon/assess_perp(var/obj/access_obj, var/check_access, var/auth_weapons, var/check_records, var/check_arrest)
if(handcuffed)
return SAFE_PERP
return ..()
/mob/living/carbon/human/assess_perp(var/obj/access_obj, var/check_access, var/auth_weapons, var/check_records, var/check_arrest)
var/threatcount = ..()
if(. == SAFE_PERP)

View File

@@ -270,7 +270,7 @@
owner.updatehealth() //droplimb will call updatehealth() again if it does end up being called
//If limb took enough damage, try to cut or tear it off
if(owner && loc == owner)
if(owner && loc == owner && !is_stump())
if(!cannot_amputate && config.limbs_can_break && (brute_dam + burn_dam) >= (max_damage * config.organ_health_multiplier))
//organs can come off in three cases
//1. If the damage source is edge_eligible and the brute damage dealt exceeds the edge threshold, then the organ is cut off.

View File

@@ -25,4 +25,4 @@
qdel(src)
/obj/item/organ/external/stump/is_usable()
return 0
return 0

View File

@@ -1148,7 +1148,7 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on)
switch(severity)
if(1.0)
//set_broken() //now Del() do what we need
//set_broken() //now qdel() do what we need
if (cell)
cell.ex_act(1.0) // more lags woohoo
qdel(src)

View File

@@ -32,17 +32,17 @@
return
..()
/datum/reagent/nutriment/egg // Also bad for skrell. Not a child of protein because it might mess up, not sure.
/datum/reagent/nutriment/protein/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien && alien == IS_SKRELL)
M.adjustToxLoss(2 * removed)
return
..()
/datum/reagent/nutriment/protein/egg // Also bad for skrell.
name = "egg yolk"
id = "egg"
color = "#FFFFAA"
/datum/reagent/nutriment/egg/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
if(alien && alien == IS_SKRELL)
M.adjustToxLoss(0.5 * removed)
return
..()
/datum/reagent/nutriment/honey
name = "Honey"
id = "honey"
@@ -570,19 +570,36 @@
adj_drowsy = -3
adj_sleepy = -2
adj_temp = 25
overdose = 45
glass_icon_state = "hot_coffee"
glass_name = "cup of coffee"
glass_desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere."
/datum/reagent/drink/coffee/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
if(alien == IS_DIONA)
return
..()
if(alien == IS_TAJARA)
M.adjustToxLoss(0.5 * removed)
M.make_jittery(4) //extra sensitive to caffine
if(adj_temp > 0)
holder.remove_reagent("frostoil", 10 * removed)
if(dose > 45)
M.make_jittery(5)
/datum/reagent/nutriment/coffee/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
..()
if(alien == IS_TAJARA)
M.adjustToxLoss(2 * removed)
M.make_jittery(4)
return
/datum/reagent/drink/coffee/overdose(var/mob/living/carbon/M, var/alien)
if(alien == IS_DIONA)
return
if(alien == IS_TAJARA)
M.adjustToxLoss(4 * REM)
M.apply_effect(3, STUTTER)
M.make_jittery(5)
/datum/reagent/drink/coffee/icecoffee
name = "Iced Coffee"
@@ -1010,7 +1027,39 @@
glass_desc = "A crystal clear glass of Griffeater gin."
glass_center_of_mass = list("x"=16, "y"=12)
/datum/reagent/ethanol/kahlua
//Base type for alchoholic drinks containing coffee
/datum/reagent/ethanol/coffee
overdose = 45
/datum/reagent/ethanol/coffee/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_DIONA)
return
..()
M.dizziness = max(0, M.dizziness - 5)
M.drowsyness = max(0, M.drowsyness - 3)
M.sleeping = max(0, M.sleeping - 2)
if(M.bodytemperature > 310)
M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
if(alien == IS_TAJARA)
M.adjustToxLoss(0.5 * removed)
M.make_jittery(4) //extra sensitive to caffine
/datum/reagent/ethanol/coffee/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_TAJARA)
M.adjustToxLoss(2 * removed)
M.make_jittery(4)
return
..()
/datum/reagent/ethanol/coffee/overdose(var/mob/living/carbon/M, var/alien)
if(alien == IS_DIONA)
return
if(alien == IS_TAJARA)
M.adjustToxLoss(4 * REM)
M.apply_effect(3, STUTTER)
M.make_jittery(5)
/datum/reagent/ethanol/coffee/kahlua
name = "Kahlua"
id = "kahlua"
description = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936!"
@@ -1022,17 +1071,6 @@
glass_desc = "DAMN, THIS THING LOOKS ROBUST"
glass_center_of_mass = list("x"=15, "y"=7)
/datum/reagent/ethanol/kahlua/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
if(alien == IS_DIONA)
return
M.dizziness = max(0, M.dizziness - 5)
M.drowsyness = max(0, M.drowsyness - 3)
M.sleeping = max(0, M.sleeping - 2)
if(M.bodytemperature > 310)
M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.make_jittery(5)
/datum/reagent/ethanol/melonliquor
name = "Melon Liquor"
id = "melonliquor"
@@ -1246,7 +1284,7 @@
glass_desc = "We cannot take legal responsibility for your actions after imbibing."
glass_center_of_mass = list("x"=15, "y"=7)
/datum/reagent/ethanol/b52
/datum/reagent/ethanol/coffee/b52
name = "B-52"
id = "b52"
description = "Coffee, Irish Cream, and cognac. You will get bombed."
@@ -1357,7 +1395,7 @@
glass_name = "glass of Booger"
glass_desc = "Ewww..."
/datum/reagent/ethanol/brave_bull
/datum/reagent/ethanol/coffee/brave_bull
name = "Brave Bull"
id = "bravebull"
description = "It's just as effective as Dutch-Courage!"
@@ -1566,7 +1604,7 @@
glass_desc = "An irish car bomb."
glass_center_of_mass = list("x"=16, "y"=8)
/datum/reagent/ethanol/irishcoffee
/datum/reagent/ethanol/coffee/irishcoffee
name = "Irish Coffee"
id = "irishcoffee"
description = "Coffee, and alcohol. More fun than a Mimosa to drink in the morning."

View File

@@ -420,19 +420,19 @@
return
M.druggy = max(M.druggy, 30)
if(dose < 1)
M.stuttering = max(M.stuttering, 3)
M.apply_effect(3, STUTTER)
M.make_dizzy(5)
if(prob(10))
M.emote(pick("twitch", "giggle"))
else if(dose < 2)
M.stuttering = max(M.stuttering, 3)
M.apply_effect(3, STUTTER)
M.make_jittery(10)
M.make_dizzy(10)
M.druggy = max(M.druggy, 35)
if(prob(20))
M.emote(pick("twitch","giggle"))
else
M.stuttering = max(M.stuttering, 3)
M.apply_effect(3, STUTTER)
M.make_jittery(20)
M.make_dizzy(20)
M.druggy = max(M.druggy, 40)

View File

@@ -124,7 +124,7 @@
if(user.a_intent != I_HURT || !isGlass)
return ..()
var/obj/item/organ/external/affecting = user.zone_sel.selecting //Find what the player is aiming at
var/affecting = user.zone_sel.selecting //Find what the player is aiming at
var/armor_block = 0 //Get the target's armour values for normal attack damage.
var/armor_duration = 0 //The more force the bottle has, the longer the duration.
@@ -140,12 +140,11 @@
// You are going to knock someone out for longer if they are not wearing a helmet.
var/do_smash = smash_check(1) //won't always break on the first hit
if(affecting == "head" && istype(target, /mob/living/carbon/) && do_smash)
var/mob/living/carbon/human/H = target
if(do_smash && istype(H) && H.headcheck(affecting))
//Display an attack message.
for(var/mob/O in viewers(user, null))
if(target != user) O.show_message(text("\red <B>[target] has been hit over the head with a bottle of [src.name], by [user]!</B>"), 1)
else O.show_message(text("\red <B>[target] hit \himself with a bottle of [src.name] on the head!</B>"), 1)
var/obj/item/organ/O = H.get_organ(affecting)
user.visible_message("<span class='danger'>[user] smashes [src] into [H]'s [O.name]!</span>")
//Weaken the target for the duration that we calculated and divide it by 5.
if(armor_duration)
target.apply_effect(min(armor_duration, 5) , WEAKEN, armor_block) // Never weaken more than a flash!