Files
Bubberstation/tools/UpdatePaths
SkyratBot 9847332609 [MIRROR] Police hats are now hats instead of helmets. [MDB IGNORE] (#16102)
* Police hats are now hats instead of helmets. (#69643)

* Fixes police hats covering your hair.

Makes police hats a subtype of Warden's hats, so they still are security-level armor, without covering your hair like helmets do.
This was gone unnoticed because the item is very limited in-game.

I also renamed the gravity generator updatepaths because it's been inconsistent with the rest of the updatepaths for a while now.

* renames updatepaths

* Update tools/UpdatePaths/Scripts/69643_police_hat.txt

Co-authored-by: san7890 <the@ san7890.com>

* moves the hat to warden's, removes icon state

Turns out the icon state is shared between both hats, so the only real difference is name and description...

Co-authored-by: san7890 <the@ san7890.com>

* Police hats are now hats instead of helmets.

* Update head.dm

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2022-09-07 00:12:12 +00:00
..

UpdatePaths

How To Use:

Drag one of the scripts in the “Scripts” folder onto the .bat file “Update Paths” to open it with the .bat file (or use the Python script directly depending on your operating system). Let the script run to completion.

Use this tool before using MapMerge2 or opening the map in an map editor. This is because the map editor may discard any unknown paths not found in the /tg/station environment (or what it builds after parsing tgstation.dme).

Scriptmaking:

This tool updates paths in the game to new paths. For instance:

If you have a path labeled /obj/structure/door/airlock/science/closed/rd and wanted it to be /obj/structure/door/airlock/science/rd/closed, this tool would update it for you! This is extremely helpful if you want to be nice to people who have to resolve merge conflicts from the PRs that you make updating these areas.


How do I do it?

Simply create a .TXT file and type this on a line:

/obj/structure/door/airlock/science/closed/rd : /obj/structure/door/airlock/science/rd/closed{@OLD}

The path on the left is the old, the path on the right is the new. It is seperated by a ":" If you want to make multiple path changes in one script, simply add more changes on new lines.

Putting {@OLD} is important since otherwise, UpdatePaths will automatically discard the old variables attached to the old path. Adding {@OLD} to the right-hand side will ensure that every single variable from the old path will be applied to the new path.


On Variable Editing

If you do not want any variable edits to carry over, you can simply skip adding the {@OLD} tag (although this is not advisable under normal circumstances). There are also a bunch of neat features you can use with UpdatePaths variable filtering, such as ensuring all new paths get a certain variable edit, filtering old paths if they have a certain variable edit, or even splitting one path into multiple paths on a map. You can find out more about this by reading https://github.com/tgstation/tgstation/blob/master/tools/UpdatePaths/__main__.py#L9.

If you get lost, look at other scripts for examples.