Skip to content

Rewrite of machine code

Rob Nelson requested to merge pull/1545/MachineRecode into Bleeding-Edge

Created by: ComicIronic

  • The most common attackbys now use a common proc and a flag system
  • The following flags now exist : EMAGGABLE, SCREWTOGGLE, CROWDESTROY, WRENCHMOVE, FIXED2WORK, EJECTNOTDEL to define different behaviour using the machine_flags var

FLAG EXPLANATION:

  • Emaggable is self explanatory
  • Screwtoggle is if it has a maintenance panel to open and close (or for computers, if you can screw the monitor off). Setting this makes the machine call togglePanelOpen when hit by a screwdriver
  • Crowdestroy is if you can decon it when the panel is open. Setting this will make the machine call crowbarDestroy if hit by a crowbar while the panel is open
  • Wrenchmove is if you can use a wrench to move it around. Setting this makes the machine call wrenchAnchor
  • Fixed2work is if it needs to be anchored to call attackby
  • Ejectnotdel is if it ejects any contents items instead of just deleting them (fridges use this)

Machines now use flags appropriately added with inherited procs to replace copied code

  • Should make adding these features to new and current machines a lot easier, since all that's needed is to inherit attackby all the way from obj/machinery and add the right flags
  • Also fixed some relative pathing in edited files, anything I edited should now be absolute
  • This is by far not the complete list of edited machines. I can put more work in to try and check them all, but this is a lot. What's most important is the functional changes.
  • Changed a door problem of windoors have a stupid number of path variants: there are now only windoors with variables

CURRENT LIST OF CHECKED AND VERIFIED MACHINES (LAST UPDATED 24/09):

  • Vendors of the vending type e.g. sale machines, department vendors
  • Autolathe
  • Smartfridges (now with special circuits), all kinds (with contents ejecting)
  • Hydro trays and apiaries, biogenerator, seed extractor
  • Shield gens, all kinds (also edited shield gens to not require a dir check on capacitors)
  • Singulo engine machines, including rad collectors, emitters, field generators, etc
  • Research machines: protolathe, decon, imprinter, fabricators (now with material removal)
  • Cooking machines: food processor, grinder, microwave. Wrench movement with all other cooking machines: fryer, oven, grill, candy machine, cereal maker
  • Chemistry machines: Chemmaster, grinder, chem dispenser
  • Pacman generators, including the unloading of fuel when deconned
  • Teleporter machines in the teleporter room
  • SMESs
  • WORKING ON: None right now

Merge request reports