diff --git a/code/game/objects/items/toys/poker_chips.dm b/code/game/objects/items/toys/poker_chips.dm new file mode 100644 index 0000000000..52f9fd5839 --- /dev/null +++ b/code/game/objects/items/toys/poker_chips.dm @@ -0,0 +1,185 @@ +/obj/item/poker_chip + name = "poker chip" + gender = PLURAL + icon = 'icons/obj/poker.dmi' + icon_state = "chip1" + throw_speed = 3 + throw_range = 10 + w_class = ITEMSIZE_TINY + drop_sound = 'sound/items/drop/ring.ogg' + pickup_sound = 'sound/items/pickup/component.ogg' + var/static/list/chip_worths = list(5000, 2000, 1000, 500, 200, 100, 50, 20, 10, 5, 2, 1) + var/worth = 0 + + +/obj/item/poker_chip/Initialize(mapload, new_worth) + . = ..() + if (new_worth) + worth = new_worth + name = "[worth] poker chip" + desc = "A poker chip with a value of [worth]." + update_icon() + + +/obj/item/poker_chip/attackby(obj/item/item, mob/living/user) + if (!istype(item, /obj/item/poker_chip)) + return ..() + var/obj/item/poker_chip/chip = item + chip.worth += worth + chip.update_icon() + user.visible_message( + SPAN_ITALIC("\The [user] combines some poker chips."), + SPAN_ITALIC("You combine some poker chips into a set worth [chip.worth]."), + SPAN_ITALIC("You hear the click of plastic on plastic."), + range = 5 + ) + user.unEquip(src) + user.unEquip(chip) + user.put_in_hands(chip) + qdel(src) + return TRUE + + +/obj/item/poker_chip/update_icon() + cut_overlays() + if (worth in chip_worths) + name = "[worth] poker chip" + icon_state = "chip[worth]" + desc = "A poker chip with a value of [worth]." + return + name = "poker chips" + desc = "Some poker chips with a value of [worth]." + var/sum = worth + var/list/chip_overlays = list() + for (var/chip_worth in chip_worths) + for (var/i = 1 to 5) + if (sum < chip_worth) + break + sum -= chip_worth + var/image/chip_overlay = image('icons/obj/poker.dmi', "chip[i]") + var/matrix/chip_transform = matrix() + chip_transform.Translate(rand(-3, 3), rand(-4, 4)) + chip_transform.Turn(pick(-45, -27.5, 0, 0, 0, 0, 0, 0, 0, 27.5, 45)) + chip_overlay.transform = chip_transform + chip_overlays += chip_overlay + if (!length(chip_overlays)) + chip_overlays += "chip1" + add_overlay(chip_overlays) + + +/obj/item/poker_chip/attack_self(mob/living/user) + user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) + if (user.a_intent != I_HELP) + user.visible_message( + SPAN_ITALIC("\The [user] kisses \the [src] for luck!"), + SPAN_ITALIC("You kiss \the [src] for luck!"), + range = 5 + ) + return + RemoveChip(user) + + +/obj/item/poker_chip/MouseDrop(mob/living/user) + if (user != usr || !istype(user, /mob/living/carbon/human)) + return + var/mob/living/carbon/human/human = user + if (!Adjacent(human)) + return + if (human.stat || human.restrained()) + to_chat(user, SPAN_WARNING("You're in no condition to do that.")) + return + if (human.get_active_hand()) + to_chat(user, SPAN_WARNING("Your hand is occupied.")) + return + var/obj/item/organ/external/hand = human.organs_by_name[human.hand ? "l_hand" : "r_hand"] + if (!hand || !hand.is_usable()) + to_chat(user, SPAN_WARNING("Your hand is unusable.")) + return + RemoveChip(user) + + +/obj/item/poker_chip/proc/RemoveChip(mob/living/user) + var/biggest_index = 0 + for (var/i = 1 to length(chip_worths)) + if (worth > chip_worths[i]) + biggest_index = i + break + else if (worth == chip_worths[i]) + biggest_index = i + 1 + break + if (!biggest_index || biggest_index > length(chip_worths)) + return + var/list/available_chips = chip_worths.Copy(biggest_index) + var/amount = input(user, "Available Chips:") as null | anything in available_chips + if (QDELETED(src) || !(amount in available_chips) || !Adjacent(user)) + return + worth -= amount + update_icon() + var/obj/item/poker_chip/chip = new(user.loc, amount) + user.put_in_hands(chip) + user.visible_message( + SPAN_ITALIC("\The [user] picks up a poker chip."), + SPAN_ITALIC("You pick up a poker chip worth [amount]."), + SPAN_ITALIC("You hear the click of plastic on plastic."), + range = 5 + ) + + +/obj/item/poker_chip/c1 + icon_state = "chip1" + worth = 1 + + +/obj/item/poker_chip/c2 + icon_state = "chip2" + worth = 2 + + +/obj/item/poker_chip/c5 + icon_state = "chip5" + worth = 5 + + +/obj/item/poker_chip/c10 + icon_state = "chip10" + worth = 10 + + +/obj/item/poker_chip/c20 + icon_state = "chip20" + worth = 20 + + +/obj/item/poker_chip/c50 + icon_state = "chip50" + worth = 50 + + +/obj/item/poker_chip/c100 + icon_state = "chip100" + worth = 100 + + +/obj/item/poker_chip/c200 + icon_state = "chip200" + worth = 200 + + +/obj/item/poker_chip/c500 + icon_state = "chip500" + worth = 500 + + +/obj/item/poker_chip/c1000 + icon_state = "chip1000" + worth = 1000 + + +/obj/item/poker_chip/c2000 + icon_state = "chip2000" + worth = 2000 + + +/obj/item/poker_chip/c5000 + icon_state = "chip5000" + worth = 5000 diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 329dd9d1a6..7fde234979 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -444,6 +444,13 @@ icon_state = "mousetraps" starts_with = list(/obj/item/assembly/mousetrap = 7) +/obj/item/storage/box/poker_chips + name = "box of poker chips" + desc = "This box contains playing chips." + icon = 'icons/obj/storage.dmi' + icon_state = "poker_chips" + starts_with = list(/obj/item/poker_chip/c5000 = 7) + /obj/item/storage/box/pillbottles name = "box of pill bottles" desc = "It has pictures of pill bottles on its front." diff --git a/code/modules/materials/materials/plastic.dm b/code/modules/materials/materials/plastic.dm index 9d077103a9..e92a19e74c 100644 --- a/code/modules/materials/materials/plastic.dm +++ b/code/modules/materials/materials/plastic.dm @@ -30,7 +30,8 @@ new /datum/stack_recipe("lampshade", /obj/item/lampshade, 1, time = 1, pass_stack_color = TRUE, recycle_material = "[name]"), new /datum/stack_recipe("plastic net", /obj/item/material/fishing_net, 25, time = 1 MINUTE, pass_stack_color = TRUE, recycle_material = "[name]"), new /datum/stack_recipe("plastic fishtank", /obj/item/glass_jar/fish/plastic, 2, time = 30 SECONDS, recycle_material = "[name]"), - new /datum/stack_recipe("reagent tubing", /obj/item/stack/hose, 1, 4, 20, pass_stack_color = TRUE, recycle_material = "[name]") + new /datum/stack_recipe("reagent tubing", /obj/item/stack/hose, 1, 4, 20, pass_stack_color = TRUE, recycle_material = "[name]"), + new /datum/stack_recipe("playing chip", /obj/item/poker_chip/c100, 1, 100, 20, pass_stack_color = TRUE, recycle_material = "[name]") ) /datum/material/cardboard diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi old mode 100644 new mode 100755 diff --git a/icons/obj/poker.dmi b/icons/obj/poker.dmi new file mode 100644 index 0000000000..0627934833 Binary files /dev/null and b/icons/obj/poker.dmi differ diff --git a/icons/obj/storage.dmi b/icons/obj/storage.dmi index e6ed4fc334..28155f9773 100644 Binary files a/icons/obj/storage.dmi and b/icons/obj/storage.dmi differ diff --git a/maps/cynosure/cynosure-2.dmm b/maps/cynosure/cynosure-2.dmm index 0e725a49fd..f6c6bbdb58 100644 --- a/maps/cynosure/cynosure-2.dmm +++ b/maps/cynosure/cynosure-2.dmm @@ -1,4 +1,70 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"aaa" = ( +/obj/structure/cable{ + d1 = 2; + d2 = 8; + icon_state = "2-8" + }, +/obj/machinery/atmospherics/pipe/simple/hidden/supply{ + dir = 10 + }, +/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ + dir = 10 + }, +/obj/machinery/navbeacon/patrol{ + location = "SEC"; + next_patrol = "NH1" + }, +/obj/effect/floor_decal/steeldecal/steel_decals_central2, +/obj/effect/floor_decal/steeldecal/steel_decals_central6, +/obj/item/radio/beacon, +/mob/living/bot/secbot/beepsky, +/turf/simulated/floor/tiled/monotile, +/area/surface/station/hallway/primary/groundfloor/north) +"aab" = ( +/obj/structure/table/woodentable, +/obj/item/deck/cah{ + pixel_x = -3; + pixel_y = 3 + }, +/obj/item/deck/cah/black{ + pixel_x = -4; + pixel_y = 6 + }, +/turf/simulated/floor/carpet, +/area/surface/station/library) +"aac" = ( +/obj/structure/table/woodentable, +/obj/item/dice, +/turf/simulated/floor/carpet, +/area/surface/station/library) +"aad" = ( +/obj/structure/cable/green{ + d2 = 4; + icon_state = "0-4" + }, +/obj/machinery/power/apc{ + dir = 1; + name = "north bump"; + pixel_y = 24 + }, +/obj/machinery/light_switch{ + pixel_x = 12; + pixel_y = 24 + }, +/obj/machinery/atmospherics/pipe/simple/hidden/supply{ + dir = 4 + }, +/obj/item/clothing/suit/storage, +/turf/simulated/floor/carpet, +/area/surface/station/library) +"aae" = ( +/obj/structure/table/woodentable, +/obj/item/storage/box/poker_chips, +/obj/item/dice/d20, +/obj/item/deck/cards, +/turf/simulated/floor/carpet, +/area/surface/station/library) "aaT" = ( /obj/machinery/atmospherics/unary/vent_pump/on, /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ @@ -4180,18 +4246,6 @@ /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, /turf/simulated/floor/tiled/monotile, /area/surface/station/hallway/primary/groundfloor/east) -"bTe" = ( -/obj/structure/table/woodentable, -/obj/item/deck/cah{ - pixel_x = -3; - pixel_y = 3 - }, -/obj/item/deck/cah/black{ - pixel_x = -4; - pixel_y = 6 - }, -/turf/simulated/floor/carpet, -/area/surface/station/library) "bUi" = ( /obj/machinery/atmospherics/unary/vent_scrubber/on{ dir = 4 @@ -13313,7 +13367,7 @@ input_tag = "o2_in"; name = "Oxygen Tank Control"; output_tag = "o2_out"; - sensors = list("o2_sensor"="Tank") + sensors = list("o2_sensor" = "Tank") }, /obj/effect/floor_decal/borderfloor, /obj/effect/floor_decal/corner/blue/border, @@ -14320,12 +14374,6 @@ }, /turf/simulated/floor/tiled/neutral, /area/surface/station/rnd/research_lockerroom) -"gvo" = ( -/obj/structure/table/woodentable, -/obj/item/dice/d20, -/obj/item/deck/cards, -/turf/simulated/floor/carpet, -/area/surface/station/library) "gvD" = ( /obj/machinery/door/firedoor/border_only, /obj/effect/decal/cleanable/dirt, @@ -16977,10 +17025,6 @@ }, /turf/simulated/floor/tiled, /area/surface/station/hallway/primary/groundfloor/north) -"hEZ" = ( -/obj/machinery/mech_recharger, -/turf/simulated/floor/tiled/dark, -/area/surface/station/garage) "hFe" = ( /obj/effect/floor_decal/industrial/warning, /turf/simulated/floor/plating, @@ -37739,25 +37783,6 @@ /obj/machinery/light, /turf/simulated/floor/tiled, /area/surface/station/engineering/hallway/reactor) -"qCT" = ( -/obj/structure/cable/green{ - d2 = 4; - icon_state = "0-4" - }, -/obj/machinery/power/apc{ - dir = 1; - name = "north bump"; - pixel_y = 24 - }, -/obj/machinery/light_switch{ - pixel_x = 12; - pixel_y = 24 - }, -/obj/machinery/atmospherics/pipe/simple/hidden/supply{ - dir = 4 - }, -/turf/simulated/floor/carpet, -/area/surface/station/library) "qCU" = ( /obj/machinery/mech_recharger, /turf/simulated/floor/tiled/dark, @@ -37948,7 +37973,7 @@ input_tag = "n2_in"; name = "Nitrogen Tank Control"; output_tag = "n2_out"; - sensors = list("n2_sensor"="Tank") + sensors = list("n2_sensor" = "Tank") }, /obj/effect/floor_decal/borderfloor, /obj/effect/floor_decal/corner/red/border, @@ -38976,7 +39001,7 @@ input_tag = "waste_in"; name = "Gas Mix Tank Control"; output_tag = "waste_out"; - sensors = list("waste_sensor"="Tank") + sensors = list("waste_sensor" = "Tank") }, /turf/simulated/floor/tiled, /area/surface/station/engineering/atmos) @@ -39507,28 +39532,6 @@ /obj/effect/floor_decal/steeldecal/steel_decals4, /turf/simulated/floor/tiled/white, /area/surface/station/rnd/hallway/stairwell) -"rnZ" = ( -/obj/structure/cable{ - d1 = 2; - d2 = 8; - icon_state = "2-8" - }, -/obj/machinery/atmospherics/pipe/simple/hidden/supply{ - dir = 10 - }, -/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ - dir = 10 - }, -/obj/machinery/navbeacon/patrol{ - location = "SEC"; - next_patrol = "NH1" - }, -/obj/effect/floor_decal/steeldecal/steel_decals_central2, -/obj/effect/floor_decal/steeldecal/steel_decals_central6, -/mob/living/bot/secbot/beepsky, -/obj/item/radio/beacon, -/turf/simulated/floor/tiled/monotile, -/area/surface/station/hallway/primary/groundfloor/north) "roh" = ( /obj/structure/cable/yellow{ d2 = 8; @@ -41772,7 +41775,7 @@ name = "Air Tank Control"; output_tag = "air_out"; pressure_setting = 2000; - sensors = list("air_sensor"="Tank") + sensors = list("air_sensor" = "Tank") }, /turf/simulated/floor/tiled, /area/surface/station/engineering/atmos) @@ -45069,7 +45072,7 @@ input_tag = "co2_in"; name = "Carbon Dioxide Supply Control"; output_tag = "co2_out"; - sensors = list("co2_sensor"="Tank") + sensors = list("co2_sensor" = "Tank") }, /obj/effect/floor_decal/borderfloor{ dir = 4 @@ -47312,7 +47315,7 @@ input_tag = "tox_in"; name = "Phoron Supply Control"; output_tag = "tox_out"; - sensors = list("tox_sensor"="Tank") + sensors = list("tox_sensor" = "Tank") }, /obj/effect/floor_decal/borderfloor{ dir = 4 @@ -48371,11 +48374,6 @@ /obj/effect/floor_decal/corner/paleblue/border, /turf/simulated/floor/tiled/white, /area/surface/station/medical/storage/primary_storage) -"vvm" = ( -/obj/structure/table/woodentable, -/obj/item/dice, -/turf/simulated/floor/carpet, -/area/surface/station/library) "vvG" = ( /obj/machinery/door/firedoor/border_only, /obj/structure/grille, @@ -49813,7 +49811,7 @@ input_tag = "n2o_in"; name = "Nitrous Oxide Supply Control"; output_tag = "n2o_out"; - sensors = list("n2o_sensor"="Tank") + sensors = list("n2o_sensor" = "Tank") }, /obj/effect/floor_decal/borderfloor{ dir = 4 @@ -82586,8 +82584,8 @@ iph lpm oEj vrU -bTe -gvo +aab +aae pHY vHV vag @@ -82843,7 +82841,7 @@ tum orw jkH vrU -vvm +aac nsO pHY vHV @@ -83099,7 +83097,7 @@ ivt wlI aUr lWA -qCT +aad qwH qwH bUi @@ -84326,7 +84324,7 @@ iaO mjO uBH mtC -hEZ +qCU aVg dyx sYc @@ -90505,7 +90503,7 @@ wRI nFp nFp igv -rnZ +aaa cEE fAE gJI diff --git a/polaris.dme b/polaris.dme index e907bfe702..9345afb8a4 100644 --- a/polaris.dme +++ b/polaris.dme @@ -1046,6 +1046,7 @@ #include "code\game\objects\items\stacks\tiles\tile_types.dm" #include "code\game\objects\items\toys\godfigures.dm" #include "code\game\objects\items\toys\mech_toys.dm" +#include "code\game\objects\items\toys\poker_chips.dm" #include "code\game\objects\items\toys\toys.dm" #include "code\game\objects\items\weapons\AI_modules.dm" #include "code\game\objects\items\weapons\augment_items.dm"