Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
tutorial:modding_onefour [2014/10/10 19:45]
sangar
tutorial:modding_onefour [2014/10/17 01:03]
sangar [Moved and renamed interfaces]
Line 107: Line 107:
   Moved to `li.cil.oc.api.internal.Robot`. This is an effort to keep all interfaces that are or should be implemented by tile entities in one package, for clarity.  ​   Moved to `li.cil.oc.api.internal.Robot`. This is an effort to keep all interfaces that are or should be implemented by tile entities in one package, for clarity.  ​
   //How to adjust//: update imports.   //How to adjust//: update imports.
 +  ​
 +- `li.cil.oc.api.prefab.ManagedEnvironment.node`  ​
 +  Made private. This change was made to ensure it can be overridden by overriding `node()`.  ​
 +  //How to adjust//: use `node()` to access, use `setNode(Node)` to set.
 +
  
 ### Added and renamed methods in existing interfaces ### Added and renamed methods in existing interfaces
Line 117: Line 122:
  
 - `li.cil.oc.api.FileSystem.asManagedEnvironment(FileSystem,​ String, EnvironmentHost)`  ​ - `li.cil.oc.api.FileSystem.asManagedEnvironment(FileSystem,​ String, EnvironmentHost)`  ​
-  Extended to `li.cil.oc.api.FileSystem.asManagedEnvironment(FileSystem,​ String, EnvironmentHost,​ String)`. Takes additional parameter, name of the sound effect to play when file system is being accessed.+  Extended to `li.cil.oc.api.FileSystem.asManagedEnvironment(FileSystem,​ String, EnvironmentHost,​ String)`. Takes additional parameter, name of the sound effect to play when file system is being accessed. ​ 
   //How to adjust//: pass name of sound effect to play on filesystem access, `null` otherwise.   //How to adjust//: pass name of sound effect to play on filesystem access, `null` otherwise.
  
Line 145: Line 150:
  
 - `li.cil.oc.api.machine.MachineHost.callBudget()`  ​ - `li.cil.oc.api.machine.MachineHost.callBudget()`  ​
-  Added to the `MachineHost` interface to allow providing a custom direct call budget for machines, enabling machines that run at different speeds. In OC this value is based on the tier of the installed CPU, with the values being 0.5, 1.0 and 1.5 for the tiers one, two and three, respectively.+  Added to the `MachineHost` interface to allow providing a custom direct call budget for machines, enabling machines that run at different speeds. In OC this value is based on the tier of the installed CPU, with the values being 0.5, 1.0 and 1.5 for the tiers one, two and three, respectively. ​ 
   //How to adjust//: return desired call budget for machine, 1.0 being equivalent to before.   //How to adjust//: return desired call budget for machine, 1.0 being equivalent to before.
  
Line 151: Line 156:
   Renamed to `li.cil.oc.api.machine.MachineHost.markForSaving` to clarify difference to EnvironmentHost'​s markChanged (which usually means the inventory changed).  ​   Renamed to `li.cil.oc.api.machine.MachineHost.markForSaving` to clarify difference to EnvironmentHost'​s markChanged (which usually means the inventory changed).  ​
   //How to adjust//: rename implementing methods.   //How to adjust//: rename implementing methods.
 +
 +- `li.cil.oc.api.network.WirelessEndpoint.receivePacket(Packet packet, double distance)`  ​
 +  Changed signature to `receivePacket(Packet packet, WirelessEndpoint sender)`, which is much more versatile.  ​
 +  //How to adjust//: change signatures, compute distance when needed.
  
 Removed Removed