Skip to content

Commit

Permalink
[QOL] Новые спрайты лестниц, перил, досок для записей, кухонных машин…
Browse files Browse the repository at this point in the history
… и декалей (BlueMoon-Labs#1339)

* Поменял спрайты лестницам и починил ноутисборды

* Перила, крафт перил, названия крафтов

* Поправил крафт и расположение предметов

* Выпадение стержней

* Ещё одна штучка

* Убрал устаревшие подтипы

* сука, ненавижу эйспрайт
  • Loading branch information
mcbalaam authored Oct 26, 2024
1 parent abe6198 commit 7e18294
Show file tree
Hide file tree
Showing 16 changed files with 143 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,6 @@
/obj/effect/turf_decal/stripes/line{
dir = 5
},
/obj/structure/noticeboard/directional/east,
/obj/structure/table/reinforced,
/obj/machinery/microwave{
pixel_x = -3;
Expand Down
1 change: 0 additions & 1 deletion _maps/map_files/MetaStation/MetaStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -31203,7 +31203,6 @@
/obj/effect/turf_decal/tile/dark_green{
dir = 1
},
/obj/structure/noticeboard/directional/west,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/open/floor/plasteel,
/area/hallway/primary/central)
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/layers_planes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
#define ON_EDGED_TURF_LAYER 4.35
#define LARGE_MOB_LAYER 4.4
#define ABOVE_ALL_MOB_LAYER 4.5
#define RAILING_LAYER 4.7

#define SPACEVINE_LAYER 4.8
#define SPACEVINE_MOB_LAYER 4.9
Expand Down
10 changes: 5 additions & 5 deletions code/controllers/subsystem/materials.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ SUBSYSTEM_DEF(materials)
var/list/list/material_combos
///List of stackcrafting recipes for materials using base recipes
var/list/base_stack_recipes = list(
new /datum/stack_recipe("Chair", /obj/structure/chair/greyscale, time = 5, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
new /datum/stack_recipe("Toilet", /obj/structure/toilet/greyscale, time = 5, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
new /datum/stack_recipe("Sink Frame", /obj/structure/sink/greyscale, time = 5, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
new /datum/stack_recipe("Material Airlock Assembly", /obj/structure/door_assembly/door_assembly_material, 4, time = 5, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
new /datum/stack_recipe("Material Floor Tile", /obj/item/stack/tile/material, 1, 4, 20, applies_mats = TRUE),
new /datum/stack_recipe("chair", /obj/structure/chair/greyscale, time = 5, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
new /datum/stack_recipe("toilet", /obj/structure/toilet/greyscale, time = 5, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
new /datum/stack_recipe("sink frame", /obj/structure/sink/greyscale, time = 5, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
new /datum/stack_recipe("material airlock assembly", /obj/structure/door_assembly/door_assembly_material, 4, time = 5, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
new /datum/stack_recipe("material floor tile", /obj/item/stack/tile/material, 1, 4, 20, applies_mats = TRUE),
)
///List of stackcrafting recipes for materials using rigid recipes
var/list/rigid_stack_recipes = list(
Expand Down
21 changes: 13 additions & 8 deletions code/game/objects/items/stacks/rods.dm
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
GLOBAL_LIST_INIT(rod_recipes, list ( \
new/datum/stack_recipe("Grille", /obj/structure/grille, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Table Frame", /obj/structure/table_frame, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Scooter Frame", /obj/item/scooter_frame, 10, time = 25, one_per_turf = 0), \
new/datum/stack_recipe("Railing", /obj/structure/railing, 3, time = 18, window_checks = TRUE), \
new/datum/stack_recipe("Catwalk Tile", /obj/item/stack/tile/catwalk, 1, 4, 20), \
new/datum/stack_recipe("Guard Rail", /obj/structure/deployable_barricade/guardrail, 2, time = 1 SECONDS, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("Tank Holder", /obj/structure/tank_holder, 2, time = 5, one_per_turf = TRUE, on_floor = FALSE), \
new/datum/stack_recipe("Glasses Frame", /obj/item/glasswork/glass_base/glasses_frame, 3, 1, 1, 30 SECONDS), \
new/datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("table frame", /obj/structure/table_frame, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("scooter frame", /obj/item/scooter_frame, 10, time = 25, one_per_turf = 0), \
new/datum/stack_recipe("catwalk tile", /obj/item/stack/tile/catwalk, 1, 4, 20), \
new/datum/stack_recipe("guard rail", /obj/structure/deployable_barricade/guardrail, 2, time = 1 SECONDS, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("tank holder", /obj/structure/tank_holder, 2, time = 5, one_per_turf = TRUE, on_floor = FALSE), \
new/datum/stack_recipe("glasses frame", /obj/item/glasswork/glass_base/glasses_frame, 3, 1, 1, 30 SECONDS), \
new /datum/stack_recipe_list("railing", list( \
new/datum/stack_recipe("railing", /obj/structure/railing, 2, time = 18, window_checks = TRUE), \
new/datum/stack_recipe("railing corner", /obj/structure/railing/corner, 2, time = 18, window_checks = TRUE), \
new/datum/stack_recipe("railing end", /obj/structure/railing/corner/end, 2, time = 18, window_checks = TRUE), \
new/datum/stack_recipe("flipped railing end", /obj/structure/railing/corner/end/flip, 2, time = 18, window_checks = TRUE), \
)), \
))

/obj/item/stack/rods
Expand Down
13 changes: 7 additions & 6 deletions code/game/objects/items/stacks/sheets/sheet_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
//END OF CIT CHANGES
new/datum/stack_recipe_list("fancy sofas", list( \
new /datum/stack_recipe("sofa (middle)", /obj/structure/chair/sofa/corp, one_per_turf = TRUE, on_floor = TRUE), \
new /datum/stack_recipe("sofa (left)", /obj/structure/chair/sofa/corp/right, one_per_turf = TRUE, on_floor = TRUE), \
new /datum/stack_recipe("sofa (right)", /obj/structure/chair/sofa/corp/left, one_per_turf = TRUE, on_floor = TRUE), \
new /datum/stack_recipe("sofa (left)", /obj/structure/chair/sofa/corp/left, one_per_turf = TRUE, on_floor = TRUE), \
new /datum/stack_recipe("sofa (right)", /obj/structure/chair/sofa/corp/right, one_per_turf = TRUE, on_floor = TRUE), \
new /datum/stack_recipe("sofa (corner)", /obj/structure/chair/sofa/corp/corner, one_per_turf = TRUE, on_floor = TRUE), \
)), \
null, \
Expand Down Expand Up @@ -136,7 +136,7 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
new/datum/stack_recipe("iron ingot", /obj/item/ingot/iron, 6, time = 100), \
null, \
new/datum/stack_recipe("tiny fan", /obj/structure/fans/tiny, 2, time = 4, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("Metal Barricade", /obj/structure/deployable_barricade/metal, 2, time = 1 SECONDS, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("metal barricade", /obj/structure/deployable_barricade/metal, 2, time = 1 SECONDS, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("desk bell", /obj/structure/desk_bell, 2, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
))

Expand Down Expand Up @@ -252,9 +252,9 @@ GLOBAL_LIST_INIT(plasteel_recipes, list ( \
* Wood
*/
GLOBAL_LIST_INIT(wood_recipes, list ( \
new/datum/stack_recipe("Wooden Sandals", /obj/item/clothing/shoes/sandal, 1), \
new/datum/stack_recipe("Sauna Oven", /obj/structure/sauna_oven, 50, time = 15 SECONDS, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("Wooden Half-Barricade", /obj/structure/deployable_barricade/wooden, 5, time = 2 SECONDS, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
new/datum/stack_recipe("sauna oven", /obj/structure/sauna_oven, 50, time = 15 SECONDS, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("wooden half-barricade", /obj/structure/deployable_barricade/wooden, 5, time = 2 SECONDS, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("tiki mask", /obj/item/clothing/mask/gas/tiki_mask, 2), \
new/datum/stack_recipe("wood table frame", /obj/structure/table_frame/wood, 2, time = 10), \
null, \
Expand Down Expand Up @@ -302,6 +302,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
new/datum/stack_recipe("painting frame", /obj/item/wallframe/painting, 1, time = 10),\
new/datum/stack_recipe("urn", /obj/item/reagent_containers/glass/mortar/urn, 3), \
new/datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10),\
new/datum/stack_recipe("notice board frame", /obj/item/wallframe/noticeboard, 5, time = 10),\
))

/obj/item/stack/sheet/mineral/wood
Expand Down
5 changes: 1 addition & 4 deletions code/game/objects/structures/displaycase.dm
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,7 @@
//prevents remote "kicks" with TK
if (!Adjacent(user))
return
user.visible_message(span_danger("[user] kicks the display case."), null, null, COMBAT_MESSAGE_RANGE)
log_combat(user, src, "kicks")
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
take_damage(2)
to_chat(user, span_notice("You poke the [src] glass."))

/obj/structure/displaycase_chassis
anchored = TRUE
Expand Down
84 changes: 51 additions & 33 deletions code/game/objects/structures/noticeboard.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,35 @@

/obj/structure/noticeboard
name = "notice board"
desc = "A board for pinning important notices upon."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "nboard00"
plane = ABOVE_WALL_PLANE
desc = "A board for pinning important notices upon. It is made of the finest Spanish cork."
icon = 'icons/obj/wallmounts.dmi'
icon_state = "noticeboard"
density = FALSE
anchored = TRUE
max_integrity = 150
max_integrity = 100
/// Current number of a pinned notices
var/notices = 0

/obj/structure/noticeboard/directional/north
dir = SOUTH
pixel_y = 32

/obj/structure/noticeboard/directional/south
dir = NORTH
pixel_y = -32

/obj/structure/noticeboard/directional/east
dir = WEST
pixel_x = 32

/obj/structure/noticeboard/directional/west
dir = EAST
pixel_x = -32

/obj/structure/noticeboard/Initialize(mapload)
/obj/structure/noticeboard/Initialize(mapload, ndir, building)
. = ..()

if(!mapload)
return
if(building)
setDir(ndir)

var/static/list/tool_behaviors = list(
TOOL_WRENCH = list(
SCREENTIP_CONTEXT_LMB = list(INTENT_ANY = "Detach"),
)
)
AddElement(/datum/element/contextual_screentip_tools, tool_behaviors)

for(var/obj/item/I in loc)
if(notices >= MAX_NOTICES)
break
if(istype(I, /obj/item/paper))
I.forceMove(src)
notices++
icon_state = "nboard0[notices]"
update_appearance(UPDATE_ICON)

//attaching papers!!
/obj/structure/noticeboard/attackby(obj/item/O, mob/user, params)
Expand All @@ -52,12 +42,21 @@
if(!user.transferItemToLoc(O, src))
return
notices++
icon_state = "nboard0[notices]"
to_chat(user, span_notice("You pin the [O] to the noticeboard."))
update_appearance(UPDATE_ICON)
to_chat(user, span_notice("You pin the [O] to the [src]."))
else
to_chat(user, span_warning("The notice board is full!"))
to_chat(user, span_warning("There is no space left on the [src]!"))
else if(O.tool_behaviour == TOOL_WRENCH)
user.visible_message("<span class='notice'>[user] starts unsecuring [src]...</span>", "<span class='notice'>You start unsecuring [src]...</span>")
O.play_tool_sound(src)
if(O.use_tool(src, user, 80))
user.visible_message("<span class='notice'>[user] unsecures [src]!</span>", "<span class='notice'>You detach [src] from the wall.</span>")
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
deconstruct()
return
else
return ..()
return ..()

/obj/structure/noticeboard/ui_state(mob/user)
return GLOB.physical_state
Expand All @@ -80,7 +79,7 @@
data["items"] += list(content_data)
return data

/obj/structure/noticeboard/ui_act(action, params)
/obj/structure/noticeboard/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
. = ..()
if(.)
return
Expand Down Expand Up @@ -111,22 +110,41 @@
* * item - The item that is to be removed
* * user - The mob that is trying to get the item removed, if there is one
*/

/obj/structure/noticeboard/proc/remove_item(obj/item/item, mob/user)
item.forceMove(drop_location())
if(user)
user.put_in_hands(item)
to_chat(user, span_notice("You tear the [item] off the [src]."))
balloon_alert(user, "removed from board")
notices--
icon_state = "nboard0[notices]"
update_appearance(UPDATE_ICON)

/obj/structure/noticeboard/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
new /obj/item/stack/sheet/metal (loc, 1)
if(!disassembled)
new /obj/item/stack/sheet/mineral/wood(loc, 2)
else
new /obj/item/wallframe/noticeboard(loc)
for(var/obj/item/content in contents)
remove_item(content)
qdel(src)

// Notice boards for the heads of staff (plus the qm)
/obj/item/wallframe/noticeboard
name = "notice board"
desc = "Right now it's more of a clipboard. Attach to a wall to use."
icon = 'icons/obj/wallframe.dmi'
icon_state = "noticeboard"
pixel_shift = -32
custom_materials = list(
/datum/material/wood = SHEET_MATERIAL_AMOUNT,
)
resistance_flags = FLAMMABLE
result_path = /obj/structure/noticeboard

/obj/structure/noticeboard/update_overlays()
. = ..()
if(notices)
. += "notices_[notices]"

/obj/structure/noticeboard/captain
name = "Captain's Notice Board"
Expand Down
71 changes: 65 additions & 6 deletions code/game/objects/structures/railings.dm
Original file line number Diff line number Diff line change
@@ -1,26 +1,75 @@
/obj/structure/railing
name = "railing"
desc = "Basic railing meant to protect idiots like you from falling."
icon = 'icons/obj/fluff.dmi'
icon = 'icons/obj/railings.dmi'
icon_state = "railing"
density = TRUE
anchored = TRUE
climbable = TRUE
layer = ABOVE_ALL_MOB_LAYER
///Initial direction of the railing.
var/ini_dir

/datum/armor/structure_railing
melee = 35
bullet = 50
laser = 50
energy = 100
bomb = 10

/obj/structure/railing/unbreakable
resistance_flags = INDESTRUCTIBLE

/obj/structure/railing/corner //aesthetic corner sharp edges hurt oof ouch
icon_state = "railing_corner"
density = FALSE
climbable = FALSE

/obj/structure/railing/corner/unbreakable
resistance_flags = INDESTRUCTIBLE

/obj/structure/railing/corner/end //end of a segment of railing without making a loop
icon_state = "railing_end"

/obj/structure/railing/corner/end/unbreakable
resistance_flags = INDESTRUCTIBLE

/obj/structure/railing/corner/end/flip //same as above but flipped around
icon_state = "railing_end_flip"

/obj/structure/railing/corner/end/flip/unbreakable
resistance_flags = INDESTRUCTIBLE

/obj/structure/railing/ComponentInitialize()
. = ..()
AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS ,null,CALLBACK(src, PROC_REF(can_be_rotated)),CALLBACK(src, PROC_REF(after_rotation)))

/obj/structure/railing/examine(mob/user)
. = ..()
if(anchored == TRUE)
. += span_notice("The railing is <b>bolted</b> to the floor.")
else
. += span_notice("The railing is <i>unbolted</i> from the floor and can be deconstructed with <b>wirecutters</b>.")

/obj/structure/railing/Initialize(mapload)
. = ..()
ini_dir = dir

var/static/list/tool_behaviors = list(
TOOL_WELDER = list(
SCREENTIP_CONTEXT_LMB = list(INTENT_HELP = "Repair"),
),
TOOL_WRENCH = list(
SCREENTIP_CONTEXT_LMB = list(INTENT_ANY = "Anchor/Unanchor"),
),
TOOL_WIRECUTTER= list(
SCREENTIP_CONTEXT_LMB = list(INTENT_ANY = "Cut"),
)
)

AddElement(/datum/element/contextual_screentip_tools, tool_behaviors)

RegisterSignal(src, COMSIG_ATOM_DIR_CHANGE, PROC_REF(on_change_layer))
adjust_dir_layer(dir)

/obj/structure/railing/attackby(obj/item/I, mob/living/user, params)
..()
Expand All @@ -34,13 +83,13 @@
obj_integrity = max_integrity
to_chat(user, "<span class='notice'>Вы починили [src].</span>")
else
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
to_chat(user, "<span class='warning'>[src] выглядит целым.</span>")
return

/obj/structure/railing/wirecutter_act(mob/living/user, obj/item/I)
. = ..()
if(!anchored)
to_chat(user, "<span class='warning'>You cut apart the railing.</span>")
to_chat(user, "<span class='warning'>Вы перекусываете крепление [src].</span>")
I.play_tool_sound(src, 100)
deconstruct()
return TRUE
Expand All @@ -50,8 +99,7 @@
if(!loc) //quick check if it's qdeleted already.
return
if(!(flags_1 & NODECONSTRUCT_1))
var/obj/item/stack/rods/rod = new /obj/item/stack/rods(drop_location(), 3)
transfer_fingerprints_to(rod)
new /obj/item/stack/rods(loc, 2)
qdel(src)
///Implements behaviour that makes it possible to unanchor the railing.
/obj/structure/railing/wrench_act(mob/living/user, obj/item/I)
Expand Down Expand Up @@ -105,3 +153,14 @@
air_update_turf(TRUE)
ini_dir = dir
add_fingerprint(user)

/obj/structure/railing/proc/on_change_layer(datum/source, old_dir, new_dir)
SIGNAL_HANDLER
adjust_dir_layer(new_dir)

/obj/structure/railing/proc/adjust_dir_layer(direction)
layer = (direction & NORTH) ? MOB_LAYER : initial(layer)




Binary file modified icons/obj/kitchen.dmi
Binary file not shown.
Binary file added icons/obj/railings.dmi
Binary file not shown.
Binary file modified icons/obj/stairs.dmi
Binary file not shown.
Binary file modified icons/obj/wallframe.dmi
Binary file not shown.
Binary file modified icons/obj/wallmounts.dmi
Binary file not shown.
Binary file added icons/obj/wallmounts2.dmi
Binary file not shown.
Binary file modified icons/turf/decals.dmi
Binary file not shown.

0 comments on commit 7e18294

Please sign in to comment.