mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 02:01:22 +00:00
[MIRROR] Traitor Traitor Panel Fixes (#26561)
* Traitor Traitor Panel Fixes (#81521) ## About The Pull Request - Fixes #81514 - Setting TC checked for `value && isnum(value)` which was dumb when `value` could be `0`. - Removing Traitor auto-takes uplink from the mob - Removing Uplink now removes just the uplink code from memory, rather than all memories ## Changelog 🆑 Melbert admin: You can now set someone's TC to 0 admin: Removing Traitor from automatically removes the uplink from them admin: Removing Uplink from someone no longer wipes ALL of their memories /🆑 * Traitor Traitor Panel Fixes --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
@@ -113,6 +113,11 @@
|
|||||||
/datum/mind/proc/wipe_memory()
|
/datum/mind/proc/wipe_memory()
|
||||||
QDEL_LIST_ASSOC_VAL(memories)
|
QDEL_LIST_ASSOC_VAL(memories)
|
||||||
|
|
||||||
|
/// Helder to wipe the passed memory type ONLY from our list of memories
|
||||||
|
/datum/mind/proc/wipe_memory_type(memory_type)
|
||||||
|
qdel(memories[memory_type])
|
||||||
|
memories -= memory_type
|
||||||
|
|
||||||
/// Helper to create quick copies of all of our memories
|
/// Helper to create quick copies of all of our memories
|
||||||
/// Quick copies aren't full copies - just basic copies containing necessities.
|
/// Quick copies aren't full copies - just basic copies containing necessities.
|
||||||
/// They cannot be used in stories.
|
/// They cannot be used in stories.
|
||||||
|
|||||||
@@ -451,7 +451,7 @@
|
|||||||
current.dropItemToGround(W, TRUE) //The TRUE forces all items to drop, since this is an admin undress.
|
current.dropItemToGround(W, TRUE) //The TRUE forces all items to drop, since this is an admin undress.
|
||||||
if("takeuplink")
|
if("takeuplink")
|
||||||
take_uplink()
|
take_uplink()
|
||||||
wipe_memory()//Remove any memory they may have had.
|
wipe_memory_type(/datum/memory/key/traitor_uplink/implant)
|
||||||
log_admin("[key_name(usr)] removed [current]'s uplink.")
|
log_admin("[key_name(usr)] removed [current]'s uplink.")
|
||||||
if("crystals")
|
if("crystals")
|
||||||
if(check_rights(R_FUN))
|
if(check_rights(R_FUN))
|
||||||
@@ -462,8 +462,8 @@
|
|||||||
message = "Amount of telecrystals for [key]",
|
message = "Amount of telecrystals for [key]",
|
||||||
title = "Syndicate uplink",
|
title = "Syndicate uplink",
|
||||||
default = U.uplink_handler.telecrystals,
|
default = U.uplink_handler.telecrystals,
|
||||||
)
|
)
|
||||||
if(crystals && isnum(crystals))
|
if(isnum(crystals))
|
||||||
U.uplink_handler.set_telecrystals(crystals)
|
U.uplink_handler.set_telecrystals(crystals)
|
||||||
message_admins("[key_name_admin(usr)] changed [current]'s telecrystal count to [crystals].")
|
message_admins("[key_name_admin(usr)] changed [current]'s telecrystal count to [crystals].")
|
||||||
log_admin("[key_name(usr)] changed [current]'s telecrystal count to [crystals].")
|
log_admin("[key_name(usr)] changed [current]'s telecrystal count to [crystals].")
|
||||||
|
|||||||
@@ -123,6 +123,9 @@
|
|||||||
uplink_handler.has_objectives = FALSE
|
uplink_handler.has_objectives = FALSE
|
||||||
uplink_handler.can_replace_objectives = null
|
uplink_handler.can_replace_objectives = null
|
||||||
uplink_handler.replace_objectives = null
|
uplink_handler.replace_objectives = null
|
||||||
|
owner.take_uplink()
|
||||||
|
owner.special_role = null
|
||||||
|
owner.forget_crafting_recipe(/datum/crafting_recipe/syndicate_uplink_beacon)
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/datum/antagonist/traitor/proc/traitor_objective_to_html(datum/traitor_objective/to_display)
|
/datum/antagonist/traitor/proc/traitor_objective_to_html(datum/traitor_objective/to_display)
|
||||||
@@ -182,11 +185,6 @@
|
|||||||
replacement_uplink_code = "[pick(GLOB.phonetic_alphabet)] [rand(10,99)]"
|
replacement_uplink_code = "[pick(GLOB.phonetic_alphabet)] [rand(10,99)]"
|
||||||
replacement_uplink_frequency = sanitize_frequency(rand(MIN_UNUSED_FREQ, MAX_FREQ), free = FALSE, syndie = FALSE)
|
replacement_uplink_frequency = sanitize_frequency(rand(MIN_UNUSED_FREQ, MAX_FREQ), free = FALSE, syndie = FALSE)
|
||||||
|
|
||||||
/datum/antagonist/traitor/on_removal()
|
|
||||||
owner.special_role = null
|
|
||||||
owner.forget_crafting_recipe(/datum/crafting_recipe/syndicate_uplink_beacon)
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
/datum/antagonist/traitor/proc/pick_employer()
|
/datum/antagonist/traitor/proc/pick_employer()
|
||||||
if(!employer)
|
if(!employer)
|
||||||
var/faction = prob(75) ? FLAVOR_FACTION_SYNDICATE : FLAVOR_FACTION_NANOTRASEN
|
var/faction = prob(75) ? FLAVOR_FACTION_SYNDICATE : FLAVOR_FACTION_NANOTRASEN
|
||||||
|
|||||||
Reference in New Issue
Block a user