-
-
Notifications
You must be signed in to change notification settings - Fork 681
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds Positronic Brains to Latejoin Menu (#11162)
* Fixes Posi Created in null bug And Dehardcode random PAI * Adds Posibrain to Latejoin Menu * Posi Job now subtype of cyborg. Failing to Spawn as Posi Kicks player back to lobby. * No more Latejoin Cyborg * Adds after_spawn_silicon per request * Forgot Debug Code Comment * Requested Changes * Remove from Prefs * Procify * Remove Src * Missed a Job * Fix stupid problem that slipped testing * Requested Changes. DM is weird. * Update code/modules/mob/living/brain/posibrain.dm Co-authored-by: PowerfulBacon <[email protected]> * Update code/modules/mob/living/brain/posibrain.dm Co-authored-by: PowerfulBacon <[email protected]> * Update code/modules/mob/living/brain/posibrain.dm Co-authored-by: PowerfulBacon <[email protected]> * Revert "Fix stupid problem that slipped testing" This reverts commit f3f1dd1. * Revert "Fixes Posi Created in null bug" This reverts commit 39d0309. * Changes as requested by Bacon, refactored unused code. * Whoops Forgot a Path * Refactors Posibrain job back into own type and not subtype of cyborg * Update Return * Whoopsies forgot a debug comment out * Requested changes * Removed report to coders line, since posi's have known "fail" states * Fix Spawning Logic --------- Co-authored-by: PowerfulBacon <[email protected]> Co-authored-by: Rukofamicom <[email protected]>
- Loading branch information
1 parent
2595f45
commit 85e0a61
Showing
8 changed files
with
119 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
GLOBAL_LIST_EMPTY(on_station_posis) | ||
|
||
/datum/job/posibrain | ||
title = JOB_NAME_POSIBRAIN | ||
description = "Follow your AI's interpretation of your laws above all else, or your own interpretation if not connected to an AI. Choose one of many modules with different tools, ask robotics for maintenance and upgrades." | ||
department_for_prefs = DEPT_BITFLAG_SILICON | ||
department_head_for_prefs = JOB_NAME_AI | ||
auto_deadmin_role_flags = DEADMIN_POSITION_SILICON | ||
faction = "Station" | ||
total_positions = 0 | ||
spawn_positions = 0 | ||
supervisors = "your laws" //No AI yet as you are just a cube | ||
selection_color = "#ddffdd" | ||
minimal_player_age = 21 | ||
exp_requirements = 120 | ||
exp_type = EXP_TYPE_CREW | ||
random_spawns_possible = FALSE | ||
|
||
display_order = JOB_DISPLAY_ORDER_CYBORG | ||
departments = DEPT_BITFLAG_SILICON | ||
|
||
show_in_prefs = FALSE //No reason to show in preferences | ||
|
||
/datum/job/posibrain/equip(mob/living/carbon/human/H, visualsOnly = FALSE, announce = TRUE, latejoin = FALSE, datum/outfit/outfit_override = null, client/preference_source = null) | ||
|
||
var/obj/item/mmi/posibrain/P = pick(GLOB.on_station_posis) | ||
|
||
//Never show number of current posis | ||
current_positions = 0 | ||
|
||
if(!P.activate(H)) //If we failed to activate a posi, kick them back to the lobby. | ||
to_chat(H, "<span class='warning'>Failed to Late Join as a Posibrain. Look higher in chat for the reason.</span>") | ||
return FALSE //Returning False is considered a failure, rather than null or a mob, which is a success. | ||
|
||
qdel(H) | ||
return P | ||
|
||
/datum/job/posibrain/radio_help_message(mob/M) | ||
to_chat(M, "<b>Prefix your message with :b to speak with other cyborgs and AI.</b>") | ||
|
||
/datum/job/posibrain/proc/check_add_posi_slot(obj/item/mmi/posibrain/pb) | ||
var/turf/currentturf = get_turf(pb) | ||
if( is_station_level(currentturf.z) ) | ||
GLOB.on_station_posis |= pb | ||
|
||
//Update Job Quantities | ||
//We should never show a posibrain as a filled job, so just make number of current positions zero | ||
current_positions = 0 | ||
total_positions = length(GLOB.on_station_posis) | ||
|
||
/datum/job/posibrain/proc/remove_posi_slot(obj/item/mmi/posibrain/pb) | ||
GLOB.on_station_posis -= pb | ||
|
||
//Update Job Quantities | ||
//We should never show a posibrain as a filled job, so just make number of current positions zero | ||
current_positions = 0 | ||
total_positions = length(GLOB.on_station_posis) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters