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