diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm index faf974bb6dbf..b40ce18057a7 100644 --- a/code/game/machinery/bots/ed209bot.dm +++ b/code/game/machinery/bots/ed209bot.dm @@ -37,14 +37,6 @@ bot_type = SEC_BOT bot_filter = RADIO_SECBOT - //List of weapons that secbots will not arrest for - var/safe_weapons = list(\ - /obj/item/weapon/gun/energy/laser/bluetag,\ - /obj/item/weapon/gun/energy/laser/redtag,\ - /obj/item/weapon/gun/energy/laser/practice,\ - /obj/item/weapon/melee/classic_baton/telescopic,\ - /obj/item/weapon/gun/energy/kinetic_accelerator) - /obj/item/weapon/ed209_assembly name = "\improper ED-209 assembly" @@ -206,6 +198,17 @@ Auto Patrol[]"}, icon_state = "[lasercolor]ed209[on]" set_weapon() +/obj/machinery/bot/ed209/bullet_act(var/obj/item/projectile/Proj) + if(istype(Proj ,/obj/item/projectile/beam)||istype(Proj,/obj/item/projectile/bullet)) + if((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE)) + if (!Proj.nodamage && Proj.damage < src.health) + threatlevel = Proj.firer.assess_threat(src) + threatlevel += 6 + if(threatlevel >= 4) + target = Proj.firer + mode = BOT_HUNT + ..() + /obj/machinery/bot/ed209/bot_process() if (!..()) return @@ -392,9 +395,8 @@ Auto Patrol[]"}, continue /obj/machinery/bot/ed209/proc/check_for_weapons(var/obj/item/slot_item) - if(istype(slot_item, /obj/item/weapon/gun) || istype(slot_item, /obj/item/weapon/melee)) - if(!(slot_item.type in safe_weapons)) - return 1 + if(slot_item && slot_item.needs_permit) + return 1 return 0 /* terrible diff --git a/code/game/machinery/bots/secbot.dm b/code/game/machinery/bots/secbot.dm index 1204393f095c..8a4ea246327a 100644 --- a/code/game/machinery/bots/secbot.dm +++ b/code/game/machinery/bots/secbot.dm @@ -27,15 +27,6 @@ bot_type = SEC_BOT bot_filter = RADIO_SECBOT - //List of weapons that secbots will not arrest for - var/safe_weapons = list(\ - /obj/item/weapon/gun/energy/laser/bluetag,\ - /obj/item/weapon/gun/energy/laser/redtag,\ - /obj/item/weapon/gun/energy/laser/practice,\ - /obj/item/weapon/melee/classic_baton/telescopic,\ - /obj/item/weapon/gun/energy/kinetic_accelerator) - - /obj/machinery/bot/secbot/beepsky name = "Officer Beep O'sky" desc = "It's Officer Beep O'sky! Powered by a potato and a shot of whiskey." @@ -189,6 +180,17 @@ Auto Patrol: []"}, declare_arrests = 0 icon_state = "secbot[on]" +/obj/machinery/bot/secbot/bullet_act(var/obj/item/projectile/Proj) + if(istype(Proj ,/obj/item/projectile/beam)||istype(Proj,/obj/item/projectile/bullet)) + if((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE)) + if (!Proj.nodamage && Proj.damage < src.health) + threatlevel = Proj.firer.assess_threat(src) + threatlevel += 6 + if(threatlevel >= 4) + target = Proj.firer + mode = BOT_HUNT + ..() + /obj/machinery/bot/secbot/bot_process() if (!..()) return @@ -350,9 +352,8 @@ Auto Patrol: []"}, else continue /obj/machinery/bot/secbot/proc/check_for_weapons(var/obj/item/slot_item) - if(istype(slot_item, /obj/item/weapon/gun) || istype(slot_item, /obj/item/weapon/melee)) - if(!(slot_item.type in safe_weapons)) - return 1 + if(slot_item && slot_item.needs_permit) + return 1 return 0 /obj/machinery/bot/secbot/explode() diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 6786b641c531..bb515cb2b8ef 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -43,6 +43,7 @@ var/g_amt = 0 // glass var/reliability = 100 //Used by SOME devices to determine how reliable they are. var/origin_tech = null //Used by R&D to determine what research bonuses it grants. + var/needs_permit = 0 //Used by security bots to determine if this item is safe for public use. var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]" var/list/species_exception = list() // even if a species cannot put items in a certain slot, if the species id is in the item's exception list, it will be able to wear that item diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index 134205787040..fa3463342789 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -1,3 +1,6 @@ +/obj/item/weapon/melee + needs_permit = 1 + /obj/item/weapon/melee/chainofcommand name = "chain of command" desc = "A tool used by great men to placate the frothing masses." @@ -79,6 +82,7 @@ item_state = null slot_flags = SLOT_BELT w_class = 2 + needs_permit = 0 force = 0 on = 0 diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 2fd24f740c36..5ff242be8aa6 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -42,7 +42,7 @@ for(var/obj/item/ammo_casing/bullet in src.loc) if (box.stored_ammo.len >= box.max_ammo) break - if (box.ammo_type == bullet.type && bullet.BB) + if (bullet.BB) if (box.give_round(bullet, 0)) boolets++ else diff --git a/code/modules/projectiles/ammunition/ammo_casings.dm b/code/modules/projectiles/ammunition/ammo_casings.dm index fe6a501926bd..e26c9b31e92b 100644 --- a/code/modules/projectiles/ammunition/ammo_casings.dm +++ b/code/modules/projectiles/ammunition/ammo_casings.dm @@ -216,6 +216,29 @@ caliber = "foam_force" icon = 'icons/obj/guns/toy.dmi' icon_state = "foamdart" + var/modified = 0 + +/obj/item/ammo_casing/caseless/foam_dart/update_icon() + ..() + if (modified) + icon_state = "foamdart_empty" + desc = "Its nerf or nothing! ...Although, this one doesn't look too safe." + +/obj/item/ammo_casing/caseless/foam_dart/attackby(var/obj/item/A as obj, mob/user as mob, params) + ..() + if (istype(A, /obj/item/weapon/screwdriver) && !modified) + modified = 1 + BB.damage_type = BRUTE + icon_state = "foamdart_empty" + desc = "Its nerf or nothing! ...Although, this one doesn't look too safe." + user << "You pop the safety cap off of [src]." + else if ((istype(A, /obj/item/weapon/pen)) && modified && !BB.contents.len) + user.drop_item() + A.loc = BB + BB.damage = 5 + BB.nodamage = 0 + user << "You insert [A] into [src]." + return /obj/item/ammo_casing/caseless/foam_dart/riot name = "riot foam dart" diff --git a/code/modules/projectiles/ammunition/magazines.dm b/code/modules/projectiles/ammunition/magazines.dm index 6a605ad218a3..b1296f8b2cf8 100644 --- a/code/modules/projectiles/ammunition/magazines.dm +++ b/code/modules/projectiles/ammunition/magazines.dm @@ -250,3 +250,23 @@ obj/item/ammo_box/magazine/tommygunm45 /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" + caliber = "foam_force" + ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot + max_ammo = 20 + +/obj/item/ammo_box/magazine/toy/smgm45/update_icon() + ..() + icon_state = "c20r45-[round(ammo_count(),2)]" + +/obj/item/ammo_box/magazine/toy/m762 + name = "donksoft box magazine" + caliber = "foam_force" + ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot + max_ammo = 50 + +/obj/item/ammo_box/magazine/toy/m762/update_icon() + ..() + icon_state = "a762-[round(ammo_count(),10)]" \ No newline at end of file diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 9b14f51bf4d5..4139a3e348c6 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -17,6 +17,7 @@ throw_range = 5 force = 5.0 origin_tech = "combat=1" + needs_permit = 1 attack_verb = list("struck", "hit", "bashed") var/fire_sound = "gunshot" diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index d255add40284..f1e7f779d14c 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -14,6 +14,7 @@ desc = "A modified version of the basic laser gun, this one fires less concentrated energy bolts designed for target practice." ammo_type = list(/obj/item/ammo_casing/energy/laser/practice) clumsy_check = 0 + needs_permit = 0 obj/item/weapon/gun/energy/laser/retro name ="retro laser" @@ -105,6 +106,7 @@ obj/item/weapon/gun/energy/laser/retro ammo_type = list(/obj/item/ammo_casing/energy/laser/bluetag) origin_tech = "combat=1;magnets=2" clumsy_check = 0 + needs_permit = 0 var/charge_tick = 0 pin = /obj/item/device/firing_pin/tag/blue @@ -135,6 +137,7 @@ obj/item/weapon/gun/energy/laser/retro ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag) origin_tech = "combat=1;magnets=2" clumsy_check = 0 + needs_permit = 0 var/charge_tick = 0 pin = /obj/item/device/firing_pin/tag/red diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 96822335fcee..ec025ada1766 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -123,6 +123,7 @@ item_state = "kineticgun" ammo_type = list(/obj/item/ammo_casing/energy/kinetic) cell_type = "/obj/item/weapon/stock_parts/cell/emproof" + needs_permit = 0 // Aparently these are safe to carry? I'm sure Golliaths would disagree. var/overheat = 0 var/recent_reload = 1 var/range_add = 0 diff --git a/code/modules/projectiles/guns/projectile/toy.dm b/code/modules/projectiles/guns/projectile/toy.dm index b0e1c5cec0fd..d1da2b67d884 100644 --- a/code/modules/projectiles/guns/projectile/toy.dm +++ b/code/modules/projectiles/guns/projectile/toy.dm @@ -11,6 +11,7 @@ burst_size = 3 can_suppress = 0 clumsy_check = 0 + needs_permit = 0 /obj/item/weapon/gun/projectile/automatic/toy/process_chamber(var/eject_casing = 0, var/empty_chamber = 1) ..() @@ -40,6 +41,7 @@ origin_tech = null mag_type = /obj/item/ammo_box/magazine/internal/shot/toy clumsy_check = 0 + needs_permit = 0 /obj/item/weapon/gun/projectile/shotgun/toy/process_chamber() ..() @@ -55,4 +57,26 @@ mag_type = /obj/item/ammo_box/magazine/internal/shot/toy/crossbow fire_sound = 'sound/items/syringeproj.ogg' slot_flags = SLOT_BELT - w_class = 2 \ No newline at end of file + w_class = 2 + +/obj/item/weapon/gun/projectile/automatic/c20r/toy + name = "donksoft SMG" + desc = "A bullpup two-round burst toy SMG, designated 'C-20r'. Ages 8 and up." + icon = 'icons/obj/guns/toy.dmi' + can_suppress = 0 + needs_permit = 0 + mag_type = /obj/item/ammo_box/magazine/toy/smgm45 + +/obj/item/weapon/gun/projectile/automatic/c20r/toy/process_chamber(var/eject_casing = 0, var/empty_chamber = 1) + ..() + +/obj/item/weapon/gun/projectile/automatic/l6_saw/toy + name = "donksoft LMG" + desc = "A heavily modified toy light machine gun, designated 'L6 SAW'. Ages 8 and up." + icon = 'icons/obj/guns/toy.dmi' + can_suppress = 0 + needs_permit = 0 + mag_type = /obj/item/ammo_box/magazine/toy/m762 + +/obj/item/weapon/gun/projectile/automatic/l6_saw/toy/process_chamber(var/eject_casing = 0, var/empty_chamber = 1) + ..() \ No newline at end of file diff --git a/code/modules/projectiles/projectile/reusable.dm b/code/modules/projectiles/projectile/reusable.dm index 118a9c60a1de..0e9d010d3fe7 100644 --- a/code/modules/projectiles/projectile/reusable.dm +++ b/code/modules/projectiles/projectile/reusable.dm @@ -37,7 +37,7 @@ damage = 0 // It's a damn toy. damage_type = OXY nodamage = 1 - icon = 'icons/obj/toy.dmi' + icon = 'icons/obj/guns/toy.dmi' icon_state = "foamdart" ammo_type = /obj/item/ammo_casing/caseless/foam_dart range = 10 diff --git a/html/changelogs/Fayrik-FoamForceFuckYeah.yml b/html/changelogs/Fayrik-FoamForceFuckYeah.yml index 74e052e8bf09..fab63cad6441 100644 --- a/html/changelogs/Fayrik-FoamForceFuckYeah.yml +++ b/html/changelogs/Fayrik-FoamForceFuckYeah.yml @@ -7,6 +7,8 @@ changes: - 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 dart boxes to the autolathe, and two crates orderable from cargo containing the new guns." - - rscadd: "New crossbow can be won as an arcade prize." - - rscadd: "All kinds of ammo containers can now be used to rapidly collect live ammunition on the ground." - - rscadd: "Speedloaders and traditional ammo boxes can now be restocked." \ No newline at end of file + - rscadd: "Added two new donksoft guns, the syndicate's own brand of Foam Force." + - tweak: "New crossbow can be won as an arcade prize." + - tweak: "All kinds of ammo containers can now be used to rapidly collect live ammunition on the ground." + - tweak: "Speedloaders and traditional ammo boxes can now be restocked." + - bugfix: "Security bots now react to being shot." \ No newline at end of file diff --git a/icons/obj/guns/toy.dmi b/icons/obj/guns/toy.dmi index 2f418c7b9a1f..e3700ae841a0 100644 Binary files a/icons/obj/guns/toy.dmi and b/icons/obj/guns/toy.dmi differ