mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Robot health buffs, addition of armour component.
This commit is contained in:
@@ -63,16 +63,21 @@
|
|||||||
else
|
else
|
||||||
powered = 0
|
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
|
/datum/robot_component/actuator
|
||||||
name = "actuator"
|
name = "actuator"
|
||||||
energy_consumption = 2
|
energy_consumption = 2
|
||||||
external_type = /obj/item/robot_parts/robot_component/actuator
|
external_type = /obj/item/robot_parts/robot_component/actuator
|
||||||
max_damage = 60
|
max_damage = 50
|
||||||
|
|
||||||
/datum/robot_component/cell
|
/datum/robot_component/cell
|
||||||
name = "power cell"
|
name = "power cell"
|
||||||
max_damage = 60
|
max_damage = 50
|
||||||
|
|
||||||
/datum/robot_component/cell/destroy()
|
/datum/robot_component/cell/destroy()
|
||||||
..()
|
..()
|
||||||
@@ -81,8 +86,8 @@
|
|||||||
/datum/robot_component/radio
|
/datum/robot_component/radio
|
||||||
name = "radio"
|
name = "radio"
|
||||||
external_type = /obj/item/robot_parts/robot_component/radio
|
external_type = /obj/item/robot_parts/robot_component/radio
|
||||||
energy_consumption = 3
|
energy_consumption = 1
|
||||||
max_damage = 10
|
max_damage = 40
|
||||||
|
|
||||||
/datum/robot_component/binary_communication
|
/datum/robot_component/binary_communication
|
||||||
name = "binary communication device"
|
name = "binary communication device"
|
||||||
@@ -93,8 +98,8 @@
|
|||||||
/datum/robot_component/camera
|
/datum/robot_component/camera
|
||||||
name = "camera"
|
name = "camera"
|
||||||
external_type = /obj/item/robot_parts/robot_component/camera
|
external_type = /obj/item/robot_parts/robot_component/camera
|
||||||
energy_consumption = 2
|
energy_consumption = 1
|
||||||
max_damage = 20
|
max_damage = 40
|
||||||
|
|
||||||
/datum/robot_component/diagnosis_unit
|
/datum/robot_component/diagnosis_unit
|
||||||
name = "self-diagnosis unit"
|
name = "self-diagnosis unit"
|
||||||
@@ -111,6 +116,7 @@
|
|||||||
components["diagnosis unit"] = new/datum/robot_component/diagnosis_unit(src)
|
components["diagnosis unit"] = new/datum/robot_component/diagnosis_unit(src)
|
||||||
components["camera"] = new/datum/robot_component/camera(src)
|
components["camera"] = new/datum/robot_component/camera(src)
|
||||||
components["comms"] = new/datum/robot_component/binary_communication(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)
|
/mob/living/silicon/robot/proc/is_component_functioning(module_name)
|
||||||
var/datum/robot_component/C = components[module_name]
|
var/datum/robot_component/C = components[module_name]
|
||||||
@@ -135,6 +141,9 @@
|
|||||||
/obj/item/robot_parts/robot_component/actuator
|
/obj/item/robot_parts/robot_component/actuator
|
||||||
name = "actuator"
|
name = "actuator"
|
||||||
|
|
||||||
|
/obj/item/robot_parts/robot_component/armour
|
||||||
|
name = "armour plating"
|
||||||
|
|
||||||
/obj/item/robot_parts/robot_component/camera
|
/obj/item/robot_parts/robot_component/camera
|
||||||
name = "camera"
|
name = "camera"
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
real_name = "Cyborg"
|
real_name = "Cyborg"
|
||||||
icon = 'icons/mob/robots.dmi'
|
icon = 'icons/mob/robots.dmi'
|
||||||
icon_state = "robot"
|
icon_state = "robot"
|
||||||
maxHealth = 300
|
maxHealth = 200
|
||||||
health = 300
|
health = 200
|
||||||
universal_speak = 1
|
universal_speak = 1
|
||||||
|
|
||||||
var/sight_mode = 0
|
var/sight_mode = 0
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/mob/living/silicon/robot/updatehealth()
|
/mob/living/silicon/robot/updatehealth()
|
||||||
if(status_flags & GODMODE)
|
if(status_flags & GODMODE)
|
||||||
health = 100
|
health = 200
|
||||||
stat = CONSCIOUS
|
stat = CONSCIOUS
|
||||||
return
|
return
|
||||||
health = 100 - (getBruteLoss() + getFireLoss())
|
health = 200 - (getBruteLoss() + getFireLoss())
|
||||||
return
|
return
|
||||||
|
|
||||||
/mob/living/silicon/robot/getBruteLoss()
|
/mob/living/silicon/robot/getBruteLoss()
|
||||||
@@ -47,6 +47,14 @@
|
|||||||
if(C.installed == 1) rval += C
|
if(C.installed == 1) rval += C
|
||||||
return rval
|
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)
|
/mob/living/silicon/robot/heal_organ_damage(var/brute, var/burn)
|
||||||
var/list/datum/robot_component/parts = get_damaged_components(brute,burn)
|
var/list/datum/robot_component/parts = get_damaged_components(brute,burn)
|
||||||
if(!parts.len) return
|
if(!parts.len) return
|
||||||
@@ -75,6 +83,11 @@
|
|||||||
burn -= absorb_burn
|
burn -= absorb_burn
|
||||||
src << "\red Your shield absorbs some of the impact!"
|
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)
|
var/datum/robot_component/C = pick(components)
|
||||||
C.take_damage(brute,burn,sharp)
|
C.take_damage(brute,burn,sharp)
|
||||||
|
|
||||||
@@ -115,6 +128,11 @@
|
|||||||
burn -= absorb_burn
|
burn -= absorb_burn
|
||||||
src << "\red Your shield absorbs some of the impact!"
|
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) )
|
while(parts.len && (brute>0 || burn>0) )
|
||||||
var/datum/robot_component/picked = pick(parts)
|
var/datum/robot_component/picked = pick(parts)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user