mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
artifact machinery now uses power
Signed-off-by: caelaislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -61,6 +61,8 @@
|
||||
owned_pad = locate() in orange(1, src)
|
||||
|
||||
/obj/machinery/artifact_analyser/attack_hand(var/mob/user as mob)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
user.machine = src
|
||||
var/dat = "<B>Artifact Analyser</B><BR>"
|
||||
dat += "<HR><BR>"
|
||||
@@ -87,6 +89,10 @@
|
||||
onclose(user, "artanalyser")
|
||||
|
||||
/obj/machinery/artifact_analyser/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
use_power(350)
|
||||
//
|
||||
if(!owned_pad)
|
||||
for(var/obj/machinery/analyser_pad/pad in range(1))
|
||||
owned_pad = pad
|
||||
@@ -229,6 +235,7 @@
|
||||
time *= 10
|
||||
var/message = "<b>[src]</b> states, \"Commencing analysis.\""
|
||||
src.visible_message(message, message)
|
||||
use_power(500)
|
||||
spawn(time)
|
||||
src.working = 0
|
||||
icon_state = "analyser"
|
||||
@@ -239,6 +246,7 @@
|
||||
scan_num++
|
||||
message = "<b>[src]</b> states, \"Analysis complete.\""
|
||||
src.visible_message(message, message)
|
||||
use_power(500)
|
||||
else if (findarti > 1)
|
||||
var/message = "<b>[src]</b> states, \"Cannot analyse. Too many artifacts on pad.\""
|
||||
src.visible_message(message, message)
|
||||
@@ -267,6 +275,7 @@
|
||||
CA.effecttype = aeffect1 + " ([accuE1]%)"
|
||||
CA.effectmode = aeffect2 + " ([accuE2]%)"
|
||||
DB.catalogued_artifacts.Add(CA)
|
||||
use_power(100)
|
||||
|
||||
if(href_list["print"])
|
||||
var/r = "Artifact Analysis Report (Scan #[scan_num])<hr>"
|
||||
@@ -280,6 +289,7 @@
|
||||
P.info = r
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\icon[src] \blue The [src.name] prints a sheet of paper", 3)
|
||||
use_power(10)
|
||||
|
||||
if(href_list["close"])
|
||||
usr << browse(null, "window=artanalyser")
|
||||
|
||||
@@ -36,8 +36,12 @@
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/artifact_harvester/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
use_power(350)
|
||||
|
||||
if(harvesting)
|
||||
use_power(250)
|
||||
inserted_battery.stored_charge += 10
|
||||
if(inserted_battery.stored_charge >= inserted_battery.capacity)
|
||||
inserted_battery.stored_charge = inserted_battery.capacity
|
||||
@@ -49,6 +53,8 @@
|
||||
return
|
||||
|
||||
/obj/machinery/artifact_harvester/proc/interact(var/mob/user as mob)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
user.machine = src
|
||||
var/dat = "<B>Artifact Power Harvester</B><BR>"
|
||||
dat += "<HR><BR>"
|
||||
@@ -140,6 +146,7 @@
|
||||
src.inserted_battery = null
|
||||
|
||||
if (href_list["drainbattery"])
|
||||
use_power(100)
|
||||
src.inserted_battery.battery_effect.artifact_id = ""
|
||||
src.inserted_battery.stored_charge = 0
|
||||
var/message = "<b>[src]</b> states, \"Battery drained of all charge.\""
|
||||
|
||||
Reference in New Issue
Block a user