Files
Paradise/code/modules/smithing/smithing_cast.dm
Kyani f81ef075f1 The NGCR: Nuclear Fission Reactor (#30493)
* coefficient balancing

* damage and meltdowns

* meltdown stuff

* alert stuff

* lots of work - whew

* some enrichment code

* rod encrichmnt

* working on enrichment

* more fabrication

* rod fab

* start to the nuke

* overload sprites

* overload code work

* some overload tweaking

* small tweak

* coolant ejections and QOL things

* overheat events + ripley gripper

* rebase + venting code

* save before rebase

* some pre-work for rods

* finishing the base rods

* fixed my dme

* de linting

* tiny lint fix

* more lint fixes

* linting

* linting

* linting

* linting

* linting

* temp delint

* temp delint

* undo TM stuff + minor fix

* didnt save

* some fixes

* fixes

* fixes and engine repair

* fixed broken durability decay

* LOTS of things

* tgui

* lint

* linter

* linter

* minor shit

* Update boxstation.dmm

* major refactors and fixes

* saved this

* critical testing tweaks and fixes

* fixes and tweaks

* smithing start

* forgot to save

* craftables + grill start

* saved

* fix

* more grill work

* Update tgui.bundle.js

* linter

* linter

* fixes

* rod fabricator initial

* cooking work

* push

* soundwork

* sound work tweak

* comments + sounds + toxins gen rework

* lots of work

* sprite stuff

* deconflicting

* delinting

* bundle rebuild

* prettier

* feex

* fuck you OD

* who asked?

* update to tgui

* another edit to tgui

* finish tgui

* remove debug metadata button

* rod tweaks for tgui

* Update code/datums/uplink_items/uplink_traitor.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/game/mecha/equipment/tools/work_tools.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/game/mecha/equipment/tools/work_tools.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/game/objects/items/robot/cyborg_gripper.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/mob/living/simple_animal/parrot.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/mob/living/simple_animal/parrot.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/mob/living/simple_animal/parrot.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/mob/living/simple_animal/parrot.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/power/engines/fission/nuclear_misc.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/power/engines/fission/nuclear_misc.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/power/engines/fission/nuclear_misc.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/power/engines/fission/nuclear_rods.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/power/engines/fission/nuclear_rods.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/power/engines/fission/reactor.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/power/engines/fission/reactor.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/power/engines/fission/nuclear_rods.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/power/engines/fission/nuclear_rods.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/power/engines/fission/nuclear_rods.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/power/engines/fission/reactor.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/smithing/components/misc_components.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/power/engines/fission/nuclear_rods.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update tgui/packages/tgui/interfaces/NuclearRodFabricator.jsx

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Spans

* tgui build

* rod redo

* improve tgui for fabricator

* sprites and centrifuge/fab work

* tgui update

* spritework

* cyberiad + hydrogen conversion

* kerberos + counter

* Update code/modules/power/engines/fission/nuclear_rods.dm

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* sprite + fab tweak

* tgui bundle

* lintering

* bugfixing

* linting

* linting

* event tweak

* add missing gases to fission monitor

* issue fixing

* sprite/overlay fixes

* mapping

* stations again

* space lattice

* tine tweak

* linter

* no rod alerts

* buttons

* loose wire

* make it so you can interact through rod casings and the uhh big thing in the center, what's that called again

* fixes

* door fix

* many bug fixes + crates

* fab ghost touch

* water convert + maint sprite + fixes

* pack changes + neighbor fix

* doors rename

* didnt save

* hydrogen fix

* map tweaks

* repair fixes + corium LETHALITY

* upped broken rad damage

* pipe rename + overload icons

* more roundstart moderators

* rod tree tweaks

* tweaks

* pack and enrichment fixes

* misc tweaks and fixes

* fixes: Density, circuits, coolant offline negation

* Apply suggestions from code review

Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* review changes

* linter + fix

* reviews and fixes

* LOTS of tweaks and changes

* supermatter kit

* spacematter balance

* tgui

* fixes and tweaks

* didnt save this

* mapping + smith fix

* cargo rods arnt radioactive til opened

* Apply suggestions from code review

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* review items

* fixes

* linters

* moving components out of nullspace

* examine fix

* Update tgui.bundle.js

* explosion nerf and minor fix

* Apply suggestions from code review

Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* reviews

* map fix + ripley rad immune

* Apply suggestions from code review

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* review

* fix chamber examine

* tweaks + rod fab disk drop

* Apply suggestions from code review

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* review changes

* Update code/modules/power/engines/fission/nuclear_rods.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* fixes

* tgui bundle

* small rod tweaks

* Update code/game/machinery/computer/buildandrepair.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/smithing/components/reactor_components.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/power/engines/fission/reactor_machines.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/power/engines/fission/reactor_machines.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* reviews

* Update code/modules/power/engines/fission/reactor_machines.dm

Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

---------

Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>
Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Co-authored-by: Paul <pmerkamp@gmail.com>
Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com>
Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
2026-01-07 09:19:43 +00:00

224 lines
7.4 KiB
Plaintext

/obj/item/smithing_cast
name = "smithing cast"
icon = 'icons/obj/smithing.dmi'
icon_state = "debug"
desc = "Debug smithing cast. If you see this, notify the development team."
w_class = WEIGHT_CLASS_SMALL
/// The selected final product of the item
var/obj/item/selected_product
/// Possible products of the item
var/list/possible_products = list()
/// How many products are we smelting at any given operation?
var/amount_to_make = 1
/// What is the icon state we pass to the basin?
var/basin_state = "error"
new_attack_chain = TRUE
/obj/item/smithing_cast/Initialize(mapload)
. = ..()
populate_products()
/obj/item/smithing_cast/examine(mob/user)
. = ..()
. += "It is currently configured to make [amount_to_make == 1 ? "a" : "[amount_to_make]"] [selected_product.name][amount_to_make == 1 ? "" : "s"]."
. += SPAN_NOTICE("You can select the desired product by using [src] in your hand.")
/obj/item/smithing_cast/activate_self(mob/user)
. = ..()
if(!possible_products)
return
if(!length(possible_products))
return
var/list/product_names = list()
var/product
for(product in possible_products)
var/obj/item/possible_product = product
product_names[possible_product.name] = possible_product
if(!length(product_names))
return
var/new_product = tgui_input_list(user, "Select a product", src, product_names)
if(!new_product)
selected_product = possible_products[1]
else
selected_product = product_names[new_product]
/obj/item/smithing_cast/update_desc()
return ..()
/obj/item/smithing_cast/proc/populate_products()
return
/obj/item/smithing_cast/sheet
name = "sheet cast"
icon_state = "sheet_cast"
desc = "A cast for forging molten minerals into workable sheets."
basin_state = "cast_sheet"
/obj/item/smithing_cast/sheet/examine(mob/user)
. = ..()
. += SPAN_NOTICE("You can change the amount of sheets smelted by alt-clicking [src].")
/obj/item/smithing_cast/sheet/populate_products()
possible_products = list(/obj/item/stack/sheet/metal,
/obj/item/stack/sheet/glass,
/obj/item/stack/sheet/mineral/silver,
/obj/item/stack/sheet/mineral/gold,
/obj/item/stack/sheet/mineral/plasma,
/obj/item/stack/sheet/mineral/uranium,
/obj/item/stack/sheet/mineral/diamond,
/obj/item/stack/ore/bluespace_crystal/refined,
/obj/item/stack/sheet/mineral/titanium,
/obj/item/stack/sheet/plasmaglass,
/obj/item/stack/sheet/titaniumglass,
/obj/item/stack/sheet/plasteel,
/obj/item/stack/sheet/mineral/plastitanium,
/obj/item/stack/sheet/plastitaniumglass,
/obj/item/stack/sheet/mineral/bananium,
/obj/item/stack/sheet/mineral/tranquillite,
/obj/item/stack/sheet/mineral/platinum,
/obj/item/stack/sheet/mineral/palladium,
/obj/item/stack/sheet/mineral/iridium,
/obj/item/stack/tile/brass
)
if(length(possible_products))
selected_product = possible_products[1]
/obj/item/smithing_cast/sheet/AltClick(mob/user)
. = ..()
if(!Adjacent(user))
return
amount_to_make = tgui_input_number(user, "Select an amount (1-50)", src, 1, 50, 1)
/obj/item/smithing_cast/component
name = "component cast"
desc = "Debug component cast. If you see this, notify the development team."
/// The selected quality of the item
var/datum/smith_quality/quality = /datum/smith_quality
/// The type of product
var/product_type
/obj/item/smithing_cast/component/examine(mob/user)
. = ..()
. += "The current selected quality is [quality.name]."
. += SPAN_NOTICE("You can change the quality of the product by alt-clicking [src].")
/obj/item/smithing_cast/component/AltClick(mob/user)
. = ..()
if(!Adjacent(user))
return
var/list/quality_name_list = list()
var/list/quality_type_list = typesof(/datum/smith_quality)
var/quality_type
for(quality_type in quality_type_list)
var/datum/smith_quality/new_quality = quality_type
quality_name_list[new_quality.name] = new_quality
var/selected_quality = tgui_input_list(user, "Select a quality", src, quality_name_list)
if(!selected_quality)
quality = quality_type_list[1]
else
quality = quality_name_list[selected_quality]
/obj/item/smithing_cast/component/populate_products()
possible_products = (typesof(product_type) - list(product_type))
if(length(possible_products))
selected_product = possible_products[1]
/obj/item/smithing_cast/component/insert_frame
name = "insert frame cast"
icon_state = "insert_frame_cast"
desc = "A cast for creating insert frames."
product_type = /obj/item/smithed_item/component/insert_frame
basin_state = "cast_armorframe"
/obj/item/smithing_cast/component/insert_lining
name = "insert lining cast"
icon_state = "insert_lining_cast"
desc = "A cast for creating insert linings."
product_type = /obj/item/smithed_item/component/insert_lining
basin_state = "cast_mesh"
/obj/item/smithing_cast/component/bit_mount
name = "bit mount cast"
icon_state = "bit_mount_cast"
desc = "A cast for creating bit mounts."
product_type = /obj/item/smithed_item/component/bit_mount
basin_state = "cast_bitmount"
/obj/item/smithing_cast/component/bit_head
name = "bit head cast"
icon_state = "bit_head_cast"
desc = "A cast for creating bit heads."
product_type = /obj/item/smithed_item/component/bit_head
basin_state = "cast_bithead"
/obj/item/smithing_cast/component/lens_frame
name = "lens frame cast"
icon_state = "lens_frame_cast"
desc = "A cast for creating lens frames."
product_type = /obj/item/smithed_item/component/lens_frame
basin_state = "cast_lens"
/obj/item/smithing_cast/component/lens_focus
name = "lens focus cast"
icon_state = "lens_focus_cast"
desc = "A cast for creating lens foci."
product_type = /obj/item/smithed_item/component/lens_focus
basin_state = "cast_focus"
/obj/item/smithing_cast/component/knife_blade
name = "knife blade cast"
desc = "A cast for creating knife blades."
icon_state = "knife_blade_cast"
product_type = /obj/item/smithed_item/component/knife_blade
basin_state = "cast_knife_blade"
/obj/item/smithing_cast/component/knife_handle
name = "knife handle cast"
desc = "A cast for creating knife handles."
icon_state = "knife_handle_cast"
product_type = /obj/item/smithed_item/component/knife_handle
basin_state = "cast_knife_handle"
/obj/item/smithing_cast/component/rod_housing
name = "rod housing cast"
icon_state = "rod_housing_cast"
desc = "A cast for creating a nuclear rod housing frame."
product_type = /obj/item/smithed_item/component/rod_housing
basin_state = "cast_rod_housing"
/obj/item/smithing_cast/component/rod_housing/AltClick(mob/user)
return
/obj/item/smithing_cast/component/rod_core
name = "rod core cast"
icon_state = "rod_core_cast"
desc = "A cast for creating a nuclear rod core."
product_type = /obj/item/smithed_item/component/rod_core
basin_state = "cast_rod_core"
/obj/item/smithing_cast/component/rod_core/AltClick(mob/user)
return
/obj/item/smithing_cast/component/trim
name = "trim cast"
icon_state = "trim_cast"
desc = "A cast for creating trims."
product_type = /obj/item/smithed_item/component/trim
basin_state = "cast_trim"
/obj/item/smithing_cast/misc
name = "misc cast"
icon_state = "insert_frame_cast"
desc = "Debug cast. If you see this, notify the development team."
/obj/item/smithing_cast/misc/AltClick(mob/user, modifiers)
return
/obj/item/smithing_cast/misc/egun_parts
name = "energy gun parts cast"
icon_state = "egun_parts_cast"
desc = "A cast for creating energy gun frames."
selected_product = /obj/item/smithed_item/component/egun_parts
basin_state = "cast_egun_parts"