Files
VOREStation/code/game/objects/items/bells.dm
Cameron Lennox c42610c5ae Have you bingled that (#17407)
* Initial wiki system

* wiki organization and spoilers

* hide belly chems

* move ads to tgui

* add search

* .

* load screen

* error screen

* 8

* center

* .

* .

* make this more realistic

* tgui errro col

* move search to top

* .

* non NT theme

* logo to common

* base custom theme

* .

* wip refactor

* almost halfway

* reworked wiki data

* easy fix

* get data fix

* Material Page in tgui

* catch null supply points

* .

* forward crash

* reset pages

* .

* canvas prep

* fix icon stacking

* .

* colored outlined images

* fix sm datum

* fix material names

* subType prep

* only on crash

* fix null crash

* .

* fix solgov

* clean hiding

* .

* implement catalog page

* .

* particle smasher page

* I'm lazy

* unfuck some sins

* ore page

* botany page

* allergen list

* allergen returns null too

* slime injection var

* slime core data

* fixed warning

* wip

* proper data list for chems

* pass is_slime as null

* chems

* split that

* .

* .

* .

* .

* donation for bingle, some cleanup

* return types

* partially colord icons for chemistry

* .

* more sillies

* donation page

* thaler

* needs some variation

* .

* this will crash until implemented

* handle it

* fix that

* dismiss donation banner button

* .

* fix that

* donating procs

* donation stuff for comp

* -

* drink glass for drinks

* illegal iconstate pass

* fixes

* .

* nuke drink fix

* .

* .

* .

* Drink reagent fix

* more cleanup

* adjust

* .

* simple food

* .

* food list

* sending nulls, removed flavor from recipes

* .

* .

* get_donation_current added

* .

* missing key

* .

* duped recipes fixed

* .

* .

* wiki food reagent recipes

* double list add

* properly forbid remaining bad reagent

* hide this too

* stacky

* enable eslint const

* fix typing

* update that

* use proper donation proc

* printing fixes

* grinding

* .

* beaker fill volume

* plant ore and mat grinding results

* duped recipes fixed, unit test tweak

* yes this is terrible

* .

* .

* .

* chem analyzer tgui mode, some subsystem changes to support it

* redoce

* .

* ,

* .

* small fixes, missing reagent volume

* push

* sort

* catalog entries unlocked by explo

* new chem stuff

* .

* fix byond code

* fix scroll tracking

* comment

* alphabetical

* also this

* .

* fallback icon

* .

* ...

* rel path

* that too

* to defines

* organ to define

* .

* .

* .

---------

Co-authored-by: Willburd <7099514+Willburd@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
2025-03-28 19:00:50 +01:00

104 lines
3.1 KiB
Plaintext

/obj/item/deskbell
name = "desk bell"
desc = "An annoying bell. Ring for service."
icon = 'icons/obj/items.dmi'
icon_state = "deskbell"
force = 2
throwforce = 2
w_class = 2.0
matter = list(MAT_STEEL = 50)
var/broken
attack_verb = list("annoyed")
var/static/radial_examine = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_examine")
var/static/radial_use = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_use")
var/static/radial_pickup = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_pickup")
/obj/item/deskbell/examine(mob/user)
. = ..()
if(broken)
. += span_bold("It looks damaged, the ringer is stuck firmly inside.")
/obj/item/deskbell/attack(mob/target as mob, mob/living/user as mob)
if(!broken)
playsound(src, 'sound/effects/deskbell.ogg', 50, 1)
..()
/obj/item/deskbell/attack_hand(mob/user)
//This defines the radials and what call we're assiging to them.
var/list/options = list()
options["examine"] = radial_examine
options["pick up"] = radial_pickup
if(!broken)
options["use"] = radial_use
// Just an example, if the bell had no options, due to conditionals, nothing would happen here.
if(length(options) < 1)
return
// Right, if there's only one available radial...
// For example, say, the bell's broken so you can only examine, it just does that (doesn't show radial)..
var/list/choice = list()
if(length(options) == 1)
for(var/key in options)
choice = key
else
// If we have other options, it will show the radial menu for the player to decide.
choice = show_radial_menu(user, src, options, require_near = !issilicon(user))
// Once the player has decided their option, choose the behaviour that will happen under said option.
switch(choice)
if("examine")
user.examinate(src)
if("use")
if(check_ability(user))
ring(user)
add_fingerprint(user)
if("pick up")
..()
/obj/item/deskbell/proc/ring(mob/user)
if(user.a_intent == I_HURT)
playsound(src, 'sound/effects/deskbell_rude.ogg', 50, 1)
to_chat(user,span_notice("You hammer [src] rudely!"))
if (prob(2))
break_bell(user)
else
playsound(src, 'sound/effects/deskbell.ogg', 50, 1)
to_chat(user,span_notice("You gracefully ring [src]."))
/obj/item/deskbell/proc/check_ability(mob/user)
if (ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name[BP_R_HAND]
if (H.hand)
temp = H.organs_by_name[BP_L_HAND]
if(temp && !temp.is_usable())
to_chat(H,span_notice("You try to move your [temp.name], but cannot!"))
return 0
return 1
else
to_chat(user,span_notice("You are not able to ring [src]."))
return 0
/obj/item/deskbell/attackby(obj/item/W, mob/user, params)
if(!istype(W))
return
if(W.has_tool_quality(TOOL_WRENCH) && isturf(loc))
if(do_after(5))
if(!src) return
to_chat(user, span_notice("You dissasemble the desk bell"))
new /obj/item/stack/material/steel(get_turf(src), 1)
qdel(src)
return
if(!broken)
ring(user)
/obj/item/deskbell/proc/break_bell(mob/user)
to_chat(user,span_notice("The ringing abruptly stops as [src]'s ringer gets jammed inside!"))
broken = 1