Merge with dev.

This commit is contained in:
Zuhayr
2015-05-15 23:22:48 +09:30
86 changed files with 3562 additions and 5272 deletions
+1 -2
View File
@@ -103,8 +103,7 @@
update_icons()
if(do_mob(src, H, 30))
if(t == 1)
reagent_glass.reagents.trans_to(H, injection_amount)
reagent_glass.reagents.reaction(H, 2)
reagent_glass.reagents.trans_to_mob(H, injection_amount, CHEM_BLOOD)
else
H.reagents.add_reagent(t, injection_amount)
visible_message("<span class='warning'>[src] injects [H] with the syringe!</span>")
@@ -23,10 +23,6 @@
verbs += /mob/living/proc/ventcrawl
verbs += /mob/living/proc/hide
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
name = "[initial(name)] ([rand(1, 1000)])"
real_name = name
regenerate_icons()
+12 -1
View File
@@ -105,7 +105,18 @@
proc/handle_chemicals_in_body()
if(reagents) reagents.metabolize(src)
chem_effects.Cut()
analgesic = 0
if(touching)
touching.metabolize(0, CHEM_TOUCH)
if(ingested)
ingested.metabolize(0, CHEM_INGEST)
if(reagents)
reagents.metabolize(0, CHEM_BLOOD)
if(CE_PAINKILLER in chem_effects)
analgesic = chem_effects[CE_PAINKILLER]
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
+4 -6
View File
@@ -7,7 +7,7 @@
var/datum/gas_mixture/breath = null
//First, check if we can breathe at all
if(health < config.health_threshold_crit && !reagents.has_reagent("inaprovaline")) //crit aka circulatory shock
if(health < config.health_threshold_crit && !(CE_STABLE in chem_effects)) //crit aka circulatory shock
losebreath++
if(losebreath>0) //Suffocating so do not take a breath
@@ -65,11 +65,9 @@
for(var/obj/effect/effect/smoke/chem/smoke in view(1, src))
if(smoke.reagents.total_volume)
smoke.reagents.reaction(src, INGEST)
spawn(5)
if(smoke)
//maybe check air pressure here or something to see if breathing in smoke is even possible.
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
smoke.reagents.trans_to_mob(src, 10, CHEM_INGEST, copy = 1)
//maybe check air pressure here or something to see if breathing in smoke is even possible.
// I dunno, maybe the reagents enter the blood stream through the lungs?
break // If they breathe in the nasty stuff once, no need to continue checking
/mob/living/carbon/proc/handle_breath(datum/gas_mixture/breath)
+18 -2
View File
@@ -1,3 +1,13 @@
/mob/living/carbon/New()
create_reagents(1000)
var/datum/reagents/R1 = new/datum/reagents(1000)
var/datum/reagents/R2 = new/datum/reagents(1000)
ingested = R1
touching = R2
R1.my_atom = src
R2.my_atom = src
..()
/mob/living/carbon/Life()
..()
@@ -442,11 +452,17 @@
Stun(stun_duration)
Weaken(Floor(stun_duration/2))
return 1
/mob/living/carbon/proc/add_chemical_effect(var/effect, var/magnitude = 1)
if(effect in chem_effects)
chem_effects[effect] += magnitude
else
chem_effects[effect] = magnitude
/mob/living/carbon/get_default_language()
if(default_language)
return default_language
if(!species)
return null
return species.default_language ? all_languages[species.default_language] : null
return species.default_language ? all_languages[species.default_language] : null
@@ -17,5 +17,8 @@
var/datum/surgery_status/op_stage = new/datum/surgery_status
//Active emote/pose
var/pose = null
var/list/chem_effects = list()
var/datum/reagents/ingested = null
var/datum/reagents/touching = null
var/pulse = PULSE_NORM //current pulse level
@@ -19,17 +19,13 @@
set_species(new_species,1)
else
set_species()
if(species)
real_name = species.get_random_name(gender)
name = real_name
if(mind)
mind.name = real_name
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
R.my_atom = src
hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudhealth100")
hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy")
hud_list[LIFE_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy")
@@ -10,9 +10,8 @@
if(embedded_flag)
handle_embedded_objects() //Moving with objects stuck in you can cause bad times.
if(reagents.has_reagent("hyperzine")) return -1
if(reagents.has_reagent("nuka_cola")) return -1
if(CE_SPEEDBOOST in chem_effects)
return -1
var/health_deficiency = (100 - health)
if(health_deficiency >= 40) tally += (health_deficiency / 25)
+9 -6
View File
@@ -859,10 +859,16 @@
proc/handle_chemicals_in_body()
if(reagents && !(species.flags & IS_SYNTHETIC)) //Synths don't process reagents.
chem_effects.Cut()
analgesic = 0
var/alien = 0
if(species && species.reagent_tag)
alien = species.reagent_tag
reagents.metabolize(src,alien)
touching.metabolize(alien, CHEM_TOUCH)
ingested.metabolize(alien, CHEM_INGEST)
reagents.metabolize(alien, CHEM_BLOOD)
if(CE_PAINKILLER in chem_effects)
analgesic = chem_effects[CE_PAINKILLER]
var/total_phoronloss = 0
for(var/obj/item/I in src)
@@ -951,9 +957,6 @@
silent = 0
return 1
// the analgesic effect wears off slowly
analgesic = max(0, analgesic - 1)
//UNCONSCIOUS. NO-ONE IS HOME
if( (getOxyLoss() > 50) || (config.health_threshold_crit > health) )
Paralyse(3)
@@ -1257,7 +1260,7 @@
see_invisible = SEE_INVISIBLE_LIVING
if(healths)
if (analgesic)
if (analgesic > 100)
healths.icon_state = "health_health_numb"
else
switch(hal_screwyhud)
@@ -1449,7 +1452,7 @@
handle_shock()
..()
if(status_flags & GODMODE) return 0 //godmode
if(analgesic || (species && species.flags & NO_PAIN)) return // analgesic avoids all traumatic shock temporarily
if(species && species.flags & NO_PAIN) return
if(health < config.health_threshold_softcrit)// health 0 makes you immediately collapse
shock_stage = max(shock_stage, 61)
+11 -1
View File
@@ -82,8 +82,18 @@
return temp_change
/mob/living/carbon/slime/proc/handle_chemicals_in_body()
chem_effects.Cut()
analgesic = 0
if(reagents) reagents.metabolize(src)
if(touching)
touching.metabolize(0, CHEM_TOUCH)
if(ingested)
ingested.metabolize(0, CHEM_INGEST)
if(reagents)
reagents.metabolize(0, CHEM_BLOOD)
if(CE_PAINKILLER in chem_effects)
analgesic = chem_effects[CE_PAINKILLER]
src.updatehealth()
@@ -61,8 +61,6 @@
verbs += /mob/living/proc/ventcrawl
create_reagents(100)
src.colour = colour
number = rand(1, 1000)
name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
@@ -410,14 +408,6 @@
adjustToxLoss(-10)
nutrition = max(nutrition, get_max_nutrition())
/mob/living/carbon/slime/proc/apply_water(var/amount)
adjustToxLoss(15 + amount)
if (!client)
if (Target) // Like cats
Target = null
++Discipline
return
/mob/living/carbon/slime/can_use_vents()
if(Victim)
return "You cannot ventcrawl while feeding."
+2 -15
View File
@@ -13,24 +13,11 @@
1.5 * src.getFireLoss() + \
1.2 * src.getBruteLoss() + \
1.7 * src.getCloneLoss() + \
2 * src.halloss
2 * src.halloss + \
-1 * src.analgesic
if(reagents.has_reagent("alkysine"))
src.traumatic_shock -= 10
if(reagents.has_reagent("inaprovaline"))
src.traumatic_shock -= 25
if(reagents.has_reagent("synaptizine"))
src.traumatic_shock -= 40
if(reagents.has_reagent("paracetamol"))
src.traumatic_shock -= 50
if(reagents.has_reagent("tramadol"))
src.traumatic_shock -= 80
if(reagents.has_reagent("oxycodone"))
src.traumatic_shock -= 200
if(src.slurring)
src.traumatic_shock -= 20
if(src.analgesic)
src.traumatic_shock = 0
// broken or ripped off organs will add quite a bit of pain
if(istype(src,/mob/living/carbon/human))
@@ -230,7 +230,7 @@ var/global/list/robot_modules = list(
src.modules += new /obj/item/roller_holder(src)
src.modules += new /obj/item/weapon/reagent_containers/borghypo/crisis(src)
src.modules += new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
src.modules += new /obj/item/weapon/reagent_containers/dropper/industrial(src)
src.modules += new /obj/item/weapon/reagent_containers/syringe(src)
src.modules += new /obj/item/weapon/extinguisher/mini(src)
src.emag = new /obj/item/weapon/reagent_containers/spray(src)
@@ -494,7 +494,7 @@ var/global/list/robot_modules = list(
M.stored_matter = 30
src.modules += M
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
src.modules += new /obj/item/weapon/reagent_containers/dropper/industrial(src)
var/obj/item/weapon/flame/lighter/zippo/L = new /obj/item/weapon/flame/lighter/zippo(src)
L.lit = 1