First (of probably several) commits to add Foam Force toy guns. Adds the new guns and crossbow, removes the old crossbow, and makes these new guns available to cargo.

This commit is contained in:
Fayrik
2015-03-12 19:25:14 +00:00
parent 0ad731d057
commit b758992e8c
11 changed files with 212 additions and 162 deletions
+21
View File
@@ -1243,3 +1243,24 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
/obj/item/weapon/lipstick/random)
cost = 30 //Lots of very expensive items. You gotta pay up to look good!
containername = "formal-wear crate"
/datum/supply_packs/misc/foamforce
name = "Foam Force Crate"
contains = list(/obj/item/weapon/gun/projectile/shotgun/toy,
/obj/item/weapon/gun/projectile/shotgun/toy,
/obj/item/weapon/gun/projectile/shotgun/toy,
/obj/item/weapon/gun/projectile/shotgun/toy,
/obj/item/weapon/gun/projectile/shotgun/toy,
/obj/item/weapon/gun/projectile/shotgun/toy)
cost = 10
containername = "foam force crate"
/datum/supply_packs/misc/foamforce/bonus
name = "Foam Force Pistol Crate"
contains = list(/obj/item/weapon/gun/projectile/automatic/toy/pistol,
/obj/item/weapon/gun/projectile/automatic/toy/pistol,
/obj/item/ammo_box/magazine/toy/pistol,
/obj/item/ammo_box/magazine/toy/pistol)
cost = 40
containername = "foam force Pistols crate"
contraband = 1
+29 -29
View File
@@ -3,35 +3,35 @@
desc = "random arcade machine"
icon = 'icons/obj/computer.dmi'
icon_state = "arcade"
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/sword = 2,
/obj/item/toy/gun = 2,
/obj/item/toy/crossbow = 2,
/obj/item/weapon/storage/box/fakesyndiesuit = 2,
/obj/item/weapon/storage/fancy/crayons = 2,
/obj/item/toy/spinningtoy = 2,
/obj/item/toy/prize/ripley = 1,
/obj/item/toy/prize/fireripley = 1,
/obj/item/toy/prize/deathripley = 1,
/obj/item/toy/prize/gygax = 1,
/obj/item/toy/prize/durand = 1,
/obj/item/toy/prize/honk = 1,
/obj/item/toy/prize/marauder = 1,
/obj/item/toy/prize/seraph = 1,
/obj/item/toy/prize/mauler = 1,
/obj/item/toy/prize/odysseus = 1,
/obj/item/toy/prize/phazon = 1,
/obj/item/toy/prize/reticence = 1,
/obj/item/toy/cards/deck = 2,
/obj/item/toy/nuke = 2,
/obj/item/toy/minimeteor = 2,
/obj/item/toy/carpplushie = 2,
/obj/item/toy/foamblade = 2,
/obj/item/toy/redbutton = 2,
/obj/item/toy/owl = 2,
/obj/item/toy/griffin = 2
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/sword = 2,
/obj/item/toy/gun = 2,
/obj/item/weapon/gun/projectile/shotgun/toy/crossbow = 2,
/obj/item/weapon/storage/box/fakesyndiesuit = 2,
/obj/item/weapon/storage/fancy/crayons = 2,
/obj/item/toy/spinningtoy = 2,
/obj/item/toy/prize/ripley = 1,
/obj/item/toy/prize/fireripley = 1,
/obj/item/toy/prize/deathripley = 1,
/obj/item/toy/prize/gygax = 1,
/obj/item/toy/prize/durand = 1,
/obj/item/toy/prize/honk = 1,
/obj/item/toy/prize/marauder = 1,
/obj/item/toy/prize/seraph = 1,
/obj/item/toy/prize/mauler = 1,
/obj/item/toy/prize/odysseus = 1,
/obj/item/toy/prize/phazon = 1,
/obj/item/toy/prize/reticence = 1,
/obj/item/toy/cards/deck = 2,
/obj/item/toy/nuke = 2,
/obj/item/toy/minimeteor = 2,
/obj/item/toy/carpplushie = 2,
/obj/item/toy/foamblade = 2,
/obj/item/toy/redbutton = 2,
/obj/item/toy/owl = 2,
/obj/item/toy/griffin = 2
)
/obj/machinery/computer/arcade/New()
-114
View File
@@ -186,120 +186,6 @@
..()
user << "There [amount_left == 1 ? "is" : "are"] [amount_left] cap\s left."
/*
* 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/guns/energy.dmi'
icon_state = "crossbow100"
item_state = "crossbow"
lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi'
righthand_file = 'icons/mob/inhands/guns_righthand.dmi'
w_class = 2.0
attack_verb = list("attacked", "struck", "hit")
var/bullets = 5
/obj/item/toy/crossbow/examine(mob/user)
..()
if (bullets)
user << "<span class='notice'>It is loaded with [bullets] foam dart\s.</span>"
/obj/item/toy/crossbow/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/toy/ammo/crossbow))
if(bullets <= 4)
user.drop_item()
qdel(I)
bullets++
user << "<span class='notice'>You load the foam dart into the crossbow.</span>"
else
usr << "<span class='danger'>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(user.loc, '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
D.visible_message("<span class='danger'>[M] was hit by the foam dart!</span>")
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)
user.visible_message("<span class='danger'>[user] 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)
// ******* Check
if (src.bullets > 0 && M.lying)
M.visible_message("<span class='danger'>[user] casually lines up a shot with [M]'s head and pulls the trigger!</span>")
M.visible_message("<span class='danger'>[M] was hit in the head by the foam dart!</span>", \
"<span class='userdanger'>You're hit in the head by the foam dart!</span>", \
"<span class='danger'>You hear the sound of foam against skull.</span>")
playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
new /obj/item/toy/ammo/crossbow(M.loc)
src.bullets--
else if (M.lying && src.bullets == 0)
M.visible_message("<span class='danger'>[user] casually lines up a shot with [M]'s head, pulls the trigger, then realizes they are out of ammo and drops to the floor in search of some!</span>")
user.Weaken(5)
return
/obj/item/toy/ammo/crossbow
name = "foam dart"
desc = "Its nerf or nothing! Ages 8 and up."
icon = 'icons/obj/toy.dmi'
icon_state = "foamdart"
w_class = 1.0
/obj/effect/foam_dart_dummy
name = ""
desc = ""
icon = 'icons/obj/toy.dmi'
icon_state = "null"
anchored = 1
density = 0
/*
* Toy swords
*/
@@ -199,8 +199,26 @@
/obj/item/ammo_casing/caseless/magspear
name = "magnetic spear"
desc = "A reusable spear that is typically loaded into kinetic spearguns."
projectile_type = /obj/item/projectile/bullet/magspear
projectile_type = /obj/item/projectile/bullet/reusable/magspear
caliber = "speargun"
icon_state = "magspear"
throwforce = 15 //still deadly when thrown
throw_speed = 3
/obj/item/ammo_casing/caseless/foam_dart
name = "foam dart"
desc = "Its nerf or nothing! Ages 8 and up."
projectile_type = /obj/item/projectile/bullet/reusable/foam_dart
caliber = "foam_force"
icon = 'icons/obj/toy.dmi'
icon_state = "foamdart"
/obj/item/ammo_casing/update_icon()
..()
icon_state = "[initial(icon_state)]"
/obj/item/ammo_casing/caseless/foam_dart/riot
name = "riot foam dart"
desc = "Who's smart idea was it to use toys as crowd control? Ages 18 and up."
projectile_type = /obj/item/projectile/bullet/reusable/foam_dart/riot
icon_state = "foamdart_riot"
@@ -104,6 +104,18 @@
max_ammo = 5
multiload = 1
/obj/item/ammo_box/magazine/internal/shot/toy
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
caliber = "foam_force"
max_ammo = 4
/obj/item/ammo_box/magazine/internal/cylinder/toy
name = "crossbow cylinder"
desc = "Oh god, this shouldn't be here"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
caliber = "foam_force"
max_ammo = 5
///////////EXTERNAL MAGAZINES////////////////
/obj/item/ammo_box/magazine/m10mm
@@ -216,3 +228,20 @@ obj/item/ammo_box/magazine/tommygunm45
name = "shotgun magazine (12g dragon's breath)"
icon_state = "m12gf"
ammo_type = /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath
/obj/item/ammo_box/magazine/toy
name = "foam force SMG magazine"
icon_state = "c20r45"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
caliber = "foam_force"
max_ammo = 18
multiple_sprites = 2
/obj/item/ammo_box/magazine/toy/pistol
name = "foam force pistol magazine"
icon_state = "9x19p"
max_ammo = 8
multiple_sprites = 2
/obj/item/ammo_box/magazine/toy/pistol/riot
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
@@ -0,0 +1,58 @@
/obj/item/weapon/gun/projectile/automatic/toy
name = "foam force SMG"
desc = "A bullpup three-round burst toy SMG. Ages 8 and up."
icon = 'icons/obj/toy.dmi'
icon_state = "saber"
item_state = "c20r"
mag_type = /obj/item/ammo_box/magazine/toy
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
fire_delay = 2
force = 0
throwforce = 0
burst_size = 3
can_suppress = 0
clumsy_check = 0
/obj/item/weapon/gun/projectile/automatic/toy/process_chamber(var/eject_casing = 0, var/empty_chamber = 1)
..()
/obj/item/weapon/gun/projectile/automatic/toy/pistol
name = "foam force pistol"
desc = "A small, easily concealable toy handgun. Ages 8 and up."
icon_state = "pistol"
item_state = "gun"
w_class = 2
mag_type = /obj/item/ammo_box/magazine/toy/pistol
fire_sound = 'sound/weapons/Gunshot.ogg'
can_suppress = 0
burst_size = 1
fire_delay = 0
action_button_name = null
/obj/item/weapon/gun/projectile/automatic/toy/pistol/update_icon()
..()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"]"
/obj/item/weapon/gun/projectile/shotgun/toy
name = "foam force shotgun"
desc = "A toy shotgun with wood furniture and a four-shell capacity underneath. Ages 8 and up."
icon = 'icons/obj/toy.dmi'
force = 0
throwforce = 0
origin_tech = null
mag_type = /obj/item/ammo_box/magazine/internal/shot/toy
clumsy_check = 0
/obj/item/weapon/gun/projectile/shotgun/toy/process_chamber()
..()
if(chambered && !chambered.BB)
qdel(chambered)
/obj/item/weapon/gun/projectile/shotgun/toy/crossbow
name = "foam force crossbow"
desc = "A weapon favored by many overactive children. Ages 8 and up."
icon_state = "foamcrossbow"
item_state = "crossbow"
fire_sound = 'sound/items/syringeproj.ogg'
slot_flags = SLOT_BELT
w_class = 2
@@ -0,0 +1,37 @@
/obj/item/projectile/bullet/reusable
name = "reusable bullet"
desc = "How do you even reuse a bullet?"
var/obj/item/ammo_casing/caseless/ammo_type = /obj/item/ammo_casing/caseless/
/obj/item/projectile/bullet/reusable/on_hit(var/atom/target, var/blocked = 0)
if(!proj_hit)
proj_hit = 1
new ammo_type(src.loc)
..()
/obj/item/projectile/bullet/reusable/on_range()
if(!proj_hit)
new ammo_type(src.loc)
..()
/obj/item/projectile/bullet/reusable/magspear
name = "magnetic spear"
desc = "WHITE WHALE, HOLY GRAIL"
damage = 30 //takes 3 spears to kill a mega carp, one to kill a normal carp
icon_state = "magspear"
ammo_type = /obj/item/ammo_casing/caseless/magspear
/obj/item/projectile/bullet/reusable/foam_dart
name = "foam dart"
desc = "I hope you're wearing eye protection."
damage = 0 // It's a damn toy.
icon = 'icons/obj/toy.dmi'
icon_state = "foamdart"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
range = 10
/obj/item/projectile/bullet/reusable/foam_dart/riot
name = "riot foam dart"
icon_state = "foamdart_riot"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
stamina = 24
+1 -18
View File
@@ -197,21 +197,4 @@ obj/item/projectile/kinetic/New()
/obj/item/projectile/bullet/frag12/on_hit(atom/target, blocked = 0)
explosion(target, -1, 0, 1)
return 1
/obj/item/projectile/bullet/magspear
name = "magnetic spear"
desc = "WHITE WHALE, HOLY GRAIL"
damage = 30 //takes 3 spears to kill a mega carp, one to kill a normal carp
icon_state = "magspear"
/obj/item/projectile/bullet/magspear/on_hit(var/atom/target, var/blocked = 0)
if(!proj_hit)
proj_hit = 1
new /obj/item/ammo_casing/caseless/magspear(src.loc)
..()
/obj/item/projectile/bullet/magspear/on_range()
if(!proj_hit)
new /obj/item/ammo_casing/caseless/magspear(src.loc)
..()
return 1
@@ -386,6 +386,14 @@
build_path = /obj/item/device/assembly/prox_sensor
category = list("initial", "Misc")
/datum/design/foam_dart
name = "Box of Foam Darts"
id = "foam_dart"
build_type = AUTOLATHE
materials = list("$metal" = 500)
build_path = /obj/item/ammo_box/foambox
category = list("initial", "Misc")
//hacked autolathe recipes
/datum/design/flamethrower
name = "Flamethrower"
@@ -0,0 +1,10 @@
author: Fayrik
delete-after: True
changes:
- rscdel: "Deleted the toy crossbow that wasn't a gun, but flung projectiles like a gun. Why was that even a thing?"
- rscadd: "Added an abstract new type of reusable ammo."
- rscadd: "Added three new foam force guns and a foam force crossbow, all of which take the new foam dart ammo."
- rscadd: "Added foam force darts to the autolathe, and a crate orderable from cargo containing the new guns."
- rscadd: "New crossbow can be won as an arcade prize."
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 24 KiB