-
-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds Positronic Brains to Latejoin Menu #11162
Adds Positronic Brains to Latejoin Menu #11162
Conversation
And Dehardcode random PAI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be a subtype of borg job, so that you don't have to touch many things manually. (since it shares the same things with borg job)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to actually fulfil #9133 it should replace cyborg as a job on latejoin entirely.
Cyborg shouldn't still be allowed the single late join, or any late joins if a cyborg goes to cryo.
Having one single Cyborg slot is needed still I think. If there is no Roboticist or Scientist there will be zero Cyborgs no matter how many positronic brains you have. |
The problem with this logic is that implies that an AI that cryos should not open up a new slot, because you can just create more AIs. Because of how Cyborgs are spawned vs the positronic activation, I'd have to remove the roundstart cyborg completely, or rework large amounts of the job code to pass in additional snowflake parameters. The best I can do is set the Cyborg total positions to zero, and the spawn positions to 1, but I do not know if that will allow for a cyborg to spawn round start. I'd have to test it. I'm not going to combine the two, but I can look at making Posi a subtype of Cyborg. The reason I didn't is because the "job" posibrain is just a workaround to get the jobs subsystem to recognize that they exist. It shouldn't exist in any consoles. Handling bans and such are already handled in the positronic code, so there's no reason to tie them to the job. I think Bacon should decide if this fulfills #9133 or not. |
I would argue it's already very explicitly part of that link, but yes he may have changed his mind and should probably weigh in himself.
There should be zero positronic brains without a roboticist to print them. That's the intent behind the change - cyborgs are introduced by roboticists and should only really be a thing at either roundstart or as a part of robotics? |
Wasn't there supposed to be a round-start positronic brain? Or are cyborgs just locked behind miners now? |
Update: Setting Cyborg Total Positions to 0 allowed for 1 roundstart cyborg ( 1 spawned position). The cyborg cryoing did not open up a slot. I'm not going to push this change until a decision is reached on whether or not we want the ability to have one late join cyborg. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to make a proc /datum/job/cyborg/proc/spawn_silicon(...)
, and should call it from proc/after_spawn()
/datum/job/cyborg/after_spawn()
codes should go to the new proc spawn_silicon()
positron brain should override the proc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to use onTransitZ()
proc to make it more accurate.
So you want me to rewrite cyborg code as well? There's no proc like that, not even in the AI stuff. Both AI and Cyborg use the "equip" function to do the transformation from human to silicon. |
No, it isn't asking you to rewrite the whole code. it's just simple. You need to do a simple touch. /datum/job/cyborg/after_spawn(mob/living/silicon/robot/R, mob/M, latejoin = FALSE, client/preference_source, on_dummy = FALSE)
if(!M.client || on_dummy)
return
after_spawn_silicon(R)
/datum/job/cyborg/proc/after_spawn_silicon(mob/living/silicon/robot/R)
R.updatename(M.client)
R.gender = NEUTER
/datum/job/cyborg/posibrain/after_spawn_silicon(mob/living/silicon/robot/R)
// that you wrote in this PR job code is miserable as fuck, but you don't have to refactor that much. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got a response from bacon who is having Internet issues - yes the latejoin cyborg should be removed as per the initial posting.
They are either already part of the station or must be built by a roboticist (or someone standing in as one)
All requests updated. The reason for my second comment on the after_spawn_silicon is that I just needed clarification if you wanted me to add that proc to Cyborg.dm, which your example was helpful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
position shpuld take a length of the list, instead of doing ++ or --. like SSjob.GetJob(JOB_NAME_POSIBRAIN).total_positions = length(GLOB.posibrains)
also, Byond can't do
SSjob.GetJob(JOB_NAME_POSIBRAIN).extra_access
so you need to do
var/datum/job/job = getjob blabla
and then do job.position = 1234
i am outside. sorry for poor review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latejoin cyborgs resolved
okay, I concluded it might not be a good idea without a spawner. here's the reason. posibrains are immobile, and in a worst case, they can't help themselves. They even can be used to trap people from lobby into a kind of contained area (like maint lockers or something), making them ghosting eventually.
pros of this idea: this can be built on non-station areas. Posibrain roles will not be only restricted to station area on lobby. sorry for saying this with the long days taken 💀 |
No worries. I figured that might be the answer. I'm not going to continue on with this PR. Someone else can recoup it, but the pinned issue should be updated. |
That doesn't matter, positronics can only be crafted by robotics. A cyborg maker is far out of scope and not necessary for this idea, which is fine as is. |
I believe any new player getting in a trouble in this edge case wouldn't be anything ideal, when especially there's no one robotics for an example even if there's no malicious intent. |
I mean, I'll reopen it if this is still desired as it is in this form. I'm not going to add an entire machine though. |
The machine is an idea to prevent that entrapment case as an example, not demanding it here. We can discuss how we can make this not abusable against players from lobby. I had to elaborate my statement. |
Alright, in that case, I'll open it back up. |
Just to make sure, at this point, as far as I am aware, I am waiting for review. I've made the requested changes that I believe make sense. Is this just waiting on maints for final review and approval then? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks alright anyway
Any maint please feel free to dismiss my review and merge when addressed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I think the posibrain job should be in job datum directory... I forgot to address that.
Any maint please feel free to dismiss my review and merge when addressed
same here
I am a bit late with this, but wouldn't it just be easier to add Cyborgs to be ghost controllable? Just give the station one of these randomly spawned somewhere and found via the ghost menu and let them take it like they are taking an Exploration VIP or a Lavaland Beach Bartender, |
Thanks, Ruko! MOST comments resolved. Posibrain job now in own datum, returns null instead of false, equip failing is
|
Alright. Turns out the equip function natively returns null if no mob transformations occur (like AI/Cyborg/Posibrain), and return a mob if the creature was transformed. Thus, with the first version of code, a null spawn (like Captain) would kick the user directly back to the lobby, preventing anyone from spawning. The new and improved version returns FALSE on a failed equip (which already was a thing, see the third line of equip, if(!h) return FALSE.) This sets me up to compare the return to see if the result is not a mob AND not null, indicating failure, and the game should kick the player back to the lobby. Good for a final review and merge. |
addressed
About The Pull Request
This PR Adds On Station Positronics to the Latejoin menu. A player at the lobby will activate a random positronic from the available ones on station.
It was going to be extremely difficult to separate round-start cyborg from positronics, so I left the ability for one late join cyborg to occur and added positronics as a separate category.
Posis created on station and moved off station will automatically be removed from the list of candidates.
Posis created off station and moved on station will automatically join the list.
Posis deleted / exploded will automatically remove themselves from the list if applicable.
Closes Request #9133 .
Why It's Good For The Game
You can now latejoin as a posibrain directly.
Testing Photographs and Procedure
Starting Test Case
![Before On Station Posis](https://github.com/BeeStation/BeeStation-Hornet/assets/100493881/71451b8e-20ec-4d89-8f6a-ea0256f22b27)3 Posis Created On Station: Total Jobs: 3
Posi Created Off Station (Mining), no change in job slots.
That Posi Being Brought On Station: Total Jobs: 4
Positronic Job Now Available in Latejoin Menu
Joining From Latejoin
Joining As Ghost
All Latejoin Tests
No More Posis After Latejoining
Deleting and Exploding Posis Removes Them From the List (Started with 2 in each case)
Changelog
🆑 Programs-The-Station, Rukofamicom
add: You can now Latejoin directly as an on-station posibrain.
add: Due to Job-code, Positronic Brain is now a job.
/:cl: