Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into ntnet_fixes
  • Loading branch information
Dejaku51 committed Sep 6, 2024
2 parents 849aae6 + 23658ba commit 3d134c5
Show file tree
Hide file tree
Showing 14 changed files with 15,183 additions and 12,022 deletions.
27,001 changes: 15,008 additions & 11,993 deletions _maps/map_files/BoxStation/BoxStation.dmm

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions beestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2849,6 +2849,7 @@
#include "code\modules\jobs\job_types\medical_doctor.dm"
#include "code\modules\jobs\job_types\mime.dm"
#include "code\modules\jobs\job_types\paramedic.dm"
#include "code\modules\jobs\job_types\posibrain.dm"
#include "code\modules\jobs\job_types\quartermaster.dm"
#include "code\modules\jobs\job_types\research_director.dm"
#include "code\modules\jobs\job_types\roboticist.dm"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
// Silicon
#define JOB_NAME_AI "AI"
#define JOB_NAME_CYBORG "Cyborg"
#define JOB_NAME_POSIBRAIN "Positronic Brain"
#define JOB_NAME_PAI "Personal AI"

// ERTs
Expand Down
10 changes: 9 additions & 1 deletion code/controllers/subsystem/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ SUBSYSTEM_DEF(job)
JOB_NAME_AI,
JOB_NAME_ASSISTANT,
JOB_NAME_CYBORG,
JOB_NAME_POSIBRAIN,
JOB_NAME_CAPTAIN,
JOB_NAME_HEADOFPERSONNEL,
JOB_NAME_HEADOFSECURITY,
Expand Down Expand Up @@ -553,7 +554,14 @@ SUBSYSTEM_DEF(job)
newplayer.new_character = living_mob
else
M = living_mob

else
if(!isnull(new_mob)) //Detect fail condition on equip
//if equip() is somehow able to fail, send them back to lobby
var/mob/dead/new_player/NP = new()
NP.ckey = M.client.ckey
qdel(M)
to_chat(M, "Error equipping [rank]. Returning to lobby.</b>")
return null
SSpersistence.antag_rep_change[M.client.ckey] += job.GetAntagRep()

if(M.client.holder)
Expand Down
1 change: 1 addition & 0 deletions code/modules/jobs/job_types/_job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@
return antag_rep

//Don't override this unless the job transforms into a non-human (Silicons do this for example)
//Returning FALSE is considered a failure. A null or mob return is a successful equip.
/datum/job/proc/equip(mob/living/carbon/human/H, visualsOnly = FALSE, announce = TRUE, latejoin = FALSE, datum/outfit/outfit_override = null, client/preference_source)
if(!H)
return FALSE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/jobs/job_types/cyborg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
department_head_for_prefs = JOB_NAME_AI
auto_deadmin_role_flags = DEADMIN_POSITION_SILICON
faction = "Station"
total_positions = 1
total_positions = 0
spawn_positions = 1
supervisors = "your laws and the AI" //Nodrak
selection_color = "#ddffdd"
Expand Down
57 changes: 57 additions & 0 deletions code/modules/jobs/job_types/posibrain.dm
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)
1 change: 1 addition & 0 deletions code/modules/jobs/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ GLOBAL_LIST_INIT(security_lightup_areas, \
GLOBAL_LIST_INIT(nonhuman_positions, list(
JOB_NAME_AI,
JOB_NAME_CYBORG,
JOB_NAME_POSIBRAIN,
ROLE_PAI
))

Expand Down
56 changes: 48 additions & 8 deletions code/modules/mob/living/brain/posibrain.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,33 +85,38 @@ GLOBAL_VAR(posibrain_notify_cooldown)
//Two ways to activate a positronic brain. A clickable link in the ghost notif, or simply clicking the object itself.
/obj/item/mmi/posibrain/proc/activate(mob/user)
if(QDELETED(brainmob))
return
return FALSE
if(is_banned_from(user.ckey, ROLE_POSIBRAIN))
to_chat(user, "<span class='warning'>You are restricted from taking positronic brain spawns at this time.</span>")
return
return FALSE
if(user.client.get_exp_living(TRUE) <= MINUTES_REQUIRED_BASIC)
to_chat(user, "<span class='warning'>You aren't allowed to take positronic brain spawns yet.</span>")
return
return FALSE
if(is_occupied() || QDELETED(brainmob) || QDELETED(src) || QDELETED(user))
return
return FALSE
if(user.ckey in GLOB.posi_key_list)
to_chat(user, "<span class='warning'>Positronic brain spawns limited to 1 per round.</span>")
return
return FALSE
if(!(GLOB.ghost_role_flags & GHOSTROLE_SILICONS))
to_chat(user, "<span class='warning'>Central Command has temporarily outlawed posibrain sentience in this sector...</span>")
return
return FALSE
if(user.suiciding) //if they suicided, they're out forever.
to_chat(user, "<span class='warning'>[src] fizzles slightly. Sadly it doesn't take those who suicided!</span>")
return
return FALSE
var/posi_ask = alert("Become a [name]? (Warning, You can no longer be cloned, and all past lives will be forgotten!)","Are you positive?","Yes","No")
if(posi_ask != "Yes" || QDELETED(src))
return
return FALSE
if(brainmob.suiciding) //clear suicide status if the old occupant suicided.
brainmob.set_suicide(FALSE)
var/ckey = user.ckey
if(transfer_personality(user))
GLOB.posi_key_list += ckey

var/datum/job/posibrain/pj = SSjob.GetJob(JOB_NAME_POSIBRAIN)
pj.remove_posi_slot(src)

return TRUE

/obj/item/mmi/posibrain/transfer_identity(mob/living/carbon/C)
name = "[initial(name)] ([C])"
brainmob.name = C.real_name
Expand Down Expand Up @@ -179,6 +184,11 @@ GLOBAL_VAR(posibrain_notify_cooldown)
brainmob.real_name = brainmob.name
brainmob.forceMove(src)
brainmob.container = src

//If we are on the station level, add it to the list of available posibrains.
var/datum/job/posibrain/pj = SSjob.GetJob(JOB_NAME_POSIBRAIN)
pj.check_add_posi_slot(src)

if(autoping)
ping_ghosts("created", TRUE)

Expand All @@ -195,3 +205,33 @@ GLOBAL_VAR(posibrain_notify_cooldown)
icon_state = "[initial(icon_state)]-occupied"
else
icon_state = initial(icon_state)

//This Proc triggers when the Z level changes. If the Posi enters the station level, add it to the Job list.
//If it leaves, remove it.
/obj/item/mmi/posibrain/onTransitZ(old_z, new_z)
. = ..()

if(is_station_level(old_z) == is_station_level(new_z))
//Early Return if we aren't entering or leaving station Z level.
return

if(is_occupied())
//No need to track occupied Posis
return

var/datum/job/posibrain/pj = SSjob.GetJob(JOB_NAME_POSIBRAIN)

//Posi was on station, now is not on station
if(is_station_level(new_z))
pj.check_add_posi_slot(src)
else
pj.remove_posi_slot(src)

/obj/item/mmi/posibrain/Destroy()
if(is_occupied())
//No need to track occupied Posis
return ..()

var/datum/job/posibrain/pj = SSjob.GetJob(JOB_NAME_POSIBRAIN)
pj.remove_posi_slot(src)
return ..()
4 changes: 2 additions & 2 deletions code/modules/research/designs/autolathe_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -546,10 +546,10 @@
/datum/design/healthanalyzer
name = "Health Analyzer"
id = "healthanalyzer"
build_type = AUTOLATHE | PROTOLATHE
build_type = PROTOLATHE
materials = list(/datum/material/iron = 500, /datum/material/glass = 50)
build_path = /obj/item/healthanalyzer
category = list("hacked", "Medical", "Medical Designs")
category = list("Medical", "Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/pillbottle
Expand Down
10 changes: 10 additions & 0 deletions code/modules/research/designs/medical_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@
build_path = /obj/item/reagent_containers/glass/beaker/meta
category = list("Medical Designs")

/datum/design/blood_pack
name = "Blood Pack"
desc = "An empty pack for blood transfusions"
id = "blood_pack"
build_type = PROTOLATHE
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
materials = list(/datum/material/plastic = 500)
build_path = /obj/item/reagent_containers/blood
category = list("Medical Designs")

/datum/design/bluespacesyringe
name = "Bluespace Syringe"
desc = "An advanced syringe that can hold 60 units of chemicals"
Expand Down
1 change: 1 addition & 0 deletions code/modules/research/techweb/all_nodes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@
"pandemic",
"sleeper",
"soda_dispenser",
"blood_pack",
)
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
export_price = 5000
Expand Down
43 changes: 26 additions & 17 deletions html/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,32 @@
-->
<div class="commit sansserif">

<h2 class="date">05 September 2024</h2>
<h3 class="author">Varo, Bombyy, PigeonVerde updated:</h3>
<ul class="changes bgimages16">
<li class="tweak">BoxStation: Reworked the service area and maintenance</li>
<li class="tweak">BoxStation: Reworked the medbay area and maintenance</li>
<li class="rscadd">BoxStation: a room for the psychiatrist in medbay</li>
<li class="tweak">BoxStation: fixed chaplain backroom having a weird shape</li>
<li class="rscadd">BoxStation: Added a new area, apc and air alarm for the captain room</li>
<li class="bugfix">BoxStation: Fixes floating cameras and doble pipes and cables errors</li>
<li class="bugfix">BoxStation: Fixes stools directions and types</li>
</ul>

<h2 class="date">04 September 2024</h2>
<h3 class="author">Programs-The-Station, Rukofamicom updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">You can now Latejoin directly as an on-station posibrain.</li>
<li class="rscadd">Due to Job-code, Positronic Brain is now a job.</li>
</ul>

<h2 class="date">03 September 2024</h2>
<h3 class="author">Geatish updated:</h3>
<ul class="changes bgimages16">
<li class="tweak">Empty blood packs can now be printed from the med lathe</li>
<li class="bugfix">health analyzer is no longer printable from a hacked autolathe</li>
</ul>

<h2 class="date">02 September 2024</h2>
<h3 class="author">PowerfulBacon updated:</h3>
<ul class="changes bgimages16">
Expand Down Expand Up @@ -902,23 +928,6 @@ <h3 class="author">DarnTheMarn updated:</h3>
<li class="tweak">Brig surgical duffelbags and defibrillators now spawn in the brig physician locker instead of on the ground</li>
<li class="rscadd">Extra gauze to brig infirmary and kelotane/charcoal bottles to the brig physician locker</li>
</ul>

<h2 class="date">05 July 2024</h2>
<h3 class="author">XeonMations updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">Added the ability for admins to remove a language from a mob's blocked language's list innately.</li>
</ul>

<h2 class="date">03 July 2024</h2>
<h3 class="author">rkz, GoldenAlpharex updated:</h3>
<ul class="changes bgimages16">
<li class="refactor">refactored undertile element to support layers without casting ambient occlusion</li>
<li class="bugfix">no more audio runtime when walking on catwalk tiles</li>
</ul>
<h3 class="author">spockye updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">adds lights to the abductor pods</li>
</ul>
</div>

<b>GoonStation 13 Development Team</b>
Expand Down
17 changes: 17 additions & 0 deletions html/changelogs/.all_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44095,3 +44095,20 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
hold kitchen knives.'
- code_imp: Cleaned up some variable names and unnecessary code within the kinetic_accelerator
file.
2024-09-03:
Geatish:
- tweak: Empty blood packs can now be printed from the med lathe
- bugfix: health analyzer is no longer printable from a hacked autolathe
2024-09-04:
Programs-The-Station, Rukofamicom:
- rscadd: You can now Latejoin directly as an on-station posibrain.
- rscadd: Due to Job-code, Positronic Brain is now a job.
2024-09-05:
Varo, Bombyy, PigeonVerde:
- tweak: 'BoxStation: Reworked the service area and maintenance'
- tweak: 'BoxStation: Reworked the medbay area and maintenance'
- rscadd: 'BoxStation: a room for the psychiatrist in medbay'
- tweak: 'BoxStation: fixed chaplain backroom having a weird shape'
- rscadd: 'BoxStation: Added a new area, apc and air alarm for the captain room'
- bugfix: 'BoxStation: Fixes floating cameras and doble pipes and cables errors'
- bugfix: 'BoxStation: Fixes stools directions and types'

0 comments on commit 3d134c5

Please sign in to comment.