commit 5ecc8ef2c71d390d117729bdb1c2c6143ed2a598 Author: rainer Date: Thu Feb 12 13:26:47 2026 +0100 init; removed all software/lua from mod diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..bdb0cab --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/API.md b/API.md new file mode 100644 index 0000000..d6cb561 --- /dev/null +++ b/API.md @@ -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 + diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..543b944 --- /dev/null +++ b/LICENSE.txt @@ -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. +================================================================ \ No newline at end of file diff --git a/README-LICENSE.txt b/README-LICENSE.txt new file mode 100644 index 0000000..f52ed9f --- /dev/null +++ b/README-LICENSE.txt @@ -0,0 +1,11 @@ +Laptop created by GamingAssociation39 + +================================================================ +License of source code and textures: LGPL v3 + +Copyright © 2007 Free Software Foundation, Inc. + +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. +================================================================ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..2f7a8ef --- /dev/null +++ b/README.md @@ -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. + +![Screenshot](https://github.com/Gerold55/minetest-laptop/blob/master/screenshot.png) + +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 diff --git a/craftitems.lua b/craftitems.lua new file mode 100644 index 0000000..070a880 --- /dev/null +++ b/craftitems.lua @@ -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}, + } +}) diff --git a/hardware_fw.lua b/hardware_fw.lua new file mode 100644 index 0000000..990e376 --- /dev/null +++ b/hardware_fw.lua @@ -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 diff --git a/hardware_nodes.lua b/hardware_nodes.lua new file mode 100644 index 0000000..8535def --- /dev/null +++ b/hardware_nodes.lua @@ -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") diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..11c6202 --- /dev/null +++ b/init.lua @@ -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') diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..6c2248b --- /dev/null +++ b/mod.conf @@ -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 diff --git a/recipe_compat.lua b/recipe_compat.lua new file mode 100644 index 0000000..62203da --- /dev/null +++ b/recipe_compat.lua @@ -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 + diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..e6e101e Binary files /dev/null and b/screenshot.png differ diff --git a/textures/laptop_bat.png b/textures/laptop_bat.png new file mode 100644 index 0000000..6bb414a Binary files /dev/null and b/textures/laptop_bat.png differ diff --git a/textures/laptop_boom.png b/textures/laptop_boom.png new file mode 100644 index 0000000..341f7ae Binary files /dev/null and b/textures/laptop_boom.png differ diff --git a/textures/laptop_case.png b/textures/laptop_case.png new file mode 100644 index 0000000..f978fe9 Binary files /dev/null and b/textures/laptop_case.png differ diff --git a/textures/laptop_cpu_65536.png b/textures/laptop_cpu_65536.png new file mode 100644 index 0000000..f717df2 Binary files /dev/null and b/textures/laptop_cpu_65536.png differ diff --git a/textures/laptop_cpu_c6.png b/textures/laptop_cpu_c6.png new file mode 100644 index 0000000..ea722f2 Binary files /dev/null and b/textures/laptop_cpu_c6.png differ diff --git a/textures/laptop_cpu_d75a.png b/textures/laptop_cpu_d75a.png new file mode 100644 index 0000000..577841a Binary files /dev/null and b/textures/laptop_cpu_d75a.png differ diff --git a/textures/laptop_cpu_jetcore.png b/textures/laptop_cpu_jetcore.png new file mode 100644 index 0000000..2729983 Binary files /dev/null and b/textures/laptop_cpu_jetcore.png differ diff --git a/textures/laptop_crt.png b/textures/laptop_crt.png new file mode 100644 index 0000000..ed651f2 Binary files /dev/null and b/textures/laptop_crt.png differ diff --git a/textures/laptop_crt_amber.png b/textures/laptop_crt_amber.png new file mode 100644 index 0000000..96420a4 Binary files /dev/null and b/textures/laptop_crt_amber.png differ diff --git a/textures/laptop_crt_green.png b/textures/laptop_crt_green.png new file mode 100644 index 0000000..6f87876 Binary files /dev/null and b/textures/laptop_crt_green.png differ diff --git a/textures/laptop_cube_monitor_back.png b/textures/laptop_cube_monitor_back.png new file mode 100644 index 0000000..d257337 Binary files /dev/null and b/textures/laptop_cube_monitor_back.png differ diff --git a/textures/laptop_cube_monitor_bottom.png b/textures/laptop_cube_monitor_bottom.png new file mode 100644 index 0000000..d526079 Binary files /dev/null and b/textures/laptop_cube_monitor_bottom.png differ diff --git a/textures/laptop_cube_monitor_front.png b/textures/laptop_cube_monitor_front.png new file mode 100644 index 0000000..02eafb6 Binary files /dev/null and b/textures/laptop_cube_monitor_front.png differ diff --git a/textures/laptop_cube_monitor_front_on.png b/textures/laptop_cube_monitor_front_on.png new file mode 100644 index 0000000..f08c0b0 Binary files /dev/null and b/textures/laptop_cube_monitor_front_on.png differ diff --git a/textures/laptop_cube_monitor_left.png b/textures/laptop_cube_monitor_left.png new file mode 100644 index 0000000..22bea18 Binary files /dev/null and b/textures/laptop_cube_monitor_left.png differ diff --git a/textures/laptop_cube_monitor_right.png b/textures/laptop_cube_monitor_right.png new file mode 100644 index 0000000..e0b3b41 Binary files /dev/null and b/textures/laptop_cube_monitor_right.png differ diff --git a/textures/laptop_cube_monitor_top.png b/textures/laptop_cube_monitor_top.png new file mode 100644 index 0000000..6f3dc8b Binary files /dev/null and b/textures/laptop_cube_monitor_top.png differ diff --git a/textures/laptop_cube_tower_back.png b/textures/laptop_cube_tower_back.png new file mode 100644 index 0000000..fca3b15 Binary files /dev/null and b/textures/laptop_cube_tower_back.png differ diff --git a/textures/laptop_cube_tower_bottom.png b/textures/laptop_cube_tower_bottom.png new file mode 100644 index 0000000..385f1d4 Binary files /dev/null and b/textures/laptop_cube_tower_bottom.png differ diff --git a/textures/laptop_cube_tower_front.png b/textures/laptop_cube_tower_front.png new file mode 100644 index 0000000..7ad67e8 Binary files /dev/null and b/textures/laptop_cube_tower_front.png differ diff --git a/textures/laptop_cube_tower_front_on.png b/textures/laptop_cube_tower_front_on.png new file mode 100644 index 0000000..884da9e Binary files /dev/null and b/textures/laptop_cube_tower_front_on.png differ diff --git a/textures/laptop_cube_tower_left.png b/textures/laptop_cube_tower_left.png new file mode 100644 index 0000000..0d13fa6 Binary files /dev/null and b/textures/laptop_cube_tower_left.png differ diff --git a/textures/laptop_cube_tower_right.png b/textures/laptop_cube_tower_right.png new file mode 100644 index 0000000..cd6402c Binary files /dev/null and b/textures/laptop_cube_tower_right.png differ diff --git a/textures/laptop_cube_tower_top.png b/textures/laptop_cube_tower_top.png new file mode 100644 index 0000000..bc09760 Binary files /dev/null and b/textures/laptop_cube_tower_top.png differ diff --git a/textures/laptop_fan.png b/textures/laptop_fan.png new file mode 100644 index 0000000..fe4530d Binary files /dev/null and b/textures/laptop_fan.png differ diff --git a/textures/laptop_fruit_base.png b/textures/laptop_fruit_base.png new file mode 100644 index 0000000..92d9ac4 Binary files /dev/null and b/textures/laptop_fruit_base.png differ diff --git a/textures/laptop_fruit_lcd_back.png b/textures/laptop_fruit_lcd_back.png new file mode 100644 index 0000000..9edbc49 Binary files /dev/null and b/textures/laptop_fruit_lcd_back.png differ diff --git a/textures/laptop_fruit_stand_top.png b/textures/laptop_fruit_stand_top.png new file mode 100644 index 0000000..24855ad Binary files /dev/null and b/textures/laptop_fruit_stand_top.png differ diff --git a/textures/laptop_gpu.png b/textures/laptop_gpu.png new file mode 100644 index 0000000..d14880d Binary files /dev/null and b/textures/laptop_gpu.png differ diff --git a/textures/laptop_harddrive.png b/textures/laptop_harddrive.png new file mode 100644 index 0000000..86d0feb Binary files /dev/null and b/textures/laptop_harddrive.png differ diff --git a/textures/laptop_home_web.png b/textures/laptop_home_web.png new file mode 100644 index 0000000..43bd636 Binary files /dev/null and b/textures/laptop_home_web.png differ diff --git a/textures/laptop_k_back.png b/textures/laptop_k_back.png new file mode 100644 index 0000000..056cac5 Binary files /dev/null and b/textures/laptop_k_back.png differ diff --git a/textures/laptop_k_bottom.png b/textures/laptop_k_bottom.png new file mode 100644 index 0000000..028dfcf Binary files /dev/null and b/textures/laptop_k_bottom.png differ diff --git a/textures/laptop_k_front.png b/textures/laptop_k_front.png new file mode 100644 index 0000000..16b31f8 Binary files /dev/null and b/textures/laptop_k_front.png differ diff --git a/textures/laptop_k_left.png b/textures/laptop_k_left.png new file mode 100644 index 0000000..aa562a2 Binary files /dev/null and b/textures/laptop_k_left.png differ diff --git a/textures/laptop_k_right.png b/textures/laptop_k_right.png new file mode 100644 index 0000000..38b2988 Binary files /dev/null and b/textures/laptop_k_right.png differ diff --git a/textures/laptop_k_top.png b/textures/laptop_k_top.png new file mode 100644 index 0000000..0514d1b Binary files /dev/null and b/textures/laptop_k_top.png differ diff --git a/textures/laptop_lap_base_closed_back.png b/textures/laptop_lap_base_closed_back.png new file mode 100644 index 0000000..a7044f5 Binary files /dev/null and b/textures/laptop_lap_base_closed_back.png differ diff --git a/textures/laptop_lap_base_closed_bottom.png b/textures/laptop_lap_base_closed_bottom.png new file mode 100644 index 0000000..d146f79 Binary files /dev/null and b/textures/laptop_lap_base_closed_bottom.png differ diff --git a/textures/laptop_lap_base_closed_front.png b/textures/laptop_lap_base_closed_front.png new file mode 100644 index 0000000..2e290eb Binary files /dev/null and b/textures/laptop_lap_base_closed_front.png differ diff --git a/textures/laptop_lap_base_closed_left.png b/textures/laptop_lap_base_closed_left.png new file mode 100644 index 0000000..8d876df Binary files /dev/null and b/textures/laptop_lap_base_closed_left.png differ diff --git a/textures/laptop_lap_base_closed_right.png b/textures/laptop_lap_base_closed_right.png new file mode 100644 index 0000000..0c15894 Binary files /dev/null and b/textures/laptop_lap_base_closed_right.png differ diff --git a/textures/laptop_lap_base_closed_top.png b/textures/laptop_lap_base_closed_top.png new file mode 100644 index 0000000..9ebfc6a Binary files /dev/null and b/textures/laptop_lap_base_closed_top.png differ diff --git a/textures/laptop_lap_base_item.png b/textures/laptop_lap_base_item.png new file mode 100644 index 0000000..6fbb9ef Binary files /dev/null and b/textures/laptop_lap_base_item.png differ diff --git a/textures/laptop_lap_base_open_back.png b/textures/laptop_lap_base_open_back.png new file mode 100644 index 0000000..3346070 Binary files /dev/null and b/textures/laptop_lap_base_open_back.png differ diff --git a/textures/laptop_lap_base_open_bottom.png b/textures/laptop_lap_base_open_bottom.png new file mode 100644 index 0000000..d146f79 Binary files /dev/null and b/textures/laptop_lap_base_open_bottom.png differ diff --git a/textures/laptop_lap_base_open_front.png b/textures/laptop_lap_base_open_front.png new file mode 100644 index 0000000..17d1364 Binary files /dev/null and b/textures/laptop_lap_base_open_front.png differ diff --git a/textures/laptop_lap_base_open_left.png b/textures/laptop_lap_base_open_left.png new file mode 100644 index 0000000..c2f6cdd Binary files /dev/null and b/textures/laptop_lap_base_open_left.png differ diff --git a/textures/laptop_lap_base_open_on_top.png b/textures/laptop_lap_base_open_on_top.png new file mode 100644 index 0000000..9834af6 Binary files /dev/null and b/textures/laptop_lap_base_open_on_top.png differ diff --git a/textures/laptop_lap_base_open_right.png b/textures/laptop_lap_base_open_right.png new file mode 100644 index 0000000..9d182a9 Binary files /dev/null and b/textures/laptop_lap_base_open_right.png differ diff --git a/textures/laptop_lap_base_open_top.png b/textures/laptop_lap_base_open_top.png new file mode 100644 index 0000000..a37ecc4 Binary files /dev/null and b/textures/laptop_lap_base_open_top.png differ diff --git a/textures/laptop_lap_car_bottom.png b/textures/laptop_lap_car_bottom.png new file mode 100644 index 0000000..f01402f Binary files /dev/null and b/textures/laptop_lap_car_bottom.png differ diff --git a/textures/laptop_lap_car_closed_back.png b/textures/laptop_lap_car_closed_back.png new file mode 100644 index 0000000..681bb3d Binary files /dev/null and b/textures/laptop_lap_car_closed_back.png differ diff --git a/textures/laptop_lap_car_closed_front.png b/textures/laptop_lap_car_closed_front.png new file mode 100644 index 0000000..3a08345 Binary files /dev/null and b/textures/laptop_lap_car_closed_front.png differ diff --git a/textures/laptop_lap_car_closed_left.png b/textures/laptop_lap_car_closed_left.png new file mode 100644 index 0000000..37482da Binary files /dev/null and b/textures/laptop_lap_car_closed_left.png differ diff --git a/textures/laptop_lap_car_closed_right.png b/textures/laptop_lap_car_closed_right.png new file mode 100644 index 0000000..0112cf9 Binary files /dev/null and b/textures/laptop_lap_car_closed_right.png differ diff --git a/textures/laptop_lap_car_closed_top.png b/textures/laptop_lap_car_closed_top.png new file mode 100644 index 0000000..9ed2d22 Binary files /dev/null and b/textures/laptop_lap_car_closed_top.png differ diff --git a/textures/laptop_lap_car_item.png b/textures/laptop_lap_car_item.png new file mode 100644 index 0000000..b0ee93e Binary files /dev/null and b/textures/laptop_lap_car_item.png differ diff --git a/textures/laptop_lap_car_open_back.png b/textures/laptop_lap_car_open_back.png new file mode 100644 index 0000000..82a8aba Binary files /dev/null and b/textures/laptop_lap_car_open_back.png differ diff --git a/textures/laptop_lap_car_open_front.png b/textures/laptop_lap_car_open_front.png new file mode 100644 index 0000000..aaff823 Binary files /dev/null and b/textures/laptop_lap_car_open_front.png differ diff --git a/textures/laptop_lap_car_open_left.png b/textures/laptop_lap_car_open_left.png new file mode 100644 index 0000000..75d6209 Binary files /dev/null and b/textures/laptop_lap_car_open_left.png differ diff --git a/textures/laptop_lap_car_open_on_top.png b/textures/laptop_lap_car_open_on_top.png new file mode 100644 index 0000000..840a3ed Binary files /dev/null and b/textures/laptop_lap_car_open_on_top.png differ diff --git a/textures/laptop_lap_car_open_right.png b/textures/laptop_lap_car_open_right.png new file mode 100644 index 0000000..81192c6 Binary files /dev/null and b/textures/laptop_lap_car_open_right.png differ diff --git a/textures/laptop_lap_car_open_top.png b/textures/laptop_lap_car_open_top.png new file mode 100644 index 0000000..cca50d2 Binary files /dev/null and b/textures/laptop_lap_car_open_top.png differ diff --git a/textures/laptop_lap_car_sc_open_bottom.png b/textures/laptop_lap_car_sc_open_bottom.png new file mode 100644 index 0000000..2e63217 Binary files /dev/null and b/textures/laptop_lap_car_sc_open_bottom.png differ diff --git a/textures/laptop_lap_car_sc_open_front.png b/textures/laptop_lap_car_sc_open_front.png new file mode 100644 index 0000000..e7df896 Binary files /dev/null and b/textures/laptop_lap_car_sc_open_front.png differ diff --git a/textures/laptop_lap_car_sc_open_on_front.png b/textures/laptop_lap_car_sc_open_on_front.png new file mode 100644 index 0000000..0e1e21a Binary files /dev/null and b/textures/laptop_lap_car_sc_open_on_front.png differ diff --git a/textures/laptop_lap_sc_open_back.png b/textures/laptop_lap_sc_open_back.png new file mode 100644 index 0000000..282592f Binary files /dev/null and b/textures/laptop_lap_sc_open_back.png differ diff --git a/textures/laptop_lap_sc_open_bottom.png b/textures/laptop_lap_sc_open_bottom.png new file mode 100644 index 0000000..09e5eef Binary files /dev/null and b/textures/laptop_lap_sc_open_bottom.png differ diff --git a/textures/laptop_lap_sc_open_front.png b/textures/laptop_lap_sc_open_front.png new file mode 100644 index 0000000..c2fd42b Binary files /dev/null and b/textures/laptop_lap_sc_open_front.png differ diff --git a/textures/laptop_lap_sc_open_on_front.png b/textures/laptop_lap_sc_open_on_front.png new file mode 100644 index 0000000..125b208 Binary files /dev/null and b/textures/laptop_lap_sc_open_on_front.png differ diff --git a/textures/laptop_lcd.png b/textures/laptop_lcd.png new file mode 100644 index 0000000..a832253 Binary files /dev/null and b/textures/laptop_lcd.png differ diff --git a/textures/laptop_lcd_fruit.png b/textures/laptop_lcd_fruit.png new file mode 100644 index 0000000..7b8fd24 Binary files /dev/null and b/textures/laptop_lcd_fruit.png differ diff --git a/textures/laptop_lcd_fruit_on.png b/textures/laptop_lcd_fruit_on.png new file mode 100644 index 0000000..0e5b379 Binary files /dev/null and b/textures/laptop_lcd_fruit_on.png differ diff --git a/textures/laptop_m_back.png b/textures/laptop_m_back.png new file mode 100644 index 0000000..d7933d5 Binary files /dev/null and b/textures/laptop_m_back.png differ diff --git a/textures/laptop_m_bottom.png b/textures/laptop_m_bottom.png new file mode 100644 index 0000000..8a96b84 Binary files /dev/null and b/textures/laptop_m_bottom.png differ diff --git a/textures/laptop_m_front.png b/textures/laptop_m_front.png new file mode 100644 index 0000000..7a35dff Binary files /dev/null and b/textures/laptop_m_front.png differ diff --git a/textures/laptop_m_front_on.png b/textures/laptop_m_front_on.png new file mode 100644 index 0000000..53dcb36 Binary files /dev/null and b/textures/laptop_m_front_on.png differ diff --git a/textures/laptop_m_left.png b/textures/laptop_m_left.png new file mode 100644 index 0000000..9d7acef Binary files /dev/null and b/textures/laptop_m_left.png differ diff --git a/textures/laptop_m_right.png b/textures/laptop_m_right.png new file mode 100644 index 0000000..6b0e1df Binary files /dev/null and b/textures/laptop_m_right.png differ diff --git a/textures/laptop_m_top.png b/textures/laptop_m_top.png new file mode 100644 index 0000000..01e695a Binary files /dev/null and b/textures/laptop_m_top.png differ diff --git a/textures/laptop_motherboard.png b/textures/laptop_motherboard.png new file mode 100644 index 0000000..fd7bd03 Binary files /dev/null and b/textures/laptop_motherboard.png differ diff --git a/textures/laptop_notes_pad.png b/textures/laptop_notes_pad.png new file mode 100644 index 0000000..ae57a05 Binary files /dev/null and b/textures/laptop_notes_pad.png differ diff --git a/textures/laptop_opti_kb_back.png b/textures/laptop_opti_kb_back.png new file mode 100644 index 0000000..8b5cf82 Binary files /dev/null and b/textures/laptop_opti_kb_back.png differ diff --git a/textures/laptop_opti_kb_bottom.png b/textures/laptop_opti_kb_bottom.png new file mode 100644 index 0000000..db98817 Binary files /dev/null and b/textures/laptop_opti_kb_bottom.png differ diff --git a/textures/laptop_opti_kb_front.png b/textures/laptop_opti_kb_front.png new file mode 100644 index 0000000..8ad0559 Binary files /dev/null and b/textures/laptop_opti_kb_front.png differ diff --git a/textures/laptop_opti_kb_left.png b/textures/laptop_opti_kb_left.png new file mode 100644 index 0000000..1c7a36a Binary files /dev/null and b/textures/laptop_opti_kb_left.png differ diff --git a/textures/laptop_opti_kb_right.png b/textures/laptop_opti_kb_right.png new file mode 100644 index 0000000..27e7ec6 Binary files /dev/null and b/textures/laptop_opti_kb_right.png differ diff --git a/textures/laptop_opti_kb_top.png b/textures/laptop_opti_kb_top.png new file mode 100644 index 0000000..5176e36 Binary files /dev/null and b/textures/laptop_opti_kb_top.png differ diff --git a/textures/laptop_opti_lcb_back.png b/textures/laptop_opti_lcb_back.png new file mode 100644 index 0000000..71b1ee4 Binary files /dev/null and b/textures/laptop_opti_lcb_back.png differ diff --git a/textures/laptop_opti_lcb_front.png b/textures/laptop_opti_lcb_front.png new file mode 100644 index 0000000..e02d6be Binary files /dev/null and b/textures/laptop_opti_lcb_front.png differ diff --git a/textures/laptop_opti_lcb_left.png b/textures/laptop_opti_lcb_left.png new file mode 100644 index 0000000..4304cbc Binary files /dev/null and b/textures/laptop_opti_lcb_left.png differ diff --git a/textures/laptop_opti_lcb_right.png b/textures/laptop_opti_lcb_right.png new file mode 100644 index 0000000..070ca82 Binary files /dev/null and b/textures/laptop_opti_lcb_right.png differ diff --git a/textures/laptop_opti_lcb_top.png b/textures/laptop_opti_lcb_top.png new file mode 100644 index 0000000..d7d6b9f Binary files /dev/null and b/textures/laptop_opti_lcb_top.png differ diff --git a/textures/laptop_opti_lcd_back.png b/textures/laptop_opti_lcd_back.png new file mode 100644 index 0000000..1b79594 Binary files /dev/null and b/textures/laptop_opti_lcd_back.png differ diff --git a/textures/laptop_opti_lcd_bottom.png b/textures/laptop_opti_lcd_bottom.png new file mode 100644 index 0000000..beb05b5 Binary files /dev/null and b/textures/laptop_opti_lcd_bottom.png differ diff --git a/textures/laptop_opti_lcd_front.png b/textures/laptop_opti_lcd_front.png new file mode 100644 index 0000000..8f90d78 Binary files /dev/null and b/textures/laptop_opti_lcd_front.png differ diff --git a/textures/laptop_opti_lcd_left.png b/textures/laptop_opti_lcd_left.png new file mode 100644 index 0000000..44ad1c2 Binary files /dev/null and b/textures/laptop_opti_lcd_left.png differ diff --git a/textures/laptop_opti_lcd_on_front.png b/textures/laptop_opti_lcd_on_front.png new file mode 100644 index 0000000..6da9e7e Binary files /dev/null and b/textures/laptop_opti_lcd_on_front.png differ diff --git a/textures/laptop_opti_lcd_right.png b/textures/laptop_opti_lcd_right.png new file mode 100644 index 0000000..2450380 Binary files /dev/null and b/textures/laptop_opti_lcd_right.png differ diff --git a/textures/laptop_opti_lcd_top.png b/textures/laptop_opti_lcd_top.png new file mode 100644 index 0000000..dea4bc7 Binary files /dev/null and b/textures/laptop_opti_lcd_top.png differ diff --git a/textures/laptop_opti_lcp_back.png b/textures/laptop_opti_lcp_back.png new file mode 100644 index 0000000..4e4d838 Binary files /dev/null and b/textures/laptop_opti_lcp_back.png differ diff --git a/textures/laptop_opti_lcp_front.png b/textures/laptop_opti_lcp_front.png new file mode 100644 index 0000000..993242c Binary files /dev/null and b/textures/laptop_opti_lcp_front.png differ diff --git a/textures/laptop_opti_lcp_left.png b/textures/laptop_opti_lcp_left.png new file mode 100644 index 0000000..3d6d481 Binary files /dev/null and b/textures/laptop_opti_lcp_left.png differ diff --git a/textures/laptop_opti_lcp_right.png b/textures/laptop_opti_lcp_right.png new file mode 100644 index 0000000..c24df5e Binary files /dev/null and b/textures/laptop_opti_lcp_right.png differ diff --git a/textures/laptop_opti_lcp_top.png b/textures/laptop_opti_lcp_top.png new file mode 100644 index 0000000..cbdb9b4 Binary files /dev/null and b/textures/laptop_opti_lcp_top.png differ diff --git a/textures/laptop_opti_ms_back.png b/textures/laptop_opti_ms_back.png new file mode 100644 index 0000000..109b849 Binary files /dev/null and b/textures/laptop_opti_ms_back.png differ diff --git a/textures/laptop_opti_ms_bottom.png b/textures/laptop_opti_ms_bottom.png new file mode 100644 index 0000000..e6bca6b Binary files /dev/null and b/textures/laptop_opti_ms_bottom.png differ diff --git a/textures/laptop_opti_ms_front.png b/textures/laptop_opti_ms_front.png new file mode 100644 index 0000000..a96e6f8 Binary files /dev/null and b/textures/laptop_opti_ms_front.png differ diff --git a/textures/laptop_opti_ms_left.png b/textures/laptop_opti_ms_left.png new file mode 100644 index 0000000..3563025 Binary files /dev/null and b/textures/laptop_opti_ms_left.png differ diff --git a/textures/laptop_opti_ms_right.png b/textures/laptop_opti_ms_right.png new file mode 100644 index 0000000..4a1fdfa Binary files /dev/null and b/textures/laptop_opti_ms_right.png differ diff --git a/textures/laptop_opti_ms_top.png b/textures/laptop_opti_ms_top.png new file mode 100644 index 0000000..1efaf51 Binary files /dev/null and b/textures/laptop_opti_ms_top.png differ diff --git a/textures/laptop_opti_pc_back.png b/textures/laptop_opti_pc_back.png new file mode 100644 index 0000000..1632bfe Binary files /dev/null and b/textures/laptop_opti_pc_back.png differ diff --git a/textures/laptop_opti_pc_bottom.png b/textures/laptop_opti_pc_bottom.png new file mode 100644 index 0000000..60cb45b Binary files /dev/null and b/textures/laptop_opti_pc_bottom.png differ diff --git a/textures/laptop_opti_pc_front.png b/textures/laptop_opti_pc_front.png new file mode 100644 index 0000000..9df5214 Binary files /dev/null and b/textures/laptop_opti_pc_front.png differ diff --git a/textures/laptop_opti_pc_left.png b/textures/laptop_opti_pc_left.png new file mode 100644 index 0000000..8906cd0 Binary files /dev/null and b/textures/laptop_opti_pc_left.png differ diff --git a/textures/laptop_opti_pc_on_front.png b/textures/laptop_opti_pc_on_front.png new file mode 100644 index 0000000..ce81ab6 Binary files /dev/null and b/textures/laptop_opti_pc_on_front.png differ diff --git a/textures/laptop_opti_pc_right.png b/textures/laptop_opti_pc_right.png new file mode 100644 index 0000000..5949710 Binary files /dev/null and b/textures/laptop_opti_pc_right.png differ diff --git a/textures/laptop_opti_pc_top.png b/textures/laptop_opti_pc_top.png new file mode 100644 index 0000000..8bb7df5 Binary files /dev/null and b/textures/laptop_opti_pc_top.png differ diff --git a/textures/laptop_p_back.png b/textures/laptop_p_back.png new file mode 100644 index 0000000..85623cc Binary files /dev/null and b/textures/laptop_p_back.png differ diff --git a/textures/laptop_p_bottom.png b/textures/laptop_p_bottom.png new file mode 100644 index 0000000..1ff420b Binary files /dev/null and b/textures/laptop_p_bottom.png differ diff --git a/textures/laptop_p_front.png b/textures/laptop_p_front.png new file mode 100644 index 0000000..7979485 Binary files /dev/null and b/textures/laptop_p_front.png differ diff --git a/textures/laptop_p_left.png b/textures/laptop_p_left.png new file mode 100644 index 0000000..521c18c Binary files /dev/null and b/textures/laptop_p_left.png differ diff --git a/textures/laptop_p_right.png b/textures/laptop_p_right.png new file mode 100644 index 0000000..cebc3c1 Binary files /dev/null and b/textures/laptop_p_right.png differ diff --git a/textures/laptop_p_top.png b/textures/laptop_p_top.png new file mode 100644 index 0000000..9912d0d Binary files /dev/null and b/textures/laptop_p_top.png differ diff --git a/textures/laptop_printer_back.png b/textures/laptop_printer_back.png new file mode 100644 index 0000000..ca25cc6 Binary files /dev/null and b/textures/laptop_printer_back.png differ diff --git a/textures/laptop_printer_bottom.png b/textures/laptop_printer_bottom.png new file mode 100644 index 0000000..a739e26 Binary files /dev/null and b/textures/laptop_printer_bottom.png differ diff --git a/textures/laptop_printer_front.png b/textures/laptop_printer_front.png new file mode 100644 index 0000000..8a6871a Binary files /dev/null and b/textures/laptop_printer_front.png differ diff --git a/textures/laptop_printer_front_off.png b/textures/laptop_printer_front_off.png new file mode 100644 index 0000000..23507fe Binary files /dev/null and b/textures/laptop_printer_front_off.png differ diff --git a/textures/laptop_printer_front_on.png b/textures/laptop_printer_front_on.png new file mode 100644 index 0000000..fe9d3ec Binary files /dev/null and b/textures/laptop_printer_front_on.png differ diff --git a/textures/laptop_printer_left.png b/textures/laptop_printer_left.png new file mode 100644 index 0000000..889fbc2 Binary files /dev/null and b/textures/laptop_printer_left.png differ diff --git a/textures/laptop_printer_right.png b/textures/laptop_printer_right.png new file mode 100644 index 0000000..b7a426d Binary files /dev/null and b/textures/laptop_printer_right.png differ diff --git a/textures/laptop_printer_top.png b/textures/laptop_printer_top.png new file mode 100644 index 0000000..6aa0c91 Binary files /dev/null and b/textures/laptop_printer_top.png differ diff --git a/textures/laptop_psu.png b/textures/laptop_psu.png new file mode 100644 index 0000000..26b26ac Binary files /dev/null and b/textures/laptop_psu.png differ diff --git a/textures/laptop_t_back.png b/textures/laptop_t_back.png new file mode 100644 index 0000000..33fdb17 Binary files /dev/null and b/textures/laptop_t_back.png differ diff --git a/textures/laptop_t_bottom.png b/textures/laptop_t_bottom.png new file mode 100644 index 0000000..e208b80 Binary files /dev/null and b/textures/laptop_t_bottom.png differ diff --git a/textures/laptop_t_front.png b/textures/laptop_t_front.png new file mode 100644 index 0000000..d08b3f7 Binary files /dev/null and b/textures/laptop_t_front.png differ diff --git a/textures/laptop_t_front_on.png b/textures/laptop_t_front_on.png new file mode 100644 index 0000000..b29319a Binary files /dev/null and b/textures/laptop_t_front_on.png differ diff --git a/textures/laptop_t_left.png b/textures/laptop_t_left.png new file mode 100644 index 0000000..8377fc2 Binary files /dev/null and b/textures/laptop_t_left.png differ diff --git a/textures/laptop_t_right.png b/textures/laptop_t_right.png new file mode 100644 index 0000000..864559d Binary files /dev/null and b/textures/laptop_t_right.png differ diff --git a/textures/laptop_t_top.png b/textures/laptop_t_top.png new file mode 100644 index 0000000..0db8fb8 Binary files /dev/null and b/textures/laptop_t_top.png differ diff --git a/textures/w.png b/textures/w.png new file mode 100644 index 0000000..aa512b7 Binary files /dev/null and b/textures/w.png differ