mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 09:03:23 +01:00
Makes Gym Equipment Buildable And Disassemblable (#29449)
* ga * k * Update sheet_types.dm * nailed it lol * Update sheet_types.dm
This commit is contained in:
@@ -123,7 +123,11 @@ GLOBAL_LIST_INIT(metal_recipes, list(
|
||||
new /datum/stack_recipe("intercom frame", /obj/item/mounted/frame/intercom, 2),
|
||||
new /datum/stack_recipe/barsign_frame("bar sign frame", /obj/machinery/barsign, 4),
|
||||
new /datum/stack_recipe("extinguisher cabinet frame", /obj/item/mounted/frame/extinguisher, 2),
|
||||
null
|
||||
null,
|
||||
new /datum/stack_recipe_list("gym equipment", list(
|
||||
new /datum/stack_recipe("bench press", /obj/structure/weightmachine/weightlifter, 5, time = 5 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
|
||||
new /datum/stack_recipe("chest press", /obj/structure/weightmachine/stacklifter, 5, time = 5 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
|
||||
)),
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/metal
|
||||
@@ -385,6 +389,7 @@ GLOBAL_LIST_INIT(cloth_recipes, list (
|
||||
new /datum/stack_recipe("rag", /obj/item/reagent_containers/glass/rag, 1),
|
||||
new /datum/stack_recipe("bedsheet", /obj/item/bedsheet, 3),
|
||||
new /datum/stack_recipe("empty sandbag", /obj/item/emptysandbag, 4),
|
||||
new /datum/stack_recipe("punching bag", /obj/structure/punching_bag, 10, time = 5 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
|
||||
null,
|
||||
new /datum/stack_recipe("blindfold", /obj/item/clothing/glasses/sunglasses/blindfold, 3),
|
||||
new /datum/stack_recipe("tattered blindfold", /obj/item/clothing/glasses/sunglasses/blindfold/fake, 2),
|
||||
|
||||
@@ -7,15 +7,32 @@
|
||||
layer = WALL_OBJ_LAYER
|
||||
var/list/hit_sounds = list('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg',\
|
||||
'sound/weapons/punch1.ogg', 'sound/weapons/punch2.ogg', 'sound/weapons/punch3.ogg', 'sound/weapons/punch4.ogg')
|
||||
var/material_drop = /obj/item/stack/sheet/cloth
|
||||
var/material_drop_amount = 10
|
||||
|
||||
/obj/structure/punching_bag/attack_hand(mob/user)
|
||||
/obj/structure/punching_bag/attack_hand(mob/living/user, obj/item/I)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
. = ..()
|
||||
. = FALSE
|
||||
if(.)
|
||||
return
|
||||
if(istype(I, /obj/item/wirecutters))
|
||||
return
|
||||
flick("[icon_state]2", src)
|
||||
playsound(loc, pick(hit_sounds), 25, TRUE, -1)
|
||||
|
||||
/obj/structure/punching_bag/wirecutter_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_start_check(src, user, 0))
|
||||
return
|
||||
WIRECUTTER_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(I.use_tool(src,user, 5 SECONDS, volume = I.tool_volume))
|
||||
WIRECUTTER_DISMANTLE_SUCCESS_MESSAGE
|
||||
deconstruct(TRUE)
|
||||
|
||||
/obj/structure/punching_bag/deconstruct(disassembled = TRUE)
|
||||
if(ispath(material_drop) && material_drop_amount && !(flags & NODECONSTRUCT))
|
||||
new material_drop(loc, material_drop_amount)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/weightmachine
|
||||
name = "weight machine"
|
||||
@@ -23,6 +40,8 @@
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
var/icon_state_inuse
|
||||
var/material_drop = /obj/item/stack/sheet/metal
|
||||
var/material_drop_amount = 5
|
||||
|
||||
/obj/structure/weightmachine/proc/AnimateMachine(mob/living/user)
|
||||
return
|
||||
@@ -51,7 +70,27 @@
|
||||
icon_state = initial(icon_state)
|
||||
to_chat(user, finishmessage)
|
||||
|
||||
/obj/structure/weightmachine/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(in_use)
|
||||
to_chat(user, "<span class='warning'>It's currently in use - wait a bit.</span>")
|
||||
return
|
||||
else
|
||||
WELDER_ATTEMPT_SLICING_MESSAGE
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
WELDER_SLICING_SUCCESS_MESSAGE
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
|
||||
/obj/structure/weightmachine/deconstruct(disassembled = TRUE)
|
||||
if(ispath(material_drop) && material_drop_amount && !(flags & NODECONSTRUCT))
|
||||
new material_drop(loc, material_drop_amount)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/weightmachine/stacklifter
|
||||
name = "chest press"
|
||||
icon = 'icons/goonstation/objects/fitness.dmi'
|
||||
icon_state = "fitnesslifter"
|
||||
icon_state_inuse = "fitnesslifter2"
|
||||
@@ -69,6 +108,7 @@
|
||||
playsound(user, 'sound/goonstation/effects/spring.ogg', 60, 1)
|
||||
|
||||
/obj/structure/weightmachine/weightlifter
|
||||
name = "bench press"
|
||||
icon = 'icons/goonstation/objects/fitness.dmi'
|
||||
icon_state = "fitnessweight"
|
||||
icon_state_inuse = "fitnessweight-c"
|
||||
|
||||
Reference in New Issue
Block a user