Merge pull request #7118 from VOREStation/vplk-shields

Ports Baystation Advanced Shield Generators
This commit is contained in:
Aronai Sieyes
2020-04-07 23:53:12 -04:00
committed by GitHub
19 changed files with 1392 additions and 125 deletions

View File

@@ -35,48 +35,6 @@
containertype = /obj/structure/closet/crate/engineering
containername = "Superconducting Transmission Coil crate"
/datum/supply_pack/eng/shield_capacitor
name = "Shield Capacitor"
contains = list(/obj/machinery/shield_capacitor)
cost = 20
containertype = /obj/structure/closet/crate/engineering
containername = "shield capacitor crate"
/datum/supply_pack/eng/shield_capacitor/advanced
name = "Advanced Shield Capacitor"
contains = list(/obj/machinery/shield_capacitor/advanced)
cost = 30
containertype = /obj/structure/closet/crate/engineering
containername = "advanced shield capacitor crate"
/datum/supply_pack/eng/bubble_shield
name = "Bubble Shield Generator"
contains = list(/obj/machinery/shield_gen)
cost = 40
containertype = /obj/structure/closet/crate/engineering
containername = "shield bubble generator crate"
/datum/supply_pack/eng/bubble_shield/advanced
name = "Advanced Bubble Shield Generator"
contains = list(/obj/machinery/shield_gen/advanced)
cost = 60
containertype = /obj/structure/closet/crate/engineering
containername = "advanced bubble shield generator crate"
/datum/supply_pack/eng/hull_shield
name = "Hull Shield Generator"
contains = list(/obj/machinery/shield_gen/external)
cost = 80
containertype = /obj/structure/closet/crate/engineering
containername = "shield hull generator crate"
/datum/supply_pack/eng/hull_shield/advanced
name = "Advanced Hull Shield Generator"
contains = list(/obj/machinery/shield_gen/external/advanced)
cost = 120
containertype = /obj/structure/closet/crate/engineering
containername = "advanced hull shield generator crate"
/datum/supply_pack/eng/electrical
name = "Electrical maintenance crate"
contains = list(
@@ -173,29 +131,19 @@
containername = "Particle Accelerator crate"
access = access_ce
/datum/supply_pack/eng/shield_gen
contains = list(/obj/item/weapon/circuitboard/shield_gen)
name = "Bubble shield generator circuitry"
cost = 30
containertype = /obj/structure/closet/crate/secure/engineering
containername = "bubble shield generator circuitry crate"
access = access_ce
/datum/supply_pack/eng/shield_gen_ex
contains = list(/obj/item/weapon/circuitboard/shield_gen_ex)
name = "Hull shield generator circuitry"
cost = 30
containertype = /obj/structure/closet/crate/secure/engineering
containername = "hull shield generator circuitry crate"
access = access_ce
/datum/supply_pack/eng/shield_cap
contains = list(/obj/item/weapon/circuitboard/shield_cap)
name = "Bubble shield capacitor circuitry"
cost = 30
containertype = /obj/structure/closet/crate/secure/engineering
containername = "shield capacitor circuitry crate"
access = access_ce
/datum/supply_pack/eng/shield_generator
name = "Shield Generator Construction Kit"
contains = list(
/obj/item/weapon/circuitboard/shield_generator,
/obj/item/weapon/stock_parts/capacitor,
/obj/item/weapon/stock_parts/micro_laser,
/obj/item/weapon/smes_coil,
/obj/item/weapon/stock_parts/console_screen,
/obj/item/weapon/stock_parts/subspace/amplifier
)
cost = 80
containertype = /obj/structure/closet/crate/engineering
containername = "shield generator construction kit crate"
/datum/supply_pack/eng/smbig
name = "Supermatter Core"

View File

@@ -53,6 +53,12 @@
name = "Black Ammunition Duffle Bag"
path = /obj/item/weapon/storage/backpack/dufflebag/syndie/ammo
/datum/uplink_item/item/tools/shield_diffuser
name = "Handheld Shield Diffuser"
desc = "A small device used to disrupt energy barriers, and allow passage through them."
item_cost = 16
path = /obj/item/weapon/shield_diffuser
/datum/uplink_item/item/tools/space_suit
name = "Space Suit"
item_cost = 15

View File

@@ -0,0 +1,46 @@
/datum/wires/shield_generator
holder_type = /obj/machinery/power/shield_generator
wire_count = 5
var/const/SHIELDGEN_WIRE_POWER = 1 // Cut to disable power input into the generator. Pulse does nothing. Mend to restore.
var/const/SHIELDGEN_WIRE_HACK = 2 // Pulse to hack the generator, enabling hacked modes. Cut to unhack. Mend does nothing.
var/const/SHIELDGEN_WIRE_CONTROL = 4 // Cut to lock most shield controls. Mend to unlock them. Pulse does nothing.
var/const/SHIELDGEN_WIRE_AICONTROL = 8 // Cut to disable AI control. Mend to restore.
var/const/SHIELDGEN_WIRE_NOTHING = 16 // A blank wire that doesn't have any specific function
/datum/wires/shield_generator/CanUse(var/mob/living/L)
var/obj/machinery/power/shield_generator/S = holder
if(S.panel_open)
return 1
return 0
/datum/wires/shield_generator/GetInteractWindow()
var/obj/machinery/power/shield_generator/S = holder
. += ..()
. += show_hint(0x1, S.mode_changes_locked, "The orange light is on.", "The orange light is off.")
. += show_hint(0x2, S.ai_control_disabled, "The blue light is off.", "The blue light is blinking.")
. += show_hint(0x4, S.hacked, "The violet light is pulsing.", "The violet light is steady.")
. += show_hint(0x8, S.input_cut, "The red light is off.", "The red light is on.")
/datum/wires/shield_generator/UpdateCut(index, mended)
var/obj/machinery/power/shield_generator/S = holder
switch(index)
if(SHIELDGEN_WIRE_POWER)
S.input_cut = !mended
if(SHIELDGEN_WIRE_HACK)
if(!mended)
S.hacked = 0
if(S.check_flag(MODEFLAG_BYPASS))
S.toggle_flag(MODEFLAG_BYPASS)
if(S.check_flag(MODEFLAG_OVERCHARGE))
S.toggle_flag(MODEFLAG_OVERCHARGE)
if(SHIELDGEN_WIRE_CONTROL)
S.mode_changes_locked = !mended
if(SHIELDGEN_WIRE_AICONTROL)
S.ai_control_disabled = !mended
/datum/wires/shield_generator/UpdatePulsed(var/index)
var/obj/machinery/power/shield_generator/S = holder
switch(index)
if(SHIELDGEN_WIRE_HACK)
S.hacked = 1