mirror of
https://github.com/goonstation/goonstation-2020.git
synced 2026-07-22 04:22:20 +01:00
28 lines
972 B
Plaintext
28 lines
972 B
Plaintext
// <drsingh>: just what the game needs, more copy pasted and slightly adjusted junk
|
|
/obj/dartboard
|
|
name = "Dartboard"
|
|
desc = "A dartboard."
|
|
icon = 'icons/obj/stationobjs.dmi'
|
|
icon_state = "dartboard"
|
|
anchored = 1
|
|
density = 0
|
|
opacity = 0
|
|
var/last_score = 0
|
|
event_handler_flags = USE_HASENTERED | USE_FLUID_ENTER
|
|
|
|
HasEntered(atom/M)
|
|
if (istype(M, /obj/item/implant/projectile/bardart) && M.dir == 1)
|
|
M.pixel_y += rand(22,38)
|
|
M.pixel_x += rand(-8,8)
|
|
last_score = rand(1,60)
|
|
src.throwing = 0
|
|
playsound(src.loc, "sound/effects/syringeproj.ogg", 100, 1)
|
|
src.visible_message("<span style=\"color:blue\">Score: [last_score].</span>")
|
|
if (src.last_score == 50)
|
|
src.visible_message("<span style=\"color:red\">It's a bullseye!</span>")
|
|
|
|
/obj/item/storage/box/lawndart_kit
|
|
name = "Lawn Darts box"
|
|
desc = "Contains three darts, hours of outdoors fun guaranteed!"
|
|
icon_state = "box"
|
|
spawn_contents = list(/obj/item/implant/projectile/lawndart = 3) |