mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
[MIRROR] Makes applies_mats on stack crafting work if the recipe result is a turf [MDB IGNORE] (#20397)
* Makes applies_mats on stack crafting work if the recipe result is a turf (#74553) ## About The Pull Request This doesn't happen anywhere, but I found out this didn't work when working on something stupid the other day. I figured I'd fix it here while I'm at it. ## Why It's Good For The Game If someone wants to make a turf created directly by stack crafting for whatever reason, it should at least get materials applied if its wanted. ## Changelog 🆑 fix: Turfs made through stack crafting (so none currently) will have materials applied if the var is set /🆑 * Makes applies_mats on stack crafting work if the recipe result is a turf --------- Co-authored-by: Paxilmaniac <82386923+Paxilmaniac@users.noreply.github.com>
This commit is contained in:
@@ -390,8 +390,10 @@
|
||||
var/turf/covered_turf = builder.drop_location()
|
||||
if(!isturf(covered_turf))
|
||||
return
|
||||
covered_turf.PlaceOnTop(recipe.result_type, flags = CHANGETURF_INHERIT_AIR)
|
||||
var/turf/created_turf = covered_turf.PlaceOnTop(recipe.result_type, flags = CHANGETURF_INHERIT_AIR)
|
||||
builder.balloon_alert(builder, "placed [ispath(recipe.result_type, /turf/open) ? "floor" : "wall"]")
|
||||
if(recipe.applies_mats && LAZYLEN(mats_per_unit))
|
||||
created_turf.set_custom_materials(mats_per_unit, recipe.req_amount / recipe.res_amount)
|
||||
|
||||
else
|
||||
created = new recipe.result_type(builder.drop_location())
|
||||
|
||||
Reference in New Issue
Block a user