Skip to content

Commit

Permalink
Stops welding wood containers. (#3816)
Browse files Browse the repository at this point in the history
# About the pull request
It doesn't make sense you can weld wood coffins and the like closed.
<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game
LOGIC
# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
fix: You can no longer weld non metal containers closed.
/:cl:
  • Loading branch information
realforest2001 committed Jul 14, 2023
1 parent 3e79bbb commit 6ec37a0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions code/game/objects/structures/crates_lockers/closets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -245,19 +245,22 @@
else if(istype(W, /obj/item/packageWrap) || istype(W, /obj/item/explosive/plastic))
return
else if(iswelder(W))
if(material != MATERIAL_METAL && material != MATERIAL_PLASTEEL)
to_chat(user, SPAN_WARNING("You cannot weld [material]!"))
return FALSE//Can't weld wood/plastic.
if(!HAS_TRAIT(W, TRAIT_TOOL_BLOWTORCH))
to_chat(user, SPAN_WARNING("You need a stronger blowtorch!"))
return
return FALSE
var/obj/item/tool/weldingtool/WT = W
if(!WT.isOn())
to_chat(user, SPAN_WARNING("\The [WT] needs to be on!"))
return
return FALSE
if(!WT.remove_fuel(0, user))
to_chat(user, SPAN_NOTICE("You need more welding fuel to complete this task."))
return
return FALSE
playsound(src, 'sound/items/Welder.ogg', 25, 1)
if(!do_after(user, 10 * user.get_skill_duration_multiplier(SKILL_CONSTRUCTION), INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD))
return
return FALSE
welded = !welded
update_icon()
for(var/mob/M as anything in viewers(src))
Expand All @@ -266,9 +269,9 @@
if(isxeno(user))
var/mob/living/carbon/xenomorph/opener = user
src.attack_alien(opener)
return
return FALSE
src.attack_hand(user)
return
return TRUE

/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/user)
if(!opened)
Expand Down

0 comments on commit 6ec37a0

Please sign in to comment.