Skip to content

Commit

Permalink
[MIRROR] [MISSED MIRRORS] Fixes clown ops getting their codes + Monke…
Browse files Browse the repository at this point in the history
…ys avoid obstacles (#1616)

* [MISSED MIRRORS] Fixes clown ops getting their codes + Monkeys avoid obstacles  (#531)

* Fixes clown ops getting their codes (#80992)

Nukies were using ``get_machines_by_type`` in ``assign_nuke`` to get the
nuke and set its code, which doesn't work for clown ops because they use
a subtype. This fixes it by replacing it with
``get_machines_by_type_and_subtypes`` instead.
while I was messing with clown op code I also made it a little bit less
copy paste

![image](https://github.com/tgstation/tgstation/assets/53777086/2db9e859-8d53-4704-a110-7f8a5f33ee0f)

Clown ops now get a code to their nuke rather than it staying as
'ADMIN', pretty cool!

Closes tgstation/tgstation#78306

🆑 Momo8289, Pepsilawn, Sinsinins, JohnFulpWillard
fix: Clown ops now get a code set for their nuke.
/🆑

* Monkeys avoid obstacles (#81001)

Changes the monkey's ai_movement from dumb movement to basic_avoidance,
allowing them to walk around tables and corners that they always
otherwise got stuck in.

https://github.com/tgstation/tgstation/assets/26240645/e1b46790-b950-4030-a9ae-4cf10913166c
Original monkey behavior

https://github.com/tgstation/tgstation/assets/26240645/e08a4094-8c81-41f6-8960-61338d38fff9
New monkey behavior

Monkeys can properly fight you without nearly constantly getting stuck
behind anything with collision.
:cl:
fix: Monkeys don't get stuck on obstacles as often.
/:cl:

* Fixes a changelog bluescreen

---------

Co-authored-by: John Willard <[email protected]>
Co-authored-by: Diamond_ <[email protected]>
Co-authored-by: Mal <[email protected]>

* Update 2024-01.yml

---------

Co-authored-by: GoldenAlpharex <[email protected]>
Co-authored-by: John Willard <[email protected]>
Co-authored-by: Diamond_ <[email protected]>
Co-authored-by: Mal <[email protected]>
Co-authored-by: Iajret <[email protected]>
  • Loading branch information
6 people authored Jan 20, 2024
1 parent 95c4f2e commit 0987909
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ GLOBAL_VAR_INIT(revolutionary_win, FALSE)
ruleset_lazy_templates = list(LAZY_TEMPLATE_KEY_NUKIEBASE)
var/required_role = ROLE_NUCLEAR_OPERATIVE
var/datum/team/nuclear/nuke_team
///The job type to dress up our nuclear operative as.
var/datum/job/job_type = /datum/job/nuclear_operative

/datum/dynamic_ruleset/roundstart/nuclear/ready(population, forced = FALSE)
required_candidates = get_antag_cap(population)
Expand All @@ -430,8 +432,8 @@ GLOBAL_VAR_INIT(revolutionary_win, FALSE)
break
var/mob/M = pick_n_take(candidates)
assigned += M.mind
M.mind.set_assigned_role(SSjob.GetJobType(/datum/job/nuclear_operative))
M.mind.special_role = ROLE_NUCLEAR_OPERATIVE
M.mind.set_assigned_role(SSjob.GetJobType(job_type))
M.mind.special_role = required_role
return TRUE

/datum/dynamic_ruleset/roundstart/nuclear/execute()
Expand Down Expand Up @@ -624,6 +626,7 @@ GLOBAL_VAR_INIT(revolutionary_win, FALSE)
antag_leader_datum = /datum/antagonist/nukeop/leader/clownop
requirements = list(101,101,101,101,101,101,101,101,101,101)
required_role = ROLE_CLOWN_OPERATIVE
job_type = /datum/job/clown_operative

/datum/dynamic_ruleset/roundstart/nuclear/clown_ops/pre_execute()
. = ..()
Expand All @@ -635,10 +638,6 @@ GLOBAL_VAR_INIT(revolutionary_win, FALSE)
new /obj/machinery/nuclearbomb/syndicate/bananium(nuke.loc)
qdel(nuke)

for(var/datum/mind/clowns in assigned)
clowns.set_assigned_role(SSjob.GetJobType(/datum/job/clown_operative))
clowns.special_role = ROLE_CLOWN_OPERATIVE

//////////////////////////////////////////////
// //
// METEOR //
Expand Down
1 change: 1 addition & 0 deletions code/datums/ai/monkey/monkey_controller.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ have ways of interacting with a specific mob and control it.
///OOK OOK OOK

/datum/ai_controller/monkey
ai_movement = /datum/ai_movement/basic_avoidance
movement_delay = 0.4 SECONDS
planning_subtrees = list(
/datum/ai_planning_subtree/generic_resist,
Expand Down
29 changes: 15 additions & 14 deletions code/modules/antagonists/nukeop/nukeop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,21 @@
add_team_hud(mob_override || owner.current, /datum/antagonist/nukeop)

/datum/antagonist/nukeop/proc/assign_nuke()
if(nuke_team && !nuke_team.tracked_nuke)
nuke_team.memorized_code = random_nukecode()
var/obj/machinery/nuclearbomb/syndicate/nuke = locate() in SSmachines.get_machines_by_type(/obj/machinery/nuclearbomb/syndicate)
if(nuke)
nuke_team.tracked_nuke = nuke
if(nuke.r_code == NUKE_CODE_UNSET)
nuke.r_code = nuke_team.memorized_code
else //Already set by admins/something else?
nuke_team.memorized_code = nuke.r_code
for(var/obj/machinery/nuclearbomb/beer/beernuke as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/nuclearbomb/beer))
beernuke.r_code = nuke_team.memorized_code
else
stack_trace("Syndicate nuke not found during nuke team creation.")
nuke_team.memorized_code = null
if(!nuke_team || nuke_team.tracked_nuke)
return
nuke_team.memorized_code = random_nukecode()
var/obj/machinery/nuclearbomb/syndicate/nuke = locate() in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/nuclearbomb/syndicate)
if(!nuke)
stack_trace("Syndicate nuke not found during nuke team creation.")
nuke_team.memorized_code = null
return
nuke_team.tracked_nuke = nuke
if(nuke.r_code == NUKE_CODE_UNSET)
nuke.r_code = nuke_team.memorized_code
else //Already set by admins/something else?
nuke_team.memorized_code = nuke.r_code
for(var/obj/machinery/nuclearbomb/beer/beernuke as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/nuclearbomb/beer))
beernuke.r_code = nuke_team.memorized_code

/datum/antagonist/nukeop/proc/give_alias()
if(nuke_team?.syndicate_name)
Expand Down
11 changes: 11 additions & 0 deletions html/changelogs/archive/2024-01.yml
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,17 @@
circuit in while it's unanchored.
- bugfix: Immobile shells properly propagate their on/off state after wrenching
to inner modules.
- image: Resprited several fishes, and the aquarium.
- bugfix: Bystanders will no longer think they've pulled out a victim's eyes after
seeing someone else do it.
- qol: They will also be able to tell when someone starts pulling out a victim's
eyes.
- refactor: Refactored Ore Silo Ui.
- bugfix: Autolathes no longer allow you to duplicate materials at higher levels
of stock parts
- qol: Autolathes now show name instead of typepath when selecting a custom material
- qol: Autolathe now print out items one by one instead of waiting for all of them
to print at once
- bugfix: Signers no longer use the wrong verb when speaking directly into a radio
for the first message after toggling sign language.
- refactor: Moved the updating of verb variables into a new method which is called
Expand Down

0 comments on commit 0987909

Please sign in to comment.