Donk Co. Toys

This commit is contained in:
Casey
2022-02-18 23:26:48 -05:00
committed by CHOMPStation2
parent a1f480932b
commit 3d6510f3ea
45 changed files with 967 additions and 287 deletions

View File

@@ -3,8 +3,6 @@
* Balloons
* Fake telebeacon
* Fake singularity
* Toy gun
* Toy crossbow
* Toy swords
* Toy bosun's whistle
* Snap pops
@@ -145,127 +143,6 @@
icon = 'icons/obj/singularity.dmi'
icon_state = "singularity_s1"
/*
* Toy crossbow
*/
/obj/item/toy/crossbow
name = "foam dart crossbow"
desc = "A weapon favored by many overactive children. Ages 8 and up."
icon = 'icons/obj/gun.dmi'
icon_state = "crossbow"
item_icons = list(
icon_l_hand = 'icons/mob/items/lefthand_guns.dmi',
icon_r_hand = 'icons/mob/items/righthand_guns.dmi',
)
slot_flags = SLOT_HOLSTER
w_class = ITEMSIZE_SMALL
attack_verb = list("attacked", "struck", "hit")
var/bullets = 5
drop_sound = 'sound/items/drop/gun.ogg'
/obj/item/toy/crossbow/examine(mob/user)
. = ..()
if(bullets && get_dist(user, src) <= 2)
. += "<span class='notice'>It is loaded with [bullets] foam darts!</span>"
/obj/item/toy/crossbow/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/toy/ammo/crossbow))
if(bullets <= 4)
user.drop_item()
qdel(I)
bullets++
to_chat(user, "<span class='notice'>You load the foam dart into the crossbow.</span>")
else
to_chat(usr, "<span class='warning'>It's already fully loaded.</span>")
/obj/item/toy/crossbow/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
if(!isturf(target.loc) || target == user) return
if(flag) return
if (locate (/obj/structure/table, src.loc))
return
else if (bullets)
var/turf/trg = get_turf(target)
var/obj/effect/foam_dart_dummy/D = new/obj/effect/foam_dart_dummy(get_turf(src))
bullets--
D.icon_state = "foamdart"
D.name = "foam dart"
playsound(src, 'sound/items/syringeproj.ogg', 50, 1)
for(var/i=0, i<6, i++)
if (D)
if(D.loc == trg) break
step_towards(D,trg)
for(var/mob/living/M in D.loc)
if(!istype(M,/mob/living)) continue
if(M == user) continue
for(var/mob/O in viewers(world.view, D))
O.show_message(text("<span class='warning'>\The [] was hit by the foam dart!</span>", M), 1)
new /obj/item/toy/ammo/crossbow(M.loc)
qdel(D)
return
for(var/atom/A in D.loc)
if(A == user) continue
if(A.density)
new /obj/item/toy/ammo/crossbow(A.loc)
qdel(D)
sleep(1)
spawn(10)
if(D)
new /obj/item/toy/ammo/crossbow(D.loc)
qdel(D)
return
else if (bullets == 0)
user.Weaken(5)
for(var/mob/O in viewers(world.view, user))
O.show_message(text("<span class='warning'>\The [] realized they were out of ammo and starting scrounging for some!</span>", user), 1)
/obj/item/toy/crossbow/attack(mob/M as mob, mob/user as mob)
src.add_fingerprint(user)
// ******* Check
if (src.bullets > 0 && M.lying)
for(var/mob/O in viewers(M, null))
if(O.client)
O.show_message(text("<span class='danger'>\The [] casually lines up a shot with []'s head and pulls the trigger!</span>", user, M), 1, "<span class='warning'>You hear the sound of foam against skull</span>", 2)
O.show_message(text("<span class='warning'>\The [] was hit in the head by the foam dart!</span>", M), 1)
playsound(src, 'sound/items/syringeproj.ogg', 50, 1)
new /obj/item/toy/ammo/crossbow(M.loc)
src.bullets--
else if (M.lying && src.bullets == 0)
for(var/mob/O in viewers(M, null))
if (O.client) O.show_message(text("<span class='danger'>\The [] casually lines up a shot with []'s head, pulls the trigger, then realizes they are out of ammo and drops to the floor in search of some!</span>", user, M), 1, "<span class='warning'>You hear someone fall</span>", 2)
user.Weaken(5)
return
/obj/item/toy/ammo/crossbow
name = "foam dart"
desc = "It's nerf or nothing! Ages 8 and up."
icon = 'icons/obj/toy.dmi'
icon_state = "foamdart"
w_class = ITEMSIZE_TINY
slot_flags = SLOT_EARS
drop_sound = 'sound/items/drop/food.ogg'
/obj/effect/foam_dart_dummy
name = ""
desc = ""
icon = 'icons/obj/toy.dmi'
icon_state = "null"
anchored = TRUE
density = FALSE
/*
* Toy swords
*/
@@ -394,7 +271,6 @@
/*
* Bosun's whistle
*/
/obj/item/toy/bosunwhistle
name = "bosun's whistle"
desc = "A genuine Admiral Krush Bosun's Whistle, for the aspiring ship's captain! Suitable for ages 8 and up, do not swallow."
@@ -1526,7 +1402,7 @@
name = "black king"
desc = "A black king chess piece."
description_info = "The King can move exactly one square horizontally, vertically, or diagonally. If your opponent captures this piece, you lose."
icon_state = "black_king"
icon_state = "black_king"
/// Balloon structures