Robot health buffs, addition of armour component.

This commit is contained in:
Zuhayr
2013-07-13 04:33:48 -07:00
parent 1af9a7bc60
commit 71f36969b8
3 changed files with 37 additions and 10 deletions

View File

@@ -63,16 +63,21 @@
else
powered = 0
/datum/robot_component/armour
name = "armour plating"
energy_consumption = 0
external_type = /obj/item/robot_parts/robot_component/armour
max_damage = 60
/datum/robot_component/actuator
name = "actuator"
energy_consumption = 2
external_type = /obj/item/robot_parts/robot_component/actuator
max_damage = 60
max_damage = 50
/datum/robot_component/cell
name = "power cell"
max_damage = 60
max_damage = 50
/datum/robot_component/cell/destroy()
..()
@@ -81,8 +86,8 @@
/datum/robot_component/radio
name = "radio"
external_type = /obj/item/robot_parts/robot_component/radio
energy_consumption = 3
max_damage = 10
energy_consumption = 1
max_damage = 40
/datum/robot_component/binary_communication
name = "binary communication device"
@@ -93,8 +98,8 @@
/datum/robot_component/camera
name = "camera"
external_type = /obj/item/robot_parts/robot_component/camera
energy_consumption = 2
max_damage = 20
energy_consumption = 1
max_damage = 40
/datum/robot_component/diagnosis_unit
name = "self-diagnosis unit"
@@ -111,6 +116,7 @@
components["diagnosis unit"] = new/datum/robot_component/diagnosis_unit(src)
components["camera"] = new/datum/robot_component/camera(src)
components["comms"] = new/datum/robot_component/binary_communication(src)
components["armour"] = new/datum/robot_component/armour(src)
/mob/living/silicon/robot/proc/is_component_functioning(module_name)
var/datum/robot_component/C = components[module_name]
@@ -135,6 +141,9 @@
/obj/item/robot_parts/robot_component/actuator
name = "actuator"
/obj/item/robot_parts/robot_component/armour
name = "armour plating"
/obj/item/robot_parts/robot_component/camera
name = "camera"

View File

@@ -3,8 +3,8 @@
real_name = "Cyborg"
icon = 'icons/mob/robots.dmi'
icon_state = "robot"
maxHealth = 300
health = 300
maxHealth = 200
health = 200
universal_speak = 1
var/sight_mode = 0

View File

@@ -1,9 +1,9 @@
/mob/living/silicon/robot/updatehealth()
if(status_flags & GODMODE)
health = 100
health = 200
stat = CONSCIOUS
return
health = 100 - (getBruteLoss() + getFireLoss())
health = 200 - (getBruteLoss() + getFireLoss())
return
/mob/living/silicon/robot/getBruteLoss()
@@ -47,6 +47,14 @@
if(C.installed == 1) rval += C
return rval
/mob/living/silicon/robot/proc/get_armour()
if(!components.len) return 0
var/datum/robot_component/C = components["armour"]
if(C && C.installed == 1)
return C
return 0
/mob/living/silicon/robot/heal_organ_damage(var/brute, var/burn)
var/list/datum/robot_component/parts = get_damaged_components(brute,burn)
if(!parts.len) return
@@ -75,6 +83,11 @@
burn -= absorb_burn
src << "\red Your shield absorbs some of the impact!"
var/datum/robot_component/armour/A = get_armour()
if(A)
A.take_damage(brute,burn,sharp)
return
var/datum/robot_component/C = pick(components)
C.take_damage(brute,burn,sharp)
@@ -115,6 +128,11 @@
burn -= absorb_burn
src << "\red Your shield absorbs some of the impact!"
var/datum/robot_component/armour/A = get_armour()
if(A)
A.take_damage(brute,burn,sharp)
return
while(parts.len && (brute>0 || burn>0) )
var/datum/robot_component/picked = pick(parts)