Thread Rating:
  • 5 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Bug] Surgical tray change
#1
The movable surgical tray is a really cool idea, I've always liked it, but it never seemed to work consistently. mbc showed me the code a while ago and essentially what it did was physically move each object in the world whenever the tray moved. 

This change takes advantage of the vis_contents feature of 512.14 (or something like that). Now adding a item to a surgical tray adds that item to the tray's contents AND vis_contents so that it is displayed on the tray's sprite.

In order to keep the functionality of only allowing a certain amount of items on the tray. I've added a line in proc/move that checks if the tray's contents is over the maximum amount (10). Then there is a chance for an item to fall off. (stole that part from disposals ejectors)

https://streamable.com/wtvj8

Notes:

- For anyone who decides to merge this, it might take a bit more effort than normal despite the small change. For one thing, it uses features of the modern codebase like (iswrenchingtool and the proc for placement at cursor coordinates.) I either commented these sections out like with the wrenching tool, or hacked it in like with the placement (which is used by regular table objects).

Bugs:

- This is really more of a bug with how throw-at works than anything I've done. If you attempt to throw something by clicking on an object that is in the contents of another object, then it attempts to throw at location (0,0). It's noticeable here because you might click on one of those objects to throw it at the table, and it goes off course.

https://github.com/goonstation/goonstati...6/pull/106
Reply


Messages In This Thread
[Bug] Surgical tray change - by kyle2143 - 01-28-2019, 04:45 PM
RE: [Bug] Surgical tray change - by New525 - 01-30-2019, 10:45 AM
RE: [Bug] Surgical tray change - by kyle2143 - 02-20-2019, 12:25 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)