From dbfefaa70f05fdcd3d94d0f47a947c5306aabd14 Mon Sep 17 00:00:00 2001 From: Lady Fowl <43487478+LadyFowls@users.noreply.github.com> Date: Tue, 30 Jul 2019 14:09:15 -0700 Subject: [PATCH] Adjusts welder bomb timers (#6630) Makes it much harder to welder bomb maliciously, gives people a prompt confirming they understand what they are doing, ensuring that it keeps those who are doing so maliciously from those on accident --- .../objects/effects/decals/Cleanable/fuel.dm | 3 +- code/game/objects/items/weapons/tools.dm | 36 +++++++++------- html/changelogs/weldertime.yml | 41 +++++++++++++++++++ 3 files changed, 63 insertions(+), 17 deletions(-) create mode 100644 html/changelogs/weldertime.yml diff --git a/code/game/objects/effects/decals/Cleanable/fuel.dm b/code/game/objects/effects/decals/Cleanable/fuel.dm index 9c87636b336..9b4900c1ff6 100644 --- a/code/game/objects/effects/decals/Cleanable/fuel.dm +++ b/code/game/objects/effects/decals/Cleanable/fuel.dm @@ -9,8 +9,7 @@ /obj/effect/decal/cleanable/liquid_fuel/Initialize(mapload, amt = 1, nologs = 0) . = ..() if(!nologs && !mapload) - message_admins("Liquid fuel has spilled in [loc.loc.name] ([loc.x],[loc.y],[loc.z]) (JMP)") - log_game("Liquid fuel has spilled in [loc.loc.name] ([loc.x],[loc.y],[loc.z])") + log_and_message_admins("spilled liquid fuel", user = usr, location = get_turf(src)) src.amount = amt var/has_spread = 0 diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 73038c99cc8..4fcb9eab1ab 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -346,24 +346,30 @@ if(tank.armed) to_chat(user, "You are already heating the [O]") return - tank.armed = 1 user.visible_message("[user] begins heating the [O].", "You start to heat the [O].") - message_admins("[key_name_admin(user)] is attempting a welder bomb at ([loc.x],[loc.y],[loc.z]) - JMP") - if(do_after(user,100)) - if(tank.defuse) - user.visible_message("[user] melts some of the framework on the [O].", "You melt some of the framework.") - tank.defuse = 0 + switch(alert("Are you sure you want to do this? It is quite dangerous and could get you in trouble.", "Heat up fuel tank", "No", "Yes")) + if("Yes") + log_and_message_admins("is attempting to welderbomb", user) + to_chat(user, span("alert", "Heating the fueltank...")) + tank.armed = 1 + if(do_after(user, 100)) + if(tank.defuse) + user.visible_message("[user] melts some of the framework on the [O].", "You melt some of the framework.") + tank.defuse = 0 + tank.armed = 0 + return + log_and_message_admins("triggered a fuel tank explosion", user) + to_chat(user, span("alert", "That was stupid of you.")) + tank.ex_act(3.0) + return + else + tank.armed = 0 + to_chat(user, "You thought better of yourself.") + return + if("No") tank.armed = 0 + to_chat(user, "You thought better of yourself.") return - message_admins("[key_name_admin(user)] triggered a fueltank explosion.") - log_game("[key_name(user)] triggered a fueltank explosion with a welding tool.",ckey=key_name(user)) - to_chat(user, span("alert", "That was stupid of you.")) - tank.ex_act(3.0) - return - else - tank.armed = 0 - to_chat(user, "You thought better of yourself.") - return return if (src.welding) remove_fuel(1) diff --git a/html/changelogs/weldertime.yml b/html/changelogs/weldertime.yml new file mode 100644 index 00000000000..e6bc7e2ff83 --- /dev/null +++ b/html/changelogs/weldertime.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Lady Fowl + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - tweak: "Added a prompt to welder bombing, to prevent accidental bombs."