Skip to content

Commit

Permalink
"quick" fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Pockets-byte committed Sep 14, 2024
1 parent 490e929 commit a4bd409
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 76 deletions.
34 changes: 19 additions & 15 deletions _maps/map_files/Aetherwhisp/Aetherwhisp2.dmm

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 8 additions & 12 deletions nsv13/code/game/objects/items/nsv_circuitboards.dm
Original file line number Diff line number Diff line change
Expand Up @@ -481,29 +481,25 @@
//energy weapon cooling
/obj/item/circuitboard/machine/cooling
name = "subspace cooling unit circuit board"
icon = 'icons/obj/module.dmi'
icon_state = "command"
materials = list(/datum/material/glass=1000)
w_class = WEIGHT_CLASS_SMALL
materials = list(/datum/material/glass=1000, /datum/material/copper=15000)
build_path = /obj/machinery/cooling/cooler
req_components = list(
/obj/item/stack/cable_coil = 30,
/obj/item/stock_parts/matter_bin = 1,
/obj/item/stack/sheet/mineral/copper = 15,
/obj/item/stock_parts/capacitor = 4,
/obj/item/stock_parts/micro_laser = 4,
/obj/item/stack/ore/bluespace_crystal = 1)
/obj/item/stock_parts/subspace/ansible = 1,
/obj/item/stock_parts/subspace/crystal =1)


/obj/item/circuitboard/machine/cooling/storage
name = "subspace heatsink unit circuit board"
icon = 'icons/obj/module.dmi'
icon_state = "command"
materials = list(/datum/material/glass=1000)
w_class = WEIGHT_CLASS_SMALL
materials = list(/datum/material/glass=1000, /datum/material/copper=15000)
build_path = /obj/machinery/cooling/storage
req_components = list(
/obj/item/stack/cable_coil = 30,
/obj/item/stock_parts/matter_bin = 4,
/obj/item/stack/sheet/mineral/copper = 30,
/obj/item/stock_parts/capacitor = 2,
/obj/item/stock_parts/micro_laser = 2,
/obj/item/stack/ore/bluespace_crystal = 1)
/obj/item/stock_parts/subspace/ansible = 1,
/obj/item/stock_parts/subspace/crystal =1)
26 changes: 13 additions & 13 deletions nsv13/code/modules/munitions/ship_weapons/energy_weapons/phaser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
var/combo = null
var/combocount = 0 //How far into the combo are they?
var/overheat_sound = 'sound/effects/smoke.ogg'
var/list/coolers = list()
var/list/storages = list()
var/list/cooling = list()
var/cooling_amount = 0
var/storage_amount = 0
var/storage_rate = 100
Expand All @@ -45,7 +44,7 @@
var/heat = 0
var/charge_rate = 430000 //How quickly do we charge?
var/charge_per_shot = 660000 //How much power per shot do we have to use?
var/heat_per_shot = 100 //how much heat do we make per shot
var/heat_per_shot = 250 //how much heat do we make per shot
var/heat_rate = 10 // how fast do we discharge heat
var/max_heat = 1000 //how much heat before ::fun:: happens
var/overloaded = 0 //have we cooked ourself
Expand All @@ -60,11 +59,11 @@
energy_weapon_type = /datum/ship_weapon/phaser
circuit = /obj/item/circuitboard/machine/phase_cannon
charge_rate = 800000 // At power level 5, requires 3MW per tick to charge(this is wrong. but I don't have the proper numbers)
charge_per_shot = 4000000 // At power level 5, requires 20MW total to fire, takes about 12 seconds to gain 1 charge (ditto)
charge_per_shot = 3800000 // At power level 5, requires 20MW total to fire, takes about 12 seconds to gain 1 charge (ditto). I'm actually making this less demanding so that heat becomes the limiting factor, especially for this one.
max_charge = 8000000 // Store 2 charges
power_modifier_cap = 5 //Allows you to do insanely powerful oneshot lasers. Maximum theoretical damage of 500.
max_heat = 2000
heat_per_shot = 800
heat_per_shot = 1200
heat_rate = 5
storage_rate = 140

Expand All @@ -75,7 +74,7 @@

/obj/machinery/ship_weapon/energy/examine(mob/user)
. = ..()
. += "<span class='notice'>The Thermal Transceiver is currently at <b>[length(storages)+length(coolers)]0%</b> connection capacity.</span>"
. += "<span class='notice'>The Thermal Transceiver is currently at <b>[length(cooling)]0%</b> connection capacity.</span>"
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The heatsink display reads <b>[(heat)]</b> out of <b>[(max_heat)]</b>.</span>"
if(maint_state != MSTATE_CLOSED)
Expand All @@ -101,7 +100,7 @@
ui.set_autoupdate(TRUE)

/obj/machinery/ship_weapon/energy/proc/vent()
if(heat > max_heat/4)
if(heat > max_heat*0.25)
weapon_state = STATE_VENTING
ventnumber = max_heat*0.25
else
Expand Down Expand Up @@ -265,11 +264,12 @@


/obj/machinery/ship_weapon/energy/proc/process_heat()//heat management. don't push your weapons too hard. actual heat generation is in _ship_weapons.dm

for(var/obj/machinery/cooling/cooler/C in coolers)
cooling_amount = 0
for(var/obj/machinery/cooling/cooler/C in cooling)
if(!(C.machine_stat & (BROKEN|NOPOWER|MAINT)))
cooling_amount++
for(var/obj/machinery/cooling/storage/C in storages)
storage_amount = 0
for(var/obj/machinery/cooling/storage/C in cooling)
if(!(C.machine_stat & (BROKEN|NOPOWER|MAINT)))
storage_amount++
max_heat = initial(max_heat) + (storage_amount*storage_rate)
Expand All @@ -283,10 +283,10 @@
else
return
if(STATE_VENTING)
if(heat <= max_heat-ventnumber)
if(heat <= ventnumber)
weapon_state = STATE_NOTHING
return
heat = max(heat-(H+H*0.2),0)
heat = max(heat-(cooling_amount*(heat_rate+(0.25*heat_rate))),0)
return
if(heat >= max_heat)
overload()
Expand Down Expand Up @@ -404,6 +404,6 @@
return ..()

/obj/machinery/ship_weapon/energy/Destroy()
for(var/obj/machinery/cooling/E in storages | coolers)
for(var/obj/machinery/cooling/E in cooling)
E.parent = null
. = ..()
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
desc = "A subspace unit."
icon = 'nsv13/icons/obj/subspace.dmi'
icon_state = "cooler"
circuit = /obj/item/circuitboard/machine
bound_width = 32
pixel_x = 0
pixel_y = 0
idle_power_usage = 2000
var/obj/machinery/ship_weapon/energy/parent
var/on = FALSE
density = TRUE
critical_machine = TRUE

/obj/machinery/cooling/cooler
name = "subspace cooling unit"
Expand All @@ -20,26 +18,11 @@



/obj/machinery/cooling/cooler/Initialize(mapload)
. = ..()
var/obj/machinery/ship_weapon/energy/E = locate(/obj/machinery/ship_weapon/energy) in orange(1, src) //I have no idea what I'm doing and this causes errors so
E.coolers |= src
parent = E

/obj/machinery/cooling/storage/Initialize(mapload)
. = ..()
var/obj/machinery/ship_weapon/energy/E = locate(/obj/machinery/ship_weapon/energy) in orange(1, src)
E.storages |= src
parent = E


/obj/machinery/cooling/cooler/Destroy()
parent.coolers -= src
/obj/machinery/cooling/Destroy()
if(parent)
parent.cooling -= src
. = ..()

/obj/machinery/cooling/storage/Destroy()
parent.storages -= src
. = ..()

/obj/machinery/cooling/attack_hand(mob/user)
. = ..()
Expand Down Expand Up @@ -87,23 +70,15 @@
to_chat(user, "<font color = #666633>-% Cannot link machines across power zones. %-</font color>")
return


if(istype(src,/obj/machinery/cooling/cooler))
parent.coolers -= src
parent = null
parent = P.buffer
.=TRUE
parent.coolers |= src
to_chat(user, "<font color = #666633>-% Successfully linked [P.buffer] with [src] %-</font color>")
if(istype(src,/obj/machinery/cooling/storage))
parent.storages -= src
if(parent)
parent.cooling -= src
parent = null
parent = P.buffer
.=TRUE
parent.storages |= src
to_chat(user, "<font color = #666633>-% Successfully linked [P.buffer] with [src] %-</font color>")
if(length(parent.storages)+length(parent.coolers) >= 11)
var/E = pick(parent.storages+parent.coolers)
parent = P.buffer
.=TRUE
parent.cooling |= src
to_chat(user, "<font color = #666633>-% Successfully linked [P.buffer] with [src] %-</font color>")
if(length(parent.cooling) >= 11)
var/E = pick(parent.cooling)
explosion(get_turf(E), 0, 1, 3, 5, flame_range = 4)
return

Expand Down

0 comments on commit a4bd409

Please sign in to comment.