griefly / griefly

Griefly: Yet Another Space Station Remake
https://grief.ly
MIT License
130 stars 25 forks source link

Tables #238

Closed kremius closed 8 years ago

kremius commented 8 years ago

Tables should automatically change their sprite/direction on creation/deletion. It should not be needed to choose direction for each table object.

shelltitan commented 8 years ago

Is there a way to detect an object on the next tile?

kremius commented 8 years ago

The combination of GetItem<SomeItem>() (look into Human::TryMove(Dir direct) for usage example) and GetNeighbour(Dir direct) should work just fine. You also may want to look into atmos pipes code (Pipes.cpp) in order to get some other hints.

shelltitan commented 8 years ago

The material of table should be a variable or the metal tables and the wood tables should be separate objects?

kremius commented 8 years ago

They should be separate objects.

shelltitan commented 8 years ago

A new passable level is required maybe?(Air,projectiles should be able to pass it but humans and closets shouldn't be able.)

SaphireLattice commented 8 years ago

I think the baystation allows to construct tables modularly, out off glass and etc.. The ”making separate object” idea for tables made out of different materials seems bad, if there will be much more materials later. As for passable level, some things can go /under/ the table too.

On Wed, Jul 13, 2016, 07:49 shelltitan notifications@github.com wrote:

A new passable level is required maybe?(Air,projectiles should be able to pass it but humans and closets shouldn't be able.)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/griefly/griefly/issues/238#issuecomment-232224551, or mute the thread https://github.com/notifications/unsubscribe/AEFMuBP54mcqfOukqw3wniH3numUtelsks5qVDYDgaJpZM4H-QLJ .

kremius commented 8 years ago

@shelltitan There is the list of current passable levels `OnMapBasse.h. I think Passable::SMALL_CREATURE will be good enough (SetPassable(D_ALL, Passable::SMALL_CREATURE)). Monkey will be a small creature for example. Also, humans do not have passable_level = Passable::BIG_CREATURE, so you may want to set it.

@dangranos It is current approach (make new classes even for minor changes) for such things in SS13, and Griefly inherits it. It does not interfere with possibility of usage a lot various materials for tables. It is kind of bad (due to other reasons), but in order to fix it properly some assets system needs to be implemented for map editor, and 1) it is not critical 2) hard to make -> later. Items go "under" the table when their visible level lower than the table visible level, and it is not associated with passable levels.

shelltitan commented 8 years ago

@kremius The structure.dmi is so messy we should separate the tables so states can be more systematic.

kremius commented 8 years ago

@shelltitan current structures.dmi is really old. You may try to look into latest tg build - maybe they already have changed it in some way. If not then it will be good idea to move the tables into the separate .dmi.

shelltitan commented 8 years ago

@kremius They have a messy one too I try to do it on linux but I don't know if that will work, and it seems to be a longer task so I will make only metal tables for now. Also the other problem is if you self-click on the metal you make a wall girder so metal need some changes for tables.

kremius commented 8 years ago

@shelltitan Do not worry about making new tables during the game - it is heavily blocked by #89

shelltitan commented 8 years ago

@kremius In that case can you give me a hint how to use KVEngine -map_editor param, I couldn't use it last time I tried some possible combinations but it didn't work.

kremius commented 8 years ago

@shelltitan try just -editor.

shelltitan commented 8 years ago

The human Passable level is Passable::BIG_ITEM now should I set to Passable::BIG_CREATURE?

kremius commented 8 years ago

It is a little bit inconvenient, but there are two passable-related definitions

  1. Who can pass through the object, This value has 5 parts and setted via SetPassable function. For example, if the object has SetPassable(D_ALL, Passable::AIR) then only objects that "smaller" or "equal" than air will be able to pass through (e.g. ghost or air).
  2. What objects can the object pass through - it is kind of size of the object. passable_level is the name of the variable. So Ghost has passable_level = Passable::EMPTY;, that means ghost can fly everywhere, and nothing can stop it. Items have passable_level = Passable::SMALL_ITEM;, so they can pass through something that has the passability at least Passable::SMALL_ITEM - Human, for example, because humans have SetPassable(D_ALL, Passable::BIG_ITEM);.

So there are two kinds of terms: passability and passable_level. It is probably needed to rename passable level into something more clear, but it will be later.

shelltitan commented 8 years ago

@kremius there is a problem with building on linux with the new updates.

kremius commented 8 years ago

@shelltitan So if you provide more details it will be possible to do something about that.

shelltitan commented 8 years ago

Well it doesn't find go(Could NOT find Go (missing: GO_VERSION GO_PLATFORM GO_ARCH)).

kremius commented 8 years ago

Do you have go installed via packet manager? (Is go command availiable from terminal?)

shelltitan commented 8 years ago

Well yes and I could run make when I was making guns.

kremius commented 8 years ago

It is kind of strange. As workaround you can set environment variable GOROOT to your go root path. Also, write the path here too, maybe later go finder will be changed.

shelltitan commented 8 years ago

When I do go env GOROOT I get /usr as path.

kremius commented 8 years ago

And do you have go binary in your /usr or /usr/bin? Probably not, so I suggest you to find real place for the go binary and set path to root as GOROOT.

shelltitan commented 8 years ago

I have a go binary in my /usr/bin...

kremius commented 8 years ago

What CMake version do you have?

shelltitan commented 8 years ago

3.2.2.2

kremius commented 8 years ago

What the output for go version?

shelltitan commented 8 years ago

go version xgcc (Ubuntu 4.9.3-8ubuntu2~14.04) 4.9.3 linux/amd64

kremius commented 8 years ago

It seems like you have some unusual version of go (probably gcc go version). Current go finder cannot parse properly verison string of the gcc go, so it fails. It is better to use the official version of the go compiler. Its version string should look something like go version go1.4.2 windows/amd64 (sure, linux instead of windows).

shelltitan commented 8 years ago

Well the older make process was ok with it so I didn't think that would be the problem.

kremius commented 8 years ago

It is the problem. The official go finder (FindGo.cmake) cannot find go. You may use your version, but that means that you should apply some patches for the build system for yourself - fix various cmake files in some way. Supporting two version of the compiler is inconvenient, because it means that someday (for example, today) everything breaks down on nonstandard compiler and it will be needed to fix it. So you should understand the consequences.

shelltitan commented 8 years ago

Well by the way the more important issue is that I have to make tables.dmi but I'm not sure if a copy paste the icons rename the file to .dmi, and adding the metadata from a .dmi setting the states by hand would work or not?

kremius commented 8 years ago

It should work. Just metadata and properly ordered icons states squares (32x32 squares) will be enough. Btw, it is not necessary to make it png - but it is better to do it for clarity.

kremius commented 8 years ago

Closed by #289