Skip to content

Conversation

ilker2445
Copy link

This PR adds the lua/autorun/spectate_mode.lua script, providing a basic spectate/freecam mode.

Originally both this file and another feature were included in a single pull request (#18). To simplify review, I'm splitting them up. This pull request only contains the spectate mode script.

Please let me know if any changes are needed.

@Earu
Copy link
Contributor

Earu commented Aug 9, 2025

I disagree with @Cynosphere opinion on making things autorun, this crowds in the autorun path and makes it more likely that multiple things might try to create a file of the same name. For future PRs and whatnot consider putting it in a dedicated folder of sorts.

Might need @Python1320 to make a loader before the situation gets more out of control.

@Python1320
Copy link
Member

It's relatively trivial to script noticing file name conflicts so it's fine but yeah somewhat more unique name would be better to avoid conflicts. Folder is overkill.
(One place we have that incubator can use is the "fast_addons" loader but I am not sure if there's a point compared to autorun.)

Doesn't look like code will conflict, but probably don't want to allow this to work on non-sandbox (or even sandbox derived like Dark RP) but incubator scripts are not loaded on those anyway right now. Also on sandbox if allow lua files is disabled this might allow cheating (for example the "build-RP" area had the great idea that you could only join it if you haven't enabled lua running on your client).

Okay to merge in my opinion even if it won't really work on metastruct due to PVS (you won't get frequent player's location updates if you're not in the same area).

@Earu
Copy link
Contributor

Earu commented Aug 13, 2025

It's relatively trivial to script noticing file name conflicts so it's fine

Just because you can put a band-aid afterwards is not "fine", I agree that in this case a folder for this file alone might be overkill, though I was thinking more for the incubator files altogether.

Besides the day we forget about that band-aid we will have issues, and it will be very annoying to debug.

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

Successfully merging this pull request may close these issues.

4 participants