mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Fix issues with the bell (#18659)
* Do the code changes * add anchored to maps * add instructions to the desc to help * missed one * Update code/modules/paperwork/desk_bell.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * Update code/modules/paperwork/desk_bell.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * adds visible messages i didnt test this btw cuz r- * This one I actually tested, fix strings * deconflict correctly * Re-run * add back to cyberiad Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
/obj/item/desk_bell
|
||||
name = "desk bell"
|
||||
desc = "The cornerstone of any customer service job. You feel an unending urge to ring it."
|
||||
desc = "The cornerstone of any customer service job. You feel an unending urge to ring it. It looks like it can be wrenched or screwdrivered."
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
icon_state = "desk_bell"
|
||||
/// The amount of times this bell has been rang, used to check the chance it breaks
|
||||
@@ -17,7 +17,11 @@
|
||||
var/ring_sound = 'sound/machines/bell.ogg'
|
||||
|
||||
/obj/item/desk_bell/attack_hand(mob/living/user)
|
||||
if(ring_cooldown > world.time)
|
||||
if(in_inventory && ishuman(user))
|
||||
if(!user.get_active_hand())
|
||||
user.put_in_hands(src)
|
||||
return TRUE
|
||||
if(ring_cooldown > world.time || !anchored)
|
||||
return TRUE
|
||||
if(!ring_bell(user))
|
||||
to_chat(user, "<span class='notice'>[src] is silent. Some idiot broke it.</span>")
|
||||
@@ -35,17 +39,7 @@
|
||||
if(!remove_item_from_storage(M))
|
||||
M.unEquip(src)
|
||||
M.put_in_hands(src)
|
||||
|
||||
else if(istype(over_object, /obj/screen))
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
if(!remove_item_from_storage(M))
|
||||
M.unEquip(src)
|
||||
M.put_in_r_hand(src)
|
||||
if("l_hand")
|
||||
if(!remove_item_from_storage(M))
|
||||
M.unEquip(src)
|
||||
M.put_in_l_hand(src)
|
||||
anchored = FALSE
|
||||
|
||||
add_fingerprint(M)
|
||||
|
||||
@@ -53,25 +47,39 @@
|
||||
/obj/item/desk_bell/screwdriver_act(mob/living/user, obj/item/tool)
|
||||
. = TRUE
|
||||
if(broken_ringer)
|
||||
to_chat(user, "<span class='notice'>You begin repairing the bell...</span>")
|
||||
visible_message("<span class='notice'>[user] begins repairing [src]...</span>", "<span class='notice'>You begin repairing [src]...</span>")
|
||||
tool.play_tool_sound(src)
|
||||
if(tool.use_tool(src, user, 5 SECONDS))
|
||||
user.visible_message("<span class='notice'>[user] repairs the bell.</span>", "<span class='notice'>You repair the bell.</span>")
|
||||
user.visible_message("<span class='notice'>[user] repairs [src].</span>", "<span class='notice'>You repair [src].</span>")
|
||||
playsound(user, 'sound/items/change_drill.ogg', 50, vary = TRUE)
|
||||
broken_ringer = FALSE
|
||||
times_rang = 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
// Deconstruct
|
||||
// Deconstruct and Anchor
|
||||
/obj/item/desk_bell/wrench_act(mob/living/user, obj/item/tool)
|
||||
to_chat(user, "<span class='notice'>You begin taking apart the bell...</span>")
|
||||
if(tool.use_tool(src, user, 5 SECONDS))
|
||||
to_chat(user, "<span class='notice'>You disassemble the bell...</span>")
|
||||
playsound(user, 'sound/items/deconstruct.ogg', 50, vary = TRUE)
|
||||
new /obj/item/stack/sheet/metal(drop_location(), 2)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
. = TRUE
|
||||
if(user.a_intent == INTENT_HARM && !in_inventory)
|
||||
visible_message("<span class='notice'>[user] begins taking apart [src]...</span>", "<span class='notice'>You begin taking apart [src]...</span>")
|
||||
if(tool.use_tool(src, user, 5 SECONDS, volume = tool.tool_volume))
|
||||
visible_message("<span class='notice'>[user] takes apart [src].</span>", "<span class='notice'>You take apart [src].</span>")
|
||||
playsound(user, 'sound/items/deconstruct.ogg', 50, vary = TRUE)
|
||||
new /obj/item/stack/sheet/metal(drop_location(), 2)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
if(!in_inventory)
|
||||
if(!anchored)
|
||||
user.visible_message("[user] begins securing [src]...", "You begin securing [src]...")
|
||||
if(!tool.use_tool(src, user, 3 SECONDS, volume = tool.tool_volume))
|
||||
return
|
||||
anchored = TRUE
|
||||
else
|
||||
user.visible_message("[user] begins unsecuring [src]...", "You begin unsecuring [src]...")
|
||||
if(!tool.use_tool(src, user, 3 SECONDS, volume = tool.tool_volume))
|
||||
return
|
||||
anchored = FALSE
|
||||
|
||||
|
||||
/// Check if the clapper breaks, and if it does, break it
|
||||
/obj/item/desk_bell/proc/check_clapper(mob/living/user)
|
||||
|
||||
Reference in New Issue
Block a user