[MIRROR] Bartender Drink Sliding: Intrinsic to Extrinsic (#5297)
* Bartender Drink Sliding: Intrinsic to Extrinsic * Update packs.dm
This commit is contained in:
committed by
Poojawa
parent
fd919986f5
commit
e16db54c67
@@ -957,3 +957,60 @@
|
||||
author = "Engineering Encyclopedia"
|
||||
title = "Hacking"
|
||||
page_link = "Hacking"
|
||||
|
||||
///Reusable books that grant actions (knowledge is power)
|
||||
/obj/item/book/action_granting
|
||||
due_date = 0 // Game time in 1/10th seconds
|
||||
unique = 1 // 0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified
|
||||
var/datum/action/granted_action = null
|
||||
var/list/remarks = list() //things to read about while learning.
|
||||
var/pages_to_mastery = 3 //Essentially controls how long a mob must keep the book in his hand to actually successfully learn
|
||||
|
||||
/obj/item/book/action_granting/attack_self(mob/user)
|
||||
if(!granted_action)
|
||||
return
|
||||
var/datum/action/G = new granted_action
|
||||
for(var/datum/action/A in user.actions)
|
||||
if(A.type == G.type)
|
||||
to_chat(user, "<span class='notice'>You already know all about [G.name].</span>")
|
||||
qdel(G)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start reading about [G.name]...</span>")
|
||||
for(var/i=1, i<=pages_to_mastery, i++)
|
||||
if(!turn_page(user))
|
||||
to_chat(user, "<span class='notice'>You stop reading...</span>")
|
||||
qdel(G)
|
||||
return
|
||||
if(do_after(user,50, user))
|
||||
to_chat(user, "<span class='notice'>You feel like you've got a good handle on [G.name]!</span>")
|
||||
G.Grant(user)
|
||||
|
||||
/obj/item/book/action_granting/proc/turn_page(mob/user)
|
||||
playsound(user, pick('sound/effects/pageturn1.ogg','sound/effects/pageturn2.ogg','sound/effects/pageturn3.ogg'), 30, 1)
|
||||
if(do_after(user,50, user))
|
||||
to_chat(user, "<span class='notice'>[pick(remarks)]</span>")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/book/action_granting/drink_fling
|
||||
name = "Tapper: This One's For You"
|
||||
desc = "A seminal work on the dying art of booze sliding."
|
||||
icon_state = "barbook"
|
||||
granted_action = /datum/action/innate/drink_fling
|
||||
remarks = list("The trick is keeping a low center of gravity it seems...", "The viscosity of the liquid is important...", "Accounting for crosswinds... really?", "Drag coefficients of various popular drinking glasses...", "What the heck is laminar flow and why does it matter here?", "Greasing the bar seems like it'd be cheating...", "I don't think I'll be working with superfluids...")
|
||||
|
||||
/datum/action/innate/drink_fling
|
||||
name = "Drink Flinging"
|
||||
desc = "Toggles your ability to satifyingly throw glasses without spilling them."
|
||||
button_icon_state = "drinkfling_off"
|
||||
check_flags = 0
|
||||
|
||||
/datum/action/innate/drink_fling/Activate()
|
||||
button_icon_state = "drinkfling_on"
|
||||
active = TRUE
|
||||
UpdateButtonIcon()
|
||||
|
||||
/datum/action/innate/drink_fling/Deactivate()
|
||||
button_icon_state = "drinkfling_off"
|
||||
active = FALSE
|
||||
UpdateButtonIcon()
|
||||
@@ -1212,7 +1212,8 @@
|
||||
/obj/item/vending_refill/boozeomat,
|
||||
/obj/item/vending_refill/coffee,
|
||||
/obj/item/vending_refill/coffee,
|
||||
/obj/item/vending_refill/coffee)
|
||||
/obj/item/vending_refill/coffee,
|
||||
/obj/item/book/action_granting/drink_fling)
|
||||
crate_name = "bartending supply crate"
|
||||
|
||||
/datum/supply_pack/organic/vending/snack
|
||||
|
||||
@@ -163,7 +163,7 @@ Bartender
|
||||
ears = /obj/item/device/radio/headset/headset_srv
|
||||
uniform = /obj/item/clothing/under/rank/bartender
|
||||
suit = /obj/item/clothing/suit/armor/vest
|
||||
backpack_contents = list(/obj/item/storage/box/beanbag=1)
|
||||
backpack_contents = list(/obj/item/storage/box/beanbag=1,/obj/item/book/action_granting/drink_fling=1)
|
||||
shoes = /obj/item/clothing/shoes/laceup
|
||||
|
||||
/*
|
||||
|
||||
@@ -79,7 +79,11 @@
|
||||
SplashReagents(target, TRUE)
|
||||
|
||||
/obj/item/reagent_containers/proc/bartender_check(atom/target)
|
||||
return (target.CanPass(src, get_turf(src)) && thrownby && thrownby.mind && thrownby.mind.assigned_role == "Bartender")
|
||||
. = FALSE
|
||||
if(target.CanPass(src, get_turf(src)) && thrownby && thrownby.actions)
|
||||
for(var/datum/action/innate/drink_fling/D in thrownby.actions)
|
||||
if(D.active)
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/proc/SplashReagents(atom/target, thrown = FALSE)
|
||||
if(!reagents || !reagents.total_volume || !spillable)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 3.1 KiB |
Reference in New Issue
Block a user