Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into upstream-merge-27697
This commit is contained in:
@@ -66,9 +66,8 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
icon = 'icons/obj/power_cond/power_cond_white.dmi'
|
||||
|
||||
// the power cable object
|
||||
/obj/structure/cable/New()
|
||||
..()
|
||||
|
||||
/obj/structure/cable/Initialize()
|
||||
. = ..()
|
||||
|
||||
// ensure d1 & d2 reflect the icon_state for entering and exiting cable
|
||||
var/dash = findtext(icon_state, "-")
|
||||
@@ -529,7 +528,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
|
||||
return(OXYLOSS)
|
||||
|
||||
/obj/item/stack/cable_coil/New(loc, new_amount = null, var/param_color = null)
|
||||
..()
|
||||
. = ..()
|
||||
if(new_amount) // MAXCOIL by default
|
||||
amount = new_amount
|
||||
if(param_color)
|
||||
|
||||
@@ -30,7 +30,7 @@ GLOBAL_LIST_EMPTY(rad_collectors)
|
||||
/obj/machinery/power/rad_collector/process()
|
||||
if(loaded_tank)
|
||||
if(!loaded_tank.air_contents.gases["plasma"])
|
||||
investigate_log("<font color='red'>out of fuel</font>.", INVESTIGATE_SINGULO)
|
||||
investigate_log("<font color='red'>out of fuel</font>.", INVESTIGATE_SINGULO)
|
||||
eject()
|
||||
else
|
||||
loaded_tank.air_contents.gases["plasma"][MOLES] -= 0.001*drainratio
|
||||
@@ -46,9 +46,11 @@ GLOBAL_LIST_EMPTY(rad_collectors)
|
||||
toggle_power()
|
||||
user.visible_message("[user.name] turns the [src.name] [active? "on":"off"].", \
|
||||
"<span class='notice'>You turn the [src.name] [active? "on":"off"].</span>")
|
||||
var/fuel = loaded_tank.air_contents.gases["plasma"]
|
||||
var/fuel
|
||||
if(loaded_tank)
|
||||
fuel = loaded_tank.air_contents.gases["plasma"]
|
||||
fuel = fuel ? fuel[MOLES] : 0
|
||||
investigate_log("turned [active?"<font color='green'>on</font>":"<font color='red'>off</font>"] by [user.key]. [loaded_tank?"Fuel: [round(fuel/0.29)]%":"<font color='red'>It is empty</font>"].", INVESTIGATE_SINGULO)
|
||||
investigate_log("turned [active?"<font color='green'>on</font>":"<font color='red'>off</font>"] by [user.key]. [loaded_tank?"Fuel: [round(fuel/0.29)]%":"<font color='red'>It is empty</font>"].", INVESTIGATE_SINGULO)
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The controls are locked!</span>")
|
||||
@@ -73,28 +75,34 @@ GLOBAL_LIST_EMPTY(rad_collectors)
|
||||
/obj/machinery/power/rad_collector/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/device/multitool))
|
||||
to_chat(user, "<span class='notice'>The [W.name] detects that [last_power]W were recently produced.</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
else if(istype(W, /obj/item/device/analyzer) && loaded_tank)
|
||||
atmosanalyzer_scan(loaded_tank.air_contents, user)
|
||||
else if(istype(W, /obj/item/weapon/tank/internals/plasma))
|
||||
if(!anchored)
|
||||
to_chat(user, "<span class='warning'>The [src] needs to be secured to the floor first!</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
if(loaded_tank)
|
||||
to_chat(user, "<span class='warning'>There's already a plasma tank loaded!</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
if(!user.drop_item())
|
||||
return 1
|
||||
return TRUE
|
||||
loaded_tank = W
|
||||
W.forceMove(src)
|
||||
update_icons()
|
||||
else if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(loaded_tank && !locked)
|
||||
if(loaded_tank)
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>The controls are locked!</span>")
|
||||
return TRUE
|
||||
eject()
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There isn't a tank loaded!</span>")
|
||||
return TRUE
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
default_unfasten_wrench(user, W, 0)
|
||||
return 1
|
||||
return TRUE
|
||||
else if(W.GetID())
|
||||
if(allowed(user))
|
||||
if(active)
|
||||
@@ -104,7 +112,7 @@ GLOBAL_LIST_EMPTY(rad_collectors)
|
||||
to_chat(user, "<span class='warning'>The controls can only be locked when \the [src] is active!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='danger'>Access denied.</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -141,11 +149,11 @@ GLOBAL_LIST_EMPTY(rad_collectors)
|
||||
/obj/machinery/power/rad_collector/proc/update_icons()
|
||||
cut_overlays()
|
||||
if(loaded_tank)
|
||||
add_overlay("ptank")
|
||||
add_overlay("ptank")
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(active)
|
||||
add_overlay("on")
|
||||
add_overlay("on")
|
||||
|
||||
|
||||
/obj/machinery/power/rad_collector/proc/toggle_power()
|
||||
|
||||
Reference in New Issue
Block a user