mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-27 17:41:50 +00:00
## About The Pull Request Adds a new Retcon smite, it makes the person fade out into nothingness with a configurable timer, deletes their records and reopens their job slot, as if they were never there at all. I was also annoyed that to play around with temporary_atom I had to slowy add a component, and it doesn't really have much of a reason to BE a component, so I refactored it into an atom level proc called fade_into_nothing ## Why It's Good For The Game The smite is useful for when you wanna get rid of someone who had to leave roundstart and whatnot, on top of just being funny. the refactor is also good because i can now put that proc on build mode and go to town. ## Changelog 🆑 add: Added new mechanics or gameplay changes add: Added more things del: Removed old things qol: made something easier to use balance: rebalanced something fix: fixed a few things sound: added/modified/removed audio or sound effects image: added/modified/removed some icons or images map: added/modified/removed map content spellcheck: fixed a few typos code: changed some code refactor: refactored some code config: changed some config setting admin: messed with admin stuff server: something server ops should know /🆑 --------- Co-authored-by: Jacquerel <hnevard@gmail.com>
40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
/datum/smite/retcon
|
|
name = "Retcon"
|
|
/// how long until the thing attacked by this smite gets deleted
|
|
var/timer
|
|
/// the time it takes to actually do the fade out animation, the victim will always have some time still fully visible
|
|
var/fade_out_timer
|
|
|
|
/datum/smite/retcon/configure(client/user)
|
|
timer = tgui_input_number(user, "How long should it take before the target disappears, in seconds?", "Retcon", 5)
|
|
|
|
if (isnull(timer))
|
|
return FALSE
|
|
|
|
fade_out_timer = timer*3*0.2
|
|
|
|
/datum/smite/retcon/effect(client/user, mob/living/target)
|
|
. = ..()
|
|
target.fade_into_nothing(timer SECONDS,fade_out_timer SECONDS)
|
|
if(ishuman(target))
|
|
delete_record(target)
|
|
delete_bank_account(target)
|
|
reopen_job_slot(target)
|
|
|
|
/datum/smite/retcon/proc/delete_record(mob/living/target)
|
|
var/name = target.real_name
|
|
GLOB.manifest.remove(name)
|
|
|
|
/datum/smite/retcon/proc/delete_bank_account(mob/living/target)
|
|
var/name = target.real_name
|
|
var/account_list = flatten_list(SSeconomy.bank_accounts_by_id)
|
|
for(var/datum/bank_account/account in account_list)
|
|
if(account.account_holder == name)
|
|
qdel(account)
|
|
return
|
|
|
|
/datum/smite/retcon/proc/reopen_job_slot(mob/living/target)
|
|
var/datum/job/target_job = target.mind?.assigned_role
|
|
if(target_job)
|
|
target_job.total_positions += 1
|