mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 12:35:33 +01:00
Merge remote-tracking branch 'remotes/upstream/master' into airlock_charge_buff
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/reset
|
||||
name = "cyborg module reset board"
|
||||
desc = "Used to reset a cyborg's module. Destroys any other upgrades applied to the cyborg."
|
||||
@@ -197,7 +196,7 @@
|
||||
R.module.rebuild()
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/syndicate/
|
||||
/obj/item/borg/upgrade/syndicate
|
||||
name = "illegal equipment module"
|
||||
desc = "Unlocks the hidden, deadlier functions of a cyborg"
|
||||
icon_state = "cyborg_upgrade3"
|
||||
@@ -211,3 +210,85 @@
|
||||
|
||||
R.SetEmagged(1)
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair
|
||||
name = "self-repair module"
|
||||
desc = "This module will repair the cyborg over time."
|
||||
icon_state = "cyborg_upgrade5"
|
||||
require_module = 1
|
||||
var/repair_amount = -1
|
||||
var/repair_tick = 1
|
||||
var/msg_cooldown = 0
|
||||
var/on = 0
|
||||
var/powercost = 10
|
||||
var/mob/living/silicon/robot/cyborg
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/action(mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
return 0
|
||||
var/obj/item/borg/upgrade/selfrepair/U = locate() in R
|
||||
if(U)
|
||||
usr << "<span class='warning'>This unit is already equipped with a self-repair module.</span>"
|
||||
return 0
|
||||
cyborg = R
|
||||
icon_state = "selfrepair_off"
|
||||
action_button_name = "Toggle Self-Repair"
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/ui_action_click()
|
||||
on = !on
|
||||
if(on)
|
||||
cyborg << "<span class='notice'>You activate the self-repair module.</span>"
|
||||
SSobj.processing |= src
|
||||
else
|
||||
cyborg << "<span class='notice'>You deactivate the self-repair module.</span>"
|
||||
SSobj.processing -= src
|
||||
update_icon()
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/update_icon()
|
||||
if(cyborg)
|
||||
icon_state = "selfrepair_[on ? "on" : "off"]"
|
||||
else
|
||||
icon_state = "cyborg_upgrade5"
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/proc/deactivate()
|
||||
SSobj.processing -= src
|
||||
on = 0
|
||||
update_icon()
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/process()
|
||||
if(!repair_tick)
|
||||
repair_tick = 1
|
||||
return
|
||||
|
||||
if( cyborg && (cyborg.stat != DEAD) && on)
|
||||
if(cyborg.cell.charge < powercost*2)
|
||||
cyborg << "<span class='warning'>Self-repair module deactivated. Please recharge.</span>"
|
||||
deactivate()
|
||||
return
|
||||
|
||||
if(cyborg.health < cyborg.maxHealth)
|
||||
if(cyborg.health < 0)
|
||||
repair_amount = -2.5
|
||||
powercost = 30
|
||||
else
|
||||
repair_amount = -1
|
||||
powercost = 10
|
||||
cyborg.adjustBruteLoss(repair_amount)
|
||||
cyborg.adjustFireLoss(repair_amount)
|
||||
cyborg.updatehealth()
|
||||
cyborg.cell.use(powercost)
|
||||
else
|
||||
cyborg.cell.use(5)
|
||||
repair_tick = 0
|
||||
|
||||
if( (world.time - 2000) > msg_cooldown )
|
||||
var/msgmode = "standby"
|
||||
if(cyborg.health < 0)
|
||||
msgmode = "critical"
|
||||
else if(cyborg.health < cyborg.maxHealth)
|
||||
msgmode = "normal"
|
||||
cyborg << "<span class='notice'>Self-repair is active in <span class='boldnotice'>[msgmode]</span> mode.</span>"
|
||||
msg_cooldown = world.time
|
||||
else
|
||||
deactivate()
|
||||
|
||||
@@ -103,6 +103,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
|
||||
new/datum/stack_recipe("book case", /obj/structure/bookcase, 4, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("drying rack", /obj/machinery/smartfridge/drying_rack, 10, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("dog bed", /obj/structure/stool/bed/dogbed, 10, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("display case chassis", /obj/structure/displaycase_chassis, 5, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/mineral/wood
|
||||
|
||||
@@ -87,6 +87,15 @@
|
||||
origin_tech = "materials=2;magnets=2;programming=2;biotech=2"
|
||||
var/id = 1
|
||||
|
||||
|
||||
/obj/item/weapon/implant/tracking/New()
|
||||
..()
|
||||
tracking_implants += src
|
||||
|
||||
/obj/item/weapon/implant/tracking/Destroy()
|
||||
..()
|
||||
tracking_implants -= src
|
||||
|
||||
/obj/item/weapon/implant/tracking/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Tracking Beacon<BR>
|
||||
|
||||
@@ -24,6 +24,14 @@
|
||||
/obj/item/weapon/implant/chem/New()
|
||||
..()
|
||||
create_reagents(50)
|
||||
tracking_implants += src
|
||||
|
||||
/obj/item/weapon/implant/chem/Destroy()
|
||||
..()
|
||||
tracking_implants -= src
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/implant/chem/trigger(emote, mob/source)
|
||||
if(emote == "deathgasp")
|
||||
|
||||
@@ -78,7 +78,7 @@ Frequency:
|
||||
src.temp += "[W.code]-[dir2text(get_dir(sr, tr))]-[direct]<BR>"
|
||||
|
||||
src.temp += "<B>Extranneous Signals:</B><BR>"
|
||||
for (var/obj/item/weapon/implant/tracking/W in world)
|
||||
for (var/obj/item/weapon/implant/tracking/W in tracking_implants)
|
||||
if (!W.implanted || !ismob(W.loc))
|
||||
continue
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user