CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.7k stars 4.2k forks source link

Food truck fridge and freezer vehicle parts unable to display sprites #77955

Open twasbrilligandtheslithytoves opened 1 week ago

twasbrilligandtheslithytoves commented 1 week ago

Describe the bug

Sprites appear to be missing for installed food cart fridges and freezers on all tile sets

Attach save file

Snowmass Village-trimmed.tar.gz

Steps to reproduce

  1. Start game with foodperson start, or otherwise spawn a food truck.
  2. There are no sprites where the fridge and freezer should be!

Expected behavior

There should be sprites there, or at least letter 'H's.

Screenshots

No response

Versions and configuration

Additional context

This was bothering me more than it probably should have. I banged my head against the json for a while and found that adding the line "location": "center", to the applicable entries in appliances_refrigeration.json allows sprites (or 'H's) to appear, which seems like relevant info. Thanks,

ampersand55 commented 1 week ago

Can confirm.

The ap_big_portable_fridge has the line:

  "looks_like": "fridge",

But fridge isn't an item. It's f_fridge for the furniture and ap_apartment_fridge for the appliance / vehicle part. I'll fix this tomorrow if it isn't fixed by then.

EDIT: Changing id didn't fix it. Seems like vehicle part fridges and freezers doesn't have good coverage.

https://cdda-guide.nornagon.net/search/fridge

The only vehicle part that's universally covered is minifreezer. I'd suggest you make a request for vehicle part freezers here:

https://github.com/I-am-Erk/CDDA-Tilesets/issues

twasbrilligandtheslithytoves commented 1 week ago

Issue isn't the sprite missing from a tileset, if that was the case an 'H' should have displayed on the tiles where the freezer/fridge are. I tried changing the "looks_like" line to various items with valid sprites (like the minifreezer) and it didn't work, not until I added the "location" line. With that in place, the 'H' appears, and I can set the "looks_like" to whatever, it displays fine. My suspicion is that without "location" defined as "center", the game thinks the fridge is on the same layer as the vehicle frame, and it prioritizes displaying the frame. That's just a guess though.

ampersand55 commented 1 week ago

Setting it to "looks_like": "minifridge", seems to display it properly though. `

twasbrilligandtheslithytoves commented 1 week ago

Huh, I tried setting "looks_like": "minifridge" on a fresh install, and I'm not able to reproduce it displaying... image

ampersand55 commented 1 week ago

Hmm.. same with me on a fresh install. I must have changed something in the inheritance chain or had the frame removed with the "Debug Hammerspace" mutation.

I get the same results as you and it seems to work fine when the "location" is set.

stubkan commented 6 days ago

I get this issue as well, latest experimental. I found a little fridge in a Luxury RV and removed it (oddly it required no tools at all to remove) and installed it into my Truck. It does not display a tile at all, showing the frame only. (It is at the top side of the displayed Truck across from the Kitchen that I also cannibalized off the RV)

Display bug aside. I think this unit coming out of a RV not requiring any tools to remove and having huge capacity of 250L compared to a full household fridge of 300L is a little OP, and does need tweaking. It shouldn't be in a RV

image

image

stubkan commented 6 days ago

2 things are required to fix this; both lines need to be in the item definition `` "looks_like": "f_fridge", -> to tell it to use a sprite that exists

"location": "center", -> to make it not be hidden by the rest of the vehicle below it ``

However, f_fridge is a poor choice for this fridge - it makes it look like a household fridge (and rotates badly)

image

It rotates the opposite way the vehicles does! image

I recommend using this instead, which fits the food truck fridge look so much better "looks_like": "chest_freezer" image

Food truck fridges do look like this.