4997 Commits

Author SHA1 Message Date
payonel
d350b30e9c make line reads safer
closes #2934
2018-09-27 18:26:14 -07:00
payonel
2158aac5d1 fix typo in in-game manual
closes #2805
2018-09-27 15:07:27 -07:00
payonel
6adad2adbe network loot disk installed via install only
The previous network installer was from legacy days, the new install
tool provides the reboot options it was meant to have

closes #2472
2018-09-27 09:48:03 -07:00
payonel
bf9eae1be9 provide inventory gui for mountable disk drives
rack click accessible as well as "from the hip" with your held item

closes #2704
2018-09-25 17:57:16 -07:00
payonel
c57dc9ae48 try exact trade first before item type only check
again closes #2788
2018-09-23 21:14:52 -07:00
payonel
89eeae875b make weak ItemStack comparison for trading
Mimicking vanilla minecraft, we now only compare Item types in recipe
inputs for making a trade with villagers. This commit also adds a
parameter to our inv utils for extracting ItemStacks, whether to make
a strict and exact comparison (as it was always doing before, and is
still the default) or to make a weak check only (which only verifies the
Item types are the same)

closes #2788
2018-09-22 21:11:07 -07:00
payonel
e5ccda83f0 use Node to find the angel upgrade
closes #2573
2018-09-22 06:48:09 -07:00
payonel
3a2a4d0a18 ic2 type check on cast
protect from event crash in case class transformer crashed on start
2018-09-22 00:26:38 -07:00
payonel
0cb24f9c4f simple nil check on drain from empty fluid tank
closes #2291
2018-09-20 22:49:09 -07:00
payonel
2f0e495265 allow force luaj even when natives are available
closes #2880
2018-09-16 00:10:37 -07:00
payonel
4bf8bbbd7f mimic player inventory with back ref to player
also, remove node neighbor check in keyboard, vex didn't like it, also
because it didn't work as intended

closes #2870
2018-09-15 23:00:27 -07:00
payonel
195074678b return bool to lua that the robot really moved
In #2334 it was reported that robot movement can at times return
success even when it didn't move. In addition to that, sangar
had left in comments that sometimes the api calls to move return true
even when they couldn't make the movements, but we don't know why

I was unable to repro this behavior. However, it seems reasonable to
believe that returning success of the api calls ALONG with a check
of the robots current position compared to the requested position it
move to, might be sufficient to correct the result sent to the machine

closes #2334 (probably, maybe)
2018-09-15 01:26:10 -07:00
payonel
202988676f voodoo magic of the dead
Apparently, mob (skeletons, zombies) equipment drops (armor, tools, etc)
were being duplicated as a side effect of the robot kill code when the
robot had no more inventory space to suck up the item. It would seem
that the vanilla mechanic for mobs dropping these special loot items is
different, and somehow oc's robot collect drop code was causing two
items to be created.

Strangely, setDead fixes this and doesn't appear to break anything else!
Very confused why, but, I've tested this and it seems to work. Works
with partial stacks pickups, full inventories, full pickups, and
various mob types

closes #2392
2018-09-15 01:21:15 -07:00
payonel
3228131dbb allow the keyboard to attach to sides
closes #2524
2018-09-13 21:26:59 -07:00
payonel
2653f31c98 allow redstone setOutput to specify large values
This appears to work fine with other mods, and with vanilla redstone
tested from 1.7.10 and up.

Also, I reviewed code in other mods setting redstone signals and it
seems that we don't need to cap our redstone signal

Note that this is not an exploit on vanilla redstone, setting output to
2,000 (for example) does not propogate a powered redstone "wire" (dust
line) further than the vanilla 15 blocks. Also, when reading a vanilla
redstone dust line that was powered with a value greater than 15 (e.g.
2,000 again), we do not read huge values either. The vanilla mc system
is capping the values for us.

closes #2058
2018-09-09 19:30:37 -07:00
payonel
a75992e164 type safe check to remove erasure warning 2018-09-09 16:34:17 -07:00
payonel
436bd1808f expose beep pattern api to lua
closes #2716
2018-09-09 14:34:45 -07:00
payonel
7b77dba230 allow processes to handle hard interrupts
no general purpose api at this time

closes #2904
2018-09-08 11:39:37 -07:00
payonel
bf0fea1354 reduce event delay for term_available, delay rc
Load rc on "init" event
to keep rc load order consistent, move before boot fs event
registrations.

This change allows rc scripts and autoruns to consistently have term io
available
2018-09-08 00:17:53 -07:00
payonel
b65f536257 devfs psuedo files can be zero size 2018-09-05 17:20:19 -07:00
payonel
6591147c15 improved statement parsing, new reset alias
> args can expand to new params
add `reset`, clears screen and sets resolution to max

closes #2642
2018-09-05 15:45:11 -07:00
payonel
68914a63f8 alias more to less --noback
removing more in place of an alias to less
updating man docs to describe value of more over less in low mem cases
adding (END) to less status when the end of a buffer is reached
2018-09-04 16:48:25 -07:00
payonel
399ef4b1ba /bin/less: optimize splits for super long lines 2018-09-04 13:27:10 -07:00
payonel
bb1c97edb4 rework more and less. simpler code, works with long lines payonel 09/04/2018 10:38 AM 2018-09-04 10:39:02 -07:00
payonel
4e5188da08 fix non tty cursor echo and support __call close 2018-09-04 08:44:25 -07:00
payonel
afe858ff2d tab complete aliases and improve io.dup efficiency 2018-09-03 16:00:54 -07:00
payonel
b493512efd woops, remove test code 2018-09-02 12:42:39 -07:00
payonel
8592cf2f25 cursor echos, io.dup, and remove unused redirect code
io.dup dups a handle, used now by all process creation and redirection
stop sharing cursors with spawned shell procs
write cursor echo to the stdin stream

close #2886
2018-09-02 12:41:38 -07:00
payonel
fcca0cc584 slight bin cleanup 2018-09-01 16:59:40 -07:00
payonel
b6bc9d0cea fixed less, simplified 2018-09-01 16:49:31 -07:00
payonel
1fb05ff432 fix and simplify /bin/more 2018-09-01 15:27:00 -07:00
kmecpp
09e0561bac Changed log level of some messages to reduce console spam 2018-08-31 21:45:54 -07:00
payonel
943f3c2339 make cursor echo safe to call even without gpu ready 2018-08-31 18:09:28 -07:00
payonel
758dfed35e reduced gradle - all deps hosted on single maven 2018-08-25 08:22:49 -07:00
payonel
9b12c1e350 openos pre-1.7.3 patching
1. as always, code cleanup and memory savings
2. allow force (-f) option with cp
3. cursor library, separating logic from tty [ the cursor library is robust and heavily tested, but the api is not finalized and is considered beta ]
4. fix autorun on ro fs
5. /bin/ls: run all filesystem calls in lua, safe from c-boundaries
6. vt100: small fix with clear line (1-off error)
2018-08-23 23:16:12 -07:00
SquidDev
2b0215bdbc Add bundled cable support for ComputerCraft 2018-07-04 08:56:34 -07:00
Adrian Siekierka
daff228f85 replace hardcoded hookInterval with bogomips calculator 2018-07-04 08:56:13 -07:00
Florian Nücke
cca7f202d5 Maven path now via environment variable. 2018-05-26 22:05:04 +02:00
payonel
a28a1aa2a5 should check timeout before blinking 2018-03-31 17:38:12 -07:00
payonel
a80f6363d5 new cursor lib, some vt100 fixes for windows
the cursor lib will probably become an official api, but not yet, still in beta
an application can define its own cursor, can handle the following methods
Here is a rough draft of the api, when it is official there will be an ocdoc article covering this
echo
  Echo does not change the input buffer, does not move the relative cursor position to the input, in is only used for updating the UI. Echo will receive the following
 "": scroll if needed
 nil: initialize blink if needed
 boolean: toggle blink if true, force blink off if false
 string: write string to output stream
 keyboard.keys.right and keyboard.keys.left: move the visual cursor left or right. scroll if necessary
move
  number: Intended to move the logical cursor relative to its current input. Should call echo for visual movement
update
  string: add (prepend, insert, or append) text to the input buffer
  number: remove (backspace, delete) text from the input buffer
  should call move if the cursor moves due to the text changes
handle
  (name, char, code): called in response to event signals when waiting for input. Typically this is used to handle key_down, touch, drag, and clipboard
  return nil if the cursor is closing
  return false if the input is interrupted
  return true if the input is not done
  return <string> as the result of the input when completed
2018-03-31 17:15:41 -07:00
payonel
9cdbaed1f5 bit32 should always be require(), regardless of arch
too bad we weren't clearing it from _G on boot, else we would have seen this bug
i'm choosing to NOT clear in from _G on boot .. for now ..
2018-03-29 13:45:26 -07:00
payonel
4ec7254e94 need to close process after error handling 2018-03-24 21:38:05 -07:00
payonel
aae7029dbe log rc errors to /tmp/event.log
closes #2787
2018-03-20 19:30:00 -07:00
payonel
abe18ad535 add detect to geolyzer
this commit also fixes some positional issues with geolyzer and canSeeSky when used as an internal component with tablets and drones

this commit also adds the hover tier 2 upgrade to the creatix robot

closes #1863
2018-03-18 01:09:45 -07:00
payonel
8cac5dfcd3 add isSunVisible and canSeeSky to the geolyzer
this is a potential solution to robots that need to know if their solar panels are able to charge
if a geolyzer is also added to a robot, it can use the geolyzer component to check for charge options

issue #1778 specifically asked for similar api on the solar upgrade, but we didn't want to make the solar upgrade a component. Doing so would increase the component load of existing robots, which could cause existing robots to simply fail.

thus this is a compromise to that request

closes #1778
2018-03-17 20:46:30 -07:00
payonel
4a83d4426d allow the robot to swing at anything that would block its movement
closes #1840
2018-03-17 19:58:23 -07:00
payonel
0095f33522 cleanup 2018-03-16 19:45:45 -07:00
payonel
37c3ddaf91 slot tier weighted fill
closes #1658
2018-03-16 19:45:39 -07:00
payonel
c69c9e6748 returning just the first value of debug getlocal and getupvalue
the suggested access was to return nil always as the value, but these values aren't nil, and I felt it reasonable to return at least the variable name and not mislead that the value was nil

closes #1607
2018-03-14 23:31:43 -07:00
payonel
d020e0d941 add new redstone_changed color parameter for bundled input
bundled inputs now include the color of the input that changed
also, the redstone_change signal for bundled input no longer sends the MAX old and MAX new values, but instead, only the old and new values of the specific color that changed

closes #1385
2018-03-14 17:29:36 -07:00