diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index c5680602ddc..9386f531d6e 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -1141,7 +1141,11 @@ About the new airlock wires panel:
if(istype(C, /mob/living))
..()
return
- if(!repairing && C.has_tool_quality(TOOL_WELDER) && !( src.operating > 0 ) && src.density)
+ //VOREstation Edit: Removing material cost from repair requirements
+ if(C.has_tool_quality(TOOL_WELDER) && !( src.operating > 0 ) && src.density)
+ if(health < maxhealth && user.a_intent == I_HELP)
+ ..()
+ return
var/obj/item/weapon/weldingtool/W = C.get_welder()
if(W.remove_fuel(0,user))
if(!src.welded)
@@ -1176,7 +1180,7 @@ About the new airlock wires panel:
else if(istype(C, /obj/item/weapon/pai_cable)) // -- TLE
var/obj/item/weapon/pai_cable/cable = C
cable.plugin(src, user)
- else if(!repairing && C.has_tool_quality(TOOL_CROWBAR))
+ else if(C.has_tool_quality(TOOL_CROWBAR))
if(can_remove_electronics())
playsound(src, C.usesound, 75, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.")
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index 5425b712109..3493ec1dc74 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -28,7 +28,7 @@
var/destroy_hits = 10 //How many strong hits it takes to destroy the door
var/min_force = 10 //minimum amount of force needed to damage the door with a melee weapon
var/hitsound = 'sound/weapons/smash.ogg' //sound door makes when hit with a weapon
- var/repairing = 0
+ //var/repairing = 0 //VOREstation Edit: We're not using materials anymore
var/block_air_zones = 1 //If set, air zones cannot merge across the door even when it is opened.
var/close_door_at = 0 //When to automatically close the door, if possible
@@ -226,63 +226,21 @@
if(istype(I))
if(attackby_vr(I, user)) //VOREStation begin: Fireproofing
return //VOREStation begin: Fireproofing
- if(istype(I, /obj/item/stack/material) && I.get_material_name() == src.get_material_name())
- if(stat & BROKEN)
- to_chat(user, "It looks like \the [src] is pretty busted. It's going to need more than just patching up now.")
- return
- if(health >= maxhealth)
- to_chat(user, "Nothing to fix!")
- return
- if(!density)
- to_chat(user, "\The [src] must be closed before you can repair it.")
- return
-
- //figure out how much metal we need
- var/amount_needed = (maxhealth - health) / DOOR_REPAIR_AMOUNT
- amount_needed = (round(amount_needed) == amount_needed)? amount_needed : round(amount_needed) + 1 //Why does BYOND not have a ceiling proc?
-
- var/obj/item/stack/stack = I
- var/amount_given = amount_needed - repairing
- var/mats_given = stack.get_amount()
- if(repairing && amount_given <= 0)
- to_chat(user, "You must weld or remove \the [get_material_name()] from \the [src] before you can add anything else.")
- else
- if(mats_given >= amount_given)
- if(stack.use(amount_given))
- repairing += amount_given
- else
- if(stack.use(mats_given))
- repairing += mats_given
- amount_given = mats_given
- if(amount_given)
- to_chat(user, "You fit [amount_given] [stack.singular_name]\s to damaged and broken parts on \the [src].")
-
- return
-
- if(repairing && I.has_tool_quality(TOOL_WELDER))
+ if(health < maxhealth && I.has_tool_quality(TOOL_WELDER))
if(!density)
to_chat(user, "\The [src] must be closed before you can repair it.")
return
var/obj/item/weapon/weldingtool/welder = I.get_welder()
if(welder.remove_fuel(0,user))
- to_chat(user, "You start to fix dents and weld \the [get_material_name()] into place.")
+ to_chat(user, "You start to fix dents and repair \the [src].")
playsound(src, welder.usesound, 50, 1)
- if(do_after(user, (5 * repairing) * welder.toolspeed) && welder && welder.isOn())
+ var/repairtime = maxhealth - health //Since we're not using materials anymore... We'll just calculate how much damage there is to repair.
+ if(do_after(user, repairtime * welder.toolspeed) && welder && welder.isOn())
to_chat(user, "You finish repairing the damage to \the [src].")
- health = between(health, health + repairing*DOOR_REPAIR_AMOUNT, maxhealth)
+ health = maxhealth
update_icon()
- repairing = 0
return
-
- if(repairing && I.has_tool_quality(TOOL_CROWBAR))
- var/datum/material/mat = get_material()
- var/obj/item/stack/material/repairing_sheet = mat.place_sheet(loc, repairing)
- repairing = 0
- to_chat(user, "You remove \the [repairing_sheet].")
- playsound(src, I.usesound, 100, 1)
- return
-
//psa to whoever coded this, there are plenty of objects that need to call attack() on doors without bludgeoning them.
if(src.density && istype(I, /obj/item/weapon) && user.a_intent == I_HURT && !istype(I, /obj/item/weapon/card))
var/obj/item/weapon/W = I
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index 22b6f37d60b..b2ec1627ca3 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -248,7 +248,12 @@
return //Don't open the door if we're putting tape on it to tell people 'don't open the door'.
if(operating)
return//Already doing something.
- if(C.has_tool_quality(TOOL_WELDER) && !repairing)
+ if(C.has_tool_quality(TOOL_WELDER))
+ //VOREstation Edit: Removing Material requirements on repairs
+ if(health < maxhealth)
+ ..()
+ return
+ //VOREstation Edit End
if(prying)
to_chat(user, "Someone's busy prying that [density ? "open" : "closed"]!")
var/obj/item/weapon/weldingtool/W = C.get_welder()
@@ -269,7 +274,7 @@
update_icon()
return
- if(blocked && C.has_tool_quality(TOOL_CROWBAR) && !repairing)
+ if(blocked && C.has_tool_quality(TOOL_CROWBAR))
if(!hatch_open)
to_chat(user, "You must open the maintenance hatch first!")
else
diff --git a/code/game/objects/structures/catwalk.dm b/code/game/objects/structures/catwalk.dm
index ffed750917f..026aa59c845 100644
--- a/code/game/objects/structures/catwalk.dm
+++ b/code/game/objects/structures/catwalk.dm
@@ -64,10 +64,10 @@
/obj/structure/catwalk/ex_act(severity)
switch(severity)
if(1)
- new /obj/item/stack/rods(src.loc)
+ new /obj/item/stack/rods(src.loc, 2) //VOREstation Edit: Conservation of mass
qdel(src)
if(2)
- new /obj/item/stack/rods(src.loc)
+ new /obj/item/stack/rods(src.loc, 2) //VOREstation Edit: Conservation of mass
qdel(src)
/obj/structure/catwalk/attack_robot(var/mob/user)
@@ -77,11 +77,12 @@
/obj/structure/catwalk/proc/deconstruct(mob/user)
playsound(src, 'sound/items/Welder.ogg', 100, 1)
to_chat(user, "Slicing \the [src] joints ...")
- new /obj/item/stack/rods(src.loc)
- new /obj/item/stack/rods(src.loc)
//Lattice would delete itself, but let's save ourselves a new obj
- if(isspace(loc) || isopenspace(loc))
+ if(isopenspace(loc) && user.a_intent == I_HELP)
new /obj/structure/lattice/(src.loc)
+ new /obj/item/stack/rods(src.loc, 1)
+ else
+ new /obj/item/stack/rods(src.loc, 2)
if(plated_tile)
new plated_tile(src.loc)
qdel(src)
@@ -200,4 +201,4 @@
/obj/effect/catwalk_plated/techfloor
icon_state = "catwalk_techfloor"
tile = /obj/item/stack/tile/floor/techgrey
- platecolor = "#363f43"
\ No newline at end of file
+ platecolor = "#363f43"
diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm
index d1fd8eb64df..b31b9580738 100644
--- a/code/game/objects/structures/girders.dm
+++ b/code/game/objects/structures/girders.dm
@@ -291,7 +291,7 @@
reinforcing = 0
/obj/structure/girder/proc/dismantle()
- girder_material.place_dismantled_product(get_turf(src))
+ girder_material.place_dismantled_product(get_turf(src), 2) //VOREstation Edit: Conservation of mass
qdel(src)
/obj/structure/girder/attack_hand(mob/user as mob)
diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm
index 978b99ab3df..0ad35d794bd 100644
--- a/code/game/objects/structures/lattice.dm
+++ b/code/game/objects/structures/lattice.dm
@@ -64,20 +64,12 @@
if(WT.welding == 1)
if(WT.remove_fuel(0, user))
to_chat(user, "Slicing lattice joints ...")
- new /obj/item/stack/rods(src.loc)
+ new /obj/item/stack/rods(src.loc, 1) //VOREstation Edit: Return the same amount of rods used to build this.
qdel(src)
return
- if(istype(C, /obj/item/stack/rods))
- var/obj/item/stack/rods/R = C
- if(R.get_amount() < 2)
- to_chat(user, "You need at least two rods to form a catwalk here.")
- else
- to_chat(user, "You start connecting \the [R.name] to \the [src.name] ...")
- if(do_after(user, 5 SECONDS))
- R.use(2) //2023-02-27 bugfix to prevent rods being used without catwalk creation
- src.alpha = 0 // Note: I don't know why this is set, Eris did it, just trusting for now. ~Leshana
- new /obj/structure/catwalk(src.loc)
- qdel(src)
+ if(istype(C, /obj/item/stack/rods)) //VOREstation Edit: Modernizes upgrading lattices into catwalks.
+ upgrade(C, user)
+ //VOREstation Edit End
return
return
@@ -98,3 +90,11 @@
icon_state = "lattice[dir_sum]"
return
+
+//Vorestation Edit: Moves upgrading lattices to their own proc for other stuff to call. Also makes them instant.
+/obj/structure/lattice/proc/upgrade(obj/item/stack/rods/R, mob/user)
+ to_chat(user, "You start connecting \the [R.name] to \the [src.name] ...")
+ R.use(1)
+ src.alpha = 0 // Note: I don't know why this is set, Eris did it, just trusting for now. ~Leshana
+ new /obj/structure/catwalk(src.loc)
+ qdel(src)
diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm
index faa2351b6fb..426cc23ea41 100644
--- a/code/game/turfs/simulated/floor.dm
+++ b/code/game/turfs/simulated/floor.dm
@@ -85,7 +85,7 @@
if(!is_plating()) // Flooring -> Plating
swap_decals()
if(flooring.build_type && place_product)
- new flooring.build_type(src)
+ new flooring.build_type(src, flooring.build_cost) //VOREstation Edit: conservation of mass
var/newtype = flooring.get_plating_type()
if(newtype) // Has a custom plating type to become
set_flooring(get_flooring_data(newtype))
@@ -182,4 +182,4 @@
var/mob/living/livingUser = user
if(try_graffiti(livingUser, livingUser.get_active_hand()))
return
- . = ..()
\ No newline at end of file
+ . = ..()
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index 52cedfdbfd5..96971a1bb20 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -197,9 +197,10 @@
else
material.place_dismantled_girder(src, null, girder_material)
if(!devastated)
- material.place_dismantled_product(src)
- if (!reinf_material)
+ if (reinf_material)
material.place_dismantled_product(src)
+ else
+ material.place_dismantled_product(src, 2)
for(var/obj/O in src.contents) //Eject contents!
if(istype(O,/obj/structure/sign/poster))
diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm
index 289a3b75ce9..60634ecc5dd 100644
--- a/code/game/turfs/space/space.dm
+++ b/code/game/turfs/space/space.dm
@@ -84,6 +84,7 @@
if(istype(C, /obj/item/stack/rods))
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
if(L)
+ L.upgrade(C, user)
return
var/obj/item/stack/rods/R = C
if (R.use(1))
diff --git a/code/modules/examine/descriptions/engineering.dm b/code/modules/examine/descriptions/engineering.dm
index 04c20a8bdbe..05b3bbc0a65 100644
--- a/code/modules/examine/descriptions/engineering.dm
+++ b/code/modules/examine/descriptions/engineering.dm
@@ -37,12 +37,10 @@
/obj/machinery/door/get_description_interaction()
var/list/results = list()
- if(!repairing && (health < maxhealth) && !(stat & BROKEN))
- results += "[desc_panel_image("metal sheet")]to start repairing damage (May require different material type)."
- if(repairing && density)
- results += "[desc_panel_image("welder")]to finish repairs."
- results += "[desc_panel_image("crowbar")]to undo adding sheets for repairs."
-
+ //VOREstation Edit: Removing material requirements
+ if((health < maxhealth) && !(stat & BROKEN))
+ results += "[desc_panel_image("welder")]to start repairing damage."
+ //VOREstation Edit End
return results
/obj/machinery/door/airlock/get_description_interaction()
diff --git a/code/modules/materials/materials/_materials.dm b/code/modules/materials/materials/_materials.dm
index 853c9e90ead..24a2beb9023 100644
--- a/code/modules/materials/materials/_materials.dm
+++ b/code/modules/materials/materials/_materials.dm
@@ -321,7 +321,7 @@ var/list/name_to_material
// General wall debris product placement.
// Not particularly necessary aside from snowflakey cult girders.
-/datum/material/proc/place_dismantled_product(var/turf/target, var/amount = 1)
+/datum/material/proc/place_dismantled_product(var/turf/target, var/amount = 1) //Added an amount var to this. Lets multi-dropped walls to drop all of their sheets together. Woo!
place_sheet(target, amount)
// Debris product. Used ALL THE TIME.