moving all the git stuff over to this so people who don't want to spend 8 years figuring out the bass ackward git system can actually run our server code

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2983 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
quartz235@gmail.com
2012-01-25 05:05:55 +00:00
parent cbe487dbd5
commit b3f7865754
82 changed files with 21831 additions and 21392 deletions
+152 -152
View File
@@ -1,153 +1,153 @@
/mob/living/verb/succumb()
set hidden = 1
if ((src.health < 0 && src.health > -95.0))
src.adjustOxyLoss(src.health + 200)
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
src << "\blue You have given up life and succumbed to death."
/mob/living/proc/updatehealth()
if(!src.nodamage)
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss()
else
src.health = 100
src.stat = 0
//sort of a legacy burn method for /electrocute, /shock, and the e_chair
/mob/living/proc/burn_skin(burn_amount)
if(istype(src, /mob/living/carbon/human))
//world << "DEBUG: burn_skin(), mutations=[mutations]"
if (src.mutations & COLD_RESISTANCE) //fireproof
return 0
var/mob/living/carbon/human/H = src //make this damage method divide the damage to be done among all the body parts, then burn each body part for that much damage. will have better effect then just randomly picking a body part
var/divided_damage = (burn_amount)/(H.organs.len)
var/extradam = 0 //added to when organ is at max dam
for(var/datum/organ/external/affecting in H.organs)
if(!affecting) continue
if(affecting.take_damage(0, divided_damage+extradam))
extradam = 0
else
extradam += divided_damage
H.UpdateDamageIcon()
H.updatehealth()
return 1
else if(istype(src, /mob/living/carbon/monkey))
if (src.mutations & COLD_RESISTANCE) //fireproof
return 0
var/mob/living/carbon/monkey/M = src
M.adjustFireLoss(burn_amount)
M.updatehealth()
return 1
else if(istype(src, /mob/living/silicon/ai))
return 0
/mob/living/proc/adjustBodyTemp(actual, desired, incrementboost)
var/temperature = actual
var/difference = abs(actual-desired) //get difference
var/increments = difference/10 //find how many increments apart they are
var/change = increments*incrementboost // Get the amount to change by (x per increment)
// Too cold
if(actual < desired)
temperature += change
if(actual > desired)
temperature = desired
// Too hot
if(actual > desired)
temperature -= change
if(actual < desired)
temperature = desired
// if(istype(src, /mob/living/carbon/human))
// world << "[src] ~ [src.bodytemperature] ~ [temperature]"
return temperature
/mob/proc/get_contents()
/mob/living/get_contents()
var/list/L = list()
L += src.contents
for(var/obj/item/weapon/storage/S in src.contents)
L += S.return_inv()
for(var/obj/item/weapon/gift/G in src.contents)
L += G.gift
if (istype(G.gift, /obj/item/weapon/storage))
L += G.gift:return_inv()
return L
/mob/living/proc/check_contents_for(A)
var/list/L = list()
L += src.contents
for(var/obj/item/weapon/storage/S in src.contents)
L += S.return_inv()
for(var/obj/item/weapon/gift/G in src.contents)
L += G.gift
if (istype(G.gift, /obj/item/weapon/storage))
L += G.gift:return_inv()
for(var/obj/B in L)
if(B.type == A)
return 1
return 0
/mob/living/proc/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0)
return 0 //only carbon liveforms have this proc
/mob/living/emp_act(severity)
var/list/L = src.get_contents()
for(var/obj/O in L)
O.emp_act(severity)
..()
/mob/living/proc/get_organ_target()
var/mob/shooter = src
var/t = shooter:zone_sel.selecting
if ((t in list( "eyes", "mouth" )))
t = "head"
var/datum/organ/external/def_zone = ran_zone(t)
return def_zone
// heal ONE external organ, organ gets randomly selected from damaged ones.
/mob/living/proc/heal_organ_damage(var/brute, var/burn)
adjustBruteLoss(-brute)
adjustFireLoss(-burn)
src.updatehealth()
// damage ONE external organ, organ gets randomly selected from damaged ones.
/mob/living/proc/take_organ_damage(var/brute, var/burn)
adjustBruteLoss(brute)
adjustFireLoss(burn)
src.updatehealth()
// heal MANY external organs, in random order
/mob/living/proc/heal_overall_damage(var/brute, var/burn)
adjustBruteLoss(-brute)
adjustFireLoss(-burn)
src.updatehealth()
// damage MANY external organs, in random order
/mob/living/proc/take_overall_damage(var/brute, var/burn)
adjustBruteLoss(brute)
adjustFireLoss(burn)
src.updatehealth()
/mob/living/proc/revive()
//src.fireloss = 0
src.setToxLoss(0)
//src.bruteloss = 0
src.setOxyLoss(0)
SetParalysis(0)
SetStunned(0)
SetWeakened(0)
//src.health = 100
src.heal_overall_damage(1000, 1000)
src.buckled = initial(src.buckled)
src.handcuffed = initial(src.handcuffed)
if(src.stat > 1) src.stat = CONSCIOUS
..()
return
/mob/living/proc/UpdateDamageIcon()
/mob/living/verb/succumb()
set hidden = 1
if ((src.health < 0 && src.health > -95.0))
src.adjustOxyLoss(src.health + 200)
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
src << "\blue You have given up life and succumbed to death."
/mob/living/proc/updatehealth()
if(!src.nodamage)
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss()
else
src.health = 100
src.stat = 0
//sort of a legacy burn method for /electrocute, /shock, and the e_chair
/mob/living/proc/burn_skin(burn_amount)
if(istype(src, /mob/living/carbon/human))
//world << "DEBUG: burn_skin(), mutations=[mutations]"
if (src.mutations & COLD_RESISTANCE) //fireproof
return 0
var/mob/living/carbon/human/H = src //make this damage method divide the damage to be done among all the body parts, then burn each body part for that much damage. will have better effect then just randomly picking a body part
var/divided_damage = (burn_amount)/(H.organs.len)
var/extradam = 0 //added to when organ is at max dam
for(var/datum/organ/external/affecting in H.organs)
if(!affecting) continue
if(affecting.take_damage(0, divided_damage+extradam))
extradam = 0
else
extradam += divided_damage
H.UpdateDamageIcon()
H.updatehealth()
return 1
else if(istype(src, /mob/living/carbon/monkey))
if (src.mutations & COLD_RESISTANCE) //fireproof
return 0
var/mob/living/carbon/monkey/M = src
M.adjustFireLoss(burn_amount)
M.updatehealth()
return 1
else if(istype(src, /mob/living/silicon/ai))
return 0
/mob/living/proc/adjustBodyTemp(actual, desired, incrementboost)
var/temperature = actual
var/difference = abs(actual-desired) //get difference
var/increments = difference/10 //find how many increments apart they are
var/change = increments*incrementboost // Get the amount to change by (x per increment)
// Too cold
if(actual < desired)
temperature += change
if(actual > desired)
temperature = desired
// Too hot
if(actual > desired)
temperature -= change
if(actual < desired)
temperature = desired
// if(istype(src, /mob/living/carbon/human))
// world << "[src] ~ [src.bodytemperature] ~ [temperature]"
return temperature
/mob/proc/get_contents()
/mob/living/get_contents()
var/list/L = list()
L += src.contents
for(var/obj/item/weapon/storage/S in src.contents)
L += S.return_inv()
for(var/obj/item/weapon/gift/G in src.contents)
L += G.gift
if (istype(G.gift, /obj/item/weapon/storage))
L += G.gift:return_inv()
return L
/mob/living/proc/check_contents_for(A)
var/list/L = list()
L += src.contents
for(var/obj/item/weapon/storage/S in src.contents)
L += S.return_inv()
for(var/obj/item/weapon/gift/G in src.contents)
L += G.gift
if (istype(G.gift, /obj/item/weapon/storage))
L += G.gift:return_inv()
for(var/obj/B in L)
if(B.type == A)
return 1
return 0
/mob/living/proc/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0)
return 0 //only carbon liveforms have this proc
/mob/living/emp_act(severity)
var/list/L = src.get_contents()
for(var/obj/O in L)
O.emp_act(severity)
..()
/mob/living/proc/get_organ_target()
var/mob/shooter = src
var/t = shooter:zone_sel.selecting
if ((t in list( "eyes", "mouth" )))
t = "head"
var/datum/organ/external/def_zone = ran_zone(t)
return def_zone
// heal ONE external organ, organ gets randomly selected from damaged ones.
/mob/living/proc/heal_organ_damage(var/brute, var/burn)
adjustBruteLoss(-brute)
adjustFireLoss(-burn)
src.updatehealth()
// damage ONE external organ, organ gets randomly selected from damaged ones.
/mob/living/proc/take_organ_damage(var/brute, var/burn)
adjustBruteLoss(brute)
adjustFireLoss(burn)
src.updatehealth()
// heal MANY external organs, in random order
/mob/living/proc/heal_overall_damage(var/brute, var/burn)
adjustBruteLoss(-brute)
adjustFireLoss(-burn)
src.updatehealth()
// damage MANY external organs, in random order
/mob/living/proc/take_overall_damage(var/brute, var/burn)
adjustBruteLoss(brute)
adjustFireLoss(burn)
src.updatehealth()
/mob/living/proc/revive()
//src.fireloss = 0
src.setToxLoss(0)
//src.bruteloss = 0
src.setOxyLoss(0)
SetParalysis(0)
SetStunned(0)
SetWeakened(0)
//src.health = 100
src.heal_overall_damage(1000, 1000)
src.buckled = initial(src.buckled)
src.handcuffed = initial(src.handcuffed)
if(src.stat > 1) src.stat = CONSCIOUS
..()
return
/mob/living/proc/UpdateDamageIcon()
return
+8 -1
View File
@@ -364,4 +364,11 @@
step(AM, t)
now_pushing = null
return
return
return
//PC stuff-Sieve
/mob/living/simple_animal/corgi/proc/mind_initialize(mob/G)
mind = new
mind.current = src
mind.assigned_role = "Corgi"
mind.key = G.key
+24
View File
@@ -296,6 +296,30 @@
new_metroid.a_intent = "hurt"
new_metroid << "<B>You are now a baby Metroid.</B>"
spawn(0)//To prevent the proc from returning null.
del(src)
return
/mob/living/carbon/human/proc/corgize()
if (monkeyizing)
return
for(var/obj/item/W in src)
drop_from_slot(W)
update_clothing()
monkeyizing = 1
canmove = 0
icon = null
invisibility = 101
for(var/t in organs)
del(t)
var/mob/living/simple_animal/corgi/new_corgi = new /mob/living/simple_animal/corgi (loc)
new_corgi.mind_initialize(src)
new_corgi.key = key
new_corgi.a_intent = "hurt"
new_corgi << "<B>You are now a Corgi!.</B>"
spawn(0)//To prevent the proc from returning null.
del(src)
return