From d74d13c382f0370b2da02e0e0d5c6f75c817960a Mon Sep 17 00:00:00 2001 From: SteelSlayer Date: Sat, 21 Dec 2019 15:24:42 -0600 Subject: [PATCH 1/2] Adds a confirmation message to guardian creation items; Allows users to cancel using them period --- code/game/gamemodes/miniantags/guardian/guardian.dm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm index 17d7187f439..4f25f101152 100644 --- a/code/game/gamemodes/miniantags/guardian/guardian.dm +++ b/code/game/gamemodes/miniantags/guardian/guardian.dm @@ -271,6 +271,7 @@ var/used = FALSE var/theme = "magic" var/mob_name = "Guardian Spirit" + var/confirmation_message = "The cards are still unused. Do you wish to use them?" var/use_message = "You shuffle the deck..." var/used_message = "All the cards seem to be blank now." var/failure_message = "..And draw a card! It's...blank? Maybe you should try again later." @@ -295,8 +296,13 @@ if(used == TRUE) to_chat(user, "[used_message]") return - used = TRUE - to_chat(user, "[use_message]") + var/choice = alert(user, "[confirmation_message]",, "Yes", "No") + if(choice == "Yes") + used = TRUE + to_chat(user, "[use_message]") + else if(choice == "No") + to_chat(user, "You decide against using the [name].") + return var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as the [mob_name] of [user.real_name]?", ROLE_GUARDIAN, 0, 100) var/mob/dead/observer/theghost = null @@ -384,6 +390,7 @@ icon_state = "combat_hypo" theme = "tech" mob_name = "Holoparasite" + confirmation_message = "The injector still contains holoparasites. Do you wish to use it?" use_message = "You start to power on the injector..." used_message = "The injector has already been used." failure_message = "...ERROR. BOOT SEQUENCE ABORTED. AI FAILED TO INTIALIZE. PLEASE CONTACT SUPPORT OR TRY AGAIN LATER." @@ -424,6 +431,7 @@ theme = "bio" mob_name = "Scarab Swarm" use_message = "The eggs begin to twitch..." + confirmation_message = "These eggs are still dormant. Do you wish to activate them?" used_message = "The cluster already hatched." failure_message = "...but soon settles again. Guess they weren't ready to hatch after all." color_list = list("Rose" = "#F62C6B", From b317b49cb0281b1f174a37ab27d15d2e11d36642 Mon Sep 17 00:00:00 2001 From: SteelSlayer Date: Sun, 22 Dec 2019 13:58:26 -0600 Subject: [PATCH 2/2] ding dong --- code/game/gamemodes/miniantags/guardian/guardian.dm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm index 4f25f101152..387cd03aceb 100644 --- a/code/game/gamemodes/miniantags/guardian/guardian.dm +++ b/code/game/gamemodes/miniantags/guardian/guardian.dm @@ -297,12 +297,11 @@ to_chat(user, "[used_message]") return var/choice = alert(user, "[confirmation_message]",, "Yes", "No") - if(choice == "Yes") - used = TRUE - to_chat(user, "[use_message]") - else if(choice == "No") + if(choice == "No") to_chat(user, "You decide against using the [name].") return + used = TRUE + to_chat(user, "[use_message]") var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as the [mob_name] of [user.real_name]?", ROLE_GUARDIAN, 0, 100) var/mob/dead/observer/theghost = null