Skip to content
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

AI Job #6626

Merged
merged 103 commits into from
Jun 29, 2021
Merged

AI Job #6626

merged 103 commits into from
Jun 29, 2021

Conversation

ThatDan123
Copy link
Contributor

@ThatDan123 ThatDan123 commented May 27, 2021

CL: [New] Added Ai Job Role and Logic
CL: [New] Added Ai Upload Console and law changing
CL: [New] Added Turrets logic and construction
CL: [New] Added InteliCard logic
CL: [New] Added Ai Core Frame construction

Fixes #6753

This Pr adds a functioning AI Job

It works differently than how AI works in classic, you are not omniscient and see everything all the time. Instead you have to move from camera to camera in order to see stuff.

-You can click on the camera images on the map, or use arrow/movement keys to move to the next nearest camera.

-You can still go to players or mobs by tracking them, that will take you to the camera they can be seen from.

-You can also save cameras for quick movement

-You can interact with doors, and other machines if you can see them, theres an interaction visual when validating an interaction showing whether you can interact with the object or not

Theres a basic door interaction screen (new doors only) but also hotkeys which are:
-Shift click => open/close door
-Ctrl Click => bolt/unbolt door (new doors only)

-Laws can now be changed, fully supports for adding new modules and changing Ai laws using Ai upload console

-Multiple Ai's should be fine too, though they are limited to the spawnpoints on the map as they are one use only, any more Ais will spawn in arrivals. Default amount of Ais is one, but admins can respawn people as Ais

-Traitor Ai is possible and can get objectives to kill players. Wont get objectives to escape or steal items as Ai's dont have hands.... (maybe in the future with borgs we'll allow stealing of items and then at the end of the round they have to be by your core on the ground to count as complete?) (Or maybe we'll just have custom objectives like hacking an amount of APC's, stealing money from Id cards, destroy machine etc....)

-Ai can call the shuttle but not recall

-Ai can be carded and moved to another empty core

-Ai cannot be built yet using a brain, that will be in another PR

Remember to squash merge this

-UI still needs some work

image

image

image

I'm sorry, Dave. I'm afraid I can't do that.

@ThatDan123 ThatDan123 removed the Status: Merge Conflicts No one likes conflicts, solve them! label Jun 15, 2021
@github-actions github-actions bot added the Status: Merge Conflicts No one likes conflicts, solve them! label Jun 19, 2021
@ThatDan123 ThatDan123 removed the Status: Merge Conflicts No one likes conflicts, solve them! label Jun 25, 2021
@github-actions github-actions bot added the Status: Merge Conflicts No one likes conflicts, solve them! label Jun 28, 2021
@ThatDan123 ThatDan123 removed the Status: Merge Conflicts No one likes conflicts, solve them! label Jun 28, 2021
@corp-0
Copy link
Member

corp-0 commented Jun 29, 2021

we will be test merging this PR. If things go terribly wrong, we have a checkpoint with 4119. Freeze is soon to be over, we're still evaluating how stability goes so other frozen prs aren't going to be merged, not just yet.

@corp-0 corp-0 merged commit 65c7036 into unitystation:develop Jun 29, 2021
@ThatDan123 ThatDan123 deleted the AiV2 branch June 29, 2021 13:30
Bod9001 added a commit that referenced this pull request Jun 29, 2021
* Body slots

* Fixing up rebase

* Part one of the Requested changes and handcuffs now work

* Fixes captain's hat

* Added more comments and stuff

* Some more comments

* Fixes tests?

* Thanks Codacy

* Fixer slot interactions and makes clothing collapsible

* Fixers compile error

* humm, This should have deleted it?

* rearranging

* name spaces

* fixed

* updated

* fixes

* fixed merge

* Squashed commit of the following:

commit dbedaad
Author: GitHub Action <action@github.com>
Date:   Tue Jun 29 10:25:32 2021 +0000

    misc: update Changelog

commit 65c7036
Author: ThatDan123 <56727168+ThatDan123@users.noreply.github.com>
Date:   Tue Jun 29 11:21:52 2021 +0100

    AI Job (#6626)

    * Basics

    * More stuff

    * display stuff

    * Fixes

    * fix interaction

    * player semi ghost clean up

    * Interaction script stuff

    * fire alarm, door switch

    * Law tab

    * State Laws

    * Camera Stuff

    * Linecast checks for netUI

    * Character customisation and camera power

    * more power stuff

    * Hook AI up to nearest APC

    * Update AiPlayer.cs

    * Hud stuff

    * Floor bolt toggle and call shuttle

    * Push fix

    * Camera Teleport

    * Teleport

    * Ai Track player and mob

    * Old doors/Windoor interaction

    * emitter

    * Camera Light decrease

    * Fix law screen issue

    * focus fix

    * Apc check for future use

    * comment out future code for AI core

    * Update UI_Ai.cs

    * Send local chat to core if near core not ai camera position

    * Test fix

    * cooldown fix

    * Stop blob and cargonia being AI

    * Law Sets

    * Camera Saving

    * Show objectives and restrict Ai traitor to obtainable objectives, sorry Ai you have no hands

    * Codacy Fixes

    * Hud fixes and interaction visualisation

    * fix admin spectator ghost

    * Law Modules and Upload console

    * Input field for module

    * Fix law length check

    * upload console construction

    * Codacy stuff, except playerscript namespace

    * Update ControlTabs.cs

    * Refactor law syncing, adds number of laws to UI

    * reset fix

    * Turret Frame Stuff

    * States and item traits

    * Turret Switch

    * Fixes

    * Fixes

    * Integrity and armor updated

    * Construction Fixes

    * Refactor power set up

    * Fixes

    * Last fixes

    * Spawn fixes

    * remove extra ;

    * Number of active cameras

    * Turret Controller NetTab

    * InteliCard part 1

    * Intelicard net tab

    * Fixes

    * more fixes

    * test fix

    * Codacy

    * Ai Core Frame construction

    * Update CircuitImprinterProducts.asset

    * Fixes

    * test fix

    * Validation line colour and some other interaction

    * Airlock Ai Ui

    * Fixes #6753

    * Clean up and camera arrow movement.

    * Fix spelling

    * Fixes

    * Admin info fix

    * obj

    * Fix Conflicts

    * Turret settings

    * Update GUI_Airlock.cs

    * Input fix

    * Door bolt sound integration

    * Ballistic Turret

    * Fix merge conflicts

    * Update UIManager.prefab

    * Spawn Sound

commit 2f9974f
Author: Gilles <43683714+corp-0@users.noreply.github.com>
Date:   Tue Jun 29 04:59:51 2021 -0400

    change version of pr2changelog

    I broke that shit on master

commit 1f5d871
Author: Aranclanos <Aranclanos@hotmail.com>
Date:   Mon Jun 28 18:34:14 2021 -0300

    Fixes self-hit when spamclicking (#6864)

    * Moves hiticons out from player prefabs into SpriteManager.
    Hit icons will now be pooled in the SpriteHandlerManager.
    Fixes the hiticons being target of interactions, which was making players hit themselves when spamclicking a target.

    * Adds the HitIcon prefab to the NetworkManager.
    Moves the HitIcon spawn away from the SpriteHandlerManager, it'll now use the Spawn and Despawn classes utilizing their client only functions.

commit 20a7d67
Author: GitHub Action <action@github.com>
Date:   Mon Jun 28 20:55:24 2021 +0000

    misc: update Changelog

commit aebf903
Author: NoooneyDude <noooneydude@gmail.com>
Date:   Tue Jun 29 08:51:29 2021 +1200

    Assorted enhancements (#6870)

commit 9eb08d8
Author: Akbadain29 <luckycannonfodder@gmail.com>
Date:   Mon Jun 28 18:45:40 2021 +1000

    Update three different documentation pages (#6862)

    * Update three different documentation pages

    * Apply suggestions from code review

    Co-authored-by: NoooneyDude <noooneydude@gmail.com>

commit 76b42e7
Author: Aranclanos <Aranclanos@hotmail.com>
Date:   Mon Jun 28 05:39:13 2021 -0300

    Hotfixes a server crash when a new player joins in an ongoing round with where coloured graffitis have been laid down. (#6868)

commit 9637176
Author: GitHub Action <action@github.com>
Date:   Mon Jun 28 08:22:13 2021 +0000

    misc: update Changelog

commit 9ee4b91
Author: PetMudstone <38266309+PetMudstone@users.noreply.github.com>
Date:   Mon Jun 28 01:18:34 2021 -0700

    Placing collision sensors and RCS on ancient station shuttle. (#6863)

commit 93bf4f8
Author: Bod9001 <Bod9001@gmail.com>
Date:   Sun Jun 27 22:09:08 2021 +0100

    Surgery fixes (#6865)

commit 85f80b6
Author: Bod9001 <Bod9001@gmail.com>
Date:   Sat Jun 26 14:28:11 2021 +0100

    Body parts now have customisations tied to the body part When set  (#6860)

    * Fixes mixer prefab and convert sprite handler  Message to use reader and writer

    * Body parts now have customisations tied to the body part When set

commit 9f98cfe
Author: Aranclanos <Aranclanos@hotmail.com>
Date:   Sat Jun 26 10:27:42 2021 -0300

    Fixes admin storage items being invisible on the UI. (#6859)

commit 8482b91
Author: Bod9001 <Bod9001@gmail.com>
Date:   Sat Jun 26 01:40:39 2021 +0100

    Fixes mixer prefab and convert sprite handler  Message to use reader and writer (#6858)

commit d0a48d3
Author: GitHub Action <action@github.com>
Date:   Fri Jun 25 20:39:06 2021 +0000

    misc: update Changelog

commit d0178fb
Author: PerfectTangent <68730437+PerfectTangent@users.noreply.github.com>
Date:   Fri Jun 25 16:35:50 2021 -0400

    Update Outpost to Doors V2 and adds security cameras, add tools and mats to Fall and Square (#6857)

    * added mats to fall and square,

    * did 1/3rd of Outpost's doors, reworked service dorms.

    * did command, medical, and west areas.

    * did more of outpost maint and halls

    * all doors switched

    * did door access and 3/4 of the cameras, added emergency storage

    * finished outpost cameras, fixed spawn point in Fall

    * fixed null values, added a handful of lights. to outpost and Fall

    * added more mats to Outpost

commit 2164e7c
Author: GitHub Action <action@github.com>
Date:   Fri Jun 25 10:26:13 2021 +0000

    misc: update Changelog

commit ffb8132
Author: PetMudstone <38266309+PetMudstone@users.noreply.github.com>
Date:   Fri Jun 25 03:22:17 2021 -0700

    Fixing sprites for cyborg and surplus prosthetic limbs. (#6855)

commit e597c42
Author: Aranclanos <Aranclanos@hotmail.com>
Date:   Fri Jun 25 07:22:00 2021 -0300

    Cleans up the duplicate calls for CanApply() and CanInteract() in Validations code as well as some clearing some code in DefaultWillInteract. (#6854)

    Now interactions will go through way less loops making it easier to debug and read.

commit 754e6a5
Author: Bod9001 <Bod9001@gmail.com>
Date:   Fri Jun 25 11:20:09 2021 +0100

    Let's hope this works (#6852)

commit 427f8dd
Author: James Simonson <jamessimo89@gmail.com>
Date:   Thu Jun 24 00:19:39 2021 +0800

    Update Mop.cs (#6848)

    Fixes issue #6828 by removing cleaning reagents when used

    Co-authored-by: James <jamessimo@outlook.com>

commit 746b911
Author: Bod9001 <Bod9001@gmail.com>
Date:   Wed Jun 23 17:19:11 2021 +0100

    fixes people spontaneously suffocating (#6849)

    * players now will no longer develop Lung and heart cancer

    * made body parts moore forgiving

    * Now properly fixed, turns out cancers hard to get rid of

    * updated SO

commit b466200
Author: James Simonson <jamessimo89@gmail.com>
Date:   Wed Jun 23 15:04:49 2021 +0800

    fix upside down shader on DX10 systems (#6847)

    * fix upside down shader on DX10 systems

    * Removed active grey camera and made shader DX agnostic

    * Apply suggestions from code review

    Co-authored-by: James <jamessimo@outlook.com>
    Co-authored-by: NoooneyDude <noooneydude@gmail.com>

commit dcbe6a2
Author: Aranclanos <Aranclanos@hotmail.com>
Date:   Tue Jun 22 20:28:05 2021 -0300

    Fixes fires getting stuck in the case of a runtime happening during a fire exposure. (#6844)

    Removes the queue and semi-lock system from TileList to apply actions, replaced it with a temp list instead.

commit e5e046e
Author: Aranclanos <Aranclanos@hotmail.com>
Date:   Tue Jun 22 20:26:42 2021 -0300

    Fixes explosions getting stuck in a loop in the case of a runtime happening when a explosion node is processing. (#6846)

commit 70883ae
Author: Bod9001 <Bod9001@gmail.com>
Date:   Tue Jun 22 21:41:15 2021 +0100

    General fixes (#6843)

    * General fixes

    * Remove unneeded check

commit 458f78c
Author: Aranclanos <Aranclanos@hotmail.com>
Date:   Tue Jun 22 16:32:29 2021 -0300

    Fixes traitors having some uplink items missing from their PDAs. (#6845)

commit 6f0b693
Author: GitHub Action <action@github.com>
Date:   Tue Jun 22 08:05:52 2021 +0000

    misc: update Changelog

commit dae0e02
Author: PetMudstone <38266309+PetMudstone@users.noreply.github.com>
Date:   Tue Jun 22 01:02:47 2021 -0700

    Adjust deconstruction for rod giving tiles. (#6842)

commit 23e5c53
Author: Pyrosshade <willofshadow@gmail.com>
Date:   Tue Jun 22 02:55:49 2021 -0400

    Hold the data structure please (#6841)

    * Enabling Physics2D for ambience colliders

    * Physics2D simulation mode changed from script to update
    * Physics2d y axis gravity changed to 0

    * Etlwwtl is fun but clearing it outside the loop is even more so

    * just adding spacing so teh file reads better

    woops

commit 11a14b2
Author: GitHub Action <action@github.com>
Date:   Mon Jun 21 21:09:45 2021 +0000

    misc: update Changelog

commit a567b4e
Author: James Simonson <jamessimo89@gmail.com>
Date:   Tue Jun 22 05:06:17 2021 +0800

    Better Drunk Shader and Camera Controls + New Desaturation Shader  (#6832)

    * Drunken Shader fixes & upgrades + Greyscale shader work

    To support the new alcohol reagent work I have boosted the drunken camera script to now manage many different stages of being drunk as
     well as exposing many shader variables

    Added a greyscale shader and camera manager to support loosing vision when you loose blood

    Changed graphics APIs for Mac to target OpenGL first to fix issues with rendering shaders

    Added checks for DirectX to fix shader issues on Linux

    #4542
    #4537
    #4717

    * Update OnlineScene.unity

    Fix clone spam

    * Add a TODO over shader conflicts

    No idea why but drunk shader and greyscale dont get on, it inverts the view

    * Update GreyscaleCamera.cs

    Make Codacy a happy boi

    * Update Camera.prefab

    forgot to add this like a dingus

    Co-authored-by: James <jamessimo@outlook.com>

commit bbbd2a4
Author: Aranclanos <Aranclanos@hotmail.com>
Date:   Mon Jun 21 18:03:38 2021 -0300

    Fixes client overlays not being removed (#6837)

    * Removes the unused 'RemoveAll' argument and variables in tile update changes code.
    Removes RemoveOverlaysOfName() and GetOverlayPosByName(), all overlay removals will now use OverlayType instead.
    All remove overlay server functions will now be thread safe.
    Separates the update tile message and remove tile message in SpawnSafeThread into two.
    Fixes clients not removing certain specific overlays.

    * Moves the OverlayType enum  to the TileManagement namespace.

commit 1fe5fca
Author: PerfectTangent <68730437+PerfectTangent@users.noreply.github.com>
Date:   Mon Jun 21 17:01:00 2021 -0400

    random item pool improvements (#6838)

commit 4c428fd
Author: Bod9001 <Bod9001@gmail.com>
Date:   Mon Jun 21 22:00:41 2021 +0100

    forgot to commit a change (#6839)

    * fixes a few staging Errors

    * Gas should be equally distributed now

    * Request a change

    * Editing the loop while within the loop is fun

    * Last-minute fix

commit e2ea694
Author: Bod9001 <Bod9001@gmail.com>
Date:   Mon Jun 21 16:54:32 2021 +0100

    fixes a few staging Errors (#6833)

    * fixes a few staging Errors

    * Gas should be equally distributed now

    * Request a change

    * Editing the loop while within the loop is fun

commit bd1320a
Author: ThatDan123 <56727168+ThatDan123@users.noreply.github.com>
Date:   Sun Jun 20 12:57:10 2021 +0100

    Readd custom log json to gitignore

* Few more fixes

* So many conflicts So many times

* Fixes Players Re-spawning With old inventory
@waffielz
Copy link

hal 9000 gaming

@PerfectTangent PerfectTangent removed Status: Awaiting Review for PRs that are awaiting reviews/rereviews Status: Awaiting Testing for PRs that that should be tested before merging Status: On Hold for PRs or issues that are on hold (during a code freeze, for example) labels Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blob stripping
5 participants