Merge pull request #12646 from Chiirno/emi

[READY] Alt-click cigarette pack functionality added to pill bottles.
This commit is contained in:
silicons
2020-07-20 16:15:38 -07:00
committed by GitHub
17 changed files with 50 additions and 31 deletions
+1 -1
View File
@@ -1453,7 +1453,7 @@
/area/ruin/space/has_grav/hotel/guestroom/room_2)
"eu" = (
/obj/structure/table/wood,
/obj/item/storage/pill_bottle/dice,
/obj/item/storage/box/dice,
/turf/open/floor/wood,
/area/ruin/space/has_grav/hotel/guestroom/room_2)
"ev" = (
@@ -5371,7 +5371,7 @@
/area/awaymission/research/interior/dorm)
"kS" = (
/obj/structure/table/wood,
/obj/item/storage/pill_bottle/dice,
/obj/item/storage/box/dice,
/turf/open/floor/plasteel,
/area/awaymission/research/interior/dorm)
"kT" = (
+2 -2
View File
@@ -350,7 +350,7 @@
/area/security/prison)
"aaV" = (
/obj/structure/table/wood,
/obj/item/storage/pill_bottle/dice,
/obj/item/storage/box/dice,
/turf/open/floor/plasteel,
/area/security/prison)
"aaW" = (
@@ -54870,7 +54870,7 @@
/area/engine/atmos)
"hgO" = (
/obj/structure/table,
/obj/item/storage/pill_bottle/dice{
/obj/item/storage/box/dice{
pixel_x = 4;
pixel_y = 4
},
@@ -20379,7 +20379,7 @@
/area/security/prison)
"aND" = (
/obj/structure/table,
/obj/item/storage/pill_bottle/dice,
/obj/item/storage/box/dice,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/obj/machinery/atmospherics/pipe/simple/supply/hidden{
dir = 4
@@ -21075,7 +21075,7 @@
/area/crew_quarters/bar/atrium)
"aOJ" = (
/obj/structure/table/wood,
/obj/item/storage/pill_bottle/dice,
/obj/item/storage/box/dice,
/obj/effect/turf_decal/tile/red{
dir = 1
},
@@ -73504,7 +73504,7 @@
/area/library)
"ctL" = (
/obj/structure/table/wood,
/obj/item/storage/pill_bottle/dice,
/obj/item/storage/box/dice,
/obj/machinery/computer/security/telescreen/entertainment{
pixel_y = -32
},
@@ -95510,7 +95510,7 @@
/area/medical/medbay/central)
"deG" = (
/obj/structure/table/wood,
/obj/item/storage/pill_bottle/dice,
/obj/item/storage/box/dice,
/obj/structure/sign/poster/official/help_others{
pixel_x = -32
},
@@ -116948,7 +116948,7 @@
/area/library/abandoned)
"dQx" = (
/obj/structure/table/wood,
/obj/item/storage/pill_bottle/dice,
/obj/item/storage/box/dice,
/turf/open/floor/carpet,
/area/library/abandoned)
"dQy" = (
@@ -123190,7 +123190,7 @@
/area/hallway/secondary/exit/departure_lounge)
"ecH" = (
/obj/structure/table,
/obj/item/storage/pill_bottle/dice,
/obj/item/storage/box/dice,
/obj/effect/turf_decal/delivery,
/turf/open/floor/plasteel,
/area/hallway/secondary/exit/departure_lounge)
+4 -4
View File
@@ -922,7 +922,7 @@
/area/security/prison)
"acb" = (
/obj/structure/table,
/obj/item/storage/pill_bottle/dice,
/obj/item/storage/box/dice,
/turf/open/floor/plasteel,
/area/security/prison)
"acc" = (
@@ -15603,7 +15603,7 @@
/area/crew_quarters/dorms)
"aDZ" = (
/obj/structure/table,
/obj/item/storage/pill_bottle/dice,
/obj/item/storage/box/dice,
/turf/open/floor/plasteel,
/area/crew_quarters/dorms)
"aEa" = (
@@ -21182,7 +21182,7 @@
/area/crew_quarters/locker)
"aPI" = (
/obj/structure/table,
/obj/item/storage/pill_bottle/dice,
/obj/item/storage/box/dice,
/turf/open/floor/plasteel,
/area/crew_quarters/locker)
"aPJ" = (
@@ -42467,7 +42467,7 @@
dir = 10
},
/obj/structure/table/wood/poker,
/obj/item/storage/pill_bottle/dice,
/obj/item/storage/box/dice,
/turf/open/floor/wood,
/area/crew_quarters/bar)
"bFt" = (
@@ -22059,7 +22059,7 @@
/area/hallway/primary/starboard)
"aJa" = (
/obj/structure/table,
/obj/item/storage/pill_bottle/dice,
/obj/item/storage/box/dice,
/obj/machinery/firealarm{
dir = 4;
pixel_x = -24
@@ -26945,7 +26945,7 @@
"aTf" = (
/obj/structure/table/wood,
/obj/item/clipboard,
/obj/item/storage/pill_bottle/dice,
/obj/item/storage/box/dice,
/obj/effect/turf_decal/tile/neutral{
dir = 1
},
@@ -2190,7 +2190,7 @@
/turf/open/floor/plasteel/dark,
/area/security/prison)
"afp" = (
/obj/item/storage/pill_bottle/dice,
/obj/item/storage/box/dice,
/obj/structure/table,
/turf/open/floor/plasteel/dark,
/area/security/prison)
@@ -10736,7 +10736,7 @@
/area/crew_quarters/dorms)
"ayo" = (
/obj/structure/table/wood,
/obj/item/storage/pill_bottle/dice,
/obj/item/storage/box/dice,
/turf/open/floor/carpet,
/area/crew_quarters/dorms)
"ayq" = (
+2 -2
View File
@@ -8429,7 +8429,7 @@
/area/centcom/ferry)
"tx" = (
/obj/structure/table/wood,
/obj/item/storage/pill_bottle/dice,
/obj/item/storage/box/dice,
/turf/open/floor/plasteel/grimy,
/area/centcom/ferry)
"ty" = (
@@ -10217,7 +10217,7 @@
/area/wizard_station)
"xy" = (
/obj/structure/table/wood/fancy,
/obj/item/storage/pill_bottle/dice{
/obj/item/storage/box/dice{
icon_state = "magicdicebag"
},
/turf/open/floor/carpet,
+1 -1
View File
@@ -307,7 +307,7 @@
"D" = (
/obj/structure/table/reinforced,
/obj/item/folder,
/obj/item/storage/pill_bottle/dice,
/obj/item/storage/box/dice,
/obj/effect/turf_decal/delivery,
/turf/open/floor/plasteel,
/area/shuttle/arrival)
+1 -1
View File
@@ -237,7 +237,7 @@
/area/shuttle/arrival)
"C" = (
/obj/structure/table/reinforced,
/obj/item/storage/pill_bottle/dice{
/obj/item/storage/box/dice{
pixel_x = -2;
pixel_y = 8
},
@@ -466,7 +466,7 @@
/obj/effect/spawner/lootdrop/cigars_cases/no_turf = 2,
/obj/effect/spawner/lootdrop/space_cash/no_turf = 5,
/obj/item/reagent_containers/food/snacks/grown/cannabis = 5,
/obj/item/storage/pill_bottle/dice = 5,
/obj/item/storage/box/dice = 5,
/obj/item/toy/cards/deck = 5,
/obj/effect/spawner/lootdrop/druggie_pill/no_turf = 5
)
@@ -485,7 +485,7 @@
/obj/effect/spawner/lootdrop/cig_packs/no_turf = 10,
/obj/effect/spawner/lootdrop/cigars_cases/no_turf = 5,
/obj/item/reagent_containers/food/snacks/grown/cannabis = 5,
/obj/item/storage/pill_bottle/dice = 5,
/obj/item/storage/box/dice = 5,
/obj/item/toy/cards/deck = 5,
/obj/effect/spawner/lootdrop/druggie_pill/no_turf = 5,
/obj/item/kitchen/knife = 5,
+1 -1
View File
@@ -93,7 +93,7 @@ RSF
use_matter(50, user)
if(4)
to_chat(user, "Dispensing Dice Pack...")
new /obj/item/storage/pill_bottle/dice(T)
new /obj/item/storage/box/dice(T)
use_matter(200, user)
if(5)
to_chat(user, "Dispensing Cigarette...")
+3 -3
View File
@@ -1,10 +1,10 @@
/obj/item/storage/pill_bottle/dice
/obj/item/storage/box/dice
name = "bag of dice"
desc = "Contains all the luck you'll ever need."
icon = 'icons/obj/dice.dmi'
icon_state = "dicebag"
/obj/item/storage/pill_bottle/dice/Initialize()
/obj/item/storage/box/dice/Initialize()
. = ..()
var/special_die = pick("1","2","fudge","space","00","8bd20","4dd6","100")
if(special_die == "1")
@@ -30,7 +30,7 @@
if(special_die == "100")
new /obj/item/dice/d100(src)
/obj/item/storage/pill_bottle/dice/suicide_act(mob/user)
/obj/item/storage/box/dice/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is gambling with death! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (OXYLOSS)
@@ -229,6 +229,25 @@
STR.click_gather = TRUE
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/dice))
/obj/item/storage/pill_bottle/AltClick(mob/living/carbon/user)
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
if(!length(user.get_empty_held_indexes()))
to_chat(user, "<span class='warning'>Your hands are full!</span>")
return
var/obj/item/reagent_containers/pill/P = locate() in contents
if(P)
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_TAKE, P, user)
if(!user.put_in_hands(P))
P.forceMove(user.drop_location()) // make sure it's not stuck in the user if the put in hands somehow fails
to_chat(user, "<span class='warning'>[P] drops to the floor!</span>")
else
to_chat(user, "<span class='notice'>You take \a [P] out of [src].</span>")
else
to_chat(user, "<span class='notice'>There are no pills left in the bottle.</span>")
return TRUE
/obj/item/storage/pill_bottle/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is trying to get the cap off [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (TOXLOSS)
@@ -204,7 +204,7 @@
var/obj/item/reagent_containers/food/snacks/donkpocket/warm/W = new(src)
load(W)
if(prob(50))
var/obj/item/storage/pill_bottle/dice/D = new(src)
var/obj/item/storage/box/dice/D = new(src)
load(D)
else
var/obj/item/instrument/guitar/G = new(src)
+1 -1
View File
@@ -4,7 +4,7 @@
product_ads = "Escape to a fantasy world!;Fuel your gambling addiction!;Ruin your friendships!;Roll for initiative!;Elves and dwarves!;Paranoid computers!;Totally not satanic!;Fun times forever!"
icon_state = "games"
products = list(/obj/item/toy/cards/deck = 5,
/obj/item/storage/pill_bottle/dice = 10,
/obj/item/storage/box/dice = 10,
/obj/item/toy/cards/deck/cas = 3,
/obj/item/toy/cards/deck/cas/black = 3,
/obj/item/toy/cards/deck/unum = 3)
@@ -11,7 +11,7 @@
/datum/gear/dice
name = "Dice bag"
category = SLOT_HANDS
path = /obj/item/storage/pill_bottle/dice
path = /obj/item/storage/box/dice
/datum/gear/eightball
name = "Magic eightball"