From aa7252ffd6eadeb6b58685cb56d677b03f66d285 Mon Sep 17 00:00:00 2001 From: shellspeed1 Date: Sun, 18 Sep 2022 22:13:44 -0700 Subject: [PATCH] port of https://github.com/Skyrat-SS13/Skyrat-tg/commit/418c58a9c3c8b78c0577e150ad891aba8d7a7731 to make pad deconstructible. --- code/game/machinery/civilian_bountys.dm | 2 +- code/modules/economy/account.dm | 4 ++-- code/modules/events/pirates.dm | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/civilian_bountys.dm b/code/game/machinery/civilian_bountys.dm index f195bdea12..1173faa5d8 100644 --- a/code/game/machinery/civilian_bountys.dm +++ b/code/game/machinery/civilian_bountys.dm @@ -150,7 +150,7 @@ to_chat(usr, "You already have an incomplete civilian bounty, try again in [curr_time] minutes to replace it!") return FALSE var/datum/bounty/crumbs = random_bounty(pot_acc.account_job.bounty_types) - pot_acc.bounty_timer = world.time + COOLDOWN_START(pot_acc, bounty_timer, 5 MINUTES) pot_acc.civilian_bounty = crumbs if("eject") id_eject(usr, inserted_scan_id) diff --git a/code/modules/economy/account.dm b/code/modules/economy/account.dm index 7ebf9468ac..af3eced8db 100644 --- a/code/modules/economy/account.dm +++ b/code/modules/economy/account.dm @@ -11,7 +11,7 @@ var/being_dumped = FALSE //pink levels are rising var/withdrawDelay = 0 var/datum/bounty/civilian_bounty - var/bounty_timer = 0 + COOLDOWN_DECLARE(bounty_timer) /datum/bank_account/New(newname, job) if(add_to_accounts) @@ -141,7 +141,7 @@ */ /datum/bank_account/proc/reset_bounty() civilian_bounty = null - bounty_timer = 0 + COOLDOWN_RESET(src, bounty_timer) /datum/bank_account/department account_holder = "Guild Credit Agency" diff --git a/code/modules/events/pirates.dm b/code/modules/events/pirates.dm index bf6026300f..f68e8f8b18 100644 --- a/code/modules/events/pirates.dm +++ b/code/modules/events/pirates.dm @@ -264,6 +264,17 @@ I.buffer = src return TRUE +/obj/machinery/piratepad/screwdriver_act_secondary(mob/living/user, obj/item/screwdriver/screw) + . = ..() + if(!.) + return default_deconstruction_screwdriver(user, "lpad-idle-open", "lpad-idle-off", screw) + +/obj/machinery/piratepad/crowbar_act_secondary(mob/living/user, obj/item/tool) + . = ..() + default_deconstruction_crowbar(tool) + return TRUE + + /obj/machinery/computer/piratepad_control name = "cargo hold control terminal" var/status_report = "Ready for delivery." @@ -390,6 +401,15 @@ sending = FALSE /obj/machinery/computer/piratepad_control/proc/start_sending() + var/obj/machinery/piratepad/pad = pad_ref?.resolve() + if(!pad) + status_report = "No pad detected. Build or link a pad." + pad.audible_message(span_notice("[pad] beeps.")) + return + if(pad?.panel_open) + status_report = "Please screwdrive pad closed to send. " + pad.audible_message(span_notice("[pad] beeps.")) + return if(sending) return sending = TRUE