init; removed all software/lua from mod
17
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
# Auto detect text files and perform LF normalization
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
# Custom for Visual Studio
|
||||||
|
*.cs diff=csharp
|
||||||
|
|
||||||
|
# Standard to msysgit
|
||||||
|
*.doc diff=astextplain
|
||||||
|
*.DOC diff=astextplain
|
||||||
|
*.docx diff=astextplain
|
||||||
|
*.DOCX diff=astextplain
|
||||||
|
*.dot diff=astextplain
|
||||||
|
*.DOT diff=astextplain
|
||||||
|
*.pdf diff=astextplain
|
||||||
|
*.PDF diff=astextplain
|
||||||
|
*.rtf diff=astextplain
|
||||||
|
*.RTF diff=astextplain
|
||||||
262
API.md
Normal file
|
|
@ -0,0 +1,262 @@
|
||||||
|
# Laptop Mod API
|
||||||
|
|
||||||
|
## Add new hardware nodes
|
||||||
|
`laptop.register_hardware(name, hwdef)`
|
||||||
|
- `name` - Item name (prefix) The created node names are name_variant
|
||||||
|
- `hwdef.description` - Computer item name
|
||||||
|
- `hwdef.infotext` - Text shown if node is pointed
|
||||||
|
- `hwdef.sequence` = { "variant_1_name", "variant_2_name", "variant_3_name" } On punch swaps sequence. the first variant is in creative inventory
|
||||||
|
- `hwdef.custom_launcher` - optional - custom launcher name
|
||||||
|
- `hwdef.os_version` - optional - Set OS version. ('1.10', '3.31' or '6.33') By default the latest version is used
|
||||||
|
- `hwdef.tty_style` - optional - override CS-BOS console textcolor
|
||||||
|
- `hwdef.tty_monochrome` - Old computer with monochrome CRT screen
|
||||||
|
- `hwdef.custom_theme` - optional - custom initial theme name
|
||||||
|
- `hwdef.hw_capabilities` = { "hdd", "floppy", "usb", "net", "liveboot" } Table with hardware capabilities. Default is all, if nothing set
|
||||||
|
- `hwdef.battery_capacity` - battery capacity (used if technic mod is aviable)
|
||||||
|
- `hwdef.node_defs` - A list for node definitions for each variant. with hw_state parameter for OS-initialization
|
||||||
|
```
|
||||||
|
hwdef.node_defs = {
|
||||||
|
variant_1_name = {
|
||||||
|
hw_state = "resume", "power_on" or "power_off", -- Hardware state
|
||||||
|
_eu_demand = 100, -- required technic power
|
||||||
|
_power_off_seq = "variant_name", -- name of variant for switch when power source is not aviable
|
||||||
|
_battery_charge = 400, -- speed of batter charging (with technin mod)
|
||||||
|
--node 1 definiton
|
||||||
|
},
|
||||||
|
variant_2_name = {
|
||||||
|
hw_state = "resume", "power_on" or "power_off", -- Hardware state
|
||||||
|
--node 2 definiton
|
||||||
|
},
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- `laptop.os_get(pos)` - Get an OS object. Usefull in on_construct or on_punch to initialize or do anything with OS
|
||||||
|
Needed in on_receive_fields to be able to call mtos:receive_fields(fields, sender) for interactive apps
|
||||||
|
- `laptop.after_place_node` / `laptop.after_dig_node` - (optional) can be used directly for node definition. Move laptop apps data to ItemStack if digged and restored back if placed again. So you can take along your laptop. Note: you need to set `stack_max = 1` because the data can be stored per stack only, not per item.
|
||||||
|
|
||||||
|
|
||||||
|
## Operating system object
|
||||||
|
`local mtos = laptop.os_get(pos)` - Get the Operating system object. Used internally, but usable for remote operations. mtos is passed to app methods as parameter
|
||||||
|
|
||||||
|
### Operating system methods
|
||||||
|
- `mtos:power_on(new_node_name)` - Free RAM, activate the launcher and if given swap node to new_node_name
|
||||||
|
- `mtos:resume(new_node_name)` - Restore the last running app after power_off. Means no free ram and no switch to launcher. Update formspec and if given swap node to new_node_name
|
||||||
|
- `mtos:power_off(new_node_name)` - Remove the formspec and if given swap node to new_node_name
|
||||||
|
- `mtos:swap_node(new_node_name)`- Swap the node only without any changes on OS
|
||||||
|
- `mtos:set_infotext(infotext)` - Set the mouseover infotext for laptop node
|
||||||
|
- `mtos:get_app(appname)`- Get the app instance
|
||||||
|
- `mtos:set_app(appname)` - Start/Enable/navigate to appname. If no appname given the launcher is called
|
||||||
|
- `mtos:get_theme(theme)`- Get theme data current or requested (theme parameter is optional)
|
||||||
|
- `mtos:set_theme(theme)`- Activate theme
|
||||||
|
- `mtos:get_os_attr()`- Get OS-version attributes (see mtos.os_attr)
|
||||||
|
- `mtos:save()` - Store all app-data to nodemeta. Called mostly internally so no explicit call necessary
|
||||||
|
- `mtos:pass_to_app(method, reshow, sender, ...)` - call custom "method" on app object. Used internally. Reshow means update formspec after update
|
||||||
|
- `mtos:select_file_dialog(param)` - call the select file dialog ('os:select_file')
|
||||||
|
```
|
||||||
|
if fields.load then
|
||||||
|
mtos:select_file_dialog({
|
||||||
|
mode = 'open', -- open/select or save mode
|
||||||
|
allowed_disks = {'hdd', 'removable'}, -- disks shown in disk overview ('ram', 'hdd', 'removable', 'cloud' or 'system')
|
||||||
|
selected_disk_name = data.selected_disk_name, -- Start selection on disk
|
||||||
|
selected_file_name = data.selected_file_name, -- Start selection with file
|
||||||
|
store_name = store_area, -- The storage_name used for fliles (Sample 'stickynote:files')
|
||||||
|
prefix = 'open_', -- Prefix for return files
|
||||||
|
})
|
||||||
|
elseif fields.open_selected_disk and fields.open_selected_file then
|
||||||
|
data.selected_disk_name = fields.open_selected_disk -- Selected disk (prefix 'open_' is used)
|
||||||
|
data.selected_file_name = fields.open_selected_file -- Selected file (prefix 'open_' is used)
|
||||||
|
```
|
||||||
|
- `mtos:print_file_dialog({ label= , text= })` - call the print file dialog ('printer:app')
|
||||||
|
|
||||||
|
### Operating system attributes
|
||||||
|
`mtos.pos` - Computers position vector
|
||||||
|
`mtos.node` = minetest.get_node(pos)
|
||||||
|
`mtos.hwdef` = Merged hardware definition (Hardware + Hardware node attributes merged to 1 object)
|
||||||
|
`mtos.meta` = Nade meta - mostly managed by block device framework
|
||||||
|
`mtos.bdev` = Block device framework object
|
||||||
|
`mtos.sysram` = System/OS ram partition, mtos.bdev:get_app_storage('ram', 'os')
|
||||||
|
`mtos.sysdata` = System/OS data partition, mtos.bdev:get_app_storage('system', 'os')
|
||||||
|
`mtos.theme` = Selected theme object
|
||||||
|
`mtos.os_attr` = Hard-coded attributes for OS version
|
||||||
|
`releaseyear`
|
||||||
|
`version_string`
|
||||||
|
`blacklist_commands` CS-BOS interpreter
|
||||||
|
`tty_style` CS-BOS Console color. Supported GREEN, AMBER, WHITE
|
||||||
|
`tty_monochrome` CS-BOS Console is monochrome, no color change supported
|
||||||
|
`min_scrollback_size` CS-BOS Buffer
|
||||||
|
`max_scrollback_size` CS-BOS Buffer
|
||||||
|
`custom_launcher` Custom launcher for OS (can be overriden on node level)
|
||||||
|
`custom_theme` Custom theme for OS (can be overriden on node level)
|
||||||
|
|
||||||
|
## Apps
|
||||||
|
### Definition attributes
|
||||||
|
`laptop.register_app(internal_shortname, { definitiontable })` - add a new app or view
|
||||||
|
- `app_name` - App name shown in launcher. If not defined the app is just a view, not visible in launcher but can be activated. This way multi-screen apps are possible
|
||||||
|
- `app_icon` - Icon to be shown in launcher. If nothing given the default icon is used
|
||||||
|
- `app_info` - Short app info visible in launcher tooltip
|
||||||
|
- `os_min_version` - minimum version to be used (CS-BOS, optional)
|
||||||
|
- `os_max_version` - maximum version to be used (CS-BOS, optional)
|
||||||
|
- `fullscreen` - (boolean) Do not add app-background and window buttons
|
||||||
|
- `view` - (boolean) The definition is a view. That means the app/view is not visible in launcher
|
||||||
|
- `browser_page` - (boolean) This view is shown in browser app as available page
|
||||||
|
- `formspec_func(app, mtos)` - Function, should return the app formspec (mandatory) During definition the "app" and the "mtos" are available
|
||||||
|
- `appwindow_formspec_func(launcher_app, app, mtos)`- Only custom launcher app: App background / Window decorations and buttons
|
||||||
|
- `receive_fields_func(app, mtos, sender, fields)` Function for input processing. The "app" and the "mtos" are available inside the call
|
||||||
|
- `allow_metadata_inventory_put(app, mtos, player, listname, index, stack)` - Optional: custom actions on item put
|
||||||
|
- `allow_metadata_inventory_take(app, mtos, player, listname, index, stack)` - Optional: custom actions on item take
|
||||||
|
- `allow_metadata_inventory_move(app, mtos, player, from_list, from_index, to_list, to_index, count)` - Optional: custom actions on item move
|
||||||
|
- `on_metadata_inventory_put(app, mtos, player, listname, index, stack)` - Optional: custom check on items put
|
||||||
|
- `on_metadata_inventory_take(app, mtos, player, listname, index, stack)` - Optional: custom check on items put
|
||||||
|
- `on_metadata_inventory_move(app, mtos, player, from_list, from_index, to_list, to_index, count)` - Optional: custom check on items put
|
||||||
|
- `on_timer(app, mtos, nil, elapsed) - Optional. The on-timer callback (no sender)
|
||||||
|
|
||||||
|
`laptop.register_view(internal_shortname, { definitiontable })` - add a new app or view
|
||||||
|
same as register_app, but the view flag is set. app_name and app_icon not necessary
|
||||||
|
|
||||||
|
### App Object
|
||||||
|
`local app = mtos:get_app(appname)` - Give the app object internal_shortname, connected to given mtos. Not necessary in formspec_func or receive_fields_func because given trough interface
|
||||||
|
- `app:back_app(fields, sender)` - Go back to previous app/view. Trough fields/sender additional data can be sent to the previous app trough receive_fields_func
|
||||||
|
- `app:exit_app()` - Delete call stack and return to launcher
|
||||||
|
- `app:get_timer()` - Get timer for this app (based on nodetimer)
|
||||||
|
|
||||||
|
## Themes
|
||||||
|
### Theme definition
|
||||||
|
`laptop.register_theme(name, definitiontable)` - add a new theme. All parameters optional, if missed, the default is used
|
||||||
|
The most colors are grouped by "prefixes". Each prefix means a specific content to be themed.
|
||||||
|
#### Theme suffixes
|
||||||
|
- background - A background texture
|
||||||
|
- button - A foreground texture, used on buttons
|
||||||
|
- bgcolor - Background RGB color, should be the same color as background texture
|
||||||
|
- textcolor - Foreground RGB color used for label text or button texts
|
||||||
|
|
||||||
|
#### Theme prefixes
|
||||||
|
- desktop - Main launcher
|
||||||
|
- `desktop_background` Desktop background image
|
||||||
|
- desktop_icon - The App icon in main launcher
|
||||||
|
- `desktop_icon_button` App button background in launcher
|
||||||
|
- desktop_icon_label The label under the app icon in main launcher (technically a button too)
|
||||||
|
- `desktop_icon_label_button` Background texture for icon label text
|
||||||
|
- `desktop_icon_label_textcolor` Icon label text color
|
||||||
|
|
||||||
|
- app - App decorations
|
||||||
|
- `app_background` Apps background image, adds titlebar
|
||||||
|
- titlebar - The titlebar on app decorations
|
||||||
|
- `titlebar_textcolor` Sets the color of text on app titlebar
|
||||||
|
- back - The back button on app decoration
|
||||||
|
- `back_button` Back Button image
|
||||||
|
- `back_textcolor` Back Button textclolor (for '<' character)
|
||||||
|
- exit - The exit button on app decoration
|
||||||
|
- `exit_button` Exit button image
|
||||||
|
- `exit_textcolor` Exit button textcolor (for 'X' character)
|
||||||
|
- `exit_character` Sets the character that shows up in the close box, X is default
|
||||||
|
|
||||||
|
- major - Highlighted Button
|
||||||
|
- `major_button` Major (highlighted) button image
|
||||||
|
- `major_textcolor` Major (highlighted) button text color
|
||||||
|
|
||||||
|
- minor - not highlighted button
|
||||||
|
- `minor_button` Minor button image
|
||||||
|
- `minor_textcolor` Minor button text color
|
||||||
|
|
||||||
|
- contrast - dark background in contrast for not themeable elements
|
||||||
|
- `contrast_background` dark background to place under white text elements that does not support textcolor
|
||||||
|
- `contrast_bgcolor` dark background as RGB
|
||||||
|
- `contrast_textcolor` some labels are placed on contrast background. This color is used to colorize them
|
||||||
|
|
||||||
|
- toolbar - Toolbar buttons
|
||||||
|
`toolbar_button` Button unterlay
|
||||||
|
`toolbar_textcolor` Toolbar buttons textcolor
|
||||||
|
|
||||||
|
- status_online - Used to show status information "online / green"
|
||||||
|
- `status_online_textcolor` - Sets "online" text color for peripherals
|
||||||
|
- status_disabled - Used to show status information "disabled / yellow"
|
||||||
|
- `status_disabled_textcolor` - Sets "disabled" text color for peripherals
|
||||||
|
- status_off - Used to show status information "off / red"
|
||||||
|
- `status_off_textcolor =` - Sets "offline" text color for peripherals
|
||||||
|
|
||||||
|
- table - Colorize the table-like output
|
||||||
|
- `table_bgcolor` - Table background color
|
||||||
|
- `table_textcolor` - Table text color
|
||||||
|
- table_highlight - Colorize the selection in tables
|
||||||
|
- `table_highlight_bgcolor` - Table highlighted background
|
||||||
|
- `table_highlight_textcolor` - Table highlighted textcolor
|
||||||
|
- muted - muted color
|
||||||
|
- `muted_textcolor` - Table textcolor muted
|
||||||
|
|
||||||
|
- monochrome - Optimized for monochrome output (old computers). Some elements will be colorized using this color
|
||||||
|
- `monochrome_textcolor` - default is nil. if set to RGB, colorization is applied on some textures (like tetris shapes)
|
||||||
|
|
||||||
|
- url - Browser URL's for default background
|
||||||
|
`url_textcolor`
|
||||||
|
`url_button`
|
||||||
|
|
||||||
|
- url_dark - Browser URL's for dark background
|
||||||
|
`url_dark_textcolor`
|
||||||
|
`url_dark_button`
|
||||||
|
|
||||||
|
- url_bright - Browser URL's for white background
|
||||||
|
`url_bright_textcolor`
|
||||||
|
`url_bright_button`
|
||||||
|
|
||||||
|
- fallback - without prefix (obsolete)
|
||||||
|
- `textcolor` Default text color for buttons and labels. Each "prefix" can have own textcolor, like major_textcolor and minor_textcolor for major/minor buttons or labels
|
||||||
|
|
||||||
|
- Other settings / without prefix
|
||||||
|
- `taskbar_clock_position_and_size` Set where the clock is positioned and its size on the taskbar
|
||||||
|
- `node_color` Palette number to set if the node is paramtype2 = "colorfacedir" (inactive)
|
||||||
|
- `os_min_version` - minimum version to be used (CS-BOS, optional)
|
||||||
|
- `os_max_version` - maximum version to be used (CS-BOS, optional)
|
||||||
|
- `table_border` - draw tables border (true or false)
|
||||||
|
- `texture_replacements` - A table with texture replacements, defined as { ['orig_texture_name.png'] = 'themed_texture_name.png', }
|
||||||
|
|
||||||
|
### Theme methods
|
||||||
|
`function laptop.get_theme(theme_name)`
|
||||||
|
- `theme:get_button(area, prefix, code, text)` get a themed [prefix]_button in area 'x,y;w,h' with code and text
|
||||||
|
- `theme:get_image_button(area, prefix, code, image, text)` get a themed [prefix]_button in area 'x,y;w,h' with code an image and text. Text is colorized by [prefix]_textcolor or textcolor
|
||||||
|
- `theme:get_label(pos, text, color_prefix)` get a themed label text starting at pos 'x,y', colorize theme by color prefix (usually the button text colors)
|
||||||
|
- `theme:get_texture(image)` get replacement for texture image if set in theme or the image. Called internally from get_image_button()
|
||||||
|
- `theme:get_tableoptions(show_select_bar)` get themed tableoptions string before table[]. If show_select_bar is set to false, the highlight values are the same as non-highlight so no selection is visible
|
||||||
|
- `theme:get_bgcolor_box(area, prefix)` get plain box colorized by [prefix]_bgcolor or bgcolor
|
||||||
|
|
||||||
|
## Block devices / Data objects
|
||||||
|
`mtos.bdev = laptop.get_bdev_handler(mtos)`
|
||||||
|
|
||||||
|
### Low-Level methods
|
||||||
|
Can be used for non-data and/or system tasks. For usual data store please use the storage methods
|
||||||
|
- `bdev:get_ram_disk()` ram store - a table with all app-related storage partitions
|
||||||
|
- `bdev:get_hard_disk()` hdd store - a table with all app-related storage partitions, if hard disk capatibility exists
|
||||||
|
- `bdev:get_removable_disk()` removable data object (drive)
|
||||||
|
- `bdev:get_cloud_disk(storage_name)` - Get named cloud storage
|
||||||
|
- `bdev:sync()` - Write/store all opened and maybe changed data (cached)
|
||||||
|
- `bdev:sync_cloud()` - Write/store all opened and maybe changed data in cloud
|
||||||
|
|
||||||
|
### Storage methods
|
||||||
|
- `get_boot_disk()` - Check which device can be booted. possible return value is "hdd" or "removable"
|
||||||
|
- `get_app_storage(disk_type, storage_name)` - Get data storage table to be used in apps.
|
||||||
|
- disk_type can be 'ram', 'hdd', 'removable', 'cloud' or 'system'. System is eather hdd or removable storage depending on booted device
|
||||||
|
- store_name is usually the app name. 'os' is reserved for System related saves
|
||||||
|
|
||||||
|
### Low-level Removable data
|
||||||
|
`data = bdev:get_removable_disk()`
|
||||||
|
- `bdev.inv` - node inventory (the slot)
|
||||||
|
- `bdev.label` - Meda label. Item name by default
|
||||||
|
- `bdev.def` - Registered item definition (read-only)
|
||||||
|
- `bdev.stack` - The item stack
|
||||||
|
- `bdev.meta` - Stack metadata
|
||||||
|
- `bdev.os_format`- The format type: "none", "boot", "backup", "filesystem" (read-only)
|
||||||
|
- `bdev.rtype` - Removable type. "usb" or "floppy"
|
||||||
|
- `bdev.storage` - Data table used for app storage, if format is data compatible
|
||||||
|
- `bdev:reload(stack)` - Reload all data from node inventory. If stack is given, the stack will be inserted to slot
|
||||||
|
- `bdev:eject()` - Remove item from slot and drop them to the world nearly computer
|
||||||
|
- `bdev:format_disk(ftype, label)` - Format the disk. ftype can be "" or nil, "data" "backup" or "boot"
|
||||||
|
|
||||||
|
## Compatible Items
|
||||||
|
There is no own compatible items registrator. The item needs to match the item group to be usable with the laptops
|
||||||
|
- `laptop_removable_floppy = 1` - The item is a floppy
|
||||||
|
- `laptop_removable_usb = 1` - The item is usb storage disk
|
||||||
|
|
||||||
|
## Browser app specific functions
|
||||||
|
- `laptop.browser_api.navigate(app, mtos, pagename)` Check the "pagename" and start if the app have browser_page setting
|
||||||
|
- `formspec = laptop.browser_api.header_formspec_func(app, mtos)` Contains the formspec for navigation bar. Needs to be included to all pages
|
||||||
|
- `laptop.browser_api.header_receive_fields_func(app, mtos, sender, fields)` Process the navigation bar buttons. Needs to be included to all pages
|
||||||
|
|
||||||
9
LICENSE.txt
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
================================================================
|
||||||
|
License of source code and textures: WTFPL
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
This program is free software. It comes without any warranty, to
|
||||||
|
the extent permitted by applicable law. You can redistribute it
|
||||||
|
and/or modify it under the terms of the do whatever you want with it.
|
||||||
|
To Public License, Version 2, as published by Sam Hocevar. See
|
||||||
|
http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||||
|
================================================================
|
||||||
11
README-LICENSE.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
Laptop created by GamingAssociation39
|
||||||
|
|
||||||
|
================================================================
|
||||||
|
License of source code and textures: LGPL v3
|
||||||
|
|
||||||
|
Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.
|
||||||
|
================================================================
|
||||||
77
README.md
Normal file
|
|
@ -0,0 +1,77 @@
|
||||||
|
# Laptop | Computers emulation for Minetest
|
||||||
|
|
||||||
|
The Laptop mod is a group collaboration between bell07, Cross_over, Gerold55, Toby109tt, v-rob, veNext, Grizzly Adam and Yours truly lol.
|
||||||
|
We aim to make a working laptop inside of MineTest.
|
||||||
|
There are different computers, apps which run on computers, media to store data and different themes to personalize the appearance.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
An [API.md](https://github.com/Gerold55/minetest-laptop/blob/master/API.md) is given to develop additional components.
|
||||||
|
The mod includes next components:
|
||||||
|
|
||||||
|
## Hardware
|
||||||
|
|
||||||
|
| Itemname | Name | Author |
|
||||||
|
| - | - | - |
|
||||||
|
| core | CP Core | by Cross_over and Gerold55 |
|
||||||
|
| printer | Flash Printex | by Cross_over and Gerold55 |
|
||||||
|
| cube | CUBE PC | by Cross_over and Gerold55 |
|
||||||
|
| monitor2 | Fruit Zero | by Cross_over and Gerold55 |
|
||||||
|
| monitor4 | Bell CrossOver | by Cross_over and Gerold55 |
|
||||||
|
| monitor3 | Pentium 3 | by Cross_over and Gerold55 |
|
||||||
|
| laptop | laptop v2.0 | by Cross_over and Gerold55 |
|
||||||
|
|
||||||
|
## Items
|
||||||
|
| Itemname | Description | Author |
|
||||||
|
| - | - | - |
|
||||||
|
| floppy | Boot old computer or just store data | by Toby109tt and Cross_over |
|
||||||
|
| usbstick | Store data or take full computer backup | by Toby109tt and Cross_over |
|
||||||
|
| printed_paper | Show printed text on use | by Toby109tt and Cross_over |
|
||||||
|
|
||||||
|
## Software
|
||||||
|
### System
|
||||||
|
| Name | Description | Author |
|
||||||
|
| - | - | - |
|
||||||
|
| mtos/app_fw/bdev | Operating System | by bell07 |
|
||||||
|
| launcher | Desktop launcher | by bell07, app icons by Toby109tt and Cross_over |
|
||||||
|
| launcher_settings | Theme selector | by bell07 |
|
||||||
|
| os_dialogs | Select file dialog | by bell07 |
|
||||||
|
| os_print | Printer OS and driver | by bell07 |
|
||||||
|
| removable | Removable storage manager | by bell07 |
|
||||||
|
| CS-BOS | Text based Operating System | by Grizzly Adam and bell07 |
|
||||||
|
|
||||||
|
### Office
|
||||||
|
| Name | Description | Author |
|
||||||
|
| - | - | - |
|
||||||
|
| calculator | Calculator | by bell07 |
|
||||||
|
| mail | Email service | by bell07 |
|
||||||
|
| stickynote | Text editor | by bell07 |
|
||||||
|
|
||||||
|
### Games
|
||||||
|
| Name | Description | Author |
|
||||||
|
| - | - | - |
|
||||||
|
| tetris | Tetris clone | by kilbith (Ported from homedecor by bell07) |
|
||||||
|
| TNTsweeper | Minesweeper clone | by bell07 |
|
||||||
|
| realchess | Chess game | by kilbith (Ported from realchess by bell07) |
|
||||||
|
|
||||||
|
## Themes
|
||||||
|
| Name | Description | Author |
|
||||||
|
| - | - | - |
|
||||||
|
| amber shell | | by Grizzly Adam |
|
||||||
|
| argyle | | by Grizzly Adam |
|
||||||
|
| basic | | by v-rob |
|
||||||
|
| blue | | by v-rob |
|
||||||
|
| boing! | | by Grizzly Adam |
|
||||||
|
| bubbles | | by veNext |
|
||||||
|
| Circuit | | by Grizzly Adam |
|
||||||
|
| clouds | | by Grizzly Adam |
|
||||||
|
| cubic | | by v-rob |
|
||||||
|
| fruit | | by veNext |
|
||||||
|
| green shell | | by Grizzly Adam |
|
||||||
|
| magma | | by v-rob |
|
||||||
|
| red | | by v-rob |
|
||||||
|
| shell | | by Grizzly Adam |
|
||||||
|
| snow pines | | by Grizzly Adam |
|
||||||
|
|
||||||
|
|
||||||
|
V.0.38
|
||||||
215
craftitems.lua
Normal file
|
|
@ -0,0 +1,215 @@
|
||||||
|
local rc = laptop.recipe_compat -- Recipe items from other mods
|
||||||
|
|
||||||
|
----------------------------
|
||||||
|
---------PROCESSORS---------
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
minetest.register_craftitem("laptop:cpu_c6", {
|
||||||
|
description = 'Ziram c6 Processor',
|
||||||
|
inventory_image = "laptop_cpu_c6.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:cpu_c6',
|
||||||
|
recipe = {
|
||||||
|
{'', '', ''},
|
||||||
|
{rc.silicon, rc.gates_diode, rc.tin},
|
||||||
|
{rc.gates_and, rc.gates_or, rc.gates_nand},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("laptop:cpu_d75a", {
|
||||||
|
description = 'Interlink D75A Processor',
|
||||||
|
inventory_image = "laptop_cpu_d75a.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:cpu_d75a',
|
||||||
|
recipe = {
|
||||||
|
{rc.silicon, rc.silicon, rc.silicon},
|
||||||
|
{rc.gates_xor, rc.copper, rc.gates_nand},
|
||||||
|
{rc.fpga, rc.programmer, rc.fpga},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("laptop:cpu_jetcore", {
|
||||||
|
description = 'Interlink jetCore Processor',
|
||||||
|
inventory_image = "laptop_cpu_jetcore.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:cpu_jetcore',
|
||||||
|
recipe = {
|
||||||
|
{rc.silicon, rc.silicon, rc.silicon},
|
||||||
|
{rc.fiber, rc.gold, rc.delayer},
|
||||||
|
{rc.fpga, rc.controller, rc.programmer},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("laptop:cpu_65536", {
|
||||||
|
description = 'Transpose 65536 Processor',
|
||||||
|
inventory_image = "laptop_cpu_65536.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:cpu_65536',
|
||||||
|
recipe = {
|
||||||
|
{'', '', ''},
|
||||||
|
{rc.silicon, rc.copper, rc.silicon},
|
||||||
|
{rc.gates_not, rc.fpga, rc.delayer},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("laptop:bat", {
|
||||||
|
description = 'Battery',
|
||||||
|
inventory_image = "laptop_bat.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:bat',
|
||||||
|
recipe = {
|
||||||
|
{rc.steel, rc.battery, rc.steel},
|
||||||
|
{rc.battery, rc.gates_diode, rc.battery},
|
||||||
|
{rc.steel, rc.battery, rc.steel},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("laptop:case", {
|
||||||
|
description = 'Case',
|
||||||
|
inventory_image = "laptop_case.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:case',
|
||||||
|
recipe = {
|
||||||
|
{rc.steel, rc.steel, rc.steel},
|
||||||
|
{rc.steel, '', rc.steel},
|
||||||
|
{rc.steel, rc.steel, rc.steel},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("laptop:crt", {
|
||||||
|
description = 'CRT Screen',
|
||||||
|
inventory_image = "laptop_crt.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:crt',
|
||||||
|
recipe = {
|
||||||
|
{rc.glass, rc.glass, rc.glass},
|
||||||
|
{rc.light_red , rc.light_green, rc.light_blue},
|
||||||
|
{rc.steel, rc.controller, rc.steel},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("laptop:crt_amber", {
|
||||||
|
description = 'Amber CRT Screen',
|
||||||
|
inventory_image = "laptop_crt_amber.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:crt_amber',
|
||||||
|
recipe = {
|
||||||
|
{rc.glass, 'dye:orange', rc.glass},
|
||||||
|
{rc.light_red , rc.light_green, rc.light_blue},
|
||||||
|
{rc.steel, rc.controller, rc.steel},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("laptop:crt_green", {
|
||||||
|
description = 'Green CRT Screen',
|
||||||
|
inventory_image = "laptop_crt_green.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:crt_green',
|
||||||
|
recipe = {
|
||||||
|
{rc.glass, 'dye:green', rc.glass},
|
||||||
|
{rc.light_red , rc.light_green, rc.light_blue},
|
||||||
|
{rc.steel, rc.controller, rc.steel},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("laptop:lcd", {
|
||||||
|
description = 'LCD Screen',
|
||||||
|
inventory_image = "laptop_lcd.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:lcd',
|
||||||
|
recipe = {
|
||||||
|
{rc.light_red , rc.light_green, rc.light_blue},
|
||||||
|
{'dye:black', rc.controller, 'dye:black'},
|
||||||
|
{rc.steel, rc.diamond, rc.steel},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("laptop:gpu", {
|
||||||
|
description = 'GPU',
|
||||||
|
inventory_image = "laptop_gpu.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:gpu',
|
||||||
|
recipe = {
|
||||||
|
{rc.steel, rc.silicon, rc.steel},
|
||||||
|
{'laptop:fan', rc.fpga, 'laptop:fan'},
|
||||||
|
{rc.steel, rc.silicon, rc.steel},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("laptop:HDD", {
|
||||||
|
description = 'Hard Drive',
|
||||||
|
inventory_image = "laptop_harddrive.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:HDD',
|
||||||
|
recipe = {
|
||||||
|
{rc.steel, rc.steel, rc.steel},
|
||||||
|
{rc.steel, rc.controller, rc.steel},
|
||||||
|
{rc.steel, rc.steel, rc.steel},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("laptop:motherboard", {
|
||||||
|
description = 'Motherboard',
|
||||||
|
inventory_image = "laptop_motherboard.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:motherboard',
|
||||||
|
recipe = {
|
||||||
|
{rc.controller, rc.fpga, rc.gates_nand},
|
||||||
|
{'dye:dark_green', 'dye:dark_green', 'dye:dark_green'},
|
||||||
|
{rc.steel, rc.copper, rc.steel},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("laptop:fan", {
|
||||||
|
description = 'Fan',
|
||||||
|
inventory_image = "laptop_fan.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:fan',
|
||||||
|
recipe = {
|
||||||
|
{'', rc.plastic, ''},
|
||||||
|
{rc.plastic, rc.motor, rc.plastic},
|
||||||
|
{'', rc.plastic, ''},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("laptop:psu", {
|
||||||
|
description = 'PSU',
|
||||||
|
inventory_image = "laptop_psu.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:psu',
|
||||||
|
recipe = {
|
||||||
|
{rc.steel, rc.lv_transformer, rc.steel},
|
||||||
|
{rc.controller, rc.fpga, 'laptop:fan'},
|
||||||
|
{rc.steel, rc.lv_transformer, rc.steel},
|
||||||
|
}
|
||||||
|
})
|
||||||
70
hardware_fw.lua
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
-- hardware_fw.lua (Minimal-Version für Deko-Zwecke)
|
||||||
|
|
||||||
|
laptop.node_config = {}
|
||||||
|
|
||||||
|
-- 1. Die neue, extrem vereinfachte Punch-Funktion
|
||||||
|
-- Diese Funktion tut nur noch eine Sache: Sie schaltet zum nächsten Node in der Sequenz um.
|
||||||
|
local function on_punch(pos, node, puncher)
|
||||||
|
-- Finde die Konfiguration des aktuellen Nodes
|
||||||
|
local hwdef = laptop.node_config[node.name]
|
||||||
|
|
||||||
|
-- Wenn ein "nächster Node" definiert ist, wechsle zu diesem.
|
||||||
|
if hwdef and hwdef.next_node then
|
||||||
|
-- KORREKTUR: Wir übergeben auch den alten param2-Wert, um die Ausrichtung beizubehalten.
|
||||||
|
minetest.swap_node(pos, {name = hwdef.next_node, param2 = node.param2})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- 2. Die neue, entschlackte Registrierungs-Funktion
|
||||||
|
-- Diese "Fabrik" baut die Nodes. Wir haben alles entfernt, was nicht für die reine
|
||||||
|
-- Darstellung und die simple Punch-Funktion gebraucht wird.
|
||||||
|
function laptop.register_hardware(name, hwdef)
|
||||||
|
local default_nodename = name.."_"..hwdef.sequence[1]
|
||||||
|
|
||||||
|
for idx, variant in ipairs(hwdef.sequence) do
|
||||||
|
local nodename = name.."_"..variant
|
||||||
|
local def = table.copy(hwdef.node_defs[variant])
|
||||||
|
|
||||||
|
def.description = hwdef.description
|
||||||
|
|
||||||
|
-- Basis-Gruppen, damit man den Node abbauen kann
|
||||||
|
if def.groups then
|
||||||
|
def.groups = table.copy(def.groups) -- Behalte ggf. spezifische Gruppen
|
||||||
|
else
|
||||||
|
def.groups = {choppy=2, oddly_breakably_by_hand=2, dig_immediate=2}
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Wenn es nicht der Standard-Node ist, droppe den Standard-Node
|
||||||
|
if nodename ~= default_nodename then
|
||||||
|
def.drop = default_nodename
|
||||||
|
def.groups.not_in_creative_inventory = 1
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Weise unsere simple Punch-Funktion zu
|
||||||
|
def.on_punch = on_punch
|
||||||
|
|
||||||
|
-- Registriere den Node bei Minetest
|
||||||
|
minetest.register_node(nodename, def)
|
||||||
|
|
||||||
|
-- Speichere die Konfiguration für unsere Punch-Funktion
|
||||||
|
local merged_hwdef = {}
|
||||||
|
merged_hwdef.name = name
|
||||||
|
merged_hwdef.nodename = nodename
|
||||||
|
|
||||||
|
-- Finde den nächsten Node in der Sequenz (z.B. "on" -> "off")
|
||||||
|
local next_seq = hwdef.sequence[idx+1] or hwdef.sequence[1]
|
||||||
|
local next_node = name.."_"..next_seq
|
||||||
|
if next_node ~= nodename then
|
||||||
|
merged_hwdef.next_node = next_node
|
||||||
|
end
|
||||||
|
|
||||||
|
laptop.node_config[nodename] = merged_hwdef
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Wenn eine spezielle Item-Definition für Batterien etc. da war,
|
||||||
|
-- ersetzen wir sie durch einen simplen Alias, damit die Crafting-Rezepte nicht ins Leere laufen.
|
||||||
|
if hwdef.inventory_image then
|
||||||
|
minetest.register_alias(name.."_item", default_nodename)
|
||||||
|
end
|
||||||
|
end
|
||||||
557
hardware_nodes.lua
Normal file
|
|
@ -0,0 +1,557 @@
|
||||||
|
laptop.register_hardware("laptop:core", {
|
||||||
|
description = "CP Core",
|
||||||
|
infotext = 'CP Core',
|
||||||
|
sequence = { "closed", "open", "open_on" },
|
||||||
|
custom_theme = "Red",
|
||||||
|
hw_capabilities = { 'hdd', 'usb', 'net' },
|
||||||
|
battery_capacity = 80000,
|
||||||
|
inventory_image = "laptop_lap_car_item.png",
|
||||||
|
node_defs = {
|
||||||
|
["open"] = {
|
||||||
|
hw_state = "power_off",
|
||||||
|
tiles = {
|
||||||
|
"laptop_lap_car_open_top.png",
|
||||||
|
"laptop_lap_car_sc_open_bottom.png^laptop_lap_car_bottom.png",
|
||||||
|
"laptop_lap_car_open_right.png",
|
||||||
|
"laptop_lap_car_open_left.png",
|
||||||
|
"laptop_lap_car_sc_open_bottom.png^laptop_lap_car_open_back.png",
|
||||||
|
"laptop_lap_car_open_front.png^laptop_lap_car_sc_open_front.png",
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, 0.375}, -- base_open
|
||||||
|
{-0.4375, -0.4375, 0.375, 0.4375, 0.3125, 0.4375}, -- sc_open
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["open_on"] = {
|
||||||
|
hw_state = "resume",
|
||||||
|
_power_off_seq = "open",
|
||||||
|
_eu_demand = 100,
|
||||||
|
_battery_charge = 400,
|
||||||
|
light_source = 4,
|
||||||
|
tiles = {
|
||||||
|
"laptop_lap_car_open_on_top.png",
|
||||||
|
"laptop_lap_car_sc_open_bottom.png^laptop_lap_car_bottom.png",
|
||||||
|
"laptop_lap_car_open_right.png",
|
||||||
|
"laptop_lap_car_open_left.png",
|
||||||
|
"laptop_lap_car_sc_open_bottom.png^laptop_lap_car_open_back.png",
|
||||||
|
"laptop_lap_car_open_front.png^laptop_lap_car_sc_open_on_front.png",
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, 0.375}, -- base_open
|
||||||
|
{-0.4375, -0.4375, 0.375, 0.4375, 0.3125, 0.4375}, -- sc_open
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["closed"] = {
|
||||||
|
hw_state = "power_off",
|
||||||
|
tiles = {
|
||||||
|
"laptop_lap_car_closed_top.png",
|
||||||
|
"laptop_lap_car_bottom.png",
|
||||||
|
"laptop_lap_car_closed_right.png",
|
||||||
|
"laptop_lap_car_closed_left.png",
|
||||||
|
"laptop_lap_car_closed_back.png",
|
||||||
|
"laptop_lap_car_closed_front.png",
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.4375, -0.5, -0.4375, 0.4375, -0.375, 0.375}, -- base_closed
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:core_item',
|
||||||
|
recipe = {
|
||||||
|
{'dye:red', 'laptop:lcd', 'dye:red', },
|
||||||
|
{'laptop:HDD', 'laptop:motherboard', 'laptop:gpu', },
|
||||||
|
{'laptop:bat', 'laptop:case', 'dye:red', },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
laptop.register_hardware("laptop:printer", {
|
||||||
|
description = "Flash Printex",
|
||||||
|
infotext = 'Flash Printex',
|
||||||
|
sequence = { "off", "powersave", "on" },
|
||||||
|
custom_theme = "PrintOS",
|
||||||
|
custom_launcher = "printer_launcher",
|
||||||
|
hw_capabilities = {"hdd"},
|
||||||
|
node_defs = {
|
||||||
|
|
||||||
|
["powersave"] = {
|
||||||
|
hw_state = "power_off",
|
||||||
|
_power_off_seq = "off",
|
||||||
|
tiles = {
|
||||||
|
"laptop_printer_top.png",
|
||||||
|
"laptop_printer_bottom.png",
|
||||||
|
"laptop_printer_right.png",
|
||||||
|
"laptop_printer_left.png",
|
||||||
|
"laptop_printer_back.png",
|
||||||
|
"laptop_printer_front.png",
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {choppy=2, oddly_breakably_by_hand=2, dig_immediate = 2, laptop_printer = 1, technic_machine = 1, technic_lv = 1},
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.375, -0.5, -0.125, 0.375, -0.125, 0.3125}, -- core
|
||||||
|
{-0.25, -0.5, -0.375, 0.25, -0.4375, -0.125}, -- tray
|
||||||
|
{-0.25, -0.125, 0.25, 0.25, 0.125, 0.3125}, -- charger
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["on"] = {
|
||||||
|
hw_state = "power_on",
|
||||||
|
_power_off_seq = "off",
|
||||||
|
_eu_demand = 100,
|
||||||
|
tiles = {
|
||||||
|
"laptop_printer_top.png",
|
||||||
|
"laptop_printer_bottom.png",
|
||||||
|
"laptop_printer_right.png",
|
||||||
|
"laptop_printer_left.png",
|
||||||
|
"laptop_printer_back.png",
|
||||||
|
"laptop_printer_front_on.png",
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {choppy=2, oddly_breakably_by_hand=2, dig_immediate = 2, laptop_printer = 1, technic_machine = 1, technic_lv = 1},
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.375, -0.5, -0.125, 0.375, -0.125, 0.3125}, -- core
|
||||||
|
{-0.25, -0.5, -0.375, 0.25, -0.4375, -0.125}, -- tray
|
||||||
|
{-0.25, -0.125, 0.25, 0.25, 0.125, 0.3125}, -- charger
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["off"] = {
|
||||||
|
hw_state = "power_off",
|
||||||
|
tiles = {
|
||||||
|
"laptop_printer_top.png",
|
||||||
|
"laptop_printer_bottom.png",
|
||||||
|
"laptop_printer_right.png",
|
||||||
|
"laptop_printer_left.png",
|
||||||
|
"laptop_printer_back.png",
|
||||||
|
"laptop_printer_front_off.png",
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.375, -0.5, -0.125, 0.375, -0.125, 0.3125}, -- core
|
||||||
|
{-0.25, -0.5, -0.375, 0.25, -0.4375, -0.125}, -- tray
|
||||||
|
{-0.25, -0.125, 0.25, 0.25, 0.125, 0.3125}, -- charger
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:printer_off',
|
||||||
|
recipe = {
|
||||||
|
{'', 'laptop:motherboard', '', },
|
||||||
|
{'', 'laptop:psu', '', },
|
||||||
|
{'', 'laptop:case', '', },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
laptop.register_hardware("laptop:cube", {
|
||||||
|
description = "CUBE PC",
|
||||||
|
infotext = "CUBE PC",
|
||||||
|
os_version = '5.02',
|
||||||
|
sequence = { "off", "on"},
|
||||||
|
hw_capabilities = { "hdd", "floppy", "net", "liveboot" },
|
||||||
|
node_defs = {
|
||||||
|
["on"] = {
|
||||||
|
hw_state = "power_on",
|
||||||
|
_power_off_seq = "off",
|
||||||
|
_eu_demand = 150,
|
||||||
|
light_source = 4,
|
||||||
|
tiles = {
|
||||||
|
"laptop_cube_monitor_top.png^laptop_cube_tower_top.png",
|
||||||
|
"laptop_cube_monitor_bottom.png^laptop_cube_tower_bottom.png",
|
||||||
|
"laptop_cube_monitor_right.png^laptop_cube_tower_right.png",
|
||||||
|
"laptop_cube_monitor_left.png^laptop_cube_tower_left.png",
|
||||||
|
"laptop_cube_monitor_back.png^laptop_cube_tower_back.png",
|
||||||
|
"laptop_cube_monitor_front_on.png^laptop_cube_tower_front_on.png"
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.5, -0.5, -0.1875, 0.5, -0.1875, 0.5}, -- cube tower
|
||||||
|
{-0.5, -0.5, -0.5, 0.1875, -0.4375, -0.25}, -- cube keyboard
|
||||||
|
{0.25, -0.5, -0.5, 0.4375, -0.4375, -0.25}, -- cube mouse
|
||||||
|
{-0.3125, -0.5, -0.125, 0.3125, 0.5, 0.4375}, -- cube monitor
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
["off"] = {
|
||||||
|
hw_state = "power_off",
|
||||||
|
tiles = {
|
||||||
|
"laptop_cube_monitor_top.png^laptop_cube_tower_top.png",
|
||||||
|
"laptop_cube_monitor_bottom.png^laptop_cube_tower_bottom.png",
|
||||||
|
"laptop_cube_monitor_right.png^laptop_cube_tower_right.png",
|
||||||
|
"laptop_cube_monitor_left.png^laptop_cube_tower_left.png",
|
||||||
|
"laptop_cube_monitor_back.png^laptop_cube_tower_back.png",
|
||||||
|
"laptop_cube_monitor_front.png^laptop_cube_tower_front.png"
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.5, -0.5, -0.1875, 0.5, -0.1875, 0.5}, -- cube tower
|
||||||
|
{-0.5, -0.5, -0.5, 0.1875, -0.4375, -0.25}, -- cube keyboard
|
||||||
|
{0.25, -0.5, -0.5, 0.4375, -0.4375, -0.25}, -- cube mouse
|
||||||
|
{-0.3125, -0.5, -0.125, 0.3125, 0.5, 0.4375}, -- cube monitor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:cube_off',
|
||||||
|
recipe = {
|
||||||
|
{'', 'laptop:crt', '', },
|
||||||
|
{'laptop:HDD', 'laptop:motherboard', 'laptop:psu', },
|
||||||
|
{'laptop:cpu_65536', 'laptop:case', '', },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
laptop.register_hardware("laptop:fruit_zero", {
|
||||||
|
description = "Fruit Zero",
|
||||||
|
infotext = "Fruit Zero",
|
||||||
|
sequence = { "off", "on"},
|
||||||
|
custom_theme = "Magma",
|
||||||
|
node_defs = {
|
||||||
|
["on"] = {
|
||||||
|
hw_state = "power_on",
|
||||||
|
_power_off_seq = "off",
|
||||||
|
_eu_demand = 300,
|
||||||
|
light_source = 4,
|
||||||
|
tiles = {
|
||||||
|
"laptop_fruit_stand_top.png",
|
||||||
|
"laptop_fruit_base.png",
|
||||||
|
"laptop_fruit_base.png",
|
||||||
|
"laptop_fruit_base.png",
|
||||||
|
"laptop_fruit_lcd_back.png",
|
||||||
|
"laptop_lcd_fruit_on.png"
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.5, -0.5, -0.125, 0.5, -0.4375, 0.375}, -- NodeBox1
|
||||||
|
{-0.0625, -0.4375, 0.125, 0.0625, 0.0625, 0.25}, -- NodeBox2
|
||||||
|
{-0.5, -0.1875, 0, 0.5, 0.5, 0.125}, -- NodeBox3
|
||||||
|
{-0.5, -0.5, -0.5, 0.1875, -0.4375, -0.25}, -- NodeBox4
|
||||||
|
{0.25, -0.5, -0.5, 0.4375, -0.4375, -0.25}, -- NodeBox5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["off"] = {
|
||||||
|
hw_state = "power_off",
|
||||||
|
tiles = {
|
||||||
|
"laptop_fruit_stand_top.png",
|
||||||
|
"laptop_fruit_base.png",
|
||||||
|
"laptop_fruit_base.png",
|
||||||
|
"laptop_fruit_base.png",
|
||||||
|
"laptop_fruit_lcd_back.png",
|
||||||
|
"laptop_lcd_fruit.png"
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.5, -0.5, -0.125, 0.5, -0.4375, 0.375}, -- NodeBox1
|
||||||
|
{-0.0625, -0.4375, 0.125, 0.0625, 0.0625, 0.25}, -- NodeBox2
|
||||||
|
{-0.5, -0.1875, 0, 0.5, 0.5, 0.125}, -- NodeBox3
|
||||||
|
{-0.5, -0.5, -0.5, 0.1875, -0.4375, -0.25}, -- NodeBox4
|
||||||
|
{0.25, -0.5, -0.5, 0.4375, -0.4375, -0.25}, -- NodeBox5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:fruit_zero_off',
|
||||||
|
recipe = {
|
||||||
|
{'dye:white', 'laptop:lcd', 'dye:white', },
|
||||||
|
{'laptop:gpu', 'laptop:motherboard', 'laptop:HDD', },
|
||||||
|
{'laptop:cpu_jetcore', 'laptop:case', 'laptop:psu', },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
laptop.register_hardware("laptop:bell_crossover", {
|
||||||
|
description = "Bell CrossOver",
|
||||||
|
infotext = "Bell CrossOver",
|
||||||
|
os_version = "6.33",
|
||||||
|
sequence = { "off", "on"},
|
||||||
|
node_defs = {
|
||||||
|
["on"] = {
|
||||||
|
hw_state = "power_on",
|
||||||
|
_power_off_seq = "off",
|
||||||
|
_eu_demand = 250,
|
||||||
|
light_source = 4,
|
||||||
|
tiles = {
|
||||||
|
"laptop_opti_pc_top.png^laptop_opti_kb_top.png^laptop_opti_ms_top.png^laptop_opti_lcb_top.png^laptop_opti_lcp_top.png^laptop_opti_lcd_top.png",
|
||||||
|
"laptop_opti_pc_bottom.png^laptop_opti_kb_bottom.png^laptop_opti_ms_bottom.png^laptop_opti_lcd_bottom.png",
|
||||||
|
"laptop_opti_pc_right.png^laptop_opti_kb_right.png^laptop_opti_ms_right.png^laptop_opti_lcb_right.png^laptop_opti_lcp_right.png^laptop_opti_lcd_right.png",
|
||||||
|
"laptop_opti_pc_left.png^laptop_opti_kb_left.png^laptop_opti_ms_left.png^laptop_opti_lcb_left.png^laptop_opti_lcp_left.png^laptop_opti_lcd_left.png",
|
||||||
|
"laptop_opti_pc_back.png^laptop_opti_kb_back.png^laptop_opti_ms_back.png^laptop_opti_lcb_back.png^laptop_opti_lcp_back.png^laptop_opti_lcd_back.png",
|
||||||
|
"laptop_opti_pc_on_front.png^laptop_opti_kb_front.png^laptop_opti_ms_front.png^laptop_opti_lcb_front.png^laptop_opti_lcp_front.png^laptop_opti_lcd_on_front.png",
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.375, -0.5, -0.0625, 0.375, -0.3125, 0.4375}, -- tower
|
||||||
|
{-0.4375, -0.5, -0.4375, 0.25, -0.4375, -0.1875}, -- keboard
|
||||||
|
{0.3125, -0.5, -0.375, 0.4375, -0.4375, -0.1875}, -- mouse
|
||||||
|
{-0.25, -0.3125, 0.0625, 0.25, -0.25, 0.3125}, -- lcd_base
|
||||||
|
{-0.0625, -0.25, 0.1875, 0.0625, 0.0625, 0.25}, -- lcd_pedestal
|
||||||
|
{-0.4375, -0.125, 0.125, 0.4375, 0.4375, 0.1875}, -- lcd_main
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["off"] = {
|
||||||
|
hw_state = "power_off",
|
||||||
|
tiles = {
|
||||||
|
"laptop_opti_pc_top.png^laptop_opti_kb_top.png^laptop_opti_ms_top.png^laptop_opti_lcb_top.png^laptop_opti_lcp_top.png^laptop_opti_lcd_top.png",
|
||||||
|
"laptop_opti_pc_bottom.png^laptop_opti_kb_bottom.png^laptop_opti_ms_bottom.png^laptop_opti_lcd_bottom.png",
|
||||||
|
"laptop_opti_pc_right.png^laptop_opti_kb_right.png^laptop_opti_ms_right.png^laptop_opti_lcb_right.png^laptop_opti_lcp_right.png^laptop_opti_lcd_right.png",
|
||||||
|
"laptop_opti_pc_left.png^laptop_opti_kb_left.png^laptop_opti_ms_left.png^laptop_opti_lcb_left.png^laptop_opti_lcp_left.png^laptop_opti_lcd_left.png",
|
||||||
|
"laptop_opti_pc_back.png^laptop_opti_kb_back.png^laptop_opti_ms_back.png^laptop_opti_lcb_back.png^laptop_opti_lcp_back.png^laptop_opti_lcd_back.png",
|
||||||
|
"laptop_opti_pc_front.png^laptop_opti_kb_front.png^laptop_opti_ms_front.png^laptop_opti_lcb_front.png^laptop_opti_lcp_front.png^laptop_opti_lcd_front.png",
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.375, -0.5, -0.0625, 0.375, -0.3125, 0.4375}, -- tower
|
||||||
|
{-0.4375, -0.5, -0.4375, 0.25, -0.4375, -0.1875}, -- keboard
|
||||||
|
{0.3125, -0.5, -0.375, 0.4375, -0.4375, -0.1875}, -- mouse
|
||||||
|
{-0.25, -0.3125, 0.0625, 0.25, -0.25, 0.3125}, -- lcd_base
|
||||||
|
{-0.0625, -0.25, 0.1875, 0.0625, 0.0625, 0.25}, -- lcd_pedestal
|
||||||
|
{-0.4375, -0.125, 0.125, 0.4375, 0.4375, 0.1875}, -- lcd_main
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:bell_crossover_off',
|
||||||
|
recipe = {
|
||||||
|
{'dye:dark_grey', 'laptop:lcd', 'dye:dark_grey', },
|
||||||
|
{'laptop:psu', 'laptop:motherboard', 'laptop:HDD', },
|
||||||
|
{'laptop:cpu_d75a', 'laptop:case', 'dye:dark_grey', },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
--Kodiak 1000--
|
||||||
|
laptop.register_hardware("laptop:kodiak_1000", {
|
||||||
|
description = "Kodiak 1000",
|
||||||
|
infotext = "Kodiak 1000",
|
||||||
|
sequence = { "off", "on"},
|
||||||
|
os_version = "3.31",
|
||||||
|
hw_capabilities = { "floppy", "liveboot" },
|
||||||
|
node_defs = {
|
||||||
|
["on"] = {
|
||||||
|
hw_state = "power_on",
|
||||||
|
_power_off_seq = "off",
|
||||||
|
_eu_demand = 100,
|
||||||
|
light_source = 3,
|
||||||
|
tiles = {
|
||||||
|
"laptop_k_top.png^laptop_t_top.png^laptop_p_top.png^laptop_m_top.png",
|
||||||
|
"laptop_k_bottom.png^laptop_t_bottom.png^laptop_p_bottom.png^laptop_m_bottom.png",
|
||||||
|
"laptop_k_right.png^laptop_t_right.png^laptop_p_right.png^laptop_m_right.png",
|
||||||
|
"laptop_k_left.png^laptop_t_left.png^laptop_p_left.png^laptop_m_left.png",
|
||||||
|
"laptop_k_back.png^laptop_t_back.png^laptop_p_back.png^laptop_m_back.png",
|
||||||
|
"laptop_k_front.png^laptop_t_front_on.png^laptop_p_front.png^laptop_m_front_on.png",
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.3125, -0.5, -0.5, 0.3125, -0.4375, -0.25}, -- keyboard
|
||||||
|
{-0.4375, -0.5, -0.1875, 0.4375, -0.3125, 0.4375}, -- tower
|
||||||
|
{-0.25, -0.3125, -0.0625, 0.25, -0.25, 0.375}, -- pedestal
|
||||||
|
{-0.375, -0.25, -0.125, 0.375, 0.25, 0.4375}, -- monitor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["off"] = {
|
||||||
|
hw_state = "power_off",
|
||||||
|
tiles = {
|
||||||
|
"laptop_k_top.png^laptop_t_top.png^laptop_p_top.png^laptop_m_top.png",
|
||||||
|
"laptop_k_bottom.png^laptop_t_bottom.png^laptop_p_bottom.png^laptop_m_bottom.png",
|
||||||
|
"laptop_k_right.png^laptop_t_right.png^laptop_p_right.png^laptop_m_right.png",
|
||||||
|
"laptop_k_left.png^laptop_t_left.png^laptop_p_left.png^laptop_m_left.png",
|
||||||
|
"laptop_k_back.png^laptop_t_back.png^laptop_p_back.png^laptop_m_back.png",
|
||||||
|
"laptop_k_front.png^laptop_t_front.png^laptop_p_front.png^laptop_m_front.png",
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.3125, -0.5, -0.5, 0.3125, -0.4375, -0.25}, -- keyboard
|
||||||
|
{-0.4375, -0.5, -0.1875, 0.4375, -0.3125, 0.4375}, -- tower
|
||||||
|
{-0.25, -0.3125, -0.0625, 0.25, -0.25, 0.375}, -- pedestal
|
||||||
|
{-0.375, -0.25, -0.125, 0.375, 0.25, 0.4375}, -- monitor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:kodiak_1000_off',
|
||||||
|
recipe = {
|
||||||
|
{'', 'laptop:crt_green', '', },
|
||||||
|
{'laptop:cpu_c6', 'laptop:motherboard', 'laptop:psu', },
|
||||||
|
{'laptop:HDD', 'laptop:case', '', },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Portable Workstation
|
||||||
|
laptop.register_hardware("laptop:portable_workstation_2", {
|
||||||
|
description = "Portable Workstation 2",
|
||||||
|
infotext = "Portable Workstation 2",
|
||||||
|
os_version = "5.02",
|
||||||
|
custom_theme = "Argyle",
|
||||||
|
sequence = { "closed", "open", "open_on"},
|
||||||
|
battery_capacity = 80000,
|
||||||
|
inventory_image = "laptop_lap_base_item.png",
|
||||||
|
node_defs = {
|
||||||
|
["closed"] = {
|
||||||
|
hw_state = "power_off",
|
||||||
|
tiles = {
|
||||||
|
"laptop_lap_base_closed_top.png",
|
||||||
|
"laptop_lap_base_closed_bottom.png",
|
||||||
|
"laptop_lap_base_closed_right.png",
|
||||||
|
"laptop_lap_base_closed_left.png",
|
||||||
|
"laptop_lap_base_closed_back.png",
|
||||||
|
"laptop_lap_base_closed_front.png",
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.4375, -0.5, -0.4375, 0.4375, -0.375, 0.375}, -- base_closed
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["open"] = {
|
||||||
|
hw_state = "power_off",
|
||||||
|
tiles = {
|
||||||
|
"laptop_lap_base_open_top.png",
|
||||||
|
"laptop_lap_base_open_bottom.png^laptop_lap_sc_open_bottom.png",
|
||||||
|
"laptop_lap_base_open_right.png",
|
||||||
|
"laptop_lap_base_open_left.png",
|
||||||
|
"laptop_lap_base_open_back.png^laptop_lap_sc_open_back.png",
|
||||||
|
"laptop_lap_base_open_front.png^laptop_lap_sc_open_front.png",
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, 0.375}, -- base_open
|
||||||
|
{-0.4375, -0.4375, 0.375, 0.4375, 0.3125, 0.4375}, -- sc_open
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["open_on"] = {
|
||||||
|
hw_state = "resume",
|
||||||
|
_power_off_seq = "open",
|
||||||
|
_eu_demand = 200,
|
||||||
|
_battery_charge = 400,
|
||||||
|
light_source = 4,
|
||||||
|
tiles = {
|
||||||
|
"laptop_lap_base_open_on_top.png",
|
||||||
|
"laptop_lap_base_open_bottom.png^laptop_lap_sc_open_bottom.png",
|
||||||
|
"laptop_lap_base_open_right.png",
|
||||||
|
"laptop_lap_base_open_left.png",
|
||||||
|
"laptop_lap_base_open_back.png^laptop_lap_sc_open_back.png",
|
||||||
|
"laptop_lap_base_open_front.png^laptop_lap_sc_open_on_front.png",
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.4375, -0.5, -0.4375, 0.4375, -0.4375, 0.375}, -- base_open
|
||||||
|
{-0.4375, -0.4375, 0.375, 0.4375, 0.3125, 0.4375}, -- sc_open
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'laptop:portable_workstation_2_item',
|
||||||
|
recipe = {
|
||||||
|
{'dye:dark_grey', 'laptop:lcd', 'dye:dark_grey', },
|
||||||
|
{'laptop:HDD', 'laptop:motherboard', 'laptop:cpu_d75a', },
|
||||||
|
{'laptop:bat', 'laptop:case', 'dye:dark_grey', },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Conversion from older laptop version, before 2018-03
|
||||||
|
minetest.register_alias("laptop:monitor2_off", "laptop:fruit_zero_off")
|
||||||
|
minetest.register_alias("laptop:monitor2_on", "laptop:fruit_zero_on")
|
||||||
|
|
||||||
|
minetest.register_alias("laptop:monitor4_off", "laptop:bell_crossover_off")
|
||||||
|
minetest.register_alias("laptop:monitor4_on", "laptop:bell_crossover_on")
|
||||||
|
|
||||||
|
minetest.register_alias("laptop:monitor3_off", "laptop:kodiak_1000_off")
|
||||||
|
minetest.register_alias("laptop:monitor3_on", "laptop:kodiak_1000_on")
|
||||||
|
|
||||||
|
minetest.register_alias("laptop:laptop_closed", "laptop:portable_workstation_2_closed")
|
||||||
|
minetest.register_alias("laptop:laptop_open", "laptop:portable_workstation_2_open")
|
||||||
|
minetest.register_alias("laptop:laptop_open_on", "laptop:portable_workstation_2_open_on")
|
||||||
10
init.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
laptop = {}
|
||||||
|
laptop.class_lib = {}
|
||||||
|
--dofile(minetest.get_modpath('laptop')..'/themes.lua')
|
||||||
|
--dofile(minetest.get_modpath('laptop')..'/block_devices.lua')
|
||||||
|
--dofile(minetest.get_modpath('laptop')..'/app_fw.lua')
|
||||||
|
--dofile(minetest.get_modpath('laptop')..'/mtos.lua')
|
||||||
|
dofile(minetest.get_modpath('laptop')..'/hardware_fw.lua')
|
||||||
|
dofile(minetest.get_modpath('laptop')..'/recipe_compat.lua')
|
||||||
|
dofile(minetest.get_modpath('laptop')..'/hardware_nodes.lua')
|
||||||
|
dofile(minetest.get_modpath('laptop')..'/craftitems.lua')
|
||||||
8
mod.conf
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
name = laptop
|
||||||
|
title = Laptop
|
||||||
|
description = Adds laptops/computers to your MT world.
|
||||||
|
depends = default
|
||||||
|
optional_depends = mesecons_materials, mesecons_gates, mesecons_fpga, mesecons_delayer, mesecons_luacontroller, mesecons_lightstone, homedecor, basic_materials, technic, power_generators
|
||||||
|
|
||||||
|
release = 12776
|
||||||
|
author = GamingAssociation39
|
||||||
87
recipe_compat.lua
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
laptop.recipe_compat = {
|
||||||
|
-- Init all used vars to avoid crash if missed
|
||||||
|
tin = '-unknown-', copper = '-unknown-', gold = '-unknown-',
|
||||||
|
steel = '-unknown-', glass = '-unknown-', diamond = '-unknown-',
|
||||||
|
silicon = '-unknown-', fiber = '-unknown-',
|
||||||
|
gates_diode = '-unknown-', gates_and = '-unknown-', gates_or = '-unknown-',
|
||||||
|
gates_nand = '-unknown-', gates_xor = '-unknown-', gates_not = '-unknown-',
|
||||||
|
fpga = '-unknown-', programmer = '-unknown-', delayer = '-unknown-',
|
||||||
|
controller = '-unknown-', light_red = '-unknown-', light_green = '-unknown-',
|
||||||
|
light_blue = '-unknown-',
|
||||||
|
plastic = '-unknown-', motor = '-unknown-',
|
||||||
|
battery = '-unknown-', lv_transformer = '-unknown-',
|
||||||
|
}
|
||||||
|
|
||||||
|
local rc = laptop.recipe_compat
|
||||||
|
|
||||||
|
-- Fallback values from default mod
|
||||||
|
if minetest.get_modpath('default') then
|
||||||
|
rc.tin = 'default:tin_ingot'
|
||||||
|
rc.copper = 'default:copper_ingot'
|
||||||
|
rc.gold = 'default:gold_ingot'
|
||||||
|
rc.steel = 'default:steel_ingot'
|
||||||
|
rc.glass = 'default:glass'
|
||||||
|
rc.diamond = 'default:diamond'
|
||||||
|
rc.plastic = 'default:steel_ingot'
|
||||||
|
rc.motor = 'default:steel_ingot'
|
||||||
|
rc.battery = 'default:steel_ingot'
|
||||||
|
rc.lv_transformer = 'default:copper_ingot'
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.get_modpath('homedecor') then
|
||||||
|
rc.gates_diode = 'homedecor:paraffin'
|
||||||
|
rc.gates_and = 'homedecor:power_crystal'
|
||||||
|
rc.gates_or = 'homedecor:steel_strip'
|
||||||
|
rc.gates_nand = 'homedecor:steel_wire'
|
||||||
|
rc.gates_xor = 'homedecor:copper_wire'
|
||||||
|
rc.gates_not = 'homedecor:copper_strip'
|
||||||
|
rc.fpga = 'homedecor:ic'
|
||||||
|
rc.programmer = 'homedecor:heating_element'
|
||||||
|
rc.controller = 'homedecor:motor'
|
||||||
|
rc.motor = 'homedecor:motor'
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.get_modpath('mesecons_materials') then
|
||||||
|
rc.silicon = 'mesecons_materials:silicon'
|
||||||
|
rc.fiber = 'mesecons_materials:fiber'
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.get_modpath('mesecons_gates') then
|
||||||
|
rc.gates_diode = 'mesecons_gates:diode_off'
|
||||||
|
rc.gates_and = 'mesecons_gates:and_off'
|
||||||
|
rc.gates_or = 'mesecons_gates:or_off'
|
||||||
|
rc.gates_nand = 'mesecons_gates:nand_off'
|
||||||
|
rc.gates_xor = 'mesecons_gates:xor_off'
|
||||||
|
rc.gates_not = 'mesecons_gates:not_off'
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.get_modpath('mesecons_fpga') then
|
||||||
|
rc.fpga = 'mesecons_fpga:fpga0000'
|
||||||
|
rc.programmer = 'mesecons_fpga:programmer'
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.get_modpath('mesecons_delayer') then
|
||||||
|
rc.delayer = 'mesecons_delayer:delayer_off_1'
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.get_modpath('mesecons_luacontroller') then
|
||||||
|
rc.controller = 'mesecons_luacontroller:luacontroller0000'
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.get_modpath('mesecons_lightstone') then
|
||||||
|
rc.light_red = 'mesecons_lightstone:lightstone_red_off'
|
||||||
|
rc.light_green = 'mesecons_lightstone:lightstone_green_off'
|
||||||
|
rc.light_blue = 'mesecons_lightstone:lightstone_blue_off'
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.get_modpath('basic_materials') then
|
||||||
|
rc.plastic = 'basic_materials:plastic_sheet'
|
||||||
|
rc.motor = 'basic_materials:motor'
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.get_modpath('technic') then
|
||||||
|
rc.battery = 'technic:battery'
|
||||||
|
rc.lv_transformer = 'technic:lv_transformer'
|
||||||
|
rc.silicon = 'technic:doped_silicon_wafer'
|
||||||
|
end
|
||||||
|
|
||||||
BIN
screenshot.png
Normal file
|
After Width: | Height: | Size: 507 KiB |
BIN
textures/laptop_bat.png
Normal file
|
After Width: | Height: | Size: 383 B |
BIN
textures/laptop_boom.png
Normal file
|
After Width: | Height: | Size: 442 B |
BIN
textures/laptop_case.png
Normal file
|
After Width: | Height: | Size: 311 B |
BIN
textures/laptop_cpu_65536.png
Normal file
|
After Width: | Height: | Size: 404 B |
BIN
textures/laptop_cpu_c6.png
Normal file
|
After Width: | Height: | Size: 360 B |
BIN
textures/laptop_cpu_d75a.png
Normal file
|
After Width: | Height: | Size: 350 B |
BIN
textures/laptop_cpu_jetcore.png
Normal file
|
After Width: | Height: | Size: 442 B |
BIN
textures/laptop_crt.png
Normal file
|
After Width: | Height: | Size: 334 B |
BIN
textures/laptop_crt_amber.png
Normal file
|
After Width: | Height: | Size: 292 B |
BIN
textures/laptop_crt_green.png
Normal file
|
After Width: | Height: | Size: 306 B |
BIN
textures/laptop_cube_monitor_back.png
Normal file
|
After Width: | Height: | Size: 272 B |
BIN
textures/laptop_cube_monitor_bottom.png
Normal file
|
After Width: | Height: | Size: 383 B |
BIN
textures/laptop_cube_monitor_front.png
Normal file
|
After Width: | Height: | Size: 306 B |
BIN
textures/laptop_cube_monitor_front_on.png
Normal file
|
After Width: | Height: | Size: 403 B |
BIN
textures/laptop_cube_monitor_left.png
Normal file
|
After Width: | Height: | Size: 243 B |
BIN
textures/laptop_cube_monitor_right.png
Normal file
|
After Width: | Height: | Size: 197 B |
BIN
textures/laptop_cube_monitor_top.png
Normal file
|
After Width: | Height: | Size: 352 B |
BIN
textures/laptop_cube_tower_back.png
Normal file
|
After Width: | Height: | Size: 301 B |
BIN
textures/laptop_cube_tower_bottom.png
Normal file
|
After Width: | Height: | Size: 163 B |
BIN
textures/laptop_cube_tower_front.png
Normal file
|
After Width: | Height: | Size: 264 B |
BIN
textures/laptop_cube_tower_front_on.png
Normal file
|
After Width: | Height: | Size: 297 B |
BIN
textures/laptop_cube_tower_left.png
Normal file
|
After Width: | Height: | Size: 235 B |
BIN
textures/laptop_cube_tower_right.png
Normal file
|
After Width: | Height: | Size: 207 B |
BIN
textures/laptop_cube_tower_top.png
Normal file
|
After Width: | Height: | Size: 419 B |
BIN
textures/laptop_fan.png
Normal file
|
After Width: | Height: | Size: 243 B |
BIN
textures/laptop_fruit_base.png
Normal file
|
After Width: | Height: | Size: 194 B |
BIN
textures/laptop_fruit_lcd_back.png
Normal file
|
After Width: | Height: | Size: 434 B |
BIN
textures/laptop_fruit_stand_top.png
Normal file
|
After Width: | Height: | Size: 346 B |
BIN
textures/laptop_gpu.png
Normal file
|
After Width: | Height: | Size: 405 B |
BIN
textures/laptop_harddrive.png
Normal file
|
After Width: | Height: | Size: 320 B |
BIN
textures/laptop_home_web.png
Normal file
|
After Width: | Height: | Size: 180 B |
BIN
textures/laptop_k_back.png
Normal file
|
After Width: | Height: | Size: 607 B |
BIN
textures/laptop_k_bottom.png
Normal file
|
After Width: | Height: | Size: 512 B |
BIN
textures/laptop_k_front.png
Normal file
|
After Width: | Height: | Size: 609 B |
BIN
textures/laptop_k_left.png
Normal file
|
After Width: | Height: | Size: 621 B |
BIN
textures/laptop_k_right.png
Normal file
|
After Width: | Height: | Size: 612 B |
BIN
textures/laptop_k_top.png
Normal file
|
After Width: | Height: | Size: 597 B |
BIN
textures/laptop_lap_base_closed_back.png
Normal file
|
After Width: | Height: | Size: 260 B |
BIN
textures/laptop_lap_base_closed_bottom.png
Normal file
|
After Width: | Height: | Size: 448 B |
BIN
textures/laptop_lap_base_closed_front.png
Normal file
|
After Width: | Height: | Size: 222 B |
BIN
textures/laptop_lap_base_closed_left.png
Normal file
|
After Width: | Height: | Size: 239 B |
BIN
textures/laptop_lap_base_closed_right.png
Normal file
|
After Width: | Height: | Size: 256 B |
BIN
textures/laptop_lap_base_closed_top.png
Normal file
|
After Width: | Height: | Size: 297 B |
BIN
textures/laptop_lap_base_item.png
Normal file
|
After Width: | Height: | Size: 396 B |
BIN
textures/laptop_lap_base_open_back.png
Normal file
|
After Width: | Height: | Size: 346 B |
BIN
textures/laptop_lap_base_open_bottom.png
Normal file
|
After Width: | Height: | Size: 448 B |
BIN
textures/laptop_lap_base_open_front.png
Normal file
|
After Width: | Height: | Size: 244 B |
BIN
textures/laptop_lap_base_open_left.png
Normal file
|
After Width: | Height: | Size: 323 B |
BIN
textures/laptop_lap_base_open_on_top.png
Normal file
|
After Width: | Height: | Size: 598 B |
BIN
textures/laptop_lap_base_open_right.png
Normal file
|
After Width: | Height: | Size: 325 B |
BIN
textures/laptop_lap_base_open_top.png
Normal file
|
After Width: | Height: | Size: 600 B |
BIN
textures/laptop_lap_car_bottom.png
Normal file
|
After Width: | Height: | Size: 533 B |
BIN
textures/laptop_lap_car_closed_back.png
Normal file
|
After Width: | Height: | Size: 245 B |
BIN
textures/laptop_lap_car_closed_front.png
Normal file
|
After Width: | Height: | Size: 219 B |
BIN
textures/laptop_lap_car_closed_left.png
Normal file
|
After Width: | Height: | Size: 244 B |
BIN
textures/laptop_lap_car_closed_right.png
Normal file
|
After Width: | Height: | Size: 246 B |
BIN
textures/laptop_lap_car_closed_top.png
Normal file
|
After Width: | Height: | Size: 400 B |
BIN
textures/laptop_lap_car_item.png
Normal file
|
After Width: | Height: | Size: 366 B |
BIN
textures/laptop_lap_car_open_back.png
Normal file
|
After Width: | Height: | Size: 401 B |
BIN
textures/laptop_lap_car_open_front.png
Normal file
|
After Width: | Height: | Size: 245 B |
BIN
textures/laptop_lap_car_open_left.png
Normal file
|
After Width: | Height: | Size: 317 B |
BIN
textures/laptop_lap_car_open_on_top.png
Normal file
|
After Width: | Height: | Size: 497 B |
BIN
textures/laptop_lap_car_open_right.png
Normal file
|
After Width: | Height: | Size: 307 B |
BIN
textures/laptop_lap_car_open_top.png
Normal file
|
After Width: | Height: | Size: 498 B |
BIN
textures/laptop_lap_car_sc_open_bottom.png
Normal file
|
After Width: | Height: | Size: 361 B |
BIN
textures/laptop_lap_car_sc_open_front.png
Normal file
|
After Width: | Height: | Size: 473 B |
BIN
textures/laptop_lap_car_sc_open_on_front.png
Normal file
|
After Width: | Height: | Size: 590 B |
BIN
textures/laptop_lap_sc_open_back.png
Normal file
|
After Width: | Height: | Size: 536 B |
BIN
textures/laptop_lap_sc_open_bottom.png
Normal file
|
After Width: | Height: | Size: 346 B |
BIN
textures/laptop_lap_sc_open_front.png
Normal file
|
After Width: | Height: | Size: 504 B |
BIN
textures/laptop_lap_sc_open_on_front.png
Normal file
|
After Width: | Height: | Size: 627 B |
BIN
textures/laptop_lcd.png
Normal file
|
After Width: | Height: | Size: 328 B |
BIN
textures/laptop_lcd_fruit.png
Normal file
|
After Width: | Height: | Size: 230 B |
BIN
textures/laptop_lcd_fruit_on.png
Normal file
|
After Width: | Height: | Size: 452 B |
BIN
textures/laptop_m_back.png
Normal file
|
After Width: | Height: | Size: 388 B |
BIN
textures/laptop_m_bottom.png
Normal file
|
After Width: | Height: | Size: 363 B |
BIN
textures/laptop_m_front.png
Normal file
|
After Width: | Height: | Size: 518 B |
BIN
textures/laptop_m_front_on.png
Normal file
|
After Width: | Height: | Size: 502 B |
BIN
textures/laptop_m_left.png
Normal file
|
After Width: | Height: | Size: 477 B |
BIN
textures/laptop_m_right.png
Normal file
|
After Width: | Height: | Size: 458 B |
BIN
textures/laptop_m_top.png
Normal file
|
After Width: | Height: | Size: 413 B |
BIN
textures/laptop_motherboard.png
Normal file
|
After Width: | Height: | Size: 425 B |
BIN
textures/laptop_notes_pad.png
Normal file
|
After Width: | Height: | Size: 391 B |
BIN
textures/laptop_opti_kb_back.png
Normal file
|
After Width: | Height: | Size: 278 B |
BIN
textures/laptop_opti_kb_bottom.png
Normal file
|
After Width: | Height: | Size: 340 B |
BIN
textures/laptop_opti_kb_front.png
Normal file
|
After Width: | Height: | Size: 288 B |
BIN
textures/laptop_opti_kb_left.png
Normal file
|
After Width: | Height: | Size: 454 B |
BIN
textures/laptop_opti_kb_right.png
Normal file
|
After Width: | Height: | Size: 440 B |