abstract class Works::Struct::Base
- Works::Struct::Base
- Works::Cell
- Reference
- Object
Direct Known Subclasses
- Works::Struct::Chest::Base
- Works::Struct::Furnace::Base
- Works::Struct::Inserter::Base
- Works::Struct::TransportBelt::Base
Defined in:
works/struct/base.crConstant Summary
-
BackgroundColor =
LibAllegro.premul_rgba_f(0, 0, 0, 0.13)
-
Color =
LibAllegro.map_rgb_f(0.5, 0.5, 0.1)
-
HoverColor =
LibAllegro.premul_rgba_f(1, 0.5, 0, 0.33)
-
Key =
:struct
-
Margin =
4 * Screen.scale_factor
-
HUD
-
Name =
"Struct"
-
SlotSize =
32 * Screen.scale_factor
Constructors
Class Method Summary
Instance Method Summary
- #accept_item?(item : Item::Base)
- #add_from_inserter(klass, amount, inserter_facing : Symbol)
- #add_from_inserter?(item : Item::Base, inserter_facing : Symbol)
- #after_rotate(map : Map)
- #can_overwrite?(strct : Struct::Base)
- #color
- #destroy
- #draw(dx, dy, color)
- #draw(x, y)
- #draw_hover_info
- #draw_struct_info(inventory_width, inventory_height)
- #draw_struct_info_slots(inventory_width, inventory_height)
- #grab_item(item_grab_size)
- #grab_item
- #hide_hud
- #hud_background_color
- #hud_hover_color
- #hud_margin
- #hud_shown? : Bool
- #hud_slot_size
- #hud_x
- #hud_y(inventory_height)
- #item_class
- #key
- #overlaps_input?(col, row)
- #overlaps_output?(col, row)
- #rotate
- #show_hud
- #slot_click(inventory : Inventory, mouse : Mouse)
- #slot_click_grab_item(inventory : Inventory, mouse : Mouse)
- #slot_click_held_item(inventory : Inventory, held_item : Item::Held)
- #slot_hover?(slot_x, slot_y, mouse : Mouse)
- #update(map : Map)
- #update_struct_info_slot_hovers(mouse : Mouse, inventory_width, inventory_height)
Instance methods inherited from class Works::Cell
clone
clone,
col : UInt16
col,
col=(col : UInt16)
col=,
cols : UInt8
cols,
dimensions : NamedTuple(x: UInt8, y: UInt8)
dimensions,
draw(x, y)
draw,
draw_selection(dx, dy, color = nil)
draw_selection,
height
height,
hover?(mouse_col, mouse_row)
hover?,
name
name,
overlaps?(o_col, o_row)overlaps?(cell : Cell) overlaps?, print_str print_str, row : UInt16 row, row=(row : UInt16) row=, rows : UInt8 rows, size : UInt16 size, width width, x x, y y