Files
Bubberstation/code/game/objects/items/stacks/rods.dm
iwishforducks a2d7005f44 Makes railings easier to construct, while making them easier to destroy. (#77894)
## About The Pull Request

Changes the cost of railings from 6 metal rods to 2 metal rods.
The time to construct has been reduced from 3.6 to 1 second to be
in-line with the grille.
The health of railings has been reduced from 75 to 25.
Armor of railings have been reduced as well by about 30%.

I'm not positive on whether or not it should cost 1 metal rod or 2. I
decided to play it safe and make it 2. If some maintainer is interested
in making it only cost 1 rod then I will gladly do so- but this was my
compromise.

Also changes decaseconds/ticks to seconds in the rod construction code
to make it look better.

## Why It's Good For The Game

Railings look nice and it's an absolute pain in the ass that they cost 6
metal rods.

They're also currently substantially stronger than grilles for whatever
reason. Grilles have 50 health, while railings have 75.
The armor of railings makes this health of 75 to a whopping effective
health of 150.

Railings shouldn't be stronger than full-tile grilles. They should be
fairly flimsy.
They also shouldn't take a wrench AND wirecutters to deconstruct.
Grilles only take wirecutters and we should mirror that.

## Changelog

🆑
balance: Railings now only cost 2 rods and are much easier to construct.
But they can now be destroyed much easier and cut with wirecutters
without unwrenching.
/🆑
2023-08-25 20:35:46 -04:00

135 lines
5.8 KiB
Plaintext

GLOBAL_LIST_INIT(rod_recipes, list ( \
new/datum/stack_recipe("grille", /obj/structure/grille, 2, time = 1 SECONDS, one_per_turf = TRUE, on_solid_ground = FALSE, check_density = FALSE, category = CAT_STRUCTURE), \
new/datum/stack_recipe("table frame", /obj/structure/table_frame, 2, time = 1 SECONDS, one_per_turf = TRUE, on_solid_ground = TRUE, category = CAT_FURNITURE), \
new/datum/stack_recipe("scooter frame", /obj/item/scooter_frame, 10, time = 2.5 SECONDS, one_per_turf = FALSE, category = CAT_ENTERTAINMENT), \
new/datum/stack_recipe("linen bin", /obj/structure/bedsheetbin/empty, 2, time = 0.5 SECONDS, one_per_turf = FALSE, category = CAT_CONTAINERS), \
new/datum/stack_recipe("railing", /obj/structure/railing, 2, time = 1 SECONDS, check_direction = TRUE, category = CAT_STRUCTURE), \
new/datum/stack_recipe("railing corner", /obj/structure/railing/corner, 1, time = 1 SECONDS, check_direction = TRUE, category = CAT_STRUCTURE), \
new/datum/stack_recipe("railing end", /obj/structure/railing/corner/end, 1, time = 1 SECONDS, check_direction = TRUE, category = CAT_STRUCTURE), \
new/datum/stack_recipe("railing end (flipped)", /obj/structure/railing/corner/end/flip, 1, time = 1 SECONDS, check_direction = TRUE, category = CAT_STRUCTURE), \
new/datum/stack_recipe("tank holder", /obj/structure/tank_holder, 2, time = 0.5 SECONDS, one_per_turf = TRUE, on_solid_ground = FALSE, check_density = FALSE, category = CAT_FURNITURE), \
new/datum/stack_recipe("ladder", /obj/structure/ladder/crafted, 15, time = 15 SECONDS, one_per_turf = TRUE, on_solid_ground = FALSE, check_density = FALSE, category = CAT_STRUCTURE), \
new/datum/stack_recipe("catwalk floor tile", /obj/item/stack/tile/catwalk_tile, 1, 4, 20, category = CAT_TILES), \
new/datum/stack_recipe("stairs frame", /obj/structure/stairs_frame, 10, time = 5 SECONDS, one_per_turf = TRUE, on_solid_ground = TRUE, category = CAT_STRUCTURE), \
new/datum/stack_recipe("white cane", /obj/item/cane/white, 3, time = 1 SECONDS, one_per_turf = FALSE, category = CAT_TOOLS), \
))
/obj/item/stack/rods
name = "iron rod"
desc = "Some rods. Can be used for building or something."
singular_name = "iron rod"
icon_state = "rods"
inhand_icon_state = "rods"
flags_1 = CONDUCT_1
w_class = WEIGHT_CLASS_NORMAL
force = 9
throwforce = 10
throw_speed = 3
throw_range = 7
demolition_mod = 1.25
mats_per_unit = list(/datum/material/iron=HALF_SHEET_MATERIAL_AMOUNT)
max_amount = 50
attack_verb_continuous = list("hits", "bludgeons", "whacks")
attack_verb_simple = list("hit", "bludgeon", "whack")
hitsound = 'sound/weapons/gun/general/grenade_launch.ogg'
embedding = list(embed_chance = 50)
novariants = TRUE
matter_amount = 2
cost = HALF_SHEET_MATERIAL_AMOUNT
source = /datum/robot_energy_storage/material/iron
merge_type = /obj/item/stack/rods
/obj/item/stack/rods/suicide_act(mob/living/carbon/user)
user.visible_message(span_suicide("[user] begins to stuff \the [src] down [user.p_their()] throat! It looks like [user.p_theyre()] trying to commit suicide!"))//it looks like theyre ur mum
return BRUTELOSS
/obj/item/stack/rods/Initialize(mapload, new_amount, merge = TRUE, list/mat_override=null, mat_amt=1)
. = ..()
update_appearance()
AddElement(/datum/element/openspace_item_click_handler)
var/static/list/tool_behaviors = list(
TOOL_WELDER = list(
SCREENTIP_CONTEXT_LMB = "Craft iron sheets",
SCREENTIP_CONTEXT_RMB = "Craft floor tiles",
),
)
AddElement(/datum/element/contextual_screentip_tools, tool_behaviors)
/obj/item/stack/rods/handle_openspace_click(turf/target, mob/user, proximity_flag, click_parameters)
if(proximity_flag)
target.attackby(src, user, click_parameters)
/obj/item/stack/rods/get_main_recipes()
. = ..()
. += GLOB.rod_recipes
/obj/item/stack/rods/update_icon_state()
. = ..()
var/amount = get_amount()
if(amount <= 5)
icon_state = "rods-[amount]"
else
icon_state = "rods"
/obj/item/stack/rods/welder_act(mob/living/user, obj/item/tool)
if(get_amount() < 2)
balloon_alert(user, "not enough rods!")
return
if(tool.use_tool(src, user, delay = 0, volume = 40))
var/obj/item/stack/sheet/iron/new_item = new(user.loc)
user.visible_message(
span_notice("[user.name] shaped [src] into iron sheets with [tool]."),
blind_message = span_hear("You hear welding."),
vision_distance = COMBAT_MESSAGE_RANGE,
ignored_mobs = user
)
use(2)
user.put_in_inactive_hand(new_item)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/item/stack/rods/welder_act_secondary(mob/living/user, obj/item/tool)
if(tool.use_tool(src, user, delay = 0, volume = 40))
var/obj/item/stack/tile/iron/two/new_item = new(user.loc)
user.visible_message(
span_notice("[user.name] shaped [src] into floor tiles with [tool]."),
blind_message = span_hear("You hear welding."),
vision_distance = COMBAT_MESSAGE_RANGE,
ignored_mobs = user
)
use(1)
user.put_in_inactive_hand(new_item)
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/item/stack/rods/cyborg/Initialize(mapload)
AddElement(/datum/element/update_icon_blocker)
return ..()
/obj/item/stack/rods/two
amount = 2
/obj/item/stack/rods/ten
amount = 10
/obj/item/stack/rods/twentyfive
amount = 25
/obj/item/stack/rods/fifty
amount = 50
/obj/item/stack/rods/lava
name = "heat resistant rod"
desc = "Treated, specialized iron rods. When exposed to the vaccum of space their coating breaks off, but they can hold up against the extreme heat of active lava."
singular_name = "heat resistant rod"
icon_state = "rods"
inhand_icon_state = "rods"
color = "#5286b9ff"
flags_1 = CONDUCT_1
w_class = WEIGHT_CLASS_NORMAL
mats_per_unit = list(/datum/material/iron=HALF_SHEET_MATERIAL_AMOUNT, /datum/material/plasma=SMALL_MATERIAL_AMOUNT*5, /datum/material/titanium=SHEET_MATERIAL_AMOUNT)
max_amount = 30
resistance_flags = FIRE_PROOF | LAVA_PROOF
merge_type = /obj/item/stack/rods/lava
/obj/item/stack/rods/lava/thirty
amount = 30