mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 07:38:05 +01:00
Ports VG's antimatter engine shield sprites and adds the AM engine to cargo (#20744)
* Ports VG's antimatter engine shield sprites * crate name
This commit is contained in:
@@ -656,6 +656,34 @@ datum/supply_pack
|
||||
crate_type = /obj/structure/closet/crate/secure/engineering
|
||||
dangerous = TRUE
|
||||
|
||||
/datum/supply_pack/engineering/engine/am_shielding
|
||||
name = "Antimatter Shielding Crate"
|
||||
cost = 2000
|
||||
contains = list(/obj/item/device/am_shielding_container,
|
||||
/obj/item/device/am_shielding_container,
|
||||
/obj/item/device/am_shielding_container,
|
||||
/obj/item/device/am_shielding_container,
|
||||
/obj/item/device/am_shielding_container,
|
||||
/obj/item/device/am_shielding_container,
|
||||
/obj/item/device/am_shielding_container,
|
||||
/obj/item/device/am_shielding_container,
|
||||
/obj/item/device/am_shielding_container,
|
||||
/obj/item/device/am_shielding_container)//10 shields: 3x3 containment and a core
|
||||
crate_name = "antimatter shielding crate"
|
||||
|
||||
/datum/supply_pack/engineering/engine/am_core
|
||||
name = "Antimatter Control Crate"
|
||||
cost = 5000
|
||||
contains = list(/obj/machinery/power/am_control_unit)
|
||||
crate_name = "antimatter control crate"
|
||||
|
||||
/datum/supply_pack/engineering/engine/am_jar
|
||||
name = "Antimatter Containment Jar Crate"
|
||||
cost = 2000
|
||||
contains = list(/obj/item/weapon/am_containment,
|
||||
/obj/item/weapon/am_containment)
|
||||
crate_name = "antimatter jar crate"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////// Medical /////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "This device injects antimatter into connected shielding units, the more antimatter injected the more power produced. Wrench the device to set it up."
|
||||
icon = 'icons/obj/machines/antimatter.dmi'
|
||||
icon_state = "control"
|
||||
anchored = 1
|
||||
anchored = 0
|
||||
density = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 100
|
||||
@@ -37,7 +37,10 @@
|
||||
|
||||
/obj/machinery/power/am_control_unit/Destroy()//Perhaps damage and run stability checks rather than just del on the others
|
||||
for(var/obj/machinery/am_shielding/AMS in linked_shielding)
|
||||
AMS.control_unit = null
|
||||
qdel(AMS)
|
||||
qdel(fueljar)
|
||||
fueljar = null
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
var/processing = 0//To track if we are in the update list or not, we need to be when we are damaged and if we ever
|
||||
var/stability = 100//If this gets low bad things tend to happen
|
||||
var/efficiency = 1//How many cores this core counts for when doing power processing, plasma in the air and stability could affect this
|
||||
var/coredirs = 0
|
||||
var/dirs = 0
|
||||
|
||||
|
||||
/obj/machinery/am_shielding/New(loc)
|
||||
@@ -105,14 +107,37 @@
|
||||
|
||||
|
||||
/obj/machinery/am_shielding/update_icon()
|
||||
dirs = 0
|
||||
coredirs = 0
|
||||
cut_overlays()
|
||||
for(var/direction in alldirs)
|
||||
var/machine = locate(/obj/machinery, get_step(loc, direction))
|
||||
if((istype(machine, /obj/machinery/am_shielding) && machine:control_unit == control_unit)||(istype(machine, /obj/machinery/power/am_control_unit) && machine == control_unit))
|
||||
add_overlay("shield_[direction]")
|
||||
var/turf/T = get_step(loc, direction)
|
||||
for(var/obj/machinery/machine in T)
|
||||
if(istype(machine, /obj/machinery/am_shielding))
|
||||
var/obj/machinery/am_shielding/shield = machine
|
||||
if(shield.control_unit == control_unit)
|
||||
if(shield.processing)
|
||||
coredirs |= direction
|
||||
if(direction in cardinal)
|
||||
dirs |= direction
|
||||
|
||||
else
|
||||
if(istype(machine, /obj/machinery/power/am_control_unit) && (direction in cardinal))
|
||||
var/obj/machinery/power/am_control_unit/control = machine
|
||||
if(control == control_unit)
|
||||
dirs |= direction
|
||||
|
||||
|
||||
var/prefix = ""
|
||||
var/icondirs=dirs
|
||||
|
||||
if(coredirs)
|
||||
prefix="core"
|
||||
|
||||
icon_state = "[prefix]shield_[icondirs]"
|
||||
|
||||
if(core_check())
|
||||
add_overlay("core")
|
||||
add_overlay("core[control_unit && control_unit.active]")
|
||||
if(!processing)
|
||||
setup_core()
|
||||
else if(processing)
|
||||
@@ -151,10 +176,15 @@
|
||||
//Scans cards for shields or the control unit and if all there it
|
||||
/obj/machinery/am_shielding/proc/core_check()
|
||||
for(var/direction in alldirs)
|
||||
var/machine = locate(/obj/machinery, get_step(loc, direction))
|
||||
if(!machine)
|
||||
return 0//Need all for a core
|
||||
if(!istype(machine, /obj/machinery/am_shielding) && !istype(machine, /obj/machinery/power/am_control_unit))
|
||||
var/found_am_device=0
|
||||
for(var/obj/machinery/machine in get_step(loc, direction))
|
||||
//var/machine = locate(/obj/machinery, get_step(loc, direction))
|
||||
if(!machine)
|
||||
continue//Need all for a core
|
||||
if(istype(machine, /obj/machinery/am_shielding) || istype(machine, /obj/machinery/power/am_control_unit))
|
||||
found_am_device = 1
|
||||
break
|
||||
if(!found_am_device)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user