mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
misc tweaks and cleanups to shield gens/caps (renames, power usage), added a temp recharge delay when a field takes damage
Signed-off-by: Cael Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
// External Shield Generator
|
// External Shield Generator
|
||||||
|
|
||||||
/obj/item/weapon/circuitboard/shield_gen_ex
|
/obj/item/weapon/circuitboard/shield_gen_ex
|
||||||
name = "Circuit board (Experimental hull shield generator)"
|
name = "Circuit board (Hull shield generator)"
|
||||||
board_type = "machine"
|
board_type = "machine"
|
||||||
build_path = "/obj/machinery/shield_gen/external"
|
build_path = "/obj/machinery/shield_gen/external"
|
||||||
origin_tech = "bluespace=4;phorontech=3"
|
origin_tech = "bluespace=4;phorontech=3"
|
||||||
@@ -29,7 +29,7 @@ datum/design/shield_gen_ex
|
|||||||
// Shield Generator
|
// Shield Generator
|
||||||
|
|
||||||
/obj/item/weapon/circuitboard/shield_gen
|
/obj/item/weapon/circuitboard/shield_gen
|
||||||
name = "Circuit board (Experimental shield generator)"
|
name = "Circuit board (Bubble shield generator)"
|
||||||
board_type = "machine"
|
board_type = "machine"
|
||||||
build_path = "/obj/machinery/shield_gen/external"
|
build_path = "/obj/machinery/shield_gen/external"
|
||||||
origin_tech = "bluespace=4;phorontech=3"
|
origin_tech = "bluespace=4;phorontech=3"
|
||||||
@@ -43,7 +43,7 @@ datum/design/shield_gen_ex
|
|||||||
"/obj/item/weapon/cable_coil" = 5)
|
"/obj/item/weapon/cable_coil" = 5)
|
||||||
|
|
||||||
datum/design/shield_gen
|
datum/design/shield_gen
|
||||||
name = "Circuit Design (Experimental shield generator)"
|
name = "Circuit Design (Bubble shield generator)"
|
||||||
desc = "Allows for the construction of circuit boards used to build an experimental shield generator."
|
desc = "Allows for the construction of circuit boards used to build an experimental shield generator."
|
||||||
id = "shield_gen"
|
id = "shield_gen"
|
||||||
req_tech = list("bluespace" = 4, "phorontech" = 3)
|
req_tech = list("bluespace" = 4, "phorontech" = 3)
|
||||||
@@ -55,7 +55,7 @@ datum/design/shield_gen
|
|||||||
// Shield Capacitor
|
// Shield Capacitor
|
||||||
|
|
||||||
/obj/item/weapon/circuitboard/shield_cap
|
/obj/item/weapon/circuitboard/shield_cap
|
||||||
name = "Circuit board (Experimental shield capacitor)"
|
name = "Circuit board (Shield capacitor)"
|
||||||
board_type = "machine"
|
board_type = "machine"
|
||||||
build_path = "/obj/machinery/shield_capacitor"
|
build_path = "/obj/machinery/shield_capacitor"
|
||||||
origin_tech = "magnets=3;powerstorage=4"
|
origin_tech = "magnets=3;powerstorage=4"
|
||||||
@@ -69,7 +69,7 @@ datum/design/shield_gen
|
|||||||
"/obj/item/weapon/cable_coil" = 5)
|
"/obj/item/weapon/cable_coil" = 5)
|
||||||
|
|
||||||
datum/design/shield_cap
|
datum/design/shield_cap
|
||||||
name = "Circuit Design (Experimental shield capacitor)"
|
name = "Circuit Design (Shield capacitor)"
|
||||||
desc = "Allows for the construction of circuit boards used to build an experimental shielding capacitor."
|
desc = "Allows for the construction of circuit boards used to build an experimental shielding capacitor."
|
||||||
id = "shield_cap"
|
id = "shield_cap"
|
||||||
req_tech = list("magnets" = 3, "powerstorage" = 4)
|
req_tech = list("magnets" = 3, "powerstorage" = 4)
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
density = 0
|
density = 0
|
||||||
invisibility = 101
|
invisibility = 101
|
||||||
var/strength = 0
|
var/strength = 0
|
||||||
|
var/ticks_recovering = 10
|
||||||
|
|
||||||
/obj/effect/energy_field/ex_act(var/severity)
|
/obj/effect/energy_field/ex_act(var/severity)
|
||||||
Stress(0.5 + severity)
|
Stress(0.5 + severity)
|
||||||
@@ -27,9 +28,12 @@
|
|||||||
strength -= severity
|
strength -= severity
|
||||||
|
|
||||||
//if we take too much damage, drop out - the generator will bring us back up if we have enough power
|
//if we take too much damage, drop out - the generator will bring us back up if we have enough power
|
||||||
|
ticks_recovering = min(ticks_recovering + 2, 10)
|
||||||
if(strength < 1)
|
if(strength < 1)
|
||||||
invisibility = 101
|
invisibility = 101
|
||||||
density = 0
|
density = 0
|
||||||
|
ticks_recovering = 10
|
||||||
|
strength = 0
|
||||||
else if(strength >= 1)
|
else if(strength >= 1)
|
||||||
invisibility = 0
|
invisibility = 0
|
||||||
density = 1
|
density = 1
|
||||||
|
|||||||
@@ -9,12 +9,10 @@
|
|||||||
icon_state = "capacitor"
|
icon_state = "capacitor"
|
||||||
var/active = 1
|
var/active = 1
|
||||||
density = 1
|
density = 1
|
||||||
anchored = 1
|
|
||||||
var/stored_charge = 0
|
var/stored_charge = 0
|
||||||
var/time_since_fail = 100
|
var/time_since_fail = 100
|
||||||
var/max_charge = 1000000
|
var/max_charge = 5e6
|
||||||
var/max_charge_rate = 100000
|
var/charge_limit = 200000
|
||||||
var/min_charge_rate = 0
|
|
||||||
var/locked = 0
|
var/locked = 0
|
||||||
//
|
//
|
||||||
use_power = 1 //0 use nothing
|
use_power = 1 //0 use nothing
|
||||||
@@ -23,6 +21,7 @@
|
|||||||
idle_power_usage = 10
|
idle_power_usage = 10
|
||||||
active_power_usage = 100
|
active_power_usage = 100
|
||||||
var/charge_rate = 100
|
var/charge_rate = 100
|
||||||
|
var/obj/machinery/shield_gen/owned_gen
|
||||||
|
|
||||||
/obj/machinery/shield_capacitor/New()
|
/obj/machinery/shield_capacitor/New()
|
||||||
spawn(10)
|
spawn(10)
|
||||||
@@ -55,17 +54,17 @@
|
|||||||
src.anchored = !src.anchored
|
src.anchored = !src.anchored
|
||||||
src.visible_message("\blue \icon[src] [src] has been [anchored ? "bolted to the floor" : "unbolted from the floor"] by [user].")
|
src.visible_message("\blue \icon[src] [src] has been [anchored ? "bolted to the floor" : "unbolted from the floor"] by [user].")
|
||||||
|
|
||||||
spawn(0)
|
if(anchored)
|
||||||
for(var/obj/machinery/shield_gen/gen in range(1, src))
|
spawn(0)
|
||||||
if(get_dir(src, gen) == src.dir)
|
for(var/obj/machinery/shield_gen/gen in range(1, src))
|
||||||
if(!src.anchored && gen.owned_capacitor == src)
|
if(get_dir(src, gen) == src.dir && !gen.owned_capacitor)
|
||||||
gen.owned_capacitor = null
|
owned_gen = gen
|
||||||
break
|
owned_gen.owned_capacitor = src
|
||||||
else if(src.anchored && !gen.owned_capacitor)
|
owned_gen.updateDialog()
|
||||||
gen.owned_capacitor = src
|
else
|
||||||
break
|
if(owned_gen && owned_gen.owned_capacitor == src)
|
||||||
gen.updateDialog()
|
owned_gen.owned_capacitor = null
|
||||||
updateDialog()
|
owned_gen = null
|
||||||
else
|
else
|
||||||
..()
|
..()
|
||||||
|
|
||||||
@@ -94,17 +93,19 @@
|
|||||||
t += "[time_since_fail > 2 ? "<font color=green>Charging stable.</font>" : "<font color=red>Warning, low charge!</font>"]<br>"
|
t += "[time_since_fail > 2 ? "<font color=green>Charging stable.</font>" : "<font color=red>Warning, low charge!</font>"]<br>"
|
||||||
t += "Charge: [stored_charge] Watts ([100 * stored_charge/max_charge]%)<br>"
|
t += "Charge: [stored_charge] Watts ([100 * stored_charge/max_charge]%)<br>"
|
||||||
t += "Charge rate: \
|
t += "Charge rate: \
|
||||||
<a href='?src=\ref[src];charge_rate=[-max_charge_rate]'>\[min\]</a> \
|
<a href='?src=\ref[src];charge_rate=-100000'>\[----\]</a> \
|
||||||
|
<a href='?src=\ref[src];charge_rate=-10000'>\[---\]</a> \
|
||||||
<a href='?src=\ref[src];charge_rate=-1000'>\[--\]</a> \
|
<a href='?src=\ref[src];charge_rate=-1000'>\[--\]</a> \
|
||||||
<a href='?src=\ref[src];charge_rate=-100'>\[-\]</a>[charge_rate] Watts/sec \
|
<a href='?src=\ref[src];charge_rate=-100'>\[-\]</a>[charge_rate] Watts/sec \
|
||||||
<a href='?src=\ref[src];charge_rate=100'>\[+\]</a> \
|
<a href='?src=\ref[src];charge_rate=100'>\[+\]</a> \
|
||||||
<a href='?src=\ref[src];charge_rate=1000'>\[++\]</a> \
|
<a href='?src=\ref[src];charge_rate=1000'>\[++\]</a> \
|
||||||
<a href='?src=\ref[src];charge_rate=[max_charge_rate]'>\[max\]</a><br>"
|
<a href='?src=\ref[src];charge_rate=10000'>\[+++\]</a> \
|
||||||
|
<a href='?src=\ref[src];charge_rate=100000'>\[+++\]</a><br>"
|
||||||
t += "<hr>"
|
t += "<hr>"
|
||||||
t += "<A href='?src=\ref[src]'>Refresh</A> "
|
t += "<A href='?src=\ref[src]'>Refresh</A> "
|
||||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||||
|
|
||||||
user << browse(t, "window=shield_capacitor;size=500x800")
|
user << browse(t, "window=shield_capacitor;size=500x400")
|
||||||
user.set_machine(src)
|
user.set_machine(src)
|
||||||
|
|
||||||
/obj/machinery/shield_capacitor/process()
|
/obj/machinery/shield_capacitor/process()
|
||||||
@@ -137,10 +138,10 @@
|
|||||||
use_power = 1
|
use_power = 1
|
||||||
if( href_list["charge_rate"] )
|
if( href_list["charge_rate"] )
|
||||||
charge_rate += text2num(href_list["charge_rate"])
|
charge_rate += text2num(href_list["charge_rate"])
|
||||||
if(charge_rate > max_charge_rate)
|
if(charge_rate > charge_limit)
|
||||||
charge_rate = max_charge_rate
|
charge_rate = charge_limit
|
||||||
else if(charge_rate < min_charge_rate)
|
else if(charge_rate < 0)
|
||||||
charge_rate = min_charge_rate
|
charge_rate = 0
|
||||||
//
|
//
|
||||||
updateDialog()
|
updateDialog()
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
var/field_radius = 3
|
var/field_radius = 3
|
||||||
var/list/field
|
var/list/field
|
||||||
density = 1
|
density = 1
|
||||||
anchored = 1
|
|
||||||
var/locked = 0
|
var/locked = 0
|
||||||
var/average_field_strength = 0
|
var/average_field_strength = 0
|
||||||
var/strengthen_rate = 0.2
|
var/strengthen_rate = 0.2
|
||||||
@@ -22,7 +21,7 @@
|
|||||||
var/powered = 0
|
var/powered = 0
|
||||||
var/check_powered = 1
|
var/check_powered = 1
|
||||||
var/obj/machinery/shield_capacitor/owned_capacitor
|
var/obj/machinery/shield_capacitor/owned_capacitor
|
||||||
var/max_field_strength = 10
|
var/target_field_strength = 10
|
||||||
var/time_since_fail = 100
|
var/time_since_fail = 100
|
||||||
var/energy_conversion_rate = 0.01 //how many renwicks per watt?
|
var/energy_conversion_rate = 0.01 //how many renwicks per watt?
|
||||||
//
|
//
|
||||||
@@ -63,17 +62,22 @@
|
|||||||
src.anchored = !src.anchored
|
src.anchored = !src.anchored
|
||||||
src.visible_message("\blue \icon[src] [src] has been [anchored?"bolted to the floor":"unbolted from the floor"] by [user].")
|
src.visible_message("\blue \icon[src] [src] has been [anchored?"bolted to the floor":"unbolted from the floor"] by [user].")
|
||||||
|
|
||||||
spawn(0)
|
if(active)
|
||||||
for(var/obj/machinery/shield_gen/gen in range(1, src))
|
toggle()
|
||||||
if(get_dir(src, gen) == src.dir)
|
if(anchored)
|
||||||
if(!src.anchored && gen.owned_capacitor == src)
|
spawn(0)
|
||||||
gen.owned_capacitor = null
|
for(var/obj/machinery/shield_capacitor/cap in range(1, src))
|
||||||
|
if(cap.owned_gen)
|
||||||
|
continue
|
||||||
|
if(get_dir(cap, src) == cap.dir && src.anchored)
|
||||||
|
owned_capacitor = cap
|
||||||
|
owned_capacitor.owned_gen = src
|
||||||
|
updateDialog()
|
||||||
break
|
break
|
||||||
else if(src.anchored && !gen.owned_capacitor)
|
else
|
||||||
gen.owned_capacitor = src
|
if(owned_capacitor && owned_capacitor.owned_gen == src)
|
||||||
break
|
owned_capacitor.owned_gen = null
|
||||||
gen.updateDialog()
|
owned_capacitor = null
|
||||||
updateDialog()
|
|
||||||
else
|
else
|
||||||
..()
|
..()
|
||||||
|
|
||||||
@@ -102,67 +106,65 @@
|
|||||||
t += "This generator is: [active ? "<font color=green>Online</font>" : "<font color=red>Offline</font>" ] <a href='?src=\ref[src];toggle=1'>[active ? "\[Deactivate\]" : "\[Activate\]"]</a><br>"
|
t += "This generator is: [active ? "<font color=green>Online</font>" : "<font color=red>Offline</font>" ] <a href='?src=\ref[src];toggle=1'>[active ? "\[Deactivate\]" : "\[Activate\]"]</a><br>"
|
||||||
t += "[time_since_fail > 2 ? "<font color=green>Field is stable.</font>" : "<font color=red>Warning, field is unstable!</font>"]<br>"
|
t += "[time_since_fail > 2 ? "<font color=green>Field is stable.</font>" : "<font color=red>Warning, field is unstable!</font>"]<br>"
|
||||||
t += "Coverage radius (restart required): \
|
t += "Coverage radius (restart required): \
|
||||||
|
<a href='?src=\ref[src];change_radius=-50'>---</a> \
|
||||||
<a href='?src=\ref[src];change_radius=-5'>--</a> \
|
<a href='?src=\ref[src];change_radius=-5'>--</a> \
|
||||||
<a href='?src=\ref[src];change_radius=-1'>-</a> \
|
<a href='?src=\ref[src];change_radius=-1'>-</a> \
|
||||||
[field_radius * 2]m \
|
[field_radius * 2]m \
|
||||||
<a href='?src=\ref[src];change_radius=1'>+</a> \
|
<a href='?src=\ref[src];change_radius=1'>+</a> \
|
||||||
<a href='?src=\ref[src];change_radius=5'>++</a><br>"
|
<a href='?src=\ref[src];change_radius=5'>++</a> \
|
||||||
t += "Overall field strength: [average_field_strength] Renwicks ([max_field_strength ? 100 * average_field_strength / max_field_strength : "NA"]%)<br>"
|
<a href='?src=\ref[src];change_radius=50'>+++</a><br>"
|
||||||
t += "Charge rate: <a href='?src=\ref[src];strengthen_rate=-0.1'>--</a> \
|
t += "Overall field strength: [average_field_strength] Renwicks ([target_field_strength ? 100 * average_field_strength / target_field_strength : "NA"]%)<br>"
|
||||||
<a href='?src=\ref[src];strengthen_rate=-0.01'>-</a> \
|
|
||||||
[strengthen_rate] Renwicks/sec \
|
|
||||||
<a href='?src=\ref[src];strengthen_rate=0.01'>+</a> \
|
|
||||||
<a href='?src=\ref[src];strengthen_rate=0.1'>++</a><br>"
|
|
||||||
t += "Upkeep energy: [field.len * average_field_strength / energy_conversion_rate] Watts/sec<br>"
|
t += "Upkeep energy: [field.len * average_field_strength / energy_conversion_rate] Watts/sec<br>"
|
||||||
|
t += "Charge rate: <a href='?src=\ref[src];strengthen_rate=-0.1'>--</a> \
|
||||||
|
[strengthen_rate] Renwicks/sec \
|
||||||
|
<a href='?src=\ref[src];strengthen_rate=0.1'>++</a><br>"
|
||||||
t += "Additional energy required to charge: [field.len * strengthen_rate / energy_conversion_rate] Watts/sec<br>"
|
t += "Additional energy required to charge: [field.len * strengthen_rate / energy_conversion_rate] Watts/sec<br>"
|
||||||
t += "Maximum field strength: \
|
t += "Maximum field strength: \
|
||||||
<a href='?src=\ref[src];max_field_strength=-100'>\[min\]</a> \
|
<a href='?src=\ref[src];target_field_strength=-100'>\[min\]</a> \
|
||||||
<a href='?src=\ref[src];max_field_strength=-10'>--</a> \
|
<a href='?src=\ref[src];target_field_strength=-10'>--</a> \
|
||||||
<a href='?src=\ref[src];max_field_strength=-1'>-</a> \
|
<a href='?src=\ref[src];target_field_strength=-1'>-</a> \
|
||||||
[max_field_strength] Renwicks \
|
[target_field_strength] Renwicks \
|
||||||
<a href='?src=\ref[src];max_field_strength=1'>+</a> \
|
<a href='?src=\ref[src];target_field_strength=1'>+</a> \
|
||||||
<a href='?src=\ref[src];max_field_strength=10'>++</a> \
|
<a href='?src=\ref[src];target_field_strength=10'>++</a> \
|
||||||
<a href='?src=\ref[src];max_field_strength=100'>\[max\]</a><br>"
|
<a href='?src=\ref[src];target_field_strength=100'>\[max\]</a><br>"
|
||||||
t += "<hr>"
|
t += "<hr>"
|
||||||
t += "<A href='?src=\ref[src]'>Refresh</A> "
|
t += "<A href='?src=\ref[src]'>Refresh</A> "
|
||||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||||
user << browse(t, "window=shield_generator;size=500x800")
|
user << browse(t, "window=shield_generator;size=500x400")
|
||||||
user.set_machine(src)
|
user.set_machine(src)
|
||||||
|
|
||||||
/obj/machinery/shield_gen/process()
|
/obj/machinery/shield_gen/process()
|
||||||
|
|
||||||
if(active && field.len)
|
if(field.len)
|
||||||
|
time_since_fail++
|
||||||
var/stored_renwicks = 0
|
var/stored_renwicks = 0
|
||||||
var/target_field_strength = min(strengthen_rate + max(average_field_strength, 0), max_field_strength)
|
var/target_strength_this_update = min(strengthen_rate + max(average_field_strength, 0), target_field_strength)
|
||||||
if(owned_capacitor)
|
|
||||||
var/required_energy = field.len * target_field_strength / energy_conversion_rate
|
if(active && owned_capacitor)
|
||||||
|
var/required_energy = field.len * target_strength_this_update / energy_conversion_rate
|
||||||
var/assumed_charge = min(owned_capacitor.stored_charge, required_energy)
|
var/assumed_charge = min(owned_capacitor.stored_charge, required_energy)
|
||||||
stored_renwicks = assumed_charge * energy_conversion_rate
|
stored_renwicks = assumed_charge * energy_conversion_rate
|
||||||
owned_capacitor.stored_charge -= assumed_charge
|
owned_capacitor.stored_charge -= assumed_charge
|
||||||
|
|
||||||
time_since_fail++
|
|
||||||
|
|
||||||
average_field_strength = 0
|
average_field_strength = 0
|
||||||
target_field_strength = stored_renwicks / field.len
|
var/renwicks_per_field = 0
|
||||||
|
if(stored_renwicks != 0)
|
||||||
|
renwicks_per_field = stored_renwicks / field.len
|
||||||
|
|
||||||
for(var/obj/effect/energy_field/E in field)
|
for(var/obj/effect/energy_field/E in field)
|
||||||
if(stored_renwicks)
|
if(active && renwicks_per_field > 0)
|
||||||
var/strength_change = target_field_strength - E.strength
|
var/amount_to_strengthen = min(renwicks_per_field - E.strength, strengthen_rate)
|
||||||
if(strength_change > stored_renwicks)
|
if(E.ticks_recovering > 0 && amount_to_strengthen > 0)
|
||||||
strength_change = stored_renwicks
|
E.Strengthen( min(amount_to_strengthen / 10, 0.1) )
|
||||||
if(E.strength < 0)
|
E.ticks_recovering -= 1
|
||||||
E.strength = 0
|
|
||||||
else
|
else
|
||||||
E.Strengthen(strength_change)
|
E.Strengthen(amount_to_strengthen)
|
||||||
|
|
||||||
stored_renwicks -= strength_change
|
|
||||||
|
|
||||||
average_field_strength += E.strength
|
average_field_strength += E.strength
|
||||||
else
|
else
|
||||||
E.Strengthen(-E.strength)
|
E.Strengthen(-E.strength)
|
||||||
|
|
||||||
average_field_strength /= field.len
|
average_field_strength /= field.len
|
||||||
if(average_field_strength < 0)
|
if(average_field_strength < 1)
|
||||||
time_since_fail = 0
|
time_since_fail = 0
|
||||||
else
|
else
|
||||||
average_field_strength = 0
|
average_field_strength = 0
|
||||||
@@ -187,12 +189,12 @@
|
|||||||
strengthen_rate = 1
|
strengthen_rate = 1
|
||||||
else if(strengthen_rate < 0)
|
else if(strengthen_rate < 0)
|
||||||
strengthen_rate = 0
|
strengthen_rate = 0
|
||||||
else if( href_list["max_field_strength"] )
|
else if( href_list["target_field_strength"] )
|
||||||
max_field_strength += text2num(href_list["max_field_strength"])
|
target_field_strength += text2num(href_list["target_field_strength"])
|
||||||
if(max_field_strength > 1000)
|
if(target_field_strength > 1000)
|
||||||
max_field_strength = 1000
|
target_field_strength = 1000
|
||||||
else if(max_field_strength < 0)
|
else if(target_field_strength < 0)
|
||||||
max_field_strength = 0
|
target_field_strength = 0
|
||||||
//
|
//
|
||||||
updateDialog()
|
updateDialog()
|
||||||
|
|
||||||
@@ -252,6 +254,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/obj/machinery/shield_gen/proc/toggle()
|
/obj/machinery/shield_gen/proc/toggle()
|
||||||
|
set background = 1
|
||||||
active = !active
|
active = !active
|
||||||
power_change()
|
power_change()
|
||||||
if(active)
|
if(active)
|
||||||
@@ -269,7 +272,7 @@
|
|||||||
else
|
else
|
||||||
for(var/obj/effect/energy_field/D in field)
|
for(var/obj/effect/energy_field/D in field)
|
||||||
field.Remove(D)
|
field.Remove(D)
|
||||||
del D
|
D.loc = null
|
||||||
|
|
||||||
for(var/mob/M in view(5,src))
|
for(var/mob/M in view(5,src))
|
||||||
M << "\icon[src] You hear heavy droning fade out."
|
M << "\icon[src] You hear heavy droning fade out."
|
||||||
@@ -278,6 +281,8 @@
|
|||||||
/obj/machinery/shield_gen/proc/get_shielded_turfs()
|
/obj/machinery/shield_gen/proc/get_shielded_turfs()
|
||||||
var/list/out = list()
|
var/list/out = list()
|
||||||
for(var/turf/T in range(field_radius, src))
|
for(var/turf/T in range(field_radius, src))
|
||||||
|
world << "turf dist:[get_dist(src,T)]"
|
||||||
if(get_dist(src,T) == field_radius)
|
if(get_dist(src,T) == field_radius)
|
||||||
out.Add(T)
|
out.Add(T)
|
||||||
|
world << " added"
|
||||||
return out
|
return out
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
|
|
||||||
//---------- external shield generator
|
//---------- external shield generator
|
||||||
//generates an energy field that loops around any built up area in space (is useless inside) halts movement and airflow, is blocked by walls, windows, airlocks etc
|
//generates an energy field that loops around any built up area in space (is useless inside) halts movement and airflow, is blocked by walls, windows, airlocks etc
|
||||||
|
|
||||||
|
/obj/machinery/shield_gen/external
|
||||||
|
name = "hull shield generator"
|
||||||
|
|
||||||
/obj/machinery/shield_gen/external/New()
|
/obj/machinery/shield_gen/external/New()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user