mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-26 14:46:52 +01:00
Donk-Soft! (#8305)
* Initial port * Various fixes * Doomguy Costume Addition Halloween just around the corner, I wanted to add a costume that uses the new toy guns. * Merge conflict, fixes
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
* Fake telebeacon
|
||||
* Fake singularity
|
||||
* Toy gun
|
||||
* Toy crossbow
|
||||
* Toy swords
|
||||
* Toy bosun's whistle
|
||||
* Snap pops
|
||||
@@ -16,7 +15,7 @@
|
||||
* Plushies
|
||||
* Toy cult sword
|
||||
* Bouquets
|
||||
Stick Horse
|
||||
* Stick Horse
|
||||
*/
|
||||
|
||||
|
||||
@@ -145,127 +144,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 = 1
|
||||
density = 0
|
||||
|
||||
/*
|
||||
* Toy swords
|
||||
*/
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
/obj/item/weapon/beach_ball/holoball,
|
||||
/obj/item/toy/balloon,
|
||||
/obj/item/toy/blink,
|
||||
/obj/item/toy/crossbow,
|
||||
/obj/item/weapon/gun/projectile/revolver/toy/crossbow,
|
||||
/obj/item/weapon/gun/projectile/revolver/capgun,
|
||||
/obj/item/toy/katana,
|
||||
/obj/item/toy/mecha/deathripley,
|
||||
|
||||
@@ -453,4 +453,13 @@
|
||||
name = "ranger belt"
|
||||
desc = "The fancy utility-belt holding the tools, cuffs and gadgets of the Go Go ERT-Rangers. The belt buckle is not real phoron, but it is still surprisingly comfortable to wear."
|
||||
icon = 'icons/obj/clothing/ranger.dmi'
|
||||
icon_state = "ranger_belt"
|
||||
icon_state = "ranger_belt"
|
||||
|
||||
/obj/item/weapon/storage/belt/dbandolier
|
||||
name = "\improper Donk-Soft bandolier"
|
||||
desc = "A Donk-Soft bandolier! Carry your spare darts anywhere! Ages 8 and up."
|
||||
icon_state = "dbandolier"
|
||||
storage_slots = 8
|
||||
can_hold = list(
|
||||
/obj/item/ammo_casing/afoam_dart
|
||||
)
|
||||
@@ -551,3 +551,14 @@
|
||||
name = "ambrosia deus seeds box"
|
||||
desc = "Contains the seeds you need to get a proper healthy high."
|
||||
starts_with = list(/obj/item/seeds/ambrosiadeusseed = 7)
|
||||
|
||||
/obj/item/weapon/storage/box/foam_darts
|
||||
name = "\improper Donk-Soft ammo box"
|
||||
desc = "Contains Donk-Soft foam darts. It's Donk or Don't! Ages 8 and up."
|
||||
icon = 'icons/obj/gun_toy.dmi'
|
||||
icon_state = "foambox"
|
||||
starts_with = list(/obj/item/ammo_casing/afoam_dart = 15)
|
||||
max_w_class = ITEMSIZE_TINY
|
||||
max_storage_space = ITEMSIZE_COST_TINY * 15
|
||||
drop_sound = 'sound/items/drop/ammobox.ogg'
|
||||
pickup_sound = 'sound/items/pickup/ammobox.ogg'
|
||||
@@ -721,7 +721,7 @@
|
||||
/obj/item/toy/snappop,
|
||||
/obj/item/toy/sword,
|
||||
/obj/item/toy/balloon,
|
||||
/obj/item/toy/crossbow,
|
||||
/obj/item/weapon/gun/projectile/revolver/toy/crossbow,
|
||||
/obj/item/toy/blink,
|
||||
/obj/item/weapon/reagent_containers/spray/waterflower,
|
||||
/obj/item/toy/eight_ball,
|
||||
|
||||
@@ -58,6 +58,11 @@
|
||||
ME.attach(H)
|
||||
..()
|
||||
|
||||
/obj/structure/largecrate/donksoftvendor
|
||||
name = "\improper Donk-Soft vendor crate"
|
||||
desc = "A hefty wooden crate displaying the logo of Donk-Soft. It's rather heavy."
|
||||
starts_with = list(/obj/machinery/vending/donksoft)
|
||||
|
||||
/obj/structure/largecrate/vehicle
|
||||
name = "vehicle crate"
|
||||
desc = "Wulf Aeronautics says it comes in a box for the consumer's sake... How is this so light?"
|
||||
|
||||
Reference in New Issue
Block a user