BeeStation / BeeStation-Hornet

99.95% station. 0.05% bees
https://beestation13.com
GNU Affero General Public License v3.0
200 stars 682 forks source link

Renames ABSTRACT item_flag to PSEUDO_ITEM, adds in a new method for marking objects as abstract #11851

Open PowerfulBacon opened 2 weeks ago

PowerfulBacon commented 2 weeks ago

About The Pull Request

In the future we may be able to do some simple static analysis on the code to check for these, but that would be hard.

Edit: Abstract is only a hint flag, it prevents admin spawning and will prevent unit tests from targetting that object but will not prevent coders from using it. There are some cases where /obj is used as a placeholder to access some byond variables and there will be a lot of things that get picked up erronously.

Why It's Good For The Game

Being able to mark objects as being something that shouldn't be able to be spawned is useful behaviour, and is something that is required for making the icon tests far stricter.

Testing Photographs and Procedure

/obj/item/implant cannot be spawned through the create object menu.

image

Neither can storage nor belt:

image

See unit tests for more evidence

Changelog

:cl: code: Renames the abstract item flag to pseudo_item to better represent its purpose, and adds support for abstract items which cannot be spawned by admins and shouldn't be spawned by code. fix: The missing icon test will now fail if a missing icon, non-null icon is present in an abstract path /:cl:

PowerfulBacon commented 2 weeks ago

When create and destroy is added, test coverage for accidentally created abstract paths should be pretty strong

PowerfulBacon commented 2 weeks ago

I might just let coders instantiate these objects and restrict it for mappers only due to a lot of uses where it could erronously pick something up

github-actions[bot] commented 1 week ago

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

github-actions[bot] commented 2 days ago

This PR has been marked as stale due to being in an unmergable state for 7 days. Please resolve any conflicts and add testing evidence, then contact a project maintainer to have the stale label removed.