4246 Commits

Author SHA1 Message Date
Florian Nücke
a845ce1be1 made the "response" port when sending messages to computercraft optional (it'll default to -1, an invalid port number); fixed a deadlock when consuming power in computers for the first time (lazy vals lock this when initializing... kinda makes sense in hindsight) 2013-12-11 13:25:34 +01:00
Florian Nücke
9c45f1f823 only routing network messages (otherwise keyboards/computer signals in general would still cause trouble in other networks) 2013-12-11 01:37:28 +01:00
Florian Nücke
eb15bf5a62 added buffer for converter (to allow directly connecting it to a distributor) and updated tooltip of distributor 2013-12-11 01:11:01 +01:00
Florian Nücke
0a83286082 better error reporting when out of power while booting a computer; providing some buffer in the converter to allow building a simple computer without needing a capacitor; scaling kernel ram when saving, to get somewhat equal usage when loading 64 bit save on a 32 bit vm or vice versa; reworking power distribution, integrating it into the network directly now; reworked distributor block to share energy between networks (balances such that each connected network has the same relative amount of energy); due to that change, added two functions to the computer api: energy and maxEnergy (as replacements for the power distributor component) 2013-12-11 00:49:06 +01:00
Florian Nücke
066c59f916 added te info to converter tooltip 2013-12-10 13:41:38 +01:00
Florian Nücke
310a5cc36c fixed thermal expansion power conversion (returned the wrong value, not the amount absorbed but remaining); forcing block updates used for node adding to be as soon as possible. after reobfuscating and running the mod in the "normal" minecraft+forge environment block updates triggered in validate() seem to be delayed for some reason (around 5 seconds...) which leads to capacitors not being added to the network in time when loading a chunk and everything running out of power in turn 2013-12-10 02:36:23 +01:00
Florian Nücke
3f40e58929 increased suck and drop delays on robot; taking into account the tick that's "lost" by requiring the server thread to resume the robot in the delays to get the effective delay right (was one tick more than set in the config) 2013-12-10 00:03:52 +01:00
Florian Nücke
193c8cf035 added license information file for used APIs from other mods 2013-12-09 23:18:56 +01:00
Florian Nücke
7dffb9c477 updated cc api to 1.58 and including the full API again after reading the header for the first time -.- 2013-12-09 23:16:51 +01:00
Florian Nücke
d1094c0661 added setting to internally scale memory made available to lua vms on 64 bit machines, to make it less likely that programs will work in 32 bit but run out of memory on 64 bit machines 2013-12-09 22:01:22 +01:00
Florian Nücke
59d16ea6b2 made power tick frequency configurable; added support for ThermalExpansion energy in power converter (untested) 2013-12-09 14:40:58 +01:00
Florian Nücke
dcda6056df removed some redundant code from distributor (that led to an assertion error, yay assertions!) and fixed visuals on additional distributors not updating immediately; fixed derpy optimization breaking receiving power from buildcraft 2013-12-09 03:57:19 +01:00
Florian Nücke
b535e85c82 fixed slot number check when loading components 2013-12-09 03:38:27 +01:00
Florian Nücke
2de8622f8b some more minor performance tweaks 2013-12-09 02:56:53 +01:00
Florian Nücke
407d25131f working on performance, removing implicit conversions to rich number types in frequently called places (i.e. anything somehow called per tick); optimized power distribution a bit; added a tick delay for continuous power consumption stuff (screens, computer); converted some methods to lazy vals and caching multi-screen bounds 2013-12-09 01:32:31 +01:00
Florian Nücke
8c948098d8 fixed dynamic component adding/removal when dynamically changing visibility of components 2013-12-08 15:09:10 +01:00
Florian Nücke
1b15f89498 some (temporary?) changes to get it running in published form... 2013-12-08 08:56:15 +01:00
Florian Nücke
8560a8cce8 moved origin of robot's click ray towards their facing (so its on the line between the block the robot is in and the block they try to interact towards) to fix some hit glitches (e.g. robots couldn't flip levers on walls) 2013-12-08 08:38:15 +01:00
Florian Nücke
6aa2bd8298 fixed / properly implemented zip file system 2013-12-08 07:59:49 +01:00
Florian Nücke
33a45493b8 explicitly specify encoding for char lookup of monospace font renderer to avoid errors 2013-12-08 03:37:42 +01:00
Florian Nücke
b0e8e40317 changed cutting wire recipe; hiding and disabling iron nugget if gregtech is available; no longer give xp when making circuit boards; 2013-12-08 00:01:46 +01:00
Florian Nücke
9a8da535e2 catching npe when library is not present and starting computer in single player; fixed iron nugget not being used via oredict 2013-12-07 23:33:26 +01:00
Florian Nücke
3ebda93e94 fixed redlogic interface stripping 2013-12-07 23:07:09 +01:00
Florian Nücke
78e22a0384 fixed fs possibly being nil when os lib is loaded 2013-12-07 22:41:59 +01:00
Florian Nücke
03eedec22a updated eris to latest version, also for linux libraries 2013-12-07 21:11:16 +01:00
Florian Nücke
d0e97e8d4b tinting robots based on their level; including distance of zero in normal network messages to have a uniform signal signature 2013-12-07 17:03:22 +01:00
Florian Nücke
eee27e49de changed robot.xp to robot.level; checking for pausedness in start from lua callbacks to avoid computers forcing resumption when forced to be paused (e.g. avoids computers breaking a robots pause after some action); small pause in command block after trigger to ensure the action was executed; fixed note block pitch getter returning non-offsetted value 2013-12-07 15:15:38 +01:00
Florian Nücke
23135ff845 little cleanup in fs lib and resetting shell working directory if the filesystem containing the working path is unmounted 2013-12-06 23:59:21 +01:00
Florian Nücke
5233a8d6db checking for nei's text field being focused in robot gui to avoid typing text on the computer while it is 2013-12-06 22:08:19 +01:00
Florian Nücke
90f6756392 less render glitchiness on moving robots 2013-12-06 16:01:16 +01:00
Florian Nücke
426239f03a allow robots to interact (inventory) and break mine carts 2013-12-06 15:46:12 +01:00
Florian Nücke
c54f285345 moved custom Lua methods from os table to new 'computer' table; some typos in config comments 2013-12-06 15:44:16 +01:00
Florian Nücke
039b3cce9b fixed crafting upgrade crafting computing the max amount of crafted items but ignoring it... 2013-12-06 05:47:01 +01:00
Florian Nücke
f3d020c132 non-busy wait in dig program when drop chest is full 2013-12-06 03:10:57 +01:00
Florian Nücke
476eb587d9 fixed recursion into drop-off logic of dig program. probably. 2013-12-05 23:49:35 +01:00
Florian Nücke
14f47fd637 clearing robot afterimages in a scheduled block update, which should be a bit more stable... should. minecraft. whatever; catching error in analyzer if node has no address; added setting to allow robots to ignore cobwebs, the most stupid invention ever (hardness of four without tools? seriously?), defaults to on; fixed threading issue with setBlockBoundsBasedOnState, hopefully resolving robot suicides 2013-12-05 23:32:47 +01:00
Florian Nücke
76f3e03925 fixed robot double chests interaction (screw you minecraft, seriously, use your bloody interfaces right); fixed breaking of moving robots; dropping robots with tag when they have xp but no energy left (oops); tried stabilizing robot movement a bit, robots still seem to spontaneously commit suicide occasionally, though... 2013-12-05 20:54:38 +01:00
Florian Nücke
d17bc2e2d2 robot level has an influence on how fast robots can harvest blocks; max level is now technically 31 - i.e. robots can level up 30 times. if they're level 0 no level info is shown in tooltip. 2013-12-05 14:57:16 +01:00
Florian Nücke
bc8ebd2508 using actual break time based on equipped tool for robots when breaking blocks; swing time is only used for attacking and extinguishing fires; fixed fire extinguishing by robots 2013-12-05 14:34:39 +01:00
Florian Nücke
7b136183ea checking new against current component in setPrimary to avoid unnecessary work; fixed timing issue in primary.lua 2013-12-05 00:42:51 +01:00
Florian Nücke
5171b14d1b fixed unicode.lower and upper (were string.lower and upper); fixed serialization of negative infinity; allowing serialization of the same table multiple times (multiple references) 2013-12-04 23:33:49 +01:00
Florian Nücke
0403d5b675 basic robot leveling logic 2013-12-04 22:14:05 +01:00
Florian Nücke
cfb8849e0e split component.primary into component.getPrimary and component.setPrimary 2013-12-04 16:24:03 +01:00
Florian Nücke
3d343ec34f fixed a typo in the robot lib; made count and space direct callbacks and allowing to specify a slot to check for (defaults to selected one); prioritizing living entities in robot detection and fixed entity detection sidedness; added simple excavation program; general cleanup 2013-12-04 14:11:54 +01:00
Florian Nücke
f94022c61c sorted crafting items to be somewhat logically grouped; fixed crafting upgrade 2013-12-04 00:37:20 +01:00
Florian Nücke
28fa4c3d5b don't return the bucket when crafting acid but do return it when crafting a pcb 2013-12-04 00:03:36 +01:00
Florian Nücke
08a412baa4 more tooltips, removed posion (because it needs netherwart, dammit) and replaced it with... acid. so to speak; 2013-12-03 23:42:23 +01:00
Florian Nücke
3617b711ac setting for whether lua gc should run each time the state is resumed; allowing to pass pitch in note block trigger to save a tick 2013-12-03 18:11:32 +01:00
Florian Nücke
d0c5ffa5ff fixed fs autorun and catching bad reads (negative number of bytes) 2013-12-03 18:10:15 +01:00
Florian Nücke
7c15fbe09c moved http requests into a tiny lib with one function that returns an iterator over the lines of the response, or throws an error if something went wrong 2013-12-02 18:15:13 +01:00