Skip to content

Commit

Permalink
various fixes, linters, and removes the donksoft toy guns
Browse files Browse the repository at this point in the history
  • Loading branch information
rye-rice committed Sep 7, 2024
1 parent 6d9244c commit 57e49b3
Show file tree
Hide file tree
Showing 15 changed files with 12 additions and 112 deletions.
2 changes: 1 addition & 1 deletion _maps/RandomRuins/RockRuins/rockplanet_harmfactory.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
/area/ruin/powered)
"ga" = (
/obj/structure/table/wood/reinforced,
/obj/item/gun/ballistic/automatic/smg/cobra/toy/riot{
/obj/item/gun/ballistic/automatic/toy/riot{
pixel_x = 5;
pixel_y = 7
},
Expand Down
19 changes: 0 additions & 19 deletions code/game/objects/items/attachments/laser_sight.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,3 @@
gun.wield_delay += 0.3 SECONDS

playsound(user, toggled ? 'sound/weapons/magin.ogg' : 'sound/weapons/magout.ogg', 40, TRUE)

/obj/item/attachment/laser_sight/on_preattack(obj/item/gun/gun, atom/target, mob/user, list/params)
if(toggled) //copied from lsaer pointer code, dont kill me
var/targloc = get_turf(target)
var/image/laser_image = image('icons/obj/projectiles.dmi',targloc,"red_laser",10)
var/list/modifiers = params2list(params)
if(modifiers)
if(LAZYACCESS(modifiers, ICON_X))
laser_image.pixel_x = (text2num(LAZYACCESS(modifiers, ICON_X)) - 16)
if(LAZYACCESS(modifiers, ICON_Y))
laser_image.pixel_y = (text2num(LAZYACCESS(modifiers, ICON_Y)) - 16)
else
laser_image.pixel_x = target.pixel_x + rand(-5,5)
laser_image.pixel_y = target.pixel_y + rand(-5,5)

flick_overlay_view(laser_image, targloc, 1 SECONDS)
return TRUE

return FALSE
4 changes: 2 additions & 2 deletions code/game/objects/items/storage/backpack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@
/obj/item/storage/backpack/duffelbag/syndie/med/medicalbundle/PopulateContents()
new /obj/item/clothing/shoes/magboots/syndie(src)
new /obj/item/storage/firstaid/tactical(src)
new /obj/item/gun/ballistic/automatic/assault/hydra/lmg/extended/toy/riot(src)
new /obj/item/gun/ballistic/automatic/toy(src)
new /obj/item/ammo_box/foambox/riot(src)

/obj/item/storage/backpack/duffelbag/syndie/med/bioterrorbundle
Expand All @@ -651,7 +651,7 @@
new /obj/item/reagent_containers/spray/chemsprayer/bioterror(src)
new /obj/item/storage/box/syndie_kit/chemical(src)
new /obj/item/gun/syringe/syndicate(src)
new /obj/item/gun/ballistic/automatic/smg/cobra/toy/riot(src)
new /obj/item/gun/ballistic/automatic/toy(src)
new /obj/item/storage/box/syringes(src)
new /obj/item/ammo_box/foambox/riot(src)
new /obj/item/grenade/chem_grenade/bioterrorfoam(src)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/storage/uplink_kits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
/obj/item/storage/box/syndie_kit/imp_radio,
/obj/item/storage/box/syndie_kit/imp_uplink,
/obj/item/clothing/gloves/krav_maga/combatglovesplus,
/obj/item/gun/ballistic/automatic/smg/cobra/toy/riot,
/obj/item/gun/ballistic/automatic/toy,
/obj/item/reagent_containers/hypospray/medipen/stimulants,
/obj/item/storage/box/syndie_kit/imp_freedom,
/obj/item/toy/eightball/haunted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
/datum/blackmarket_item/explosive/rpg
name = "PML-9 RPG"
desc = "Offically, it's an anti-armor RPG launcher. Technically, it's anti-everything. Most things don't enjoy being hit in the face with high explosives."
item = /obj/item/gun/ballistic/rocketlauncher/mako
item = /obj/item/gun/ballistic/rocketlauncher

price_min = 3500
price_max = 6500
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mining/abandoned_crates.dm
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
new /obj/item/gun/ballistic/shotgun/toy(src)
new /obj/item/gun/ballistic/automatic/toy/pistol(src)
new /obj/item/gun/ballistic/automatic/toy(src)
new /obj/item/gun/ballistic/automatic/assault/hydra/lmg/extended/toy(src)
new /obj/item/gun/ballistic/automatic/toy(src)
new /obj/item/ammo_box/foambox(src)
if(98)
for(var/i in 1 to 3)
Expand Down
40 changes: 2 additions & 38 deletions code/modules/projectiles/boxes_magazines/external/toy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,46 +21,10 @@
/obj/item/ammo_box/magazine/toy/pistol
name = "foam force pistol magazine"
desc = "A toy pistol magazine designed to fit harmless foam darts."
icon_state = "stechkin_mag-1"
base_icon_state = "stechkin_mag"
icon_state = "toy_magazine-1"
base_icon_state = "toy_magazine"
max_ammo = 8
multiple_sprites = AMMO_BOX_FULL_EMPTY

/obj/item/ammo_box/magazine/toy/pistol/riot
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot

/obj/item/ammo_box/magazine/toy/smgm45
name = "donksoft SMG magazine"
desc = "A toy submachine gun magazine designed to fit harmless foam darts."
icon_state = "c20r45-toy"
base_icon_state = "c20r45"
caliber = "foam_force"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
max_ammo = 20

/obj/item/ammo_box/magazine/toy/smgm45/update_icon_state()
. = ..()
icon_state = "[base_icon_state]-[round(ammo_count(), 2)]"

/obj/item/ammo_box/magazine/toy/smgm45/riot
icon_state = "c20r45-riot"
desc = "A toy submachine gun magazine designed to fit legally-harmless riot control darts."
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot

/obj/item/ammo_box/magazine/toy/m762
name = "donksoft box magazine"
desc = "A huge toy LMG magazine designed to fit vast quantities of harmless foam darts."
icon_state = "a762-100"
base_icon_state = "a762"
caliber = "foam_force"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
max_ammo = 50
w_class = WEIGHT_CLASS_NORMAL

/obj/item/ammo_box/magazine/toy/m762/update_icon_state()
. = ..()
icon_state = "[base_icon_state]-[round(ammo_count(), 10)]"

/obj/item/ammo_box/magazine/toy/m762/riot
desc = "A huge toy LMG magazine designed to fit vast quantities of legally-harmless riot control darts."
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
5 changes: 0 additions & 5 deletions code/modules/projectiles/guns/ballistic/launchers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@
name = "\improper PML-9"
desc = "A reusable rocket-propelled grenade launcher. The words \"NT this way\" and an arrow have been written near the barrel."

icon = 'icons/obj/guns/manufacturer/scarborough/48x32.dmi'
lefthand_file = 'icons/obj/guns/manufacturer/scarborough/lefthand.dmi'
righthand_file = 'icons/obj/guns/manufacturer/scarborough/righthand.dmi'
mob_overlay_icon = 'icons/obj/guns/manufacturer/scarborough/onmob.dmi'

icon_state = "rocketlauncher"
item_state = "rocketlauncher"
mag_type = /obj/item/ammo_box/magazine/internal/rocketlauncher
Expand Down
36 changes: 0 additions & 36 deletions code/modules/projectiles/guns/ballistic/toy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,39 +83,3 @@
manufacturer = MANUFACTURER_DONKCO
recoil = -10 //its a toy...
recoil_unwielded = -10

/obj/item/gun/ballistic/automatic/smg/cobra/toy //likely deleting, leaving this here to remind me, if this is still here in master fucking scream at me
name = "should be deleted"
desc = "9 instances in the code x3"
item_flags = NONE
mag_type = /obj/item/ammo_box/magazine/toy/smgm45
fire_sound = 'sound/items/syringeproj.ogg'
casing_ejector = FALSE
manufacturer = MANUFACTURER_DONKCO
recoil = -10 //its a toy...
recoil_unwielded = -10

/obj/item/gun/ballistic/automatic/smg/cobra/toy/riot
mag_type = /obj/item/ammo_box/magazine/toy/smgm45/riot

/obj/item/gun/ballistic/automatic/smg/cobra/toy/update_overlays()
. = ..()
. += "[icon_state]_toy"

/obj/item/gun/ballistic/automatic/assault/hydra/lmg/extended/toy //likely deleting, leaving this here to remind me, if this is still here in master fucking scream at me
name = "should be deleted"
desc = "6 instances in the code :3c"
fire_sound = 'sound/items/syringeproj.ogg'
item_flags = NONE
mag_type = /obj/item/ammo_box/magazine/toy/m762
casing_ejector = FALSE
manufacturer = MANUFACTURER_DONKCO
recoil = -10 //its a toy...
recoil_unwielded = -10

/obj/item/gun/ballistic/automatic/assault/hydra/lmg/extended/toy/riot
mag_type = /obj/item/ammo_box/magazine/toy/m762/riot

/obj/item/gun/ballistic/automatic/assault/hydra/lmg/extended/toy/update_overlays()
. = ..()
. += "[icon_state]_toy"
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ EMPTY_GUN_HELPER(automatic/pistol/rattlesnake)
/obj/item/ammo_box/magazine/m9mm_rattlesnake
name = "Rattlesnake magazine (9mm)"
desc = "A long, 18-round double-stack magazine designed for the Rattlesnake machine pistol. These rounds do okay damage, but struggle against armor."
icon_state = "rattlesnake_mag-18"
icon_state = "rattlesnake_mag_18"
base_icon_state = "rattlesnake_mag"
ammo_type = /obj/item/ammo_casing/c9mm
caliber = "9mm"
Expand Down Expand Up @@ -743,7 +743,7 @@ EMPTY_GUN_HELPER(automatic/assault/hydra)
default_firemode = FIREMODE_FULLAUTO

burst_delay = 0.08 SECONDS
fire_delay = 0.1 SECONDS
fire_delay = 0.08 SECONDS
spread = 6
spread_unwielded = 20
wield_slowdown = 0.85 //better than the lmgs since it doesnt have a bipod, still not ideal
Expand Down
4 changes: 2 additions & 2 deletions code/modules/uplink/uplink_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
/datum/uplink_item/dangerous/foamsmg
name = "Toy Submachine Gun"
desc = "A fully-loaded Donksoft bullpup submachine gun that fires riot grade darts with a 20-round magazine."
item = /obj/item/gun/ballistic/automatic/smg/cobra/toy/riot
item = /obj/item/gun/ballistic/automatic/toy/riot
cost = 5
surplus = 0
include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops)
Expand All @@ -525,7 +525,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
name = "Toy Machine Gun"
desc = "A fully-loaded Donksoft belt-fed machine gun. This weapon has a massive 50-round magazine of devastating \
riot grade darts, that can briefly incapacitate someone in just one volley."
item = /obj/item/gun/ballistic/automatic/assault/hydra/lmg/extended/toy/riot
item = /obj/item/gun/ballistic/automatic/toy
cost = 10
surplus = 0
include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops)
Expand Down
2 changes: 0 additions & 2 deletions code/modules/vending/liberation_toy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
/obj/item/clothing/head/syndicatefake = 5) //OPS IN DORMS oh wait it's just an assistant
contraband = list(
/obj/item/gun/ballistic/shotgun/toy/crossbow = 10, //Congrats, you unlocked the +18 setting!
/obj/item/gun/ballistic/automatic/smg/cobra/toy = 10,
/obj/item/gun/ballistic/automatic/assault/hydra/lmg/extended/toy = 10,
/obj/item/ammo_box/foambox/riot = 20,
/obj/item/toy/katana = 10,
/obj/item/dualsaber/toy = 5,
Expand Down
2 changes: 0 additions & 2 deletions code/modules/vending/toys.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
/obj/item/clothing/suit/syndicatefake = 5,
/obj/item/clothing/head/syndicatefake = 5,
/obj/item/gun/ballistic/shotgun/toy/crossbow = 10,
/obj/item/gun/ballistic/automatic/smg/cobra/toy = 5,
/obj/item/gun/ballistic/automatic/assault/hydra/lmg/extended/toy = 5,
/obj/item/toy/katana = 10,
/obj/item/dualsaber/toy = 5)
armor = list("melee" = 100, "bullet" = 100, "laser" = 100, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
Expand Down
Binary file modified icons/obj/ammo.dmi
Binary file not shown.
Binary file modified icons/obj/guns/projectile.dmi
Binary file not shown.

0 comments on commit 57e49b3

Please sign in to comment.