diff --git a/code/game/objects/structures/props/altevian.dm b/code/game/objects/structures/props/altevian.dm new file mode 100644 index 0000000000..1bee379e7d --- /dev/null +++ b/code/game/objects/structures/props/altevian.dm @@ -0,0 +1,36 @@ +/obj/structure/prop/altevian_generator_wrecked + name = "Converted High Energy Exchange Supplier Extractor" + desc = "A take on the classic PACMAN reactors that are seen throughout the galaxy. The altevians have ripped apart the tech and seemed to of found a way to maximize the fuel usage one would see with this kind of process. \ + However, it is a lot bulkier and nearly impossible to break apart, but still can be moved if need be with special tools. This one appears to be totally wrecked though." + icon = 'icons/obj/props/decor64x64.dmi' + icon_state = "alteviangenwrecked" + bound_width = 64 + bound_height = 64 + +/obj/structure/prop/altevian_jump_drive + name = "Prosper-M Stellar Drive" + desc = "A drive created by the Altevian Hegemony that focuses heavily on using Bluespace and other tactics to achieve a stable traversal between the stars. \ + This drive is commonly seen on their medium sized craft to help with logistical operations." + icon = 'icons/obj/props/decor128x128.dmi' + icon_state = "altevian_jump_drive" + bound_width = 128 + bound_height = 128 + var/has_misc_overlay = TRUE + +/obj/structure/prop/altevian_jump_drive/Initialize() + .=..() + update_icon() + +/obj/structure/prop/altevian_jump_drive/update_icon() + cut_overlays() + if(has_misc_overlay) + add_overlay("jump_drive_misc_anim_overlay") + +/obj/structure/prop/altevian_jump_drive/active + icon_state = "altevian_jump_drive-active" + +/obj/structure/prop/altevian_jump_drive/wrecked + icon_state = "altevian_jump_drive_wrecked" + desc = "A drive created by the Altevian Hegemony that focuses heavily on using Bluespace and other tactics to achieve a stable traversal between the stars. \ + This drive is commonly seen on their medium sized craft to help with logistical operations. This one appears to be totally wrecked." + has_misc_overlay = FALSE \ No newline at end of file diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index d5993805da..a9f0cd0e28 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -32,11 +32,11 @@ /obj/machinery/power/port_gen/proc/TogglePower() if(active) active = FALSE - icon_state = "[initial(icon_state)]" + update_icon() // soundloop.stop() else if(HasFuel()) active = TRUE - icon_state = "[initial(icon_state)]on" + update_icon() // soundloop.start() /obj/machinery/power/port_gen/process() @@ -45,9 +45,15 @@ UseFuel() else active = FALSE - icon_state = initial(icon_state) + update_icon() handleInactive() +/obj/machinery/power/port_gen/update_icon() + if(active) + icon_state = "[initial(icon_state)]on" + else + icon_state = initial(icon_state) + /obj/machinery/power/powered() return 1 //doesn't require an external power source @@ -125,7 +131,7 @@ default_apply_parts() if(anchored) connect_to_network() - + /obj/machinery/power/port_gen/pacman/Destroy() DropFuel() return ..() @@ -310,7 +316,7 @@ if(!ui) ui = new(user, src, "PortableGenerator", name) ui.open() - + /obj/machinery/power/port_gen/pacman/tgui_data(mob/user) var/list/data = list() @@ -322,7 +328,7 @@ data["is_ai"] = TRUE else data["is_ai"] = FALSE - + data["sheet_name"] = capitalize(sheet_name) data["fuel_stored"] = round((sheets * 1000) + (sheet_left * 1000)) data["fuel_capacity"] = round(max_sheets * 1000, 0.1) diff --git a/code/modules/power/port_gen_vr.dm b/code/modules/power/port_gen_vr.dm index 61341a92cd..04fd1d6bde 100644 --- a/code/modules/power/port_gen_vr.dm +++ b/code/modules/power/port_gen_vr.dm @@ -412,3 +412,89 @@ circuit = /obj/item/weapon/circuitboard/machine/reg_c default_power_gen = 500000 //Half power nutrition_drain = 0.5 //for half cost - EQUIVALENT EXCHANGE >:O + + +// Big altevian version of pacman. has a lot of copypaste from regular kind, but less flexible. +/obj/machinery/power/port_gen/large_altevian + name = "Converted High Energy Exchange Supplier Extractor" + desc = "A take on the classic PACMAN reactors that are seen throughout the galaxy. The altevians have ripped apart the tech and seemed to of found a way to maximize the fuel usage one would see with this kind of process. \ + However, it is a lot bulkier and nearly impossible to break apart, but still can be moved if need be with special tools." + icon = 'icons/obj/props/decor64x64.dmi' + icon_state = "alteviangen" + bound_width = 64 + bound_height = 64 + anchored = TRUE + power_gen = 200000 + + var/sheet_name = "Phoron Sheets" + var/sheet_path = /obj/item/stack/material/phoron + var/sheets = 0 //How many sheets of material are loaded in the generator + var/sheet_left = 0 //How much is left of the current sheet + var/time_per_sheet = 120 //fuel efficiency - how long 1 sheet lasts at power level 1 + var/max_sheets = 100 //max capacity of the hopper + +/obj/machinery/power/port_gen/large_altevian/Initialize() + .=..() + if(anchored) + connect_to_network() + +/obj/machinery/power/port_gen/large_altevian/Destroy() + DropFuel() + return ..() + +/obj/machinery/power/port_gen/large_altevian/examine(mob/user) + . = ..() + . += "There [sheets == 1 ? "is" : "are"] [sheets] sheet\s left in the hopper." + +/obj/machinery/power/port_gen/large_altevian/HasFuel() + var/needed_sheets = power_output / time_per_sheet + if(sheets >= needed_sheets - sheet_left) + return 1 + return 0 + +/obj/machinery/power/port_gen/large_altevian/DropFuel() + if(sheets) + var/obj/item/stack/material/S = new sheet_path(loc, sheets) + sheets -= S.get_amount() + +/obj/machinery/power/port_gen/large_altevian/UseFuel() + var/needed_sheets = power_output / time_per_sheet + if (needed_sheets > sheet_left) + sheets-- + sheet_left = (1 + sheet_left) - needed_sheets + else + sheet_left -= needed_sheets + +/obj/machinery/power/port_gen/large_altevian/attackby(var/obj/item/O as obj, var/mob/user as mob) + if(istype(O, sheet_path)) + var/obj/item/stack/addstack = O + var/amount = min((max_sheets - sheets), addstack.get_amount()) + if(amount < 1) + to_chat(user, "The [src.name] is full!") + return + to_chat(user, "You add [amount] sheet\s to the [src.name].") + sheets += amount + addstack.use(amount) + update_icon() + return + return ..() + +/obj/machinery/power/port_gen/large_altevian/attack_hand(mob/user as mob) + ..() + if (!anchored) + return + TogglePower() + +/obj/machinery/power/port_gen/large_altevian/attack_ai(mob/user as mob) + TogglePower() + +/obj/machinery/power/port_gen/large_altevian/update_icon() + ..() + + cut_overlays() + if(sheets > 75) + add_overlay("alteviangen-fuel-100") + else if(sheets > 25) + add_overlay("alteviangen-fuel-66") + else if(sheets > 0) + add_overlay("alteviangen-fuel-33") \ No newline at end of file diff --git a/icons/obj/props/decor128x128.dmi b/icons/obj/props/decor128x128.dmi new file mode 100644 index 0000000000..32e0580e40 Binary files /dev/null and b/icons/obj/props/decor128x128.dmi differ diff --git a/icons/obj/props/decor64x64.dmi b/icons/obj/props/decor64x64.dmi index e9ac905d19..2cfca942dd 100644 Binary files a/icons/obj/props/decor64x64.dmi and b/icons/obj/props/decor64x64.dmi differ diff --git a/vorestation.dme b/vorestation.dme index 09a22f5d46..6649482de9 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1587,6 +1587,7 @@ #include "code\game\objects\structures\ghost_pods\survivor.dm" #include "code\game\objects\structures\props\alien_props.dm" #include "code\game\objects\structures\props\alien_props_vr.dm" +#include "code\game\objects\structures\props\altevian.dm" #include "code\game\objects\structures\props\beam_prism.dm" #include "code\game\objects\structures\props\blackbox.dm" #include "code\game\objects\structures\props\esoteric.dm"