Merge pull request #3583 from Fox-McCloud/permit-refactor

Refactors Bot Weapon Identification
This commit is contained in:
TheDZD
2016-02-13 18:23:12 -05:00
8 changed files with 16 additions and 26 deletions
+2 -13
View File
@@ -38,16 +38,6 @@
bot_type_name = "ED-209"
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/gun/energy/floragun)
/obj/item/weapon/ed209_assembly
name = "\improper ED-209 assembly"
desc = "Some sort of bizarre assembly."
@@ -395,9 +385,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
/obj/machinery/bot/ed209/explode()
+2 -13
View File
@@ -31,16 +31,6 @@
bot_type_name = "Secbot"
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/gun/energy/floragun)
/obj/machinery/bot/secbot/beepsky
name = "Officer Beepsky"
desc = "It's Officer Beepsky! Powered by a potato and a shot of whiskey."
@@ -378,9 +368,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()
+2
View File
@@ -49,6 +49,8 @@
var/list/allowed = null //suit storage stuff.
var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers.
var/needs_permit = 0 //Used by security bots to determine if this item is safe for public use.
var/strip_delay = DEFAULT_ITEM_STRIP_DELAY
var/put_on_delay = DEFAULT_ITEM_PUTON_DELAY
@@ -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."
@@ -77,6 +77,7 @@
item_state = null
slot_flags = SLOT_BELT
w_class = 2
needs_permit = 0
force = 0
on = 0
+1
View File
@@ -19,6 +19,7 @@
throw_range = 5
force = 5.0
origin_tech = "combat=1"
needs_permit = 1
attack_verb = list("struck", "hit", "bashed")
var/fire_sound = 'sound/weapons/Gunshot.ogg'
@@ -15,6 +15,7 @@
desc = "A modified version of the basic laser gun, this one fires less concentrated energy bolts designed for target practice."
projectile_type = "/obj/item/projectile/practice"
clumsy_check = 0
needs_permit = 0
obj/item/weapon/gun/energy/laser/retro
name ="retro laser gun"
@@ -107,6 +108,7 @@ obj/item/weapon/gun/energy/laser/retro
projectile_type = "/obj/item/projectile/lasertag/blue"
origin_tech = "combat=1;magnets=2"
clumsy_check = 0
needs_permit = 0
self_recharge = 1
@@ -124,6 +126,7 @@ obj/item/weapon/gun/energy/laser/retro
projectile_type = "/obj/item/projectile/lasertag/red"
origin_tech = "combat=1;magnets=2"
clumsy_check = 0
needs_permit = 0
self_recharge = 1
@@ -41,6 +41,7 @@
origin_tech = "materials=2;biotech=3;powerstorage=3"
modifystate = "floramut"
var/mode = 0 //0 = mutate, 1 = yield boost
needs_permit = 0
self_recharge = 1
@@ -202,6 +203,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
fire_sound = 'sound/weapons/Kenetic_accel.ogg'
charge_cost = 5000
cell_type = "/obj/item/weapon/stock_parts/cell/emproof"
needs_permit = 0 // Aparently these are safe to carry? I'm sure Golliaths would disagree.
fire_delay = 16 //Because guncode is bad and you can bug the reload for rapid fire otherwise.
var/recently_fired = 0