Files
GhomandGitHub 6eb2d1674a Implementing materials checks for techweb designs. (#96257)
## About The Pull Request
In similar fashion to what was done with crafting recipes last year,
this year it's time for techweb designs and printed items to be audited.
This is mostly just about consistency, we've a lot of items that can be
printed by protolathes, autolathes, circuit printers and techfab etc.
However they almost all (except most stacks, mainly) have custom
materials that do not match in one way or another with the materials
used by the design, which is what this PR is for.

"But items printed from lathes etc. already get the mats used to make
them." Yes, they do, however that isn't the case for items of the same
type that were spawned in some other way (cargo shuttle, space/maints
loot, mapped, admins), this create a subtle discrepancy. It isn't a huge
deal (in spite of the size of this PR, ton of designs), but given that I
have done something similar with crafting recipes before, I may as well
give it a second arc of some sort and bring things to completion. And
fix a few possible oversights.

TL;DR consistency and stuff

## Why It's Good For The Game
Consistency, unit test checks to make it harder not to be consistent in
the future. Still has a few TODOs like:

- [x] Fixed newly printed, fully charged RCDs costing less than the RCD
cartridges required to fully charge one. EDIT: I had to tweak the newly
added RDD as well because it suffered from the same fundamental issue.
- [x] Fixed plates being made of iron and yet shattering like ceramic
ones. A new subtype for metallic ones has been made.

## Changelog

🆑
refactor: Refactored a few things with techweb designs (the ones for
autolathes, protolathes, circuit printers, mechfabs etc.) to make sure
that the materials of items that can be made from these designs more
closely match the materials used to make them.
fix: Lizard fries no longer need a plate to be made, like all other
treats that used to require plates in a distant past.
balance: Tweaked the materials cost of RCD, RDD and RCD cartridges.
image: Oven trays now have a more metallic hue.
balance: Plates printed printed from lathes won't shatter like ceramic
ones, in virtue of them being made out of iron instead.
/🆑
2026-07-06 00:13:02 -07:00

87 lines
2.7 KiB
Plaintext

/**
* ## VIM!!!!!!!
*
* It's a teenie miniature mecha... for critters!
* For the critters that cannot be understood, there is a sound creator in the mecha. It also has headlights.
*/
/obj/vehicle/sealed/mecha/vim
name = "\improper Vim"
desc = "A miniature exosuit from Nanotrasen, developed to let the irreplaceable station pets live a little longer."
icon_state = "vim"
base_icon_state = "vim"
max_integrity = 50
armor_type = /datum/armor/mecha_vim
enter_delay = 2 SECONDS
movedelay = 0.6
light_system = OVERLAY_LIGHT_DIRECTIONAL
light_range = 4
light_power = 1.5
light_on = FALSE
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 10.55, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.7)
stepsound = 'sound/effects/servostep.ogg'
pivot_step = TRUE
step_energy_drain = 4
mecha_flags = CAN_STRAFE | HAS_LIGHTS | IS_ENCLOSED
mech_type = EXOSUIT_MODULE_VIM
interaction_flags_mouse_drop = NONE
move_force = MOVE_FORCE_EXTREMELY_WEAK
move_resist = MOVE_FORCE_VERY_WEAK
density = FALSE
pass_flags = PASSVEHICLE | PASSMOB | PASSTABLE
pass_flags_self = PASSVEHICLE | PASSMOB | PASSTABLE
inertia_force_weight = 0.5 // lighter than other mechs and people
accesses = list(ACCESS_MECH_ENGINE, ACCESS_MECH_SCIENCE, ACCESS_MECH_MINING)
ui_theme = PDA_THEME_CAT // since the mech is for pets ~NYAAAA~
equip_by_category = list(
MECHA_L_ARM = null, // armless mech
MECHA_R_ARM = null,
MECHA_UTILITY = list(),
MECHA_POWER = list(),
MECHA_ARMOR = list(),
)
max_equip_by_category = list(
MECHA_L_ARM = 0, // armless mech
MECHA_R_ARM = 0,
MECHA_UTILITY = 3,
MECHA_POWER = 1,
MECHA_ARMOR = 1,
)
///Maximum size of a mob trying to enter the mech
var/maximum_mob_size = MOB_SIZE_SMALL
COOLDOWN_DECLARE(sound_cooldown)
/datum/armor/mecha_vim
melee = 70
bullet = 40
laser = 40
bomb = 30
fire = 80
acid = 80
/obj/vehicle/sealed/mecha/vim/mob_try_enter(mob/entering)
if(issilicon(entering))
entering.balloon_alert(entering, "can't fit inside!")
return FALSE
var/mob/living/animal_or_basic = entering
if(animal_or_basic.mob_size > maximum_mob_size)
entering.balloon_alert(entering, "can't fit inside!")
return FALSE
mob_enter(entering)
moved_inside(entering)
/obj/vehicle/sealed/mecha/vim/generate_actions()
. = ..()
initialize_controller_action_type(/datum/action/vehicle/sealed/noise/chime, VEHICLE_CONTROL_DRIVE)
initialize_controller_action_type(/datum/action/vehicle/sealed/noise/buzz, VEHICLE_CONTROL_DRIVE)
/obj/vehicle/sealed/mecha/vim/toggle_lights(forced_state = null, mob/user)
. = ..()
update_appearance()
/obj/vehicle/sealed/mecha/vim/update_overlays()
. = ..()
if(mecha_flags & LIGHTS_ON)
. += mutable_appearance(icon, "vim_headlights")