mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
Bunch of robutt stuff
This commit is contained in:
@@ -45,6 +45,13 @@
|
||||
if(activated(O))
|
||||
src << "Already activated"
|
||||
return
|
||||
if (is_component_functioning("power cell") && cell)
|
||||
if(istype(O, /obj/item/borg))
|
||||
var/obj/item/borg/B = O
|
||||
if(B.powerneeded)
|
||||
if((cell.charge * 100 / cell.maxcharge) < B.powerneeded)
|
||||
src << "Not enough power to activate [B.name]!"
|
||||
return
|
||||
if(!module_state_1)
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
module_state_1 = O
|
||||
|
||||
@@ -29,6 +29,11 @@
|
||||
|
||||
/mob/living/silicon/robot/proc/use_power()
|
||||
if (is_component_functioning("power cell") && cell)
|
||||
for(var/obj/item/borg/B in module.modules)
|
||||
if(B.powerneeded)
|
||||
if((cell.charge * 100 / cell.maxcharge) < B.powerneeded)
|
||||
src << "Deactivating [B.name] due to lack of power!"
|
||||
unEquip(B)
|
||||
if(src.cell.charge <= 0)
|
||||
uneq_all()
|
||||
update_headlamp(1)
|
||||
|
||||
@@ -72,11 +72,15 @@
|
||||
|
||||
|
||||
//Personal shielding for the combat module.
|
||||
/obj/item/borg
|
||||
var/powerneeded // Percentage of power remaining required to run item
|
||||
|
||||
/obj/item/borg/combat/shield
|
||||
name = "personal shielding"
|
||||
desc = "A powerful experimental module that turns aside or absorbs incoming attacks at the cost of charge."
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "shock"
|
||||
powerneeded = 25
|
||||
var/shield_level = 0.5 //Percentage of damage absorbed by the shield.
|
||||
|
||||
/obj/item/borg/combat/shield/verb/set_shield_level()
|
||||
@@ -92,4 +96,5 @@
|
||||
name = "mobility module"
|
||||
desc = "By retracting limbs and tucking in its head, a combat android can roll at high speeds."
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "shock"
|
||||
icon_state = "shock"
|
||||
powerneeded = 25
|
||||
Reference in New Issue
Block a user