Skip to content

Update window code

Rob Nelson requested to merge pull/3551/Window into Bleeding-Edge

Created by: dylanstrategie

That code was old and fucky, goddamn

  • Span, formatting, newline, visible_message, yeah
  • Separate sprites for window panes and full windows. Might need a bit more refining still, but that's that
  • Remove deprecated commented silicate code. If anyone ever wants to include something akin to silicate, they would benefit from just recoding it from scratch. An item that adds health and potentially changes sprite color can't be that hard to make
  • Reduce normal window health by 4 to 10. Why would you use plain windows
  • Remove stupid paths that caused shitty inheritance. window/basic and window/full/basic were dumb as fucking shit and no longer exist (both transferred to their respective tree parent, for whatever variables needed transplanting, so 2-3). All full window types under full/ all reinforced window types under reinforced/, all in that order
  • Add in more examine() information (construction state and health)
  • Add in healthcheck() to replace destroy(), hit() and all that logging and variable juggling bullshit in about every proc where the window can be damaged
  • ex_act(), blob_act(), meteorhit() now deplete health only and no longer magically delete or Destroy() windows. Looks a bit ugly on ex_act 3 since reinforced windows can't be destroyed but grilles always are, and plasma windows still don't block explosions even if they're now almost bomb-proof, but that's progress
  • Remove window damage on passive grab window "slam", massively increase mob damage on neck/kill window slam (if you let yourself get grabbed that far, you deserve to die)
  • Change construction from that ugly variable juggling to a fancy and functional switch() construction code. Include bitflags and deconstruction safety
  • All files that were modified outside of window.dm and fullwindow.dm are compatibility fixes

Try as I might, I couldn't address #3515 (closed). It appears to be fundamentally fucked due to the way pushing objects (you enter the window's tile) and pulling objects (you cannot reach the other side of the window, ever) works. Maybe someone else will manage it

Merge request reports