mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-15 01:54:52 +01:00
365648698f
* Prevents Mindswapping on Bitrunners (#79323) ## About The Pull Request Fixes #79310 Adds a new trait to prevent mindswaps (which is just useful for any future cases when we don't wanna rely on the blacklist typecache) while also accounting for bitrunners (who you can't mindswap because their mind is elsewhere) and their avatars (because that's not a real mind now is it). this does mean that bitrunners while bitrunning are immune to all mindswaps but i don't have a good answer on how to fix it. i don't even much like the idea of VR but I think that having these traits are useful enough for future utilization. ## Why It's Good For The Game prevent big breakage. ## Changelog 🆑 fix: Bitrunners can no longer get mass-mindswapped out of their avatar when the wizard does the event. Something about machinery and magic not going well together. /🆑 * Prevents Mindswapping on Bitrunners --------- Co-authored-by: san7890 <the@san7890.com>
113 lines
3.3 KiB
Plaintext
113 lines
3.3 KiB
Plaintext
/datum/round_event/wizard/shuffle/start()
|
|
|
|
|
|
/datum/round_event_control/wizard/shuffleloc //Somewhere an AI is crying
|
|
name = "Change Places!"
|
|
weight = 2
|
|
typepath = /datum/round_event/wizard/shuffleloc
|
|
max_occurrences = 5
|
|
earliest_start = 0 MINUTES
|
|
description = "Shuffles everyone around on the station."
|
|
min_wizard_trigger_potency = 0
|
|
max_wizard_trigger_potency = 7
|
|
|
|
/datum/round_event/wizard/shuffleloc/start()
|
|
var/list/moblocs = list()
|
|
var/list/mobs = list()
|
|
|
|
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
|
|
if(!is_station_level(H.z))
|
|
continue //lets not try to strand people in space or stuck in the wizards den
|
|
moblocs += H.loc
|
|
mobs += H
|
|
|
|
if(!mobs)
|
|
return
|
|
|
|
shuffle_inplace(moblocs)
|
|
shuffle_inplace(mobs)
|
|
|
|
for(var/mob/living/carbon/human/victim in mobs)
|
|
if(!moblocs)
|
|
break //locs aren't always unique, so this may come into play
|
|
do_teleport(victim, moblocs[moblocs.len], channel = TELEPORT_CHANNEL_MAGIC)
|
|
moblocs.len -= 1
|
|
|
|
for(var/mob/living/carbon/human/victim in GLOB.alive_mob_list)
|
|
var/datum/effect_system/fluid_spread/smoke/smoke = new
|
|
smoke.set_up(0, holder = victim, location = victim.loc)
|
|
smoke.start()
|
|
|
|
//---//
|
|
|
|
/datum/round_event_control/wizard/shufflenames //Face/off joke
|
|
name = "Change Faces!"
|
|
weight = 0 //SKYRAT EDIT CHANGE - WIZARD CHANGE - ORIGINAL weight = 4
|
|
typepath = /datum/round_event/wizard/shufflenames
|
|
max_occurrences = 5
|
|
earliest_start = 0 MINUTES
|
|
description = "Shuffles the names of everyone around the station."
|
|
|
|
/datum/round_event/wizard/shufflenames/start()
|
|
var/list/mobnames = list()
|
|
var/list/mobs = list()
|
|
|
|
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
|
|
mobnames += H.real_name
|
|
mobs += H
|
|
|
|
if(!mobs)
|
|
return
|
|
|
|
shuffle_inplace(mobnames)
|
|
shuffle_inplace(mobs)
|
|
|
|
for(var/mob/living/carbon/human/victim in mobs)
|
|
if(!mobnames)
|
|
break
|
|
victim.real_name = mobnames[mobnames.len]
|
|
mobnames.len -= 1
|
|
|
|
for(var/mob/living/carbon/human/victim in GLOB.alive_mob_list)
|
|
var/datum/effect_system/fluid_spread/smoke/smoke = new
|
|
smoke.set_up(0, holder = victim, location = victim.loc)
|
|
smoke.start()
|
|
|
|
//---//
|
|
|
|
/datum/round_event_control/wizard/shuffleminds //Basically Mass Ranged Mindswap
|
|
name = "Change Minds!"
|
|
weight = 0 //SKYRAT EDIT CHANGE - WIZARD CHANGE - ORIGINAL weight = 1
|
|
typepath = /datum/round_event/wizard/shuffleminds
|
|
max_occurrences = 3
|
|
earliest_start = 0 MINUTES
|
|
description = "Shuffles the minds of everyone around the station, except for the wizard."
|
|
|
|
/datum/round_event/wizard/shuffleminds/start()
|
|
var/list/mobs_to_swap = list()
|
|
|
|
for(var/mob/living/carbon/human/alive_human in GLOB.alive_mob_list)
|
|
if(alive_human.stat != CONSCIOUS || isnull(alive_human.mind) || IS_WIZARD(alive_human) || HAS_TRAIT(alive_human, TRAIT_NO_MINDSWAP))
|
|
continue //the wizard(s) are spared on this one
|
|
mobs_to_swap += alive_human
|
|
|
|
if(!length(mobs_to_swap))
|
|
return
|
|
|
|
mobs_to_swap = shuffle(mobs_to_swap)
|
|
|
|
var/datum/action/cooldown/spell/pointed/mind_transfer/swapper = new()
|
|
|
|
while(mobs_to_swap.len > 1)
|
|
var/mob/living/swap_to = pick_n_take(mobs_to_swap)
|
|
var/mob/living/swap_from = pick_n_take(mobs_to_swap)
|
|
|
|
swapper.swap_minds(swap_to, swap_from)
|
|
|
|
qdel(swapper)
|
|
|
|
for(var/mob/living/carbon/human/alive_human in GLOB.alive_mob_list)
|
|
var/datum/effect_system/fluid_spread/smoke/smoke = new()
|
|
smoke.set_up(0, holder = alive_human, location = alive_human.loc)
|
|
smoke.start()
|