21 Nov 2016 - 02 Dec 2016


I implemented the morgue incineration animations. I also added the ability to specify a static number for specific resource limits in a room and I changed the max resource count of dead bodies in the morgue to 1. So only 1 body at a time can be delivered to the morgue. Once a body is incinerated another body can be delivered.


[Sprite Palette]

I added a script called "GenerateSpritePalette_GameObject" it changes its palette texture automatically to one that was generated by "SpritePaletteLookup_GameObject" You'll still have to manually assign the Palette Material

The lookup has variables for unused rows, number of hair rows, number of skin rows, and number of eye rows. These are all 4 in the texture file, but they could technically be any valid value.


The lookup accepts a source Texture2D. It evaluates each block of colors in the source image for unique colors. The height of the block is derived from the "number of X rows," that way the script knows how many colors are associated with hair/skin/eyes. Duplicate colors are ignored. This allows the artist (Victor) to combine multiple color types in the same image. So you could have 3 eye colors and 7 hair colors, and the script wouldn't think that there were 7 eye colors.


It then creates a new Texture2D with every possible combination from the source texture.

The specific possibilities can easily be retrieved if you know the hair/skin/eye index that you want, because the generated palette is assembled in a very specific order.

The source Texture2D NEEDS TO be have "Read/Write enabled" set to true in the import settings. The image will need to be changed to texture type "advanced" in order for this value to be exposed.


[Body Outfits]

- Bodies now use palettes. To achieve this I added a "Sprite Palette Index" variable to the outfits in ColonistBodyPartChest. Colonist jobs can also change the index on their own.



- Readded Multiple Room selection. It has a .25 seconds delay before it works. This prevents accidentally selecting rooms while selecting colonists.

- Colonists should now more appropriately generate routes when picking up dead bodies. The biggest change is that now a vertex will be considered "matching" if it's within 3 units of another vertex. Colonists also now use the pathfinding data from their target colonist to generate the correct route.

- Added a sync action for colonist's AI. It freezes a colonist until enough matching sync actions are started. A patient syncs up with the doctor, for example, so that they both perform the appropriate actions at the same time.



- Changed material of generators in the Generator Room so that it stopped causing a crash in the AnimationMaterialOffset script.

- Adjusted threshold for when low oxygen warning is displayed so that it's now more appropriate (the amount of oxygen was multiplied by 1000 in order to accommodate the percentage system)

- Fixed a bug where rooms at higher depths would occasionally block mouse overs for rooms at lower depths.

- Fixed a bug where the amount of oxygen in a room would become NAN. I think it was from the average oxygen calculation when there were too many rooms. It would cause an overflow.

- Colonists now spawn with 4 times of their base daily nutritional requirement.

- Fixed a bug where resource crates weren't placed in a position that used the rotation of their room.

- Fixed a pathfinding bug where returned vertices weren't copies, so colonists were inadvertently changing the source / original vertices.

- Fixed a bug where dead colonists unclaimed their current vertex instead of their target vertex.