Files
Bubberstation/code/modules/buildmode
SkyratBot d086ca70e5 [MIRROR] Items in your hands can catch fire (#28247)
* Items in your hands can catch fire (#83867)

## About The Pull Request

Recently we allowed items held in your hands to catch fire if you catch
fire.
This makes sense but the code had a few oversights, then we reverted it.

This PR reintroduces the feature, but with a few refinements.
The basic feature is simple: If you are on fire then items you are
holding will also catch fire, in the same vein as items you are wearing
on your head or hands.

There are also a few caveats we forgot about the first time we added
this:

- If your gloves cannot catch fire, your held items will not catch fire
(because your hands aren't on fire).
- If you are extinguished, your held items will also be extinguished.
- Stopping, Dropping, and Rolling on top of any items will also
extinguish those items.

As part of this change, after an argument about whether or not this is
an oversight in coding-general, I've made the proc `get_equipped_items`
take a bitflag instead of a series of booleans as an argument and added
a new one for "include held items", so that we need no longer argue
about whether holding something counts as "equipping" it (in all other
parts of the game than this proc, it does). This is what gives the PR
most of its code footprint, don't be scared.

## Why It's Good For The Game

Items you are holding in your hands _should_ catch fire if everything
else on your person is on fire, and taking an item off of your body to
put it in your hands shouldn't protect it from fire, because those
things don't make intuitive sense.
If we want an item to be able to catch fire when worn, then it should do
so.

This might expose some issues where we were improperly setting the
flammability flags on items, but any weapon which will burn in your
hands now would also have burned if you were wearing it on your belt or
back, so making those issues more visible should be a bonus (we'll also
stop them from burning on your back or belt).

If you see someone holding a piece of paper that you really don't want
them to read you can now set them on fire to stop them from reading it,
whereas previously they would deftly hold the very flammable object out
of reach of their flaming body.

## Changelog

🆑
balance: Items held in your hands can catch fire.
balance: Items you are holding won't catch fire if your hands cannot
catch fire.
balance: When you stop being on fire so will items you are holding.
balance: If you roll around on your burning items they will stop being
on fire.
/🆑

* Items in your hands can catch fire

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2024-06-19 10:03:45 +05:30
..

Buildmode

Code layout

Buildmode

Manager for buildmode modes. Contains logic to manage switching between each mode, and presenting a suitable user interface.

Effects

Special graphics used by buildmode modes for user interface purposes.

Buildmode Mode

Implementer of buildmode behaviors.

Existing varieties:

  • Basic

    Description:

    Allows creation of simple structures consisting of floors, walls, windows, and airlocks.

    Controls:

    • Left click a turf:

      "Upgrades" the turf based on the following rules below:

      • Space -> Tiled floor
      • Simulated floor -> Regular wall
      • Wall -> Reinforced wall
    • Right click a turf:

      "Downgrades" the turf based on the following rules below:

      • Reinforced wall -> Regular wall
      • Wall -> Tiled floor
      • Simulated floor -> Space
    • Right click an object:

      Deletes the clicked object.

    • Alt+Left click a location:

      Places an airlock at the clicked location.

    • Ctrl+Left click a location:

      Places a window at the clicked location.

  • Advanced

    Description:

    Creates an instance of a configurable atom path where you click.

    Controls:

    • Right click on the mode selector:

      Choose a path to spawn.

    • Left click a location (requires chosen path):

      Place an instance of the chosen path at the location.

    • Right click an object:

      Delete the object.

  • Fill

    Description:

    Creates an instance of an atom path on every tile in a chosen region.

    With a special control input, instead deletes everything within the region.

    Controls:

    • Right click on the mode selector:

      Choose a path to spawn.

    • Left click on a region (requires chosen path):

      Fill the region with the chosen path.

    • Alt+Left click on a region:

      Deletes everything within the region.

    • Right click during region selection:

      Cancel region selection.

  • Copy

    Description:

    Take an existing object in the world, and place duplicates with identical attributes where you click.

    May not always work nicely - "deep" variables such as lists or datums may malfunction.

    Controls:

    • Right click an existing object:

      Select the clicked object as a template.

    • Left click a location (Requires a selected object as template):

      Place a duplicate of the template at the clicked location.

  • Area Edit

    Description:

    Modifies and creates areas.

    The active area will be highlighted in yellow.

    Controls:

    • Right click the mode selector:

      Create a new area, and make it active.

    • Right click an existing area:

      Make the clicked area active.

    • Left click a turf:

      When an area is active, adds the turf to the active area.

  • Var Edit

    Description:

    Allows for setting and resetting variables of objects with a click.

    If the object does not have the var, will do nothing and print a warning message.

    Controls:

    • Right click the mode selector:

      Choose which variable to set, and what to set it to.

    • Left click an atom:

      Change the clicked atom's variables as configured.

    • Right click an atom:

      Reset the targeted variable to its original value in the code.

  • Map Generator

    Description:

    Fills rectangular regions with algorithmically generated content. Right click during region selection to cancel.

    See the procedural_mapping module for the generators themselves.

    Controls:

    • Right-click on the mode selector:

      Select a map generator from all the generators present in the codebase.

    • Left click two corners of an area:

      Use the generator to populate the region.

    • Right click during region selection:

      Cancel region selection.

  • Throwing

    Description:

    Select an object with left click, and right click to throw it towards where you clicked.

    Controls:

    • Left click on a movable atom:

      Select the atom for throwing.

    • Right click on a location:

      Throw the selected atom towards that location.

  • Boom

    Description:

    Make explosions where you click.

    Controls:

    • Right click the mode selector:

      Configure the explosion size.

    • Left click a location:

      Cause an explosion where you clicked.