mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 15:47:15 +01:00
Replaces a bunch of obj vars (and emagged on machinery/items) with obj_flags (#34078)
* It works, but is it worth it? * bitfield helpers take 1 * Would this work? * remove dangling debug code * rebase & fixes * vv bitfield stuff, reading * DNM oceans of shitcode DNM * honk * honk2 * plonk * rebase & fix
This commit is contained in:
committed by
AnturK
parent
70bec96f9c
commit
6406896df1
@@ -16,7 +16,6 @@
|
||||
throw_range = 5
|
||||
force = 5
|
||||
needs_permit = TRUE
|
||||
unique_rename = FALSE
|
||||
attack_verb = list("struck", "hit", "bashed")
|
||||
|
||||
var/fire_sound = "gunshot"
|
||||
@@ -191,7 +190,7 @@
|
||||
|
||||
/obj/item/gun/proc/handle_pins(mob/living/user)
|
||||
if(pin)
|
||||
if(pin.pin_auth(user) || pin.emagged)
|
||||
if(pin.pin_auth(user) || (pin.obj_flags & EMAGGED))
|
||||
return TRUE
|
||||
else
|
||||
pin.auth_fail(user)
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
desc = "A cheap Martian knock-off of a classic law enforcement firearm. Uses .38-special rounds."
|
||||
icon_state = "detective"
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/rev38
|
||||
unique_rename = TRUE
|
||||
obj_flags = UNIQUE_RENAME
|
||||
unique_reskin = list("Default" = "detective",
|
||||
"Leopard Spots" = "detective_leopard",
|
||||
"Black Panther" = "detective_panther",
|
||||
@@ -261,7 +261,7 @@
|
||||
slot_flags = SLOT_BACK
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/dual
|
||||
sawn_desc = "Omar's coming!"
|
||||
unique_rename = TRUE
|
||||
obj_flags = UNIQUE_RENAME
|
||||
unique_reskin = list("Default" = "dshotgun",
|
||||
"Dark Red Finish" = "dshotgun-d",
|
||||
"Ash" = "dshotgun-f",
|
||||
@@ -307,7 +307,6 @@
|
||||
slot_flags = null
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/improvised
|
||||
sawn_desc = "I'm just here for the gasoline."
|
||||
unique_rename = FALSE
|
||||
unique_reskin = null
|
||||
var/slung = FALSE
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/kinetic)
|
||||
cell_type = /obj/item/stock_parts/cell/emproof
|
||||
needs_permit = 0
|
||||
unique_rename = 1
|
||||
obj_flags = UNIQUE_RENAME
|
||||
weapon_weight = WEAPON_LIGHT
|
||||
can_flashlight = 1
|
||||
flight_x_offset = 15
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
suppressed = TRUE
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/bolt)
|
||||
weapon_weight = WEAPON_LIGHT
|
||||
unique_rename = 0
|
||||
obj_flags = 0
|
||||
overheat_time = 20
|
||||
holds_charge = TRUE
|
||||
unique_frequency = TRUE
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
to_chat(user, "<span class ='notice'>This firearm already has a firing pin installed.</span>")
|
||||
|
||||
/obj/item/device/firing_pin/emag_act(mob/user)
|
||||
if(emagged)
|
||||
if(obj_flags & EMAGGED)
|
||||
return
|
||||
emagged = TRUE
|
||||
obj_flags |= EMAGGED
|
||||
to_chat(user, "<span class='notice'>You override the authentication mechanism.</span>")
|
||||
|
||||
/obj/item/device/firing_pin/proc/gun_insert(mob/living/user, obj/item/gun/G)
|
||||
|
||||
Reference in New Issue
Block a user