diff options
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | display_lib/API.md | 14 | ||||
-rw-r--r-- | display_lib/README.md | 4 | ||||
-rw-r--r-- | display_lib/init.lua | 98 | ||||
-rw-r--r-- | font_lib/API.md | 47 | ||||
-rw-r--r-- | font_lib/LICENSE.txt | 13 | ||||
-rw-r--r-- | font_lib/README.md | 14 | ||||
-rw-r--r-- | font_lib/depends.txt | 1 | ||||
-rw-r--r-- | font_lib/init.lua | 139 | ||||
-rw-r--r-- | font_lib/textures/font_lib_20.png | bin | 0 -> 232 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_21.png (renamed from signs/textures/signs_21.png) | bin | 241 -> 241 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_22.png (renamed from signs/textures/signs_22.png) | bin | 235 -> 235 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_23.png (renamed from signs/textures/signs_23.png) | bin | 244 -> 244 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_24.png (renamed from signs/textures/signs_24.png) | bin | 247 -> 247 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_25.png (renamed from signs/textures/signs_25.png) | bin | 247 -> 247 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_26.png (renamed from signs/textures/signs_26.png) | bin | 246 -> 246 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_27.png (renamed from signs/textures/signs_27.png) | bin | 238 -> 238 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_28.png (renamed from signs/textures/signs_28.png) | bin | 242 -> 242 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_29.png | bin | 0 -> 241 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_2a.png (renamed from signs/textures/signs_2a.png) | bin | 238 -> 238 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_2b.png (renamed from signs/textures/signs_2b.png) | bin | 241 -> 241 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_2c.png | bin | 0 -> 238 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_2d.png (renamed from signs/textures/signs_2d.png) | bin | 237 -> 237 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_2e.png | bin | 0 -> 236 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_2f.png | bin | 0 -> 244 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_30.png (renamed from signs/textures/signs_30.png) | bin | 239 -> 239 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_31.png (renamed from signs/textures/signs_31.png) | bin | 239 -> 239 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_32.png (renamed from signs/textures/signs_32.png) | bin | 247 -> 247 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_33.png (renamed from signs/textures/signs_33.png) | bin | 246 -> 246 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_34.png (renamed from signs/textures/signs_34.png) | bin | 247 -> 247 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_35.png (renamed from signs/textures/signs_35.png) | bin | 247 -> 247 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_36.png (renamed from signs/textures/signs_36.png) | bin | 244 -> 244 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_37.png (renamed from signs/textures/signs_37.png) | bin | 242 -> 242 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_38.png (renamed from signs/textures/signs_38.png) | bin | 240 -> 240 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_39.png (renamed from signs/textures/signs_39.png) | bin | 243 -> 243 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_3a.png (renamed from signs/textures/signs_3a.png) | bin | 237 -> 237 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_3b.png (renamed from signs/textures/signs_3b.png) | bin | 240 -> 240 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_3c.png (renamed from signs/textures/signs_3c.png) | bin | 245 -> 245 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_3d.png (renamed from signs/textures/signs_3d.png) | bin | 236 -> 236 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_3e.png (renamed from signs/textures/signs_3e.png) | bin | 245 -> 245 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_3f.png (renamed from signs/textures/signs_3f.png) | bin | 243 -> 243 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_40.png (renamed from signs/textures/signs_40.png) | bin | 259 -> 259 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_41.png (renamed from signs/textures/signs_41.png) | bin | 243 -> 243 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_42.png (renamed from signs/textures/signs_42.png) | bin | 240 -> 240 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_43.png (renamed from signs/textures/signs_43.png) | bin | 246 -> 246 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_44.png (renamed from signs/textures/signs_44.png) | bin | 242 -> 242 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_45.png (renamed from signs/textures/signs_45.png) | bin | 240 -> 240 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_46.png (renamed from signs/textures/signs_46.png) | bin | 241 -> 241 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_47.png (renamed from signs/textures/signs_47.png) | bin | 247 -> 247 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_48.png (renamed from signs/textures/signs_48.png) | bin | 240 -> 240 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_49.png (renamed from signs/textures/signs_49.png) | bin | 236 -> 236 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_4a.png (renamed from signs/textures/signs_4a.png) | bin | 240 -> 240 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_4b.png (renamed from signs/textures/signs_4b.png) | bin | 246 -> 246 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_4c.png (renamed from signs/textures/signs_4c.png) | bin | 238 -> 238 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_4d.png (renamed from signs/textures/signs_4d.png) | bin | 249 -> 249 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_4e.png (renamed from signs/textures/signs_4e.png) | bin | 243 -> 243 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_4f.png | bin | 0 -> 243 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_50.png (renamed from signs/textures/signs_50.png) | bin | 241 -> 241 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_51.png (renamed from signs/textures/signs_51.png) | bin | 244 -> 244 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_52.png (renamed from signs/textures/signs_52.png) | bin | 238 -> 238 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_53.png (renamed from signs/textures/signs_53.png) | bin | 247 -> 247 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_54.png (renamed from signs/textures/signs_54.png) | bin | 237 -> 237 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_55.png (renamed from signs/textures/signs_55.png) | bin | 238 -> 238 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_56.png (renamed from signs/textures/signs_56.png) | bin | 243 -> 243 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_57.png (renamed from signs/textures/signs_57.png) | bin | 246 -> 246 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_58.png (renamed from signs/textures/signs_58.png) | bin | 245 -> 245 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_59.png (renamed from signs/textures/signs_59.png) | bin | 244 -> 244 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_5a.png (renamed from signs/textures/signs_5a.png) | bin | 248 -> 248 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_5b.png (renamed from signs/textures/signs_5b.png) | bin | 234 -> 234 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_5c.png (renamed from signs/textures/signs_5c.png) | bin | 244 -> 244 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_5d.png (renamed from signs/textures/signs_5d.png) | bin | 234 -> 234 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_5e.png (renamed from signs/textures/signs_5e.png) | bin | 238 -> 238 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_5f.png | bin | 0 -> 233 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_60.png (renamed from signs/textures/signs_60.png) | bin | 234 -> 234 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_61.png (renamed from signs/textures/signs_61.png) | bin | 245 -> 245 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_62.png (renamed from signs/textures/signs_62.png) | bin | 242 -> 242 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_63.png (renamed from signs/textures/signs_63.png) | bin | 244 -> 244 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_64.png | bin | 0 -> 243 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_65.png (renamed from signs/textures/signs_65.png) | bin | 245 -> 245 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_66.png (renamed from signs/textures/signs_66.png) | bin | 240 -> 240 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_67.png | bin | 0 -> 243 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_68.png (renamed from signs/textures/signs_68.png) | bin | 240 -> 240 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_69.png (renamed from signs/textures/signs_69.png) | bin | 239 -> 239 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_6a.png (renamed from signs/textures/signs_6a.png) | bin | 236 -> 236 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_6b.png (renamed from signs/textures/signs_6b.png) | bin | 246 -> 246 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_6c.png (renamed from signs/textures/signs_6c.png) | bin | 236 -> 236 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_6d.png (renamed from signs/textures/signs_6d.png) | bin | 241 -> 241 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_6e.png (renamed from signs/textures/signs_6e.png) | bin | 239 -> 239 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_6f.png | bin | 0 -> 241 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_70.png (renamed from signs/textures/signs_70.png) | bin | 242 -> 242 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_71.png | bin | 0 -> 243 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_72.png | bin | 0 -> 241 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_73.png (renamed from signs/textures/signs_73.png) | bin | 242 -> 242 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_74.png (renamed from signs/textures/signs_74.png) | bin | 243 -> 243 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_75.png (renamed from signs/textures/signs_75.png) | bin | 239 -> 239 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_76.png (renamed from signs/textures/signs_76.png) | bin | 244 -> 244 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_77.png (renamed from signs/textures/signs_77.png) | bin | 240 -> 240 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_78.png (renamed from signs/textures/signs_78.png) | bin | 244 -> 244 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_79.png | bin | 0 -> 241 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_7a.png (renamed from signs/textures/signs_7a.png) | bin | 246 -> 246 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_7b.png (renamed from signs/textures/signs_7b.png) | bin | 239 -> 239 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_7c.png | bin | 0 -> 232 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_7d.png (renamed from signs/textures/signs_7d.png) | bin | 239 -> 239 bytes | |||
-rw-r--r-- | font_lib/textures/font_lib_7e.png (renamed from signs/textures/signs_7e.png) | bin | 239 -> 239 bytes | |||
-rw-r--r-- | ontime_clocks/nodes.lua | 12 | ||||
-rw-r--r-- | signs/README.md | 30 | ||||
-rw-r--r-- | signs/common.lua | 173 | ||||
-rw-r--r-- | signs/crafts.lua | 27 | ||||
-rw-r--r-- | signs/depends.txt | 2 | ||||
-rw-r--r-- | signs/font.lua | 63 | ||||
-rw-r--r-- | signs/nodes.lua | 173 | ||||
-rw-r--r-- | signs/textures/signs_20.png | bin | 232 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_29.png | bin | 241 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_2c.png | bin | 238 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_2e.png | bin | 236 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_2f.png | bin | 244 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_4f.png | bin | 243 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_5f.png | bin | 233 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_64.png | bin | 243 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_67.png | bin | 243 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_6f.png | bin | 241 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_71.png | bin | 243 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_72.png | bin | 241 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_79.png | bin | 241 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_7c.png | bin | 232 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_black_inventory.png | bin | 265 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_black_left.png | bin | 263 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_black_right.png | bin | 258 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_blue_street.png | bin | 436 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_blue_street_inventory.png | bin | 472 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_default.png | bin | 0 -> 554 bytes | |||
-rw-r--r-- | signs/textures/signs_default_inventory.png | bin | 0 -> 617 bytes | |||
-rw-r--r-- | signs/textures/signs_green_street.png | bin | 274 -> 0 bytes | |||
-rw-r--r-- | signs/textures/signs_green_street_inventory.png | bin | 279 -> 0 bytes |
134 files changed, 425 insertions, 389 deletions
@@ -3,6 +3,8 @@ This modpack provides mods with dynamic display. Mods are : - **display_lib**: A library for adding display entities to nodes; +- **font_lib**: A library for displaying fonts on entities; - **ontime_clocks**: A mod providing clocks which display the ingame time; - **signs**: A mod providing signs and direction signs displaying text; - +- **signs_road**: A mod providing road signs displaying text; +- **steles**: A mod providing stone steles with text; diff --git a/display_lib/API.md b/display_lib/API.md index 7bfaaef..148db60 100644 --- a/display_lib/API.md +++ b/display_lib/API.md @@ -1,5 +1,6 @@ # Display Lib API -This document describes Display Lib API. Display Lib allows to add a dynamic display on a node. Node must be wallmounted and Display Lib limits its rotation to vertical positions. +This document describes Display Lib API. Display Lib allows to add a dynamic display on a node. Display Lib limits node rotations. For wallmounted, only vertical positionning is available, and for facedir, only first four position are availabel (those with default axis). + ## Provided methods ### update\_entities **display\_lib.update\_entities(pos)** @@ -38,7 +39,12 @@ This is a helper to register entities used for display. * Register display entities with **register\_display\_entity** * Register node with : - **on\_place**, **on\_construct**, **on\_destruct** and **on\_rotate** callbacks using **display\_lib** callbacks. - - a **display\_entities** field in node definition containing a entity name indexed table. For each entity, two fields : **depth** indicates the entity position (-0.5 to 0.5) and **on_display_update** is a callback in charge of setting up entity texture. + - a **display\_entities** field in node definition containing a entity name indexed table. See below for description of each display\_entities fields. + +### Display_entities fields +**depth**, **right** and **height** : Entity position regarding to node facedir/wallmounted main axis. Values for these fields can be any number between -0.5 and 0.5 (default value is 0). Position 0,0,0 is the center of the node. **depth** goes from front (-0.5) to rear (0.5), **height** goes from bottom (-0.5) to top (0.5) and **height** goes from left (-0.5) to right (0.5). + +**on_display_update** is a callback in charge of setting up entity texture. If not set, entity will have no texture and will be displayed as unknown item. ### Example @@ -60,9 +66,9 @@ This is a helper to register entities used for display. paramtype2 = "wallmounted", ... display_entities = { - ["mymod:entity1"] = { depth = -0.3, + ["mymod:entity1"] = { depth = 0.3, on_display_update = my_display_update1}, - ["mymod:entity1"] = { depth = -0.2, + ["mymod:entity1"] = { depth = 0.2, height = 0.1, on_display_update = my_display_update2}, }, ... diff --git a/display_lib/README.md b/display_lib/README.md index 7ca97b2..b075954 100644 --- a/display_lib/README.md +++ b/display_lib/README.md @@ -1,8 +1,8 @@ # Dislpay Lib -This library's purpose is to ease creation of wallmounted nodes with a display on front side. For example, signs and clocks. Display can be dynamic and/or different for each node instance. +This library's purpose is to ease creation of nodes with one or more displays on sides. For example, signs and clocks. Display can be dynamic and/or different for each node instance. -**Limitations**: This lib uses entities to draw display. This means display has to be vertical. So display nodes are only wallmounted vertically. +**Limitations**: This lib uses entities to draw display. This means display has to be vertical. So display nodes rotation are limitated to "upside up" positions. **Dependancies**:default diff --git a/display_lib/init.lua b/display_lib/init.lua index eaddfd3..276445d 100644 --- a/display_lib/init.lua +++ b/display_lib/init.lua @@ -6,14 +6,59 @@ display_lib = {} -- Miscelaneous values depending on wallmounted param2 local wallmounted_values = { - [0]={dx=0, dz=0, lx=0, lz=0, yaw=0, rotate=0}, -- Should never be used - {dx=1, dz=0, lx=0, lz=0, yaw=0, rotate=1}, -- Should never be used - {dx=1, dz=0, lx=0, lz=-1, yaw=-math.pi/2, rotate=4}, - {dx=-1, dz=0, lx=0, lz=1, yaw=math.pi/2, rotate=5}, - {dx=0, dz=1, lx=1, lz=0, yaw=0, rotate=3}, - {dx=0, dz=-1, lx=-1, lz=0, yaw=math.pi, rotate=2} + [0]={dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, -- Should never be used + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=1}, -- Should never be used + {dx=-1, dz=0, rx=0, rz=-1, yaw=-math.pi/2, rotate=5}, + {dx=1, dz=0, rx=0, rz=1, yaw=math.pi/2, rotate=4}, + {dx=0, dz=-1, rx=1, rz=0, yaw=0, rotate=2}, + {dx=0, dz=1, rx=-1, rz=0, yaw=math.pi, rotate=3} } +-- Miscelaneous values depending on facedir param2 +local facedir_values = { + [0]={dx=0, dz=-1, rx=1, rz=0, yaw=0, rotate=1}, + {dx=-1, dz=0, rx=0, rz=-1, yaw=-math.pi/2, rotate=2}, + {dx=0, dz=1, rx=-1, rz=0, yaw=math.pi, rotate=3}, + {dx=1, dz=0, rx=0, rz=1, yaw=math.pi/2, rotate=0}, + -- Forbiden values : + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + } + +-- dx/dy = depth vector, rx/ly = right vector, yaw = yaw of entity, +-- rotate = next facedir/wallmount on rotate + +local function get_values(node) + local ndef = minetest.registered_nodes[node.name] + + if ndef then + if ndef.paramtype2 == "wallmounted" then + return wallmounted_values[node.param2] + end + if ndef.paramtype2 == "facedir" then + return facedir_values[node.param2] + end + end +end + --- Gets the display entities attached with a node. Removes extra ones local function get_entities(pos) local objrefs = {} @@ -45,23 +90,24 @@ end local function place_entities(pos) local node = minetest.get_node(pos) local ndef = minetest.registered_nodes[node.name] - local values = wallmounted_values[node.param2] + local values = get_values(node) local objrefs = get_entities(pos) - if ndef and ndef.display_entities then + if values and ndef and ndef.display_entities then + for entity_name, props in pairs(ndef.display_entities) do local depth = clip_pos_prop(props.depth) - local top = clip_pos_prop(props.top) - local left = clip_pos_prop(props.left) + local height = clip_pos_prop(props.height) + local right = clip_pos_prop(props.right) if not objrefs[entity_name] then objrefs[entity_name] = minetest.add_entity(pos, entity_name) end objrefs[entity_name]:setpos({ - x = pos.x - values.dx * depth + values.lx * left, - y = pos.y + top, - z = pos.z - values.dz * depth + values.lz * left}) + x = pos.x - values.dx * depth + values.rx * right, + y = pos.y + height, + z = pos.z - values.dz * depth + values.rz * right}) objrefs[entity_name]:setyaw(values.yaw) end @@ -97,19 +143,26 @@ end --- On_place callback for display_lib items. Does nothing more than preventing item --- from being placed on ceiling or ground function display_lib.on_place(itemstack, placer, pointed_thing) + local ndef = minetest.registered_nodes[itemstack.name] local above = pointed_thing.above local under = pointed_thing.under local dir = {x = under.x - above.x, y = under.y - above.y, z = under.z - above.z} - local wdir = minetest.dir_to_wallmounted(dir) - if wdir == 0 or wdir == 1 then - dir = placer:get_look_dir() - dir.y = 0 - wdir = minetest.dir_to_wallmounted(dir) + if ndef and ndef.paramtype2 == "wallmounted" then + local wdir = minetest.dir_to_wallmounted(dir) + + if wdir == 0 or wdir == 1 then + dir = placer:get_look_dir() + dir.y = 0 + wdir = minetest.dir_to_wallmounted(dir) + end + + return minetest.item_place(itemstack, placer, pointed_thing, wdir) + else + return minetest.item_place(itemstack, placer, pointed_thing) end - return minetest.item_place(itemstack, placer, pointed_thing, wdir) end --- On_construct callback for display_lib items. Creates entities and update them. @@ -126,13 +179,14 @@ function display_lib.on_destruct(pos) end end - -- On_rotate (screwdriver) callback for display_lib items. Prevents axis rotation and reorients entities. function display_lib.on_rotate(pos, node, user, mode, new_param2) if mode ~= screwdriver.ROTATE_FACE then return false end - if wallmounted_values[node.param2] then - minetest.swap_node(pos, {name = node.name, param1 = node.param1, param2 = wallmounted_values[node.param2].rotate}) + local values = get_values(node) + + if values then + minetest.swap_node(pos, {name = node.name, param1 = node.param1, param2 = values.rotate}) place_entities(pos) return true else diff --git a/font_lib/API.md b/font_lib/API.md new file mode 100644 index 0000000..7ec499b --- /dev/null +++ b/font_lib/API.md @@ -0,0 +1,47 @@ +# Font Lib API +This document describes Font Lib API. Font Lib creates textures for font display on entities. + +## Provided methods +### get\_line\_width +**font\_lib.get\_line\_width(text)** + +Computes line width for a given font height and text +**text**: Text to be rendered + +**Returns**: rendered text width + +### make\_line\_texture +**font\_lib.make\_line\_texture(text, texturew, x, y)** + +Builds texture part for a text line + +**text**: Text to be rendered + +**texturew**: Width of the texture (extra text is not rendered) + +**x**: Starting x position in texture + +**y**: Vertical position of the line in texture + +**Returns**: Texture string + +### make\_multiline\_texture +**font\_lib.make\_multiline\_texture(text, texturew, textureh, maxlines, valign, color)** + +Builds texture for a multiline colored text + +**text**: Text to be rendered + +**texturew**: Width of the texture (extra text will be truncated) + +**textureh**: Height of the texture + +**maxlines**: Maximum number of lines + +**valign**: Vertical text align ("top" or "center") + +**color**: Color of the text + +**Returns**: Texture string + + diff --git a/font_lib/LICENSE.txt b/font_lib/LICENSE.txt new file mode 100644 index 0000000..bc06764 --- /dev/null +++ b/font_lib/LICENSE.txt @@ -0,0 +1,13 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + +Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> + +Everyone is permitted to copy and distribute verbatim or modified +copies of this license document, and changing it is allowed as long +as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/font_lib/README.md b/font_lib/README.md new file mode 100644 index 0000000..a297b93 --- /dev/null +++ b/font_lib/README.md @@ -0,0 +1,14 @@ +# Font Lib + +This library for font display on entities (to be used with display_lib for sign creation). + +**Dependancies**: default + +**License**: WTFPL + +(Font taken from VanessaE's homedecor/signs_lib) + +**API**: See API.md document please. + + + diff --git a/font_lib/depends.txt b/font_lib/depends.txt new file mode 100644 index 0000000..4ad96d5 --- /dev/null +++ b/font_lib/depends.txt @@ -0,0 +1 @@ +default diff --git a/font_lib/init.lua b/font_lib/init.lua new file mode 100644 index 0000000..3e5b8c7 --- /dev/null +++ b/font_lib/init.lua @@ -0,0 +1,139 @@ +-- Font lib mod by P.Y. Rollo +-- +-- License: WTFPL + +font_lib = {} +font_lib.path = minetest.get_modpath("font_lib") +font_lib.font_height = 10 +font_lib.font = {} + +-- Get png width, suposing png width is less than 256 (it is the case for all font textures) +local function get_png_width(filename) + local file=assert(io.open(filename,"rb")) + -- All font png are smaller than 256x256 --> read only last byte + file:seek("set",19) + local w = file:read(1) + file:close() + return w:byte() +end + +-- Computes line width for a given font height and text +-- @param text Text to be rendered +-- @return Rendered text width +function font_lib.get_line_width(text) + local char + local width = 0 + + for p=1,#text + do + char = text:sub(p,p):byte() + if font_lib.font[char] then + width = width + font_lib.font[char].width + end + end + + return width +end + +--- Builds texture part for a text line +-- @param text Text to be rendered +-- @param texturew Width of the texture (extra text is not rendered) +-- @param x Starting x position in texture +-- @param y Vertical position of the line in texture +-- @return Texture string +function font_lib.make_line_texture(text, texturew, x, y) + local char + + local texture = "" + + for p=1,#text + do + char = text:sub(p,p):byte() + if font_lib.font[char] then + -- Add image only if it is visible (at least partly) + if x + font_lib.font[char].width >= 0 and x <= texturew then + texture = texture..string.format(":%d,%d=%s", x, y, font_lib.font[char].filename) + end + x = x + font_lib.font[char].width + end + end + return texture +end + +local function split_lines(text, maxlines) + local splits = text:split("\n") + if maxlines then + local lines = {} + for num = 1,maxlines do + lines[num] = splits[num] + end + return lines + else + return splits + end +end + +--- Builds texture for a multiline colored text +-- @param text Text to be rendered +-- @param texturew Width of the texture (extra text will be truncated) +-- @param textureh Height of the texture +-- @param maxlines Maximum number of lines +-- @param valign Vertical text align ("top" or "center") +-- @param color Color of the text +-- @return Texture string +function font_lib.make_multiline_texture(text, texturew, textureh, maxlines, valign, color) + local texture = "" + local lines = split_lines(text, maxlines) + local y + + if valign == "top" then + y = font_lib.font_height / 2 + else + y = (textureh - font_lib.font_height * #lines) / 2 + 1 + end + + for _, line in pairs(lines) do + texture = texture..font_lib.make_line_texture(line, texturew, + (texturew - font_lib.get_line_width(line)) / 2, y) + y = y + font_lib.font_height + end + + texture = string.format("[combine:%dx%d", texturew, textureh)..texture + if color then texture = texture.."^[colorize:"..color end + + return texture +end + +--- Standard on_display_update entity callback. +-- Node should have a corresponding display_entity with size, resolution and maxlines fields and +-- optionally valign and color fields +-- @param pos Node position +-- @param objref Object reference of entity + +function font_lib.on_display_update(pos, objref) + local meta = minetest.get_meta(pos) + local text = meta:get_string("display_text") + + local ndef = minetest.registered_nodes[minetest.get_node(pos).name] + local entity = objref:get_luaentity() + + if entity and ndef.display_entities[entity.name] then + local def = ndef.display_entities[entity.name] + + objref:set_properties({ + textures={font_lib.make_multiline_texture( + text, def.size.x*def.resolution.x, def.size.y*def.resolution.y, + def.maxlines, def.valign, def.color)}, + visual_size = def.size + }) + end +end + +-- Populate fonts table +local w, filename +for charnum=32,126 do + filename = string.format("font_lib_%02x.png", charnum) + w = get_png_width(font_lib.path.."/textures/"..filename) + font_lib.font[charnum] = {filename=filename, width=w} +end + diff --git a/font_lib/textures/font_lib_20.png b/font_lib/textures/font_lib_20.png Binary files differnew file mode 100644 index 0000000..1657997 --- /dev/null +++ b/font_lib/textures/font_lib_20.png diff --git a/signs/textures/signs_21.png b/font_lib/textures/font_lib_21.png Binary files differindex b927105..d457a6c 100644 --- a/signs/textures/signs_21.png +++ b/font_lib/textures/font_lib_21.png diff --git a/signs/textures/signs_22.png b/font_lib/textures/font_lib_22.png Binary files differindex fae7109..7e571ea 100644 --- a/signs/textures/signs_22.png +++ b/font_lib/textures/font_lib_22.png diff --git a/signs/textures/signs_23.png b/font_lib/textures/font_lib_23.png Binary files differindex 0995756..ee4e70c 100644 --- a/signs/textures/signs_23.png +++ b/font_lib/textures/font_lib_23.png diff --git a/signs/textures/signs_24.png b/font_lib/textures/font_lib_24.png Binary files differindex 18b37d9..c05f037 100644 --- a/signs/textures/signs_24.png +++ b/font_lib/textures/font_lib_24.png diff --git a/signs/textures/signs_25.png b/font_lib/textures/font_lib_25.png Binary files differindex 83737d3..671e8bd 100644 --- a/signs/textures/signs_25.png +++ b/font_lib/textures/font_lib_25.png diff --git a/signs/textures/signs_26.png b/font_lib/textures/font_lib_26.png Binary files differindex 94357c4..93d5247 100644 --- a/signs/textures/signs_26.png +++ b/font_lib/textures/font_lib_26.png diff --git a/signs/textures/signs_27.png b/font_lib/textures/font_lib_27.png Binary files differindex cd4426c..b645159 100644 --- a/signs/textures/signs_27.png +++ b/font_lib/textures/font_lib_27.png diff --git a/signs/textures/signs_28.png b/font_lib/textures/font_lib_28.png Binary files differindex 66fd16e..759e448 100644 --- a/signs/textures/signs_28.png +++ b/font_lib/textures/font_lib_28.png diff --git a/font_lib/textures/font_lib_29.png b/font_lib/textures/font_lib_29.png Binary files differnew file mode 100644 index 0000000..316234f --- /dev/null +++ b/font_lib/textures/font_lib_29.png diff --git a/signs/textures/signs_2a.png b/font_lib/textures/font_lib_2a.png Binary files differindex 27bafea..b32406d 100644 --- a/signs/textures/signs_2a.png +++ b/font_lib/textures/font_lib_2a.png diff --git a/signs/textures/signs_2b.png b/font_lib/textures/font_lib_2b.png Binary files differindex 28a8c7f..3987425 100644 --- a/signs/textures/signs_2b.png +++ b/font_lib/textures/font_lib_2b.png diff --git a/font_lib/textures/font_lib_2c.png b/font_lib/textures/font_lib_2c.png Binary files differnew file mode 100644 index 0000000..d5e1919 --- /dev/null +++ b/font_lib/textures/font_lib_2c.png diff --git a/signs/textures/signs_2d.png b/font_lib/textures/font_lib_2d.png Binary files differindex b555ad6..78005ed 100644 --- a/signs/textures/signs_2d.png +++ b/font_lib/textures/font_lib_2d.png diff --git a/font_lib/textures/font_lib_2e.png b/font_lib/textures/font_lib_2e.png Binary files differnew file mode 100644 index 0000000..2180b81 --- /dev/null +++ b/font_lib/textures/font_lib_2e.png diff --git a/font_lib/textures/font_lib_2f.png b/font_lib/textures/font_lib_2f.png Binary files differnew file mode 100644 index 0000000..87655f0 --- /dev/null +++ b/font_lib/textures/font_lib_2f.png diff --git a/signs/textures/signs_30.png b/font_lib/textures/font_lib_30.png Binary files differindex 5a57af3..590252a 100644 --- a/signs/textures/signs_30.png +++ b/font_lib/textures/font_lib_30.png diff --git a/signs/textures/signs_31.png b/font_lib/textures/font_lib_31.png Binary files differindex 3b8ebf0..945e718 100644 --- a/signs/textures/signs_31.png +++ b/font_lib/textures/font_lib_31.png diff --git a/signs/textures/signs_32.png b/font_lib/textures/font_lib_32.png Binary files differindex 9a869a8..bcc2e2b 100644 --- a/signs/textures/signs_32.png +++ b/font_lib/textures/font_lib_32.png diff --git a/signs/textures/signs_33.png b/font_lib/textures/font_lib_33.png Binary files differindex 0bbaf59..14b9df8 100644 --- a/signs/textures/signs_33.png +++ b/font_lib/textures/font_lib_33.png diff --git a/signs/textures/signs_34.png b/font_lib/textures/font_lib_34.png Binary files differindex f6dfe63..16056ab 100644 --- a/signs/textures/signs_34.png +++ b/font_lib/textures/font_lib_34.png diff --git a/signs/textures/signs_35.png b/font_lib/textures/font_lib_35.png Binary files differindex 71a9883..a88c37e 100644 --- a/signs/textures/signs_35.png +++ b/font_lib/textures/font_lib_35.png diff --git a/signs/textures/signs_36.png b/font_lib/textures/font_lib_36.png Binary files differindex 6553bed..30b07b7 100644 --- a/signs/textures/signs_36.png +++ b/font_lib/textures/font_lib_36.png diff --git a/signs/textures/signs_37.png b/font_lib/textures/font_lib_37.png Binary files differindex 53b9541..e3a117c 100644 --- a/signs/textures/signs_37.png +++ b/font_lib/textures/font_lib_37.png diff --git a/signs/textures/signs_38.png b/font_lib/textures/font_lib_38.png Binary files differindex 0933814..946a7b3 100644 --- a/signs/textures/signs_38.png +++ b/font_lib/textures/font_lib_38.png diff --git a/signs/textures/signs_39.png b/font_lib/textures/font_lib_39.png Binary files differindex 94dae88..152bf5e 100644 --- a/signs/textures/signs_39.png +++ b/font_lib/textures/font_lib_39.png diff --git a/signs/textures/signs_3a.png b/font_lib/textures/font_lib_3a.png Binary files differindex 09b4793..05b14dc 100644 --- a/signs/textures/signs_3a.png +++ b/font_lib/textures/font_lib_3a.png diff --git a/signs/textures/signs_3b.png b/font_lib/textures/font_lib_3b.png Binary files differindex 8f9076b..93615c9 100644 --- a/signs/textures/signs_3b.png +++ b/font_lib/textures/font_lib_3b.png diff --git a/signs/textures/signs_3c.png b/font_lib/textures/font_lib_3c.png Binary files differindex a5313c9..594523b 100644 --- a/signs/textures/signs_3c.png +++ b/font_lib/textures/font_lib_3c.png diff --git a/signs/textures/signs_3d.png b/font_lib/textures/font_lib_3d.png Binary files differindex 153c272..1be8ad4 100644 --- a/signs/textures/signs_3d.png +++ b/font_lib/textures/font_lib_3d.png diff --git a/signs/textures/signs_3e.png b/font_lib/textures/font_lib_3e.png Binary files differindex ced7868..7966531 100644 --- a/signs/textures/signs_3e.png +++ b/font_lib/textures/font_lib_3e.png diff --git a/signs/textures/signs_3f.png b/font_lib/textures/font_lib_3f.png Binary files differindex 3dfc73b..ff4bdd0 100644 --- a/signs/textures/signs_3f.png +++ b/font_lib/textures/font_lib_3f.png diff --git a/signs/textures/signs_40.png b/font_lib/textures/font_lib_40.png Binary files differindex 65dc19f..7e31156 100644 --- a/signs/textures/signs_40.png +++ b/font_lib/textures/font_lib_40.png diff --git a/signs/textures/signs_41.png b/font_lib/textures/font_lib_41.png Binary files differindex 0d74cdb..546a502 100644 --- a/signs/textures/signs_41.png +++ b/font_lib/textures/font_lib_41.png diff --git a/signs/textures/signs_42.png b/font_lib/textures/font_lib_42.png Binary files differindex 7432e5f..cf33dc7 100644 --- a/signs/textures/signs_42.png +++ b/font_lib/textures/font_lib_42.png diff --git a/signs/textures/signs_43.png b/font_lib/textures/font_lib_43.png Binary files differindex 5a2e165..bde60b0 100644 --- a/signs/textures/signs_43.png +++ b/font_lib/textures/font_lib_43.png diff --git a/signs/textures/signs_44.png b/font_lib/textures/font_lib_44.png Binary files differindex f2c4d07..025c194 100644 --- a/signs/textures/signs_44.png +++ b/font_lib/textures/font_lib_44.png diff --git a/signs/textures/signs_45.png b/font_lib/textures/font_lib_45.png Binary files differindex de77e41..f1261f4 100644 --- a/signs/textures/signs_45.png +++ b/font_lib/textures/font_lib_45.png diff --git a/signs/textures/signs_46.png b/font_lib/textures/font_lib_46.png Binary files differindex a19af77..0e22836 100644 --- a/signs/textures/signs_46.png +++ b/font_lib/textures/font_lib_46.png diff --git a/signs/textures/signs_47.png b/font_lib/textures/font_lib_47.png Binary files differindex 30c6818..faa775b 100644 --- a/signs/textures/signs_47.png +++ b/font_lib/textures/font_lib_47.png diff --git a/signs/textures/signs_48.png b/font_lib/textures/font_lib_48.png Binary files differindex e49cee4..d6ead06 100644 --- a/signs/textures/signs_48.png +++ b/font_lib/textures/font_lib_48.png diff --git a/signs/textures/signs_49.png b/font_lib/textures/font_lib_49.png Binary files differindex 534500b..1d79859 100644 --- a/signs/textures/signs_49.png +++ b/font_lib/textures/font_lib_49.png diff --git a/signs/textures/signs_4a.png b/font_lib/textures/font_lib_4a.png Binary files differindex 5575e6d..c5b447a 100644 --- a/signs/textures/signs_4a.png +++ b/font_lib/textures/font_lib_4a.png diff --git a/signs/textures/signs_4b.png b/font_lib/textures/font_lib_4b.png Binary files differindex 0afb35d..3deded8 100644 --- a/signs/textures/signs_4b.png +++ b/font_lib/textures/font_lib_4b.png diff --git a/signs/textures/signs_4c.png b/font_lib/textures/font_lib_4c.png Binary files differindex 99af40d..3121f90 100644 --- a/signs/textures/signs_4c.png +++ b/font_lib/textures/font_lib_4c.png diff --git a/signs/textures/signs_4d.png b/font_lib/textures/font_lib_4d.png Binary files differindex 14648ed..361bc51 100644 --- a/signs/textures/signs_4d.png +++ b/font_lib/textures/font_lib_4d.png diff --git a/signs/textures/signs_4e.png b/font_lib/textures/font_lib_4e.png Binary files differindex 57abfbb..ea95311 100644 --- a/signs/textures/signs_4e.png +++ b/font_lib/textures/font_lib_4e.png diff --git a/font_lib/textures/font_lib_4f.png b/font_lib/textures/font_lib_4f.png Binary files differnew file mode 100644 index 0000000..9e2629e --- /dev/null +++ b/font_lib/textures/font_lib_4f.png diff --git a/signs/textures/signs_50.png b/font_lib/textures/font_lib_50.png Binary files differindex fba27a0..53c4a4a 100644 --- a/signs/textures/signs_50.png +++ b/font_lib/textures/font_lib_50.png diff --git a/signs/textures/signs_51.png b/font_lib/textures/font_lib_51.png Binary files differindex 081e272..c0f013f 100644 --- a/signs/textures/signs_51.png +++ b/font_lib/textures/font_lib_51.png diff --git a/signs/textures/signs_52.png b/font_lib/textures/font_lib_52.png Binary files differindex 12fe421..e95599f 100644 --- a/signs/textures/signs_52.png +++ b/font_lib/textures/font_lib_52.png diff --git a/signs/textures/signs_53.png b/font_lib/textures/font_lib_53.png Binary files differindex 7e1bbe0..aa308d2 100644 --- a/signs/textures/signs_53.png +++ b/font_lib/textures/font_lib_53.png diff --git a/signs/textures/signs_54.png b/font_lib/textures/font_lib_54.png Binary files differindex f50a8b8..7e7b90d 100644 --- a/signs/textures/signs_54.png +++ b/font_lib/textures/font_lib_54.png diff --git a/signs/textures/signs_55.png b/font_lib/textures/font_lib_55.png Binary files differindex 4682223..90d5beb 100644 --- a/signs/textures/signs_55.png +++ b/font_lib/textures/font_lib_55.png diff --git a/signs/textures/signs_56.png b/font_lib/textures/font_lib_56.png Binary files differindex c8a55c4..a676acf 100644 --- a/signs/textures/signs_56.png +++ b/font_lib/textures/font_lib_56.png diff --git a/signs/textures/signs_57.png b/font_lib/textures/font_lib_57.png Binary files differindex 419191c..f4c5189 100644 --- a/signs/textures/signs_57.png +++ b/font_lib/textures/font_lib_57.png diff --git a/signs/textures/signs_58.png b/font_lib/textures/font_lib_58.png Binary files differindex 1175a0e..6ac7449 100644 --- a/signs/textures/signs_58.png +++ b/font_lib/textures/font_lib_58.png diff --git a/signs/textures/signs_59.png b/font_lib/textures/font_lib_59.png Binary files differindex 9a52397..b1c48b0 100644 --- a/signs/textures/signs_59.png +++ b/font_lib/textures/font_lib_59.png diff --git a/signs/textures/signs_5a.png b/font_lib/textures/font_lib_5a.png Binary files differindex 64c1c4f..ae0cc83 100644 --- a/signs/textures/signs_5a.png +++ b/font_lib/textures/font_lib_5a.png diff --git a/signs/textures/signs_5b.png b/font_lib/textures/font_lib_5b.png Binary files differindex c360403..a78d69a 100644 --- a/signs/textures/signs_5b.png +++ b/font_lib/textures/font_lib_5b.png diff --git a/signs/textures/signs_5c.png b/font_lib/textures/font_lib_5c.png Binary files differindex 08cf8b6..bbeb143 100644 --- a/signs/textures/signs_5c.png +++ b/font_lib/textures/font_lib_5c.png diff --git a/signs/textures/signs_5d.png b/font_lib/textures/font_lib_5d.png Binary files differindex 2309ee8..6259744 100644 --- a/signs/textures/signs_5d.png +++ b/font_lib/textures/font_lib_5d.png diff --git a/signs/textures/signs_5e.png b/font_lib/textures/font_lib_5e.png Binary files differindex 60a1dbd..6bb6f1d 100644 --- a/signs/textures/signs_5e.png +++ b/font_lib/textures/font_lib_5e.png diff --git a/font_lib/textures/font_lib_5f.png b/font_lib/textures/font_lib_5f.png Binary files differnew file mode 100644 index 0000000..74e8ea9 --- /dev/null +++ b/font_lib/textures/font_lib_5f.png diff --git a/signs/textures/signs_60.png b/font_lib/textures/font_lib_60.png Binary files differindex cd2b1ef..1985973 100644 --- a/signs/textures/signs_60.png +++ b/font_lib/textures/font_lib_60.png diff --git a/signs/textures/signs_61.png b/font_lib/textures/font_lib_61.png Binary files differindex 874433d..91c0940 100644 --- a/signs/textures/signs_61.png +++ b/font_lib/textures/font_lib_61.png diff --git a/signs/textures/signs_62.png b/font_lib/textures/font_lib_62.png Binary files differindex f29b709..684a36a 100644 --- a/signs/textures/signs_62.png +++ b/font_lib/textures/font_lib_62.png diff --git a/signs/textures/signs_63.png b/font_lib/textures/font_lib_63.png Binary files differindex 6d46292..ab5afa5 100644 --- a/signs/textures/signs_63.png +++ b/font_lib/textures/font_lib_63.png diff --git a/font_lib/textures/font_lib_64.png b/font_lib/textures/font_lib_64.png Binary files differnew file mode 100644 index 0000000..a59dee2 --- /dev/null +++ b/font_lib/textures/font_lib_64.png diff --git a/signs/textures/signs_65.png b/font_lib/textures/font_lib_65.png Binary files differindex 8644032..b9ed9a2 100644 --- a/signs/textures/signs_65.png +++ b/font_lib/textures/font_lib_65.png diff --git a/signs/textures/signs_66.png b/font_lib/textures/font_lib_66.png Binary files differindex 5d4f4b9..f927609 100644 --- a/signs/textures/signs_66.png +++ b/font_lib/textures/font_lib_66.png diff --git a/font_lib/textures/font_lib_67.png b/font_lib/textures/font_lib_67.png Binary files differnew file mode 100644 index 0000000..3efba47 --- /dev/null +++ b/font_lib/textures/font_lib_67.png diff --git a/signs/textures/signs_68.png b/font_lib/textures/font_lib_68.png Binary files differindex 6b936aa..a3fff55 100644 --- a/signs/textures/signs_68.png +++ b/font_lib/textures/font_lib_68.png diff --git a/signs/textures/signs_69.png b/font_lib/textures/font_lib_69.png Binary files differindex 3251e2e..468335f 100644 --- a/signs/textures/signs_69.png +++ b/font_lib/textures/font_lib_69.png diff --git a/signs/textures/signs_6a.png b/font_lib/textures/font_lib_6a.png Binary files differindex 1e0082c..275b82f 100644 --- a/signs/textures/signs_6a.png +++ b/font_lib/textures/font_lib_6a.png diff --git a/signs/textures/signs_6b.png b/font_lib/textures/font_lib_6b.png Binary files differindex 788c3df..4a83c0a 100644 --- a/signs/textures/signs_6b.png +++ b/font_lib/textures/font_lib_6b.png diff --git a/signs/textures/signs_6c.png b/font_lib/textures/font_lib_6c.png Binary files differindex 534500b..1d79859 100644 --- a/signs/textures/signs_6c.png +++ b/font_lib/textures/font_lib_6c.png diff --git a/signs/textures/signs_6d.png b/font_lib/textures/font_lib_6d.png Binary files differindex fca6d31..63a79f2 100644 --- a/signs/textures/signs_6d.png +++ b/font_lib/textures/font_lib_6d.png diff --git a/signs/textures/signs_6e.png b/font_lib/textures/font_lib_6e.png Binary files differindex 10930a1..48262ba 100644 --- a/signs/textures/signs_6e.png +++ b/font_lib/textures/font_lib_6e.png diff --git a/font_lib/textures/font_lib_6f.png b/font_lib/textures/font_lib_6f.png Binary files differnew file mode 100644 index 0000000..5dfb0f3 --- /dev/null +++ b/font_lib/textures/font_lib_6f.png diff --git a/signs/textures/signs_70.png b/font_lib/textures/font_lib_70.png Binary files differindex dac5f79..b95cc71 100644 --- a/signs/textures/signs_70.png +++ b/font_lib/textures/font_lib_70.png diff --git a/font_lib/textures/font_lib_71.png b/font_lib/textures/font_lib_71.png Binary files differnew file mode 100644 index 0000000..6398974 --- /dev/null +++ b/font_lib/textures/font_lib_71.png diff --git a/font_lib/textures/font_lib_72.png b/font_lib/textures/font_lib_72.png Binary files differnew file mode 100644 index 0000000..f72b1bb --- /dev/null +++ b/font_lib/textures/font_lib_72.png diff --git a/signs/textures/signs_73.png b/font_lib/textures/font_lib_73.png Binary files differindex 60911df..f3f296d 100644 --- a/signs/textures/signs_73.png +++ b/font_lib/textures/font_lib_73.png diff --git a/signs/textures/signs_74.png b/font_lib/textures/font_lib_74.png Binary files differindex 079e2f1..7e6c1e7 100644 --- a/signs/textures/signs_74.png +++ b/font_lib/textures/font_lib_74.png diff --git a/signs/textures/signs_75.png b/font_lib/textures/font_lib_75.png Binary files differindex c86aaad..c0b16cd 100644 --- a/signs/textures/signs_75.png +++ b/font_lib/textures/font_lib_75.png diff --git a/signs/textures/signs_76.png b/font_lib/textures/font_lib_76.png Binary files differindex 5101584..145bd97 100644 --- a/signs/textures/signs_76.png +++ b/font_lib/textures/font_lib_76.png diff --git a/signs/textures/signs_77.png b/font_lib/textures/font_lib_77.png Binary files differindex d2bdb98..f3bd8a3 100644 --- a/signs/textures/signs_77.png +++ b/font_lib/textures/font_lib_77.png diff --git a/signs/textures/signs_78.png b/font_lib/textures/font_lib_78.png Binary files differindex 20927d9..2b1d401 100644 --- a/signs/textures/signs_78.png +++ b/font_lib/textures/font_lib_78.png diff --git a/font_lib/textures/font_lib_79.png b/font_lib/textures/font_lib_79.png Binary files differnew file mode 100644 index 0000000..1aaa5b4 --- /dev/null +++ b/font_lib/textures/font_lib_79.png diff --git a/signs/textures/signs_7a.png b/font_lib/textures/font_lib_7a.png Binary files differindex 43a1f05..828e070 100644 --- a/signs/textures/signs_7a.png +++ b/font_lib/textures/font_lib_7a.png diff --git a/signs/textures/signs_7b.png b/font_lib/textures/font_lib_7b.png Binary files differindex 08c27a1..9dd9dc8 100644 --- a/signs/textures/signs_7b.png +++ b/font_lib/textures/font_lib_7b.png diff --git a/font_lib/textures/font_lib_7c.png b/font_lib/textures/font_lib_7c.png Binary files differnew file mode 100644 index 0000000..013c6db --- /dev/null +++ b/font_lib/textures/font_lib_7c.png diff --git a/signs/textures/signs_7d.png b/font_lib/textures/font_lib_7d.png Binary files differindex 52a64af..d206d74 100644 --- a/signs/textures/signs_7d.png +++ b/font_lib/textures/font_lib_7d.png diff --git a/signs/textures/signs_7e.png b/font_lib/textures/font_lib_7e.png Binary files differindex 8a9a865..cb79225 100644 --- a/signs/textures/signs_7e.png +++ b/font_lib/textures/font_lib_7e.png diff --git a/ontime_clocks/nodes.lua b/ontime_clocks/nodes.lua index 4a184e8..e12ab7e 100644 --- a/ontime_clocks/nodes.lua +++ b/ontime_clocks/nodes.lua @@ -16,7 +16,7 @@ minetest.register_node("ontime_clocks:green_digital", { groups = {oddly_breakable_by_hand=1}, display_entities = { ["ontime_clocks:display"] = { - depth = -13/32 + 0.01, + depth = 13/32 - 0.01, on_display_update = function(pos, objref) objref:set_properties( ontime_clocks.get_digital_properties( @@ -54,7 +54,7 @@ minetest.register_node("ontime_clocks:red_digital", { groups = {oddly_breakable_by_hand=1}, display_entities = { ["ontime_clocks:display"] = { - depth = -13/32 + 0.01, + depth = 13/32 - 0.01, on_display_update = function(pos, objref) objref:set_properties( ontime_clocks.get_digital_properties( @@ -92,7 +92,7 @@ minetest.register_node("ontime_clocks:white", { groups = {choppy=1,oddly_breakable_by_hand=1}, display_entities = { ["ontime_clocks:display"] = { - depth = -6/16+0.01, + depth = 6/16 - 0.01, on_display_update = function(pos, objref) objref:set_properties( ontime_clocks.get_needles_properties( @@ -129,7 +129,7 @@ minetest.register_node("ontime_clocks:frameless_black", { groups = {choppy=1,oddly_breakable_by_hand=1}, display_entities = { ["ontime_clocks:display"] = { - depth = -7/16, + depth = 7/16, on_display_update = function(pos, objref) objref:set_properties( ontime_clocks.get_needles_properties( @@ -166,7 +166,7 @@ minetest.register_node("ontime_clocks:frameless_gold", { groups = {choppy=1,oddly_breakable_by_hand=1}, display_entities = { ["ontime_clocks:display"] = { - depth = -7/16, + depth = 7/16, on_display_update = function(pos, objref) objref:set_properties( ontime_clocks.get_needles_properties( @@ -203,7 +203,7 @@ minetest.register_node("ontime_clocks:frameless_white", { groups = {choppy=1,oddly_breakable_by_hand=1}, display_entities = { ["ontime_clocks:display"] = { - depth = -7/16, + depth = 7/16, on_display_update = function(pos, objref) objref:set_properties( ontime_clocks.get_needles_properties( diff --git a/signs/README.md b/signs/README.md index f85018f..8e38019 100644 --- a/signs/README.md +++ b/signs/README.md @@ -2,29 +2,19 @@ This mod provides various signs with text display. Text is locked if area is protected. -**Dependancies**: display_lib, default +**Dependancies**: default, display\_lib, font\_lib **License**: WTFPL -(Font taken from VanessaE's homedecor/signs_lib) - ## Recipes -**Blue Street Sign** - - B W S - S S S - - - - - -B = Blue Dye, W = White Dye, S = Steel Ingot - -**Green Street Sign** +**Sign** (overrides default sign) - G W S - S S S - - - - + W W W + W W W + - S - -G = Green Dye, W = White Dye, S = Steel Ingot +W = Wooden Plank, S = Stick **Poster** @@ -44,11 +34,3 @@ Poster displays only title, much more text can be read by right-clicking on it. W = Wooden Plank (group) -**Black direction sign** - - B W S - S S - - - - - - -B = Black Dye, W = White Dye, S = Steel Ingot - diff --git a/signs/common.lua b/signs/common.lua index 7ae420c..24286b9 100644 --- a/signs/common.lua +++ b/signs/common.lua @@ -1,120 +1,18 @@ -local font = {} -signs.font_height = 10 - --- Get png width, suposing png width is less than 256 (it is the case for all font textures) -local function get_png_width(filename) - local file=assert(io.open(filename,"rb")) - -- All font png are smaller than 256x256 --> read only last byte - file:seek("set",19) - local w = file:read(1) - file:close() - return w:byte() -end - --- Computes line width for a given font height and text -function signs.get_line_width(text) - local char - local width = 0 - - for p=1,#text - do - char = text:sub(p,p):byte() - if font[char] then - width = width + font[char].width - end - end - - return width -end - ---- Builds texture part for a text line --- @param text Text to be rendered --- @param x Starting x position in texture --- @param width Width of the texture (extra text is not rendered) --- @param y Vertical position of the line in texture --- @return Texture string -function signs.make_line_texture(text, x, width, y) - local char - - local texture = "" - - for p=1,#text - do - char = text:sub(p,p):byte() - if font[char] then - -- Add image only if it is visible (at least partly) - if x + font[char].width >= 0 and x <= width then - texture = texture..string.format(":%d,%d=%s", x, y, font[char].filename) - end - x = x + font[char].width - end - end - return texture -end - -local function split_lines(text, maxlines) - local splits = text:split("\n") - if maxlines then - local lines = {} - for num = 1,maxlines do - lines[num] = splits[num] - end - return lines - else - return splits - end -end - -function signs.on_display_update(pos, objref) - local meta = minetest.get_meta(pos) - local text = meta:get_string("display_text") - - local ndef = minetest.registered_nodes[minetest.get_node(pos).name] - if ndef and ndef.sign_model then - local model = signs.sign_models[ndef.sign_model] - local lines = split_lines(text, model.maxlines) - - local texturew = model.width/model.xscale - local textureh = model.height/model.yscale - - local texture = "" - - local y - if model.valing == "top" then - y = signs.font_height / 2 - else - y = (textureh - signs.font_height * #lines) / 2 + 1 - end - - for _, line in pairs(lines) do - texture = texture..signs.make_line_texture(line, - (texturew - signs.get_line_width(line)) / 2, - texturew, y) - y = y + signs.font_height - end - - local texture = string.format("[combine:%dx%d", texturew, textureh)..texture - if model.color then texture = texture.."^[colorize:"..model.color end - - objref:set_properties({ textures={texture}, visual_size = {x=model.width, y=model.height}}) - end -end - function signs.set_formspec(pos) local meta = minetest.get_meta(pos) local ndef = minetest.registered_nodes[minetest.get_node(pos).name] - if ndef and ndef.sign_model then - local model = signs.sign_models[ndef.sign_model] + if ndef and ndef.display_entities and ndef.display_entities["signs:text"] then + local maxlines = ndef.display_entities["signs:text"].maxlines local formspec - if model.maxlines == 1 then + if maxlines == 1 then formspec = "size[6,3]".. "field[0.5,0.7;5.5,1;display_text;Displayed text;${display_text}]".. "button_exit[2,2;2,1;ok;Write]" else local extralabel = "" - if model.maxlines then - extralabel = " (first "..model.maxlines.." lines only)" + if maxlines then + extralabel = " (first "..maxlines.." lines only)" end formspec = "size[6,4]".. @@ -192,14 +90,6 @@ function signs.on_rotate_direction(pos, node, user, mode, new_param2) end end --- Populate fonts table -local w, filename -for charnum=32,126 do - filename = string.format("signs_%02x.png", charnum) - w = get_png_width(signs.path.."/textures/"..filename) - font[charnum] = {filename=filename, width=w} -end - -- Generic callback for show_formspec displayed formspecs minetest.register_on_player_receive_fields(function(player, formname, fields) local found, _, mod, node_name, pos = formname:find("([%w_]+):([%w_]+)@(.+)") @@ -214,3 +104,56 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) end end end) + +function signs.register_sign(mod, name, model) + -- Default fields + local fields = { + sunlight_propagates = true, + paramtype = "light", + paramtype2 = "wallmounted", + drawtype = "nodebox", + node_box = { + type = "wallmounted", + wall_side = {-0.5, -model.height/2, -model.width/2, + -0.5 + model.depth, model.height/2, model.width/2}, + wall_bottom = {-model.width/2, -0.5, -model.height/2, + model.width/2, -0.5 + model.depth, model.height/2}, + wall_top = {-model.width/2, 0.5, -model.height/2, + model.width/2, 0.5 - model.depth, model.height/2}, + }, + groups = {choppy=2,dig_immediate=2,attached_node=1}, + sounds = default.node_sound_defaults(), + display_entities = { + ["signs:text"] = { + on_display_update = font_lib.on_display_update, + depth = 0.499 - model.depth, + size = { x = 1, y = 1 }, + resolution = { x = 64, y = 64 }, + maxlines = 1, + }, + + }, + on_place = display_lib.on_place, + on_construct = function(pos) + signs.set_formspec(pos) + display_lib.on_construct(pos) + end, + on_destruct = display_lib.on_destruct, + on_rotate = display_lib.on_rotate, + on_receive_fields = signs.on_receive_fields, + } + + -- Node fields override + for key, value in pairs(model.node_fields) do + fields[key] = value + end + + if not fields.wield_image then fields.wield_image = fields.inventory_image end + + -- Entity fields override + for key, value in pairs(model.entity_fields) do + fields.display_entities["signs:text"][key] = value + end + + minetest.register_node(mod..":"..name, fields) +end diff --git a/signs/crafts.lua b/signs/crafts.lua index 16b873d..2d90e52 100644 --- a/signs/crafts.lua +++ b/signs/crafts.lua @@ -1,22 +1,4 @@ minetest.register_craft({ - output = 'signs:blue_street', - recipe = { - {'dye:blue', 'dye:white', 'default:steel_ingot'}, - {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, - {'', '', ''}, - } -}) - -minetest.register_craft({ - output = 'signs:green_street', - recipe = { - {'dye:green', 'dye:white', 'default:steel_ingot'}, - {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, - {'', '', ''}, - } -}) - -minetest.register_craft({ output = 'signs:wooden_right', recipe = { {'group:wood', 'group:wood', 'group:wood'}, @@ -26,15 +8,6 @@ minetest.register_craft({ }) minetest.register_craft({ - output = 'signs:black_right', - recipe = { - {'dye:black', 'dye:white', 'default:steel_ingot'}, - {'default:steel_ingot', 'default:steel_ingot', ''}, - {'', '', ''}, - } -}) - -minetest.register_craft({ output = 'signs:poster', recipe = { {'default:paper', 'default:paper', ''}, diff --git a/signs/depends.txt b/signs/depends.txt index c1feb90..a5e20d4 100644 --- a/signs/depends.txt +++ b/signs/depends.txt @@ -1,3 +1,3 @@ default display_lib - +font_lib diff --git a/signs/font.lua b/signs/font.lua deleted file mode 100644 index 2da6611..0000000 --- a/signs/font.lua +++ /dev/null @@ -1,63 +0,0 @@ - -local font = {} -signs.font_height = 10 - --- Get png width, suposing png width is less than 256 (it is the case for all font textures) -local function get_png_width(filename) - local file=assert(io.open(filename,"rb")) - -- All font png are smaller than 256x256 --> read only last byte - file:seek("set",19) - local w = file:read(1) - file:close() - return w:byte() -end - --- Computes line width for a given font height and text -function signs.get_line_width(text) - local char - local width = 0 - - for p=1,#text - do - char = text:sub(p,p):byte() - if font[char] then - width = width + font[char].width - end - end - - return width -end - ---- Builds texture part for a text line --- @param text Text to be rendered --- @param x Starting x position in texture --- @param width Width of the texture (extra text is not rendered) --- @param y Vertical position of the line in texture --- @return Texture string -function signs.make_line_texture(text, x, width, y) - local char - - local texture = "" - - for p=1,#text - do - char = text:sub(p,p):byte() - if font[char] then - -- Add image only if it is visible (at least partly) - if x + font[char].width >= 0 and x <= width then - texture = texture..string.format(":%d,%d=%s", x, y, font[char].filename) - end - x = x + font[char].width - end - end - return texture -end - --- Populate fonts table -local w, filename -for charnum=32,126 do - filename = string.format("signs_%02x.png", charnum) - w = get_png_width(signs.path.."/textures/"..filename) - font[charnum] = {filename=filename, width=w} -end - diff --git a/signs/nodes.lua b/signs/nodes.lua index 77d8925..0c23c5e 100644 --- a/signs/nodes.lua +++ b/signs/nodes.lua @@ -39,44 +39,21 @@ local function on_receive_fields_poster(pos, formname, fields, player) end end -signs.sign_models = { - blue_street={ - depth=1/16, - width=14/16, - height=12/16, - color="#fff", - maxlines = 3, - xscale = 1/144, - yscale = 1/64, - fields = { - description="Blue street sign", - tiles={"signs_blue_street.png"}, - inventory_image="signs_blue_street_inventory.png", - }, - }, - green_street={ - depth=1/32, - width=1, - height=6/16, - color="#fff", - maxlines = 1, - xscale = 1/96, - yscale = 1/64, - fields = { - description="Green street sign", - tiles={"signs_green_street.png"}, - inventory_image="signs_green_street_inventory.png", - }, - }, +-- Text entity for all signs +display_lib.register_display_entity("signs:text") + +-- Sign models and registration +local models = { wooden_right={ depth=1/16, - width=14/16, - height=7/16, - color="#000", - maxlines = 2, - xscale = 1/112, - yscale = 1/64, - fields = { + width = 14/16, + height = 7/16, + entity_fields = { + resolution = { x = 112, y = 64 }, + maxlines = 2, + color="#000", + }, + node_fields = { description="Wooden direction sign", tiles={"signs_wooden_right.png"}, inventory_image="signs_wooden_inventory.png", @@ -87,13 +64,14 @@ signs.sign_models = { }, wooden_left={ depth=1/16, - width=14/16, - height=7/16, - color="#000", - maxlines = 2, - xscale = 1/112, - yscale = 1/64, - fields = { + width = 14/16, + height = 7/16, + entity_fields = { + resolution = { x = 112, y = 64 }, + maxlines = 2, + color="#000", + }, + node_fields = { description="Wooden direction sign", tiles={"signs_wooden_left.png"}, inventory_image="signs_wooden_inventory.png", @@ -103,50 +81,17 @@ signs.sign_models = { on_rotate=signs.on_rotate_direction, }, }, - black_right={ - depth=1/32, - width=1, - height=0.5, - color="#000", - maxlines = 1, - xscale = 1/96, - yscale = 1/64, - fields = { - description="Black direction sign", - tiles={"signs_black_right.png"}, - inventory_image="signs_black_inventory.png", - on_place=signs.on_place_direction, - on_rotate=signs.on_rotate_direction, - }, - }, - black_left={ - depth=1/32, - width=1, - height=0.5, - color="#000", - maxlines = 1, - xscale = 1/96, - yscale = 1/64, - fields = { - description="Black direction sign", - tiles={"signs_black_left.png"}, - inventory_image="signs_black_inventory.png", - groups={choppy=1,oddly_breakable_by_hand=1,not_in_creative_inventory=1}, - drop="signs:black_right", - on_place=signs.on_place_direction, - on_rotate=signs.on_rotate_direction, - }, - }, poster={ depth=1/32, - width=26/32, - height=30/32, - color="#000", - valing="top", - maxlines = 1, - xscale = 1/144, - yscale = 1/64, - fields = { + width = 26/32, + height = 30/32, + entity_fields = { + resolution = { x = 144, y = 64 }, + maxlines = 1, + color="#000", + valign="top", + }, + node_fields = { description="Poster", tiles={"signs_poster.png"}, inventory_image="signs_poster_inventory.png", @@ -157,47 +102,27 @@ signs.sign_models = { }, } -display_lib.register_display_entity("signs:text") -for model_name, model in pairs(signs.sign_models) +for name, model in pairs(models) do - local fields = { - sunlight_propagates = true, - paramtype = "light", - paramtype2 = "wallmounted", - drawtype = "nodebox", - node_box = { - type = "wallmounted", - wall_side = {-0.5, -model.height/2, -model.width/2, - -0.5 + model.depth, model.height/2, model.width/2}, - wall_bottom = {-model.width/2, -0.5, -model.height/2, - model.width/2, -0.5 + model.depth, model.height/2}, - wall_top = {-model.width/2, 0.5, -model.height/2, - model.width/2, 0.5 - model.depth, model.height/2}, + signs.register_sign("signs", name, model) +end + +-- Override default sign +signs.register_sign(":default", "sign_wall", { + depth = 1/16, + width = 14/16, + height = 10/16, + entity_fields = { + size = { x = 12/16, y = 8/16 }, + resolution = { x = 144, y = 64 }, + maxlines = 3, + color="#000", }, - groups = {choppy=1,oddly_breakable_by_hand=1}, - sign_model = model_name, - display_entities = { - ["signs:text"] = { - depth = model.depth-0.499, - on_display_update = signs.on_display_update }, + node_fields = { + description="Sign", + tiles={"signs_default.png"}, + inventory_image="signs_default_inventory.png", }, - on_place = display_lib.on_place, - on_construct = function(pos) - signs.set_formspec(pos) - display_lib.on_construct(pos) - end, - on_destruct = display_lib.on_destruct, - on_rotate = display_lib.on_rotate, - on_receive_fields = signs.on_receive_fields, - } - - for key, value in pairs(model.fields) do - fields[key] = value - end - - if not fields.wield_image then fields.wield_image = fields.inventory_image end - - minetest.register_node("signs:"..model_name, fields) -end + }) diff --git a/signs/textures/signs_20.png b/signs/textures/signs_20.png Binary files differdeleted file mode 100644 index 43df9d1..0000000 --- a/signs/textures/signs_20.png +++ /dev/null diff --git a/signs/textures/signs_29.png b/signs/textures/signs_29.png Binary files differdeleted file mode 100644 index 324d1d2..0000000 --- a/signs/textures/signs_29.png +++ /dev/null diff --git a/signs/textures/signs_2c.png b/signs/textures/signs_2c.png Binary files differdeleted file mode 100644 index 16bf1e4..0000000 --- a/signs/textures/signs_2c.png +++ /dev/null diff --git a/signs/textures/signs_2e.png b/signs/textures/signs_2e.png Binary files differdeleted file mode 100644 index cdfa677..0000000 --- a/signs/textures/signs_2e.png +++ /dev/null diff --git a/signs/textures/signs_2f.png b/signs/textures/signs_2f.png Binary files differdeleted file mode 100644 index e76fdf4..0000000 --- a/signs/textures/signs_2f.png +++ /dev/null diff --git a/signs/textures/signs_4f.png b/signs/textures/signs_4f.png Binary files differdeleted file mode 100644 index 06e0c8d..0000000 --- a/signs/textures/signs_4f.png +++ /dev/null diff --git a/signs/textures/signs_5f.png b/signs/textures/signs_5f.png Binary files differdeleted file mode 100644 index e7a4d90..0000000 --- a/signs/textures/signs_5f.png +++ /dev/null diff --git a/signs/textures/signs_64.png b/signs/textures/signs_64.png Binary files differdeleted file mode 100644 index 30e4497..0000000 --- a/signs/textures/signs_64.png +++ /dev/null diff --git a/signs/textures/signs_67.png b/signs/textures/signs_67.png Binary files differdeleted file mode 100644 index 990e8e3..0000000 --- a/signs/textures/signs_67.png +++ /dev/null diff --git a/signs/textures/signs_6f.png b/signs/textures/signs_6f.png Binary files differdeleted file mode 100644 index f4aef64..0000000 --- a/signs/textures/signs_6f.png +++ /dev/null diff --git a/signs/textures/signs_71.png b/signs/textures/signs_71.png Binary files differdeleted file mode 100644 index cc31972..0000000 --- a/signs/textures/signs_71.png +++ /dev/null diff --git a/signs/textures/signs_72.png b/signs/textures/signs_72.png Binary files differdeleted file mode 100644 index d8dbcee..0000000 --- a/signs/textures/signs_72.png +++ /dev/null diff --git a/signs/textures/signs_79.png b/signs/textures/signs_79.png Binary files differdeleted file mode 100644 index 15a76a7..0000000 --- a/signs/textures/signs_79.png +++ /dev/null diff --git a/signs/textures/signs_7c.png b/signs/textures/signs_7c.png Binary files differdeleted file mode 100644 index db5bdb3..0000000 --- a/signs/textures/signs_7c.png +++ /dev/null diff --git a/signs/textures/signs_black_inventory.png b/signs/textures/signs_black_inventory.png Binary files differdeleted file mode 100644 index 4b10ee3..0000000 --- a/signs/textures/signs_black_inventory.png +++ /dev/null diff --git a/signs/textures/signs_black_left.png b/signs/textures/signs_black_left.png Binary files differdeleted file mode 100644 index 8837dcb..0000000 --- a/signs/textures/signs_black_left.png +++ /dev/null diff --git a/signs/textures/signs_black_right.png b/signs/textures/signs_black_right.png Binary files differdeleted file mode 100644 index 0951da0..0000000 --- a/signs/textures/signs_black_right.png +++ /dev/null diff --git a/signs/textures/signs_blue_street.png b/signs/textures/signs_blue_street.png Binary files differdeleted file mode 100644 index 540a390..0000000 --- a/signs/textures/signs_blue_street.png +++ /dev/null diff --git a/signs/textures/signs_blue_street_inventory.png b/signs/textures/signs_blue_street_inventory.png Binary files differdeleted file mode 100644 index a702669..0000000 --- a/signs/textures/signs_blue_street_inventory.png +++ /dev/null diff --git a/signs/textures/signs_default.png b/signs/textures/signs_default.png Binary files differnew file mode 100644 index 0000000..0db6bfd --- /dev/null +++ b/signs/textures/signs_default.png diff --git a/signs/textures/signs_default_inventory.png b/signs/textures/signs_default_inventory.png Binary files differnew file mode 100644 index 0000000..55a5120 --- /dev/null +++ b/signs/textures/signs_default_inventory.png diff --git a/signs/textures/signs_green_street.png b/signs/textures/signs_green_street.png Binary files differdeleted file mode 100644 index b5c653d..0000000 --- a/signs/textures/signs_green_street.png +++ /dev/null diff --git a/signs/textures/signs_green_street_inventory.png b/signs/textures/signs_green_street_inventory.png Binary files differdeleted file mode 100644 index 6c2a52c..0000000 --- a/signs/textures/signs_green_street_inventory.png +++ /dev/null |