mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-28 15:39:57 +01:00
Removes Old Deprecated Stuff (#15241)
This commit is contained in:
@@ -1,154 +0,0 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
var/global/list/rad_collectors = list()
|
||||
|
||||
/obj/machinery/power/rad_collector
|
||||
name = "Radiation Collector Array"
|
||||
desc = "A device which uses Hawking Radiation and phoron to produce power."
|
||||
icon = 'icons/obj/singularity.dmi'
|
||||
icon_state = "ca"
|
||||
anchored = 0
|
||||
density = 1
|
||||
req_access = list(access_engine_equip)
|
||||
// use_power = POWER_USE_OFF
|
||||
var/obj/item/tank/phoron/P = null
|
||||
var/last_power = 0
|
||||
var/last_power_new = 0
|
||||
var/active = 0
|
||||
var/locked = 0
|
||||
var/drainratio = 1
|
||||
|
||||
/obj/machinery/power/rad_collector/Initialize()
|
||||
. = ..()
|
||||
rad_collectors += src
|
||||
|
||||
/obj/machinery/power/rad_collector/Destroy()
|
||||
rad_collectors -= src
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/rad_collector/process()
|
||||
//so that we don't zero out the meter if the SM is processed first.
|
||||
last_power = last_power_new
|
||||
last_power_new = 0
|
||||
|
||||
|
||||
if(P)
|
||||
if(P.air_contents.gas[GAS_PHORON] == 0)
|
||||
investigate_log("<span class='warning'>out of fuel</span>.","singulo")
|
||||
eject()
|
||||
else
|
||||
P.air_contents.adjust_gas(GAS_PHORON, -0.001*drainratio)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/power/rad_collector/attack_hand(mob/user as mob)
|
||||
if(anchored)
|
||||
if(!src.locked)
|
||||
toggle_power()
|
||||
user.visible_message("[user.name] turns the [src.name] [active? "on":"off"].", \
|
||||
"You turn the [src.name] [active? "on":"off"].")
|
||||
investigate_log("turned [active?"<font color='green'>on</font>":"<span class='warning'>off</span>"] by [user.key]. [P?"Fuel: [round(P.air_contents.gas[GAS_PHORON]/0.29)]%":"<span class='warning'>It is empty</span>"].","singulo")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The controls are locked!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/power/rad_collector/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/tank/phoron))
|
||||
if(!src.anchored)
|
||||
to_chat(user, "<span class='warning'>The [src] needs to be secured to the floor first.</span>")
|
||||
return 1
|
||||
if(src.P)
|
||||
to_chat(user, "<span class='warning'>There's already a phoron tank loaded.</span>")
|
||||
return 1
|
||||
user.drop_from_inventory(W,src)
|
||||
src.P = W
|
||||
update_icon()
|
||||
return 1
|
||||
else if(W.iscrowbar())
|
||||
if(P && !src.locked)
|
||||
eject()
|
||||
return 1
|
||||
else if(W.iswrench())
|
||||
if(P)
|
||||
to_chat(user, "<span class='notice'>Remove the phoron tank first.</span>")
|
||||
return 1
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
src.anchored = !src.anchored
|
||||
user.visible_message("[user.name] [anchored? "secures":"unsecures"] the [src.name].", \
|
||||
"You [anchored? "secure":"undo"] the external bolts.", \
|
||||
"You hear a ratchet")
|
||||
if(anchored)
|
||||
connect_to_network()
|
||||
else
|
||||
disconnect_from_network()
|
||||
return 1
|
||||
else if(W.GetID())
|
||||
if (src.allowed(user))
|
||||
if(active)
|
||||
src.locked = !src.locked
|
||||
to_chat(user, "The controls are now [src.locked ? "locked." : "unlocked."]")
|
||||
else
|
||||
src.locked = 0 //just in case it somehow gets locked
|
||||
to_chat(user, "<span class='warning'>The controls can only be locked when the [src] is active.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied!</span>")
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/rad_collector/examine(mob/user)
|
||||
if (..(user, 3))
|
||||
to_chat(user, "The meter indicates that \the [src] is collecting [last_power] W.")
|
||||
return 1
|
||||
|
||||
/obj/machinery/power/rad_collector/ex_act(severity)
|
||||
switch(severity)
|
||||
if(2, 3)
|
||||
eject()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/power/rad_collector/proc/eject()
|
||||
locked = 0
|
||||
var/obj/item/tank/phoron/Z = src.P
|
||||
if (!Z)
|
||||
return
|
||||
Z.forceMove(get_turf(src))
|
||||
Z.layer = initial(Z.layer)
|
||||
src.P = null
|
||||
if(active)
|
||||
toggle_power()
|
||||
else
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/power/rad_collector/proc/receive_pulse(var/pulse_strength)
|
||||
if(P && active)
|
||||
var/power_produced = 0
|
||||
power_produced = P.air_contents.gas[GAS_PHORON]*pulse_strength*20
|
||||
add_avail(power_produced)
|
||||
last_power_new = power_produced
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/power/rad_collector/update_icon()
|
||||
cut_overlays()
|
||||
if(P)
|
||||
add_overlay("ptank")
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(active)
|
||||
add_overlay("on")
|
||||
|
||||
|
||||
/obj/machinery/power/rad_collector/toggle_power()
|
||||
active = !active
|
||||
if(active)
|
||||
icon_state = "ca_on"
|
||||
flick("ca_active", src)
|
||||
else
|
||||
icon_state = "ca"
|
||||
flick("ca_deactive", src)
|
||||
update_icon()
|
||||
return
|
||||
@@ -1,10 +1,8 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
|
||||
/obj/machinery/containment_field
|
||||
name = "Containment Field"
|
||||
name = "containment field"
|
||||
desc = "An energy field."
|
||||
icon = 'icons/obj/singularity.dmi'
|
||||
icon_state = "Contain_F"
|
||||
icon = 'icons/obj/machinery/field_generator.dmi'
|
||||
icon_state = "contain_f"
|
||||
anchored = 1
|
||||
density = 0
|
||||
unacidable = 1
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/obj/machinery/power/emitter
|
||||
name = "emitter"
|
||||
desc = "It is a heavy duty industrial laser."
|
||||
icon = 'icons/obj/singularity.dmi'
|
||||
icon = 'icons/obj/emitter.dmi'
|
||||
icon_state = "emitter"
|
||||
anchored = FALSE
|
||||
density = TRUE
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
|
||||
|
||||
/*
|
||||
field_generator power level display
|
||||
The icon used for the field_generator need to have 'num_power_levels' number of icon states
|
||||
named 'Field_Gen +p[num]' where 'num' ranges from 1 to 'num_power_levels'
|
||||
named 'field_gen +p[num]' where 'num' ranges from 1 to 'num_power_levels'
|
||||
|
||||
The power level is displayed using overlays. The current displayed power level is stored in 'powerlevel'.
|
||||
The overlay in use and the powerlevel variable must be kept in sync. A powerlevel equal to 0 means that
|
||||
@@ -17,7 +14,7 @@ field_generator power level display
|
||||
name = "field generator"
|
||||
desc = "A large thermal battery that projects a high amount of energy when powered."
|
||||
icon = 'icons/obj/machinery/field_generator.dmi'
|
||||
icon_state = "Field_Gen"
|
||||
icon_state = "field_gen"
|
||||
anchored = 0
|
||||
density = 1
|
||||
use_power = POWER_USE_OFF
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
..()
|
||||
START_PROCESSING(SScalamity, src)
|
||||
SScalamity.singularities += src
|
||||
for(var/obj/machinery/power/singularity_beacon/singubeacon in SSmachinery.processing)
|
||||
for(var/obj/machinery/power/tesla_beacon/singubeacon in SSmachinery.processing)
|
||||
if(singubeacon.active)
|
||||
target = singubeacon
|
||||
break
|
||||
@@ -94,7 +94,6 @@
|
||||
|
||||
if (current_size >= STAGE_THREE)
|
||||
move()
|
||||
pulse()
|
||||
|
||||
if (prob(event_chance)) //Chance for it to run a special event TODO: Come up with one or two more that fit.
|
||||
event()
|
||||
@@ -480,11 +479,6 @@
|
||||
M.dust()
|
||||
return
|
||||
|
||||
/obj/singularity/proc/pulse()
|
||||
for(var/obj/machinery/power/rad_collector/R in rad_collectors)
|
||||
if (get_dist(R, src) <= 15) //Better than using orange() every process.
|
||||
R.receive_pulse(energy)
|
||||
|
||||
/obj/singularity/proc/on_capture()
|
||||
chained = 1
|
||||
overlays = 0
|
||||
|
||||
Reference in New Issue
Block a user