ID:259908
 
I think it'd be nice to be able to add/remove atoms from ones client.images list. Because, currently...I'm making a housing system where I can stack multiple floors on top of each other using some obj's and areas, and a few lists but, to make it so you can only see the objects on your floor, I'd have to make everything invisible & that's ok if you're only making one building in a persons view, or else you can see in a neighboring building. I'd maybe like to have this put in, or if someone has an alternative solution - that'd be nice. Because, I REALLY don't want to use multiple "Z" levels for two story houses. I want players to be able to interact with others below them on lower floors, etc...while still being able to see within the walls of the house with the roof removed.

Example:
Why not use an atom's 'tag' variable? Or a variable of your own creation. All you'd have to do is check against that variable before deletion.

atom
var
floor_level


Now when adding the objects to the screen you simply set their "floor_level" variable to something unique for the area they're at, and delete them like so:

for(var/obj/your_screen_object/O in client.screen)
if(O.floor_level == "whatever")
del(O)
In response to Nadrew (#1)
But, that'd take constant updating on a lot of screens - especially if something moves, or you move.
Teh Governator wrote:
I think it'd be nice to be able to add/remove atoms from ones client.images list.

You can add and remove specific images from the client.images var. Store the image with the appropriate atom and then you can add or remove it as needed for specific clients.

You could separate each house into specific areas (each one unique). When a player enters the area, loop through all the atoms in the house's area and display the images of everything on the player's altitude level. When they exit an area, remove them.


Because, currently...I'm making a housing system where I can stack multiple floors on top of each other using some obj's and areas, and a few lists but, to make it so you can only see the objects on your floor, I'd have to make everything invisible & that's ok if you're only making one building in a persons view, or else you can see in a neighboring building. I'd maybe like to have this put in, or if someone has an alternative solution - that'd be nice.

Here is a really simple method: use the invisibility var as you mentioned above for the altitude of an item. That way you don't have to worry about any potentially laggy loops or create all those images. Use an image based roof system like my RoofLib to prevent people from seeing into neighboring buildings.


Because, I REALLY don't want to use multiple "Z" levels for two story houses. I want players to be able to interact with others below them on lower floors, etc...while still being able to see within the walls of the house with the roof removed.

Don't forget to change movement so that the density of things at different altitudes don't affect the player!