Files
Paradise/code/modules/mob/organ/organ.dm
mport2004@gmail.com 62e28c2abf Organs:
Moved into their own folder and got split into three files.
Damage  zones have been regrouped slightly to make it easier to deal with them. Currently the organ groups are head, l/r leg, l/r arm, and head.

Attacking:
Armor is properly checked.
Currently aiming for the chest gives a higher chance to stun whereas the head will stun for longer.
Stungloves/Disarm now show up in the attack log.
Stungloves ignore intent.

Silicon:
AI units can now move between cams that are not on the ss13 network.
Cyborg's alert screen should not longer pop up every time they get an alert if they have opened it once during the round.
Robot vision now uses the standard amount of energy.

Gamemodes:
Added Deuryn's unrev message.
Runes can only be examined if you are close to them.
Moved the Loyalty implants to the HoS' locker at the request of HerpA.
Nuke agents now come with explosive implants that will activate upon death.

Projectiles:
Once again went though the gun code and cleaned things up, it is much better now.
Bullet_act fixed up and most mobs now use the one in living, just overload it if they need to do something diff.
Freeze /caplaser/xbow no longer have an infinite loop.
Shotguns have to be pumped manually.

Went though the latest runtime log.

Power cells now use return on their give/use procs

Assemblies have been reworked and are nearly finished, just need to finish up the special assembly code, redo the signalers, and add one or two new assembly items.
Laying down will now only take 3 ticks to get up, from 5.

You can no longer punch people on the spawn screen.

This is a big one and was cleared by two heads, TK will only allow you to pick up items.  If you have an item in your hand it will act normal.

This revision got much larger than originally intended my tests show everything is working fine, but you never know.  Ill likely do more mob teaks in the next few days.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2333 316c924e-a436-60f5-8080-3fe189b3f50e
2011-10-08 10:38:01 +00:00

113 lines
2.5 KiB
Plaintext

/datum/organ
var
name = "organ"
owner = null
proc/process()
return 0
proc/receive_chem(chemical as obj)
return 0
/****************************************************
EXTERNAL ORGANS
****************************************************/
/datum/organ/external
name = "external"
var
icon_name = null
body_part = null
damage_state = "00"
brute_dam = 0
burn_dam = 0
bandaged = 0
max_damage = 0
wound_size = 0
max_size = 0
proc/take_damage(brute, burn)
if((brute <= 0) && (burn <= 0)) return 0
if((src.brute_dam + src.burn_dam + brute + burn) < src.max_damage)
src.brute_dam += brute
src.burn_dam += burn
else
var/can_inflict = src.max_damage - (src.brute_dam + src.burn_dam)
if(can_inflict)
if (brute > 0 && burn > 0)
brute = can_inflict/2
burn = can_inflict/2
var/ratio = brute / (brute + burn)
src.brute_dam += ratio * can_inflict
src.burn_dam += (1 - ratio) * can_inflict
else
if (brute > 0)
brute = can_inflict
src.brute_dam += brute
else
burn = can_inflict
src.burn_dam += burn
else
return 0
var/result = src.update_icon()
return result
proc/heal_damage(brute, burn)
src.brute_dam = max(0, src.brute_dam - brute)
src.burn_dam = max(0, src.burn_dam - burn)
return update_icon()
proc/get_damage() //returns total damage
return src.brute_dam + src.burn_dam //could use src.health?
// new damage icon system
// returns just the brute/burn damage code
proc/damage_state_text()
var/tburn = 0
var/tbrute = 0
if(burn_dam ==0)
tburn =0
else if (src.burn_dam < (src.max_damage * 0.25 / 2))
tburn = 1
else if (src.burn_dam < (src.max_damage * 0.75 / 2))
tburn = 2
else
tburn = 3
if (src.brute_dam == 0)
tbrute = 0
else if (src.brute_dam < (src.max_damage * 0.25 / 2))
tbrute = 1
else if (src.brute_dam < (src.max_damage * 0.75 / 2))
tbrute = 2
else
tbrute = 3
return "[tbrute][tburn]"
// new damage icon system
// adjusted to set damage_state to brute/burn code only (without r_name0 as before)
proc/update_icon()
var/n_is = src.damage_state_text()
if (n_is != src.damage_state)
src.damage_state = n_is
return 1
return 0
/****************************************************
INTERNAL ORGANS
****************************************************/
/datum/organ/internal
name = "internal"