Firelock Unweld Grammar (#17913)

* unweld

* suggestion

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

* suggestion 2

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
This commit is contained in:
Kugamo
2022-06-06 21:49:35 +01:00
committed by GitHub
co-authored by AffectedArc07
parent add4127262
commit f33d1da673
2 changed files with 10 additions and 2 deletions
+2
View File
@@ -34,6 +34,8 @@
#define WELDER_FLOOR_SLICE_SUCCESS_MESSAGE to_chat(user, "<span class='notice'>You slice [src] clear of [get_turf(src)]!</span>")
#define WELDER_ATTEMPT_FLOOR_WELD_MESSAGE user.visible_message("<span class='notice'>[user] begins welding [src] to [get_turf(src)]...</span>", "<span class='notice'>You begin welding [src] to [get_turf(src)]...</span>", "<span class='warning'>You hear welding.</span>")
#define WELDER_FLOOR_WELD_SUCCESS_MESSAGE to_chat(user, "<span class='notice'>You weld [src] to [get_turf(src)]!</span>")
#define WELDER_ATTEMPT_UNWELD_MESSAGE user.visible_message("<span class='notice'>[user] begins cutting through the weld on [src]...</span>", "<span class='notice'>You begin cutting through the weld on [src]...</span>", "<span class='warning'>You hear welding.</span>")
#define WELDER_UNWELD_SUCCESS_MESSAGE to_chat(user, "<span class='notice'>You finish unwelding [src]!</span>")
//Wrench messages
#define WRENCH_ANCHOR_MESSAGE user.visible_message("<span class='notice'>[user] tightens the bolts on [src]!</span>", "<span class='notice'>You tighten the bolts on [src]!</span>", "<span class='warning'>You hear ratcheting.</span>")
+8 -2
View File
@@ -154,12 +154,18 @@
. = TRUE
if(!I.tool_use_check(user, 0))
return
WELDER_ATTEMPT_WELD_MESSAGE
if(welded)
WELDER_ATTEMPT_UNWELD_MESSAGE
else
WELDER_ATTEMPT_WELD_MESSAGE
if(!I.use_tool(src, user, 40, volume = I.tool_volume))
return
if(!density) //In case someone opens it while it's getting welded
return
WELDER_WELD_SUCCESS_MESSAGE
if(welded)
WELDER_UNWELD_SUCCESS_MESSAGE
else
WELDER_WELD_SUCCESS_MESSAGE
welded = !welded
update_icon()