Files
Bubberstation/code/modules/shuttle/shuttle_events/player_controlled.dm
T
fcaa706706 [MIRROR] Destroys /obj/vehicle/sealed/mecha/working with a W80 nuclear warhead [MDB IGNORE] (#22110)
* Destroys /obj/vehicle/sealed/mecha/working with a W80 nuclear warhead (#76296)

## About The Pull Request

Title.

Also, fixes https://github.com/tgstation/tgstation/issues/75568 at the
request of @ TheVekter

## Why It's Good For The Game

This subtype only exists to append ore box behavior and is clearly a
relic of pre-2020 mechcode.
Keeping it around will only make it harder in the future to add new
mechs with ore box support.

## Changelog

🆑
fix: Clarke ore box now has a less confusing dump contents button.
/🆑

---------

Co-authored-by: san7890 <the@ san7890.com>

* Destroys /obj/vehicle/sealed/mecha/working with a W80 nuclear warhead

* updatepaths

---------

Co-authored-by: ChungusGamer666 <82850673+ChungusGamer666@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
Co-authored-by: Jolly-66 <70232195+Jolly-66@users.noreply.github.com>
2023-07-04 13:35:22 +00:00

69 lines
2.7 KiB
Plaintext

///Mobs spawned with this one are automatically player controlled, if possible
/datum/shuttle_event/simple_spawner/player_controlled
spawning_list = list(/mob/living/basic/carp)
///If we cant find a ghost, do we spawn them anyway? Otherwise they go in the garbage bin
var/spawn_anyway_if_no_player = FALSE
var/ghost_alert_string = "Would you like to be shot at the shuttle?"
var/role_type = ROLE_SENTIENCE
/datum/shuttle_event/simple_spawner/player_controlled/spawn_movable(spawn_type)
if(ispath(spawn_type, /mob/living))
INVOKE_ASYNC(src, PROC_REF(try_grant_ghost_control), spawn_type)
else
..()
/datum/shuttle_event/simple_spawner/player_controlled/proc/try_grant_ghost_control(spawn_type)
var/list/candidates = poll_ghost_candidates(ghost_alert_string + " (Warning: you will not be able to return to your body!)", role_type, FALSE, 10 SECONDS)
var/mob/dead/observer/candidate = pick(candidates)
if(candidate || spawn_anyway_if_no_player)
var/mob/living/new_mob = new spawn_type (get_turf(get_spawn_turf()))
if(candidate)
new_mob.ckey = candidate.ckey
post_spawn(new_mob)
///BACK FOR REVENGE!!!
/datum/shuttle_event/simple_spawner/player_controlled/alien_queen
name = "ALIEN QUEEN! (Kinda dangerous!)"
spawning_list = list(/mob/living/carbon/alien/adult/royal/queen = 1, /obj/vehicle/sealed/mecha/ripley = 1)
spawning_flags = SHUTTLE_EVENT_HIT_SHUTTLE
event_probability = 0.2
spawn_probability_per_process = 10
activation_fraction = 0.5
spawn_anyway_if_no_player = FALSE
ghost_alert_string = "Would you like to be an alien queen shot at the shuttle?"
remove_from_list_when_spawned = TRUE
role_type = ROLE_ALIEN
///Spawns three player controlled carp!! Deadchats final chance to wreak havoc, probably really not that dangerous if even one person has a laser gun
/datum/shuttle_event/simple_spawner/player_controlled/carp
name = "Three player controlled carp! (Little dangerous!)"
spawning_list = list(/mob/living/basic/carp = 10, /mob/living/basic/carp/mega = 2, /mob/living/basic/carp/magic = 2, /mob/living/basic/carp/magic/chaos = 1)
spawning_flags = SHUTTLE_EVENT_HIT_SHUTTLE
event_probability = 1
spawn_probability_per_process = 10
activation_fraction = 0.4
spawn_anyway_if_no_player = TRUE
ghost_alert_string = "Would you like to be a space carp to pester the emergency shuttle?"
remove_from_list_when_spawned = TRUE
role_type = ROLE_SENTIENCE
///how many carp can we spawn max?
var/max_carp_spawns = 3
/datum/shuttle_event/simple_spawner/player_controlled/carp/New(obj/docking_port/mobile/port)
. = ..()
var/list/spawning_list_copy = spawning_list.Copy()
spawning_list.Cut()
for(var/i in 1 to max_carp_spawns)
spawning_list.Add(pick_weight(spawning_list_copy))