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

Modernises cameras: Automatic mapping of network and phasing out the auto_name subtype #11485

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

PowerfulBacon
Copy link
Member

@PowerfulBacon PowerfulBacon commented Sep 13, 2024

fixes #11484

Try breaking my cameras now mappers!

About The Pull Request

  • Removes camera auto_name. Any camera without a ctag will be given one automatically.
  • Camera networks are now determined from the area, since I keep seeing them wrongly applied.
  • Networks are now defines.
  • Bans cameras and camera consoles from setting the network variable manually.

If a camera is in space, it will use the area of the thing it is attached to.

To be compliant with this PR, run the update path script, mapping changes have been done entirely through updatepaths alone.

Regex for finding modified sec consoles:

/obj/machinery/computer/security\s*([^}]|\n|\r)*network =

Since away missions are going to be removed anyway, I'm not bothering to properly update them and just removing the consoles from them.

Why It's Good For The Game

With almost every mapping change, cameras and their networks become broken. It is pointless to sit on this system that just isn't working when we could do a much better job with them being calculated from the area instead.

Most of the manual attempts at creating camera networks haven't even been done properly.

Testing Photographs and Procedure

Testing Evidence

image

image

image

image

image

image

image

image

image

image

Syndicate shivs work and are per-shuttle rather than global. I have no idea how but they do work

Changelog

🆑
tweak: Tweaks camera naming and networks to be automatically assigned rather than mapped.
/:cl:

@PowerfulBacon PowerfulBacon changed the title Modernises cameras: Automatic mapping of network and removal of auto_name Modernises cameras: Automatic mapping of network and removal of auto_name subtype Sep 13, 2024
@github-actions github-actions bot added Mapping DMM Change Tools labels Sep 13, 2024
@PowerfulBacon PowerfulBacon changed the title Modernises cameras: Automatic mapping of network and removal of auto_name subtype Modernises cameras: Automatic mapping of network and phasing out the auto_name subtype Sep 13, 2024
@PowerfulBacon PowerfulBacon marked this pull request as ready for review September 14, 2024 08:29
@MarkusLarsson421
Copy link
Contributor

Try breaking my cameras now mappers!

Challenge accepted! jkjk

Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

code/game/machinery/camera/camera.dm Show resolved Hide resolved
// Calculate the camera tag
if (!c_tag)
c_tag = "[format_text(camera_area.name)] #[++autonames_in_areas[camera_area]]"
network = camera_area.camera_networks
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it be Copy()?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list in theory should be readonly so can be a reference, but I'll add vv edit protections to stop admins fucking things up

Comment on lines +79 to +80
if (!c_tag)
c_tag = "[format_text(camera_area.name)] #[++autonames_in_areas[camera_area]]"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!c_tag)
c_tag = "[format_text(camera_area.name)] #[++autonames_in_areas[camera_area]]"
if (!c_tag)
if (istype(camera_area, /area/space))
c_tag = "[format_text(camera_area.name)] #[++autonames_in_areas[camera_area]] (Space)"
else
c_tag = "[format_text(camera_area.name)] #[++autonames_in_areas[camera_area]]"

this will be nice if we can notice a camera is located at space or not.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code will only ever append space if the connected wall is space, in which case it will just say "space #1 (space)". What you want is a check to see if the current turf is space but the area is not, which I can add (will append external on in that case)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah you're right. some cameras that are only intended to show spaces are hard to recognise when the names are the same.

@EvilDragonfiend
Copy link
Member

I do not see any particularly wrong on the codes. prolly fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auotname cameras should handle the network automatically.
3 participants