mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Arcade Prize Counter
This commit is contained in:
@@ -6,41 +6,7 @@
|
||||
icon_keyboard = null
|
||||
icon_screen = "invaders"
|
||||
light_color = "#00FF00"
|
||||
|
||||
var/list/prizes = list( /obj/item/weapon/storage/box/snappops = 2,
|
||||
/obj/item/toy/AI = 2,
|
||||
/obj/item/clothing/under/syndicate/tacticool = 2,
|
||||
/obj/item/toy/blink = 2,
|
||||
/obj/item/weapon/storage/box/fakesyndiesuit = 2,
|
||||
/obj/item/toy/sword = 2,
|
||||
/obj/item/weapon/gun/projectile/revolver/capgun = 2,
|
||||
/obj/item/toy/crossbow = 2,
|
||||
/obj/item/weapon/storage/fancy/crayons = 2,
|
||||
/obj/item/toy/spinningtoy = 2,
|
||||
/obj/item/toy/crossbow/tommygun = 2,
|
||||
/obj/random/mech = 5,
|
||||
/obj/item/toy/nuke = 2,
|
||||
/obj/item/toy/cards/deck = 2,
|
||||
/obj/random/carp_plushie = 2,
|
||||
/obj/item/toy/minimeteor = 2,
|
||||
/obj/item/toy/redbutton = 2,
|
||||
/obj/item/toy/owl = 2,
|
||||
/obj/item/toy/griffin = 2,
|
||||
/obj/item/clothing/head/blob = 2,
|
||||
/obj/item/weapon/id_decal/gold = 2,
|
||||
/obj/item/weapon/id_decal/silver = 2,
|
||||
/obj/item/weapon/id_decal/prisoner = 2,
|
||||
/obj/item/weapon/id_decal/centcom = 2,
|
||||
/obj/item/weapon/id_decal/emag = 2,
|
||||
/obj/item/weapon/spellbook/oneuse/fake_gib = 2,
|
||||
/obj/item/toy/foamblade = 2,
|
||||
/obj/item/toy/flash = 2,
|
||||
/obj/item/toy/minigibber = 2,
|
||||
/obj/item/toy/toy_xeno = 2,
|
||||
/obj/random/figure = 16,
|
||||
/obj/random/plushie = 7,
|
||||
/obj/item/stack/tile/fakespace/loaded = 2,
|
||||
)
|
||||
var/prize = /obj/item/stack/tickets
|
||||
|
||||
/obj/machinery/computer/arcade/power_change()
|
||||
..()
|
||||
@@ -56,28 +22,22 @@
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/machinery/computer/arcade/proc/prizevend()
|
||||
/obj/machinery/computer/arcade/proc/prizevend(var/score)
|
||||
if(!contents.len)
|
||||
var/prizeselect = pickweight(prizes)
|
||||
new prizeselect(src.loc)
|
||||
|
||||
if(istype(prizeselect, /obj/item/weapon/gun/projectile/revolver/capgun)) //Ammo comes with the gun
|
||||
new /obj/item/ammo_box/caps(src.loc)
|
||||
|
||||
else if(istype(prizeselect, /obj/item/clothing/suit/syndicatefake)) //Helmet is part of the suit
|
||||
new /obj/item/clothing/head/syndicatefake(src.loc)
|
||||
|
||||
var/prize_amount
|
||||
if(score)
|
||||
prize_amount = score
|
||||
else
|
||||
prize_amount = rand(1, 10)
|
||||
new prize(src.loc, prize_amount)
|
||||
else
|
||||
var/atom/movable/prize = pick(contents)
|
||||
prize.loc = src.loc
|
||||
|
||||
/obj/machinery/computer/arcade/emp_act(severity)
|
||||
..(severity)
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
var/empprize = null
|
||||
var/num_of_prizes = 0
|
||||
switch(severity)
|
||||
if(1)
|
||||
@@ -85,8 +45,7 @@
|
||||
if(2)
|
||||
num_of_prizes = rand(0,2)
|
||||
for(var/i = num_of_prizes; i > 0; i--)
|
||||
empprize = pickweight(prizes)
|
||||
new empprize(src.loc)
|
||||
prizevend()
|
||||
explosion(src.loc, -1, 0, 1+num_of_prizes, flame_range = 1+num_of_prizes)
|
||||
|
||||
|
||||
@@ -231,7 +190,8 @@
|
||||
emagged = 0
|
||||
else
|
||||
feedback_inc("arcade_win_normal")
|
||||
prizevend()
|
||||
var/score = src.player_hp + player_mp + 5
|
||||
prizevend(score)
|
||||
|
||||
else if (emagged && (turtle >= 4))
|
||||
var/boomamt = rand(5,10)
|
||||
@@ -988,7 +948,8 @@
|
||||
message_admins("[key_name_admin(usr)] made it to Orion on an emagged machine and got an explosive toy ship.")
|
||||
log_game("[key_name(usr)] made it to Orion on an emagged machine and got an explosive toy ship.")
|
||||
else
|
||||
prizevend()
|
||||
var/score = alive + round(food/2) + round(fuel/5) + engine + hull + electronics - lings_aboard
|
||||
prizevend(score)
|
||||
emagged = 0
|
||||
name = "The Orion Trail"
|
||||
desc = "Learn how our ancestors got to Orion, and have fun in the process!"
|
||||
|
||||
@@ -844,7 +844,18 @@ obj/item/weapon/circuitboard/rdserver
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=2"
|
||||
req_components = list(
|
||||
/obj/item/weapon/stock_parts.matter_bin = 1,
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/prize_counter
|
||||
name = "circuit board (Prize Counter)"
|
||||
build_path = /obj/machinery/prize_counter
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=2;materials=2"
|
||||
req_components = list(
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1,
|
||||
/obj/item/stack/cable_coil = 1)
|
||||
@@ -200,7 +200,9 @@
|
||||
return
|
||||
else if (bullets == 0)
|
||||
user.Weaken(5)
|
||||
user.visible_message("<span class='danger'>[] realized they were out of ammo and started scrounging for some!</span>")
|
||||
user.visible_message("<span class='danger'>[] realized they were out of ammo and starting scrounging for some!</span>")
|
||||
|
||||
|
||||
|
||||
/obj/item/toy/crossbow/attack(mob/M as mob, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
@@ -277,27 +279,27 @@
|
||||
flags = NOSHIELD
|
||||
attack_verb = list("attacked", "struck", "hit")
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
src.active = !( src.active )
|
||||
if (src.active)
|
||||
user << "\blue You extend the plastic blade with a quick flick of your wrist."
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
|
||||
src.icon_state = "swordblue"
|
||||
src.item_state = "swordblue"
|
||||
src.w_class = 4
|
||||
else
|
||||
user << "\blue You push the plastic blade back down into the handle."
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
|
||||
src.icon_state = "sword0"
|
||||
src.item_state = "sword0"
|
||||
src.w_class = 2
|
||||
/obj/item/toy/sword/attack_self(mob/user as mob)
|
||||
src.active = !( src.active )
|
||||
if (src.active)
|
||||
user << "\blue You extend the plastic blade with a quick flick of your wrist."
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
|
||||
src.icon_state = "swordblue"
|
||||
src.item_state = "swordblue"
|
||||
src.w_class = 4
|
||||
else
|
||||
user << "\blue You push the plastic blade back down into the handle."
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
|
||||
src.icon_state = "sword0"
|
||||
src.item_state = "sword0"
|
||||
src.w_class = 2
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_l_hand()
|
||||
H.update_inv_r_hand()
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_l_hand()
|
||||
H.update_inv_r_hand()
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
// Copied from /obj/item/weapon/melee/energy/sword/attackby
|
||||
/obj/item/toy/sword/attackby(obj/item/weapon/W, mob/living/user, params)
|
||||
@@ -372,21 +374,15 @@
|
||||
w_class = 1
|
||||
|
||||
|
||||
throw_impact(atom/hit_atom)
|
||||
..()
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
new /obj/effect/decal/cleanable/ash(src.loc)
|
||||
src.visible_message("\red The [src.name] explodes!","\red You hear a bang!")
|
||||
|
||||
|
||||
playsound(src, 'sound/effects/snap.ogg', 50, 1)
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/toy/snappop/virus/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
new /obj/effect/decal/cleanable/ash(src.loc)
|
||||
src.visible_message("\red The [src.name] explodes!","\red You hear a bang!")
|
||||
playsound(src, 'sound/effects/snap.ogg', 50, 1)
|
||||
qdel(src)
|
||||
|
||||
/*
|
||||
* Snap pops
|
||||
@@ -427,13 +423,13 @@
|
||||
/*
|
||||
* Mech prizes
|
||||
*/
|
||||
/obj/item/toy/mech
|
||||
/obj/item/toy/prize
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "ripleytoy"
|
||||
var/cooldown = 0
|
||||
|
||||
//all credit to skasi for toy mech fun ideas
|
||||
/obj/item/toy/mech/attack_self(mob/user as mob)
|
||||
/obj/item/toy/prize/attack_self(mob/user as mob)
|
||||
if(cooldown < world.time - 8)
|
||||
user << "<span class='notice'>You play with [src].</span>"
|
||||
playsound(user, 'sound/mecha/mechstep.ogg', 20, 1)
|
||||
@@ -457,37 +453,37 @@
|
||||
/obj/random/mech/item_to_spawn()
|
||||
return pick(subtypesof(/obj/item/toy/prize)) //exclude the base type.
|
||||
|
||||
/obj/item/toy/mech/ripley
|
||||
/obj/item/toy/prize/ripley
|
||||
name = "toy ripley"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 1/11."
|
||||
|
||||
/obj/item/toy/mech/fireripley
|
||||
/obj/item/toy/prize/fireripley
|
||||
name = "toy firefighting ripley"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 2/11."
|
||||
icon_state = "fireripleytoy"
|
||||
|
||||
/obj/item/toy/mech/deathripley
|
||||
/obj/item/toy/prize/deathripley
|
||||
name = "toy deathsquad ripley"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 3/11."
|
||||
icon_state = "deathripleytoy"
|
||||
|
||||
/obj/item/toy/mech/gygax
|
||||
/obj/item/toy/prize/gygax
|
||||
name = "toy gygax"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 4/11."
|
||||
icon_state = "gygaxtoy"
|
||||
|
||||
|
||||
/obj/item/toy/mech/durand
|
||||
/obj/item/toy/prize/durand
|
||||
name = "toy durand"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 5/11."
|
||||
icon_state = "durandprize"
|
||||
|
||||
/obj/item/toy/mech/honk
|
||||
/obj/item/toy/prize/honk
|
||||
name = "toy H.O.N.K."
|
||||
desc = "Mini-Mecha action figure! Collect them all! 6/11."
|
||||
icon_state = "honkprize"
|
||||
|
||||
/obj/item/toy/mech/marauder
|
||||
/obj/item/toy/prize/marauder
|
||||
name = "toy marauder"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 7/11."
|
||||
icon_state = "marauderprize"
|
||||
@@ -497,17 +493,17 @@
|
||||
desc = "Mini-Mecha action figure! Collect them all! 8/11."
|
||||
icon_state = "seraphprize"
|
||||
|
||||
/obj/item/toy/mech/mauler
|
||||
/obj/item/toy/prize/mauler
|
||||
name = "toy mauler"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 9/11."
|
||||
icon_state = "maulerprize"
|
||||
|
||||
/obj/item/toy/mech/odysseus
|
||||
/obj/item/toy/prize/odysseus
|
||||
name = "toy odysseus"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 10/11."
|
||||
icon_state = "odysseusprize"
|
||||
|
||||
/obj/item/toy/mech/phazon
|
||||
/obj/item/toy/prize/phazon
|
||||
name = "toy phazon"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 11/11."
|
||||
icon_state = "phazonprize"
|
||||
@@ -924,44 +920,55 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
/obj/item/toy/therapy
|
||||
name = "therapy doll"
|
||||
desc = "A toy for therapeutic and recreational purposes."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "therapyred"
|
||||
item_state = "egg4" // It's the red egg in items_left/righthand
|
||||
item_state = "egg4"
|
||||
w_class = 1
|
||||
item_color = "red"
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/toy/therapy/New()
|
||||
..()
|
||||
icon_state = "therapy[item_color]"
|
||||
UpdateDesc()
|
||||
if(item_color)
|
||||
name = "[item_color] therapy doll"
|
||||
desc += " This one is [item_color]."
|
||||
icon_state = "therapy[item_color]"
|
||||
|
||||
/obj/item/toy/therapy/proc/UpdateDesc()
|
||||
name = "[item_color] therapy doll"
|
||||
desc += " This one is [item_color]."
|
||||
/obj/item/toy/therapy/attack_self(mob/user)
|
||||
if(cooldown < world.time - 8)
|
||||
user << "<span class='notice'>You relieve some stress with /the [src].</span>"
|
||||
playsound(user, 'sound/items/squeaktoy.ogg', 20, 1)
|
||||
cooldown = world.time
|
||||
|
||||
/obj/random/therapy
|
||||
name = "Random Therapy Doll"
|
||||
desc = "This is a random therapy doll."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "therapyred"
|
||||
|
||||
/obj/random/prize/item_to_spawn()
|
||||
return pick(subtypesof(/obj/item/toy/therapy)) //exclude the base type.
|
||||
|
||||
/obj/item/toy/therapy/red
|
||||
item_color = "red"
|
||||
item_state = "egg4" // It's the red egg in items_left/righthand
|
||||
item_color = "red"
|
||||
|
||||
/obj/item/toy/therapy/purple
|
||||
item_color = "purple"
|
||||
item_state = "egg1" // It's the magenta egg in items_left/righthand
|
||||
item_color = "purple"
|
||||
|
||||
/obj/item/toy/therapy/blue
|
||||
item_color = "blue"
|
||||
item_state = "egg2" // It's the blue egg in items_left/righthand
|
||||
item_color = "blue"
|
||||
|
||||
/obj/item/toy/therapy/yellow
|
||||
item_color = "yellow"
|
||||
item_state = "egg5" // It's the yellow egg in items_left/righthand
|
||||
item_color = "yellow"
|
||||
|
||||
/obj/item/toy/therapy/orange
|
||||
item_color = "orange"
|
||||
item_state = "egg4" // It's the red one again, lacking an orange item_state and making a new one is pointless
|
||||
item_color = "orange"
|
||||
|
||||
/obj/item/toy/therapy/green
|
||||
item_color = "green"
|
||||
item_state = "egg3" // It's the green egg in items_left/righthand
|
||||
item_color = "green"
|
||||
|
||||
/obj/item/weapon/toddler
|
||||
icon_state = "toddler"
|
||||
|
||||
@@ -148,4 +148,11 @@
|
||||
. = 0
|
||||
|
||||
else
|
||||
. = 1
|
||||
. = 1
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/handle_rotation()
|
||||
overlays = null
|
||||
var/image/O = image(icon = 'icons/vehicles/motorcycle.dmi', icon_state = "motorcycle_overlay_4d", layer = FLY_LAYER, dir = src.dir)
|
||||
overlays += O
|
||||
if(buckled_mob)
|
||||
buckled_mob.dir = dir
|
||||
@@ -25,7 +25,7 @@
|
||||
var/prize_inside = pick(possible_contents)
|
||||
spawn(10)
|
||||
user.unEquip(src)
|
||||
if(istype(/obj/item/stack))
|
||||
if(istype(prize_inside, /obj/item/stack))
|
||||
var/amount = pick(5, 10, 15, 25, 50)
|
||||
new prize_inside(user.loc, amount)
|
||||
else
|
||||
@@ -55,7 +55,7 @@
|
||||
/obj/item/toy/prizeball/therapy
|
||||
name = "therapy doll capsule"
|
||||
desc = "Contains one squishy therapy doll."
|
||||
possible_contents = subtypesof(/obj/item/toy/therapy)
|
||||
possible_contents = list(/obj/random/therapy)
|
||||
|
||||
/obj/item/stack/tickets
|
||||
name = "prize ticket"
|
||||
@@ -64,7 +64,7 @@
|
||||
icon = 'icons/obj/arcade.dmi'
|
||||
icon_state = "tickets_1"
|
||||
force = 1
|
||||
throw_force = 1
|
||||
throwforce = 1
|
||||
throw_speed = 1
|
||||
throw_range = 1
|
||||
w_class = 1.0
|
||||
|
||||
@@ -25,38 +25,16 @@
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/B in component_parts)
|
||||
prize_tier = B.rating
|
||||
|
||||
/obj/machinery/prize_counter/proc/UpdateListings()
|
||||
var/dat = ""
|
||||
for(var/datum/prize_item/item in global_prizes.prizes)
|
||||
var/cost_class="affordable"
|
||||
if(item.cost>tickets)
|
||||
cost_class="toomuch"
|
||||
var/itemID = global_prizes.prizes.Find(item)
|
||||
dat += {"
|
||||
<tr>
|
||||
<th>
|
||||
[itemID]
|
||||
</th>
|
||||
<td>
|
||||
<p><b>[item.name]</b></p>
|
||||
<p>[item.desc]</p>
|
||||
</td>
|
||||
"}
|
||||
if(prize_tier >= item.tier_unlocked)
|
||||
dat += {"
|
||||
<td class="cost [cost_class]">
|
||||
<a href="byond://?src=\ref[src];buy=[itemID]">[item.cost] Tickets</a>
|
||||
</td>
|
||||
</tr>
|
||||
"}
|
||||
else
|
||||
dat += {"
|
||||
<td>
|
||||
LOCKED.
|
||||
</td>
|
||||
</tr>
|
||||
"}
|
||||
return dat
|
||||
/obj/machinery/prize_counter/update_icon()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "prize_counter-broken"
|
||||
else if(panel_open)
|
||||
icon_state = "prize_counter-open"
|
||||
else if(stat & NOPOWER)
|
||||
icon_state = "prize_counter-off"
|
||||
else
|
||||
icon_state = "prize_counter-on"
|
||||
return
|
||||
|
||||
/obj/machinery/prize_counter/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(istype(O, /obj/item/stack/tickets))
|
||||
@@ -74,16 +52,18 @@
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
default_unfasten_wrench(user, O)
|
||||
if(component_parts && istype(O, /obj/item/weapon/crowbar))
|
||||
if(tickets) //save the tickets!
|
||||
print_tickets()
|
||||
default_deconstruction_crowbar(O)
|
||||
|
||||
/obj/machinery/prize_counter/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
add_fingerprint(user)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/prize_counter/interact(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
@@ -152,7 +132,37 @@ td.cost.toomuch {
|
||||
</thead>
|
||||
<tbody>
|
||||
"}
|
||||
dat += UpdateListings()
|
||||
|
||||
for(var/datum/prize_item/item in global_prizes.prizes)
|
||||
var/cost_class="affordable"
|
||||
if(item.cost>tickets)
|
||||
cost_class="toomuch"
|
||||
var/itemID = global_prizes.prizes.Find(item)
|
||||
dat += {"
|
||||
<tr>
|
||||
<th>
|
||||
[itemID]
|
||||
</th>
|
||||
<td>
|
||||
<p><b>[item.name]</b></p>
|
||||
<p>[item.desc]</p>
|
||||
</td>
|
||||
"}
|
||||
if(prize_tier >= item.tier_unlocked)
|
||||
dat += {"
|
||||
<td class="cost [cost_class]">
|
||||
<a href="byond://?src=\ref[src];buy=[itemID]">[item.cost] Tickets</a>
|
||||
</td>
|
||||
</tr>
|
||||
"}
|
||||
else
|
||||
dat += {"
|
||||
<td>
|
||||
LOCKED.
|
||||
</td>
|
||||
</tr>
|
||||
"}
|
||||
|
||||
dat += {"
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -169,7 +179,7 @@ td.cost.toomuch {
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
if(href_list["eject"])
|
||||
print_tickets
|
||||
print_tickets()
|
||||
|
||||
if (href_list["buy"])
|
||||
var/itemID = text2num(href_list["buy"])
|
||||
@@ -183,7 +193,7 @@ td.cost.toomuch {
|
||||
else
|
||||
usr << "<span class='notice'>You've successfully purchased the item.</span>"
|
||||
|
||||
src.updateUsrDialog()
|
||||
interact(usr)
|
||||
return
|
||||
|
||||
/obj/machinery/prize_counter/proc/print_tickets()
|
||||
@@ -194,4 +204,5 @@ td.cost.toomuch {
|
||||
tickets -= 9999
|
||||
print_tickets()
|
||||
else
|
||||
new /obj/item/stack/tickets(src.loc, tickets)
|
||||
new /obj/item/stack/tickets(src.loc, tickets)
|
||||
tickets = 0
|
||||
@@ -15,7 +15,7 @@ var/global/datum/prizes/global_prizes = new
|
||||
if(!item)
|
||||
return 0
|
||||
if(prize_counter.tickets >= item.cost)
|
||||
item.deliver(prize_counter)
|
||||
new item.typepath(prize_counter.loc)
|
||||
prize_counter.visible_message("<span class='notice'>Enjoy your prize!</span>")
|
||||
return 1
|
||||
else
|
||||
@@ -23,7 +23,7 @@ var/global/datum/prizes/global_prizes = new
|
||||
return 0
|
||||
|
||||
//////////////////////////////////////
|
||||
// /datum/prize_item //
|
||||
// prize_item datum //
|
||||
//////////////////////////////////////
|
||||
|
||||
/datum/prize_item
|
||||
@@ -33,9 +33,6 @@ var/global/datum/prizes/global_prizes = new
|
||||
var/cost = 0
|
||||
var/tier_unlocked = 0 //minimum tier needed to unlock the ability to select this prize
|
||||
|
||||
/datum/prize_item/proc/deliver(var/obj/machinery/prize_counter/P_C)
|
||||
var/thing = new typepath(P_C.loc)
|
||||
|
||||
//////////////////////////////////////
|
||||
// Tier 1 Prizes //
|
||||
//////////////////////////////////////
|
||||
@@ -54,7 +51,7 @@ var/global/datum/prizes/global_prizes = new
|
||||
cost = 35
|
||||
tier_unlocked = 1
|
||||
|
||||
/datum/prize_item/snap-pops
|
||||
/datum/prize_item/snappops
|
||||
name = "Snap-Pops"
|
||||
desc = "A box of exploding snap-pop fireworks."
|
||||
typepath = /obj/item/weapon/storage/box/snappops
|
||||
@@ -85,7 +82,7 @@ var/global/datum/prizes/global_prizes = new
|
||||
/datum/prize_item/cards
|
||||
name = "Deck of cards"
|
||||
desc = "Anyone fancy a game of 52-card Pickup?"
|
||||
typepath = obj/item/toy/cards/deck
|
||||
typepath = /obj/item/toy/cards/deck
|
||||
cost = 25
|
||||
tier_unlocked = 1
|
||||
|
||||
@@ -134,10 +131,10 @@ var/global/datum/prizes/global_prizes = new
|
||||
desc = "A sticker that can make any ID look like a golden ID."
|
||||
typepath = /obj/item/weapon/id_decal/gold
|
||||
|
||||
/datum/prize_item/id_sticker/centcomm
|
||||
/datum/prize_item/id_sticker/centcom
|
||||
name = "Centcomm ID Sticker"
|
||||
desc = "A sticker that can make any ID look like a Central Command ID."
|
||||
typepath = /obj/item/weapon/id_decal/centcomm
|
||||
typepath = /obj/item/weapon/id_decal/centcom
|
||||
|
||||
/datum/prize_item/id_sticker/emag
|
||||
name = "Suspicious ID Sticker"
|
||||
|
||||
@@ -490,4 +490,13 @@
|
||||
build_type = IMPRINTER
|
||||
materials = list(MAT_GLASS=1000, "sacid"=20)
|
||||
build_path = /obj/item/weapon/circuitboard/clawgame
|
||||
category = list ("Misc. Machinery")
|
||||
category = list ("Misc. Machinery")
|
||||
|
||||
/datum/design/prize_counter
|
||||
name = "Machine Design (Prize Counter)"
|
||||
desc = "The circuit board for an arcade Prize Counter."
|
||||
req_tech = list("programming" = 2, "materials" = 2)
|
||||
build_type = IMPRINTER
|
||||
materials = list(MAT_GLASS=1000, "sacid"=20)
|
||||
build_path = /obj/item/weapon/circuitboard/prize_counter
|
||||
category = list("Misc. Machinery")
|
||||
Reference in New Issue
Block a user