Closed D3athrow-Issues closed 5 years ago
Man, now I kind of want to code alchemy. But the sciencey kind, not the battle-magic kind.
Aren't slimes alchemy mobs?
Easy fix
Well that name sure is a mouthful.
>easy fix
Funny. I added w_type = RECYK_WOOD
to coffin.dm . Didn't work. Decided to dig deeper. Realized there's a mountain of shitcode behind it.
Why the fuck is deconstructing objects handled in several different ways
Jesus christ this codebase has skeletons in it.
There should be a line that says new sheet/metal(loc). Replace it with wood and that's it. I said SHOULD
Yeah that's the rub. There should.
It inherits from this in [closets.dm]
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(src.opened)
if(istype(W, /obj/item/weapon/grab))
if(src.large)
var/obj/item/weapon/grab/G = W
src.MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
else
to_chat(user, "<span class='notice'>The locker is too small to stuff [W] into!</span>")
if(istype(W,/obj/item/tk_grab))
return 0
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.remove_fuel(0,user))
to_chat(user, "<span class='notice'>You need more welding fuel to complete this task.</span>")
return
materials.makeSheets(src)
for(var/mob/M in viewers(src))
M.show_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WT].</span>", 1, "You hear welding.", 2)
qdel(src)
return
materials.makeSheets(src)
Which is only used here
/datum/materials/proc/makeSheets(var/atom/loc)
for (var/id in storage)
var/amount = getAmount(id)
if(amount)
var/datum/material/mat = getMaterial(id)
getFromPool(mat.sheettype, loc, Floor(amount / mat.cc_per_sheet))
Is the proc makeSheets used anywhere else? If that's the case you could make it so it takes another argument (type of sheet). If not, completely remove that shit. There are a lot of ways to address this, I'm not sure what other deconstructions do
Honestly this is the kinda thing that should be refactored to always use the same system. There's no need to have several different ways to skin a cat.
completely remove a utility function from the materials system to fix a coffin bug
For what purpose
The real solution is to make it so that coffins have the wood material instead of the iron one.
If only someone would have wrote wood materials when they made material datums.
Haha woops
Adding new materials isn't too difficult, and the system is deliberately extensible. Look at what's been done for cloth and leather in that PR, and it should fall out.
Will do.
FYI the metal crates have the same issue. Costs 10 plasteel to make and becomes 2 metal sheets when deconstructed.
yea thats why I started getting uppity about the easy fix issue.
there is a vast sea of shit right below the surface of this issue. I regret looking under the waves of poo code and seeing the fathomless depths of shitcode. I stared into the shitbysss and it stared back into me.
okay its not that bad but it is a few hours job and a lot of testing.
there is a vast sea of shit right below the surface of this issue. I regret looking under the waves of poo code and seeing the fathomless depths of shitcode. I stared into the shitbysss and it stared back into me.
Welcome to SS13, enjoy your stay!
"I will totally fix this for you Probe" says person soon to let Probe down.
(WEB REPORT BY: reind REMOTE: 172.93.109.202:7777)