mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
CI lint for UID() misuse (#28465)
* Adds CI check for UID() being passed parameters. * Fixes cases of UID() being passed parameters.
This commit is contained in:
@@ -116,7 +116,7 @@
|
||||
return ..()
|
||||
|
||||
/datum/action/item_action/mod/pinned_module/Grant(mob/user)
|
||||
var/user_uid = UID(user)
|
||||
var/user_uid = user.UID()
|
||||
if(!pinner_uid)
|
||||
pinner_uid = user_uid
|
||||
module.pinned_to[pinner_uid] = src
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
for(var/obj/item/mod/module/module as anything in modules)
|
||||
if(!default_pins[module.type]) //this module isnt meant to be pinned by default
|
||||
continue
|
||||
if(UID(wearer) in default_pins[module.type]) //if we already had pinned once to this user, don care anymore
|
||||
if(wearer.UID() in default_pins[module.type]) //if we already had pinned once to this user, don care anymore
|
||||
continue
|
||||
default_pins[module.type] += UID(wearer)
|
||||
default_pins[module.type] += wearer.UID()
|
||||
module.pin(wearer)
|
||||
|
||||
/obj/item/mod/control/pre_equipped/uninstall(obj/item/mod/module/old_module, deleting)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"description" = module.desc,
|
||||
"module_type" = module.module_type,
|
||||
"module_active" = module.active,
|
||||
"pinned" = module.pinned_to[UID(user)], //might just want user here
|
||||
"pinned" = module.pinned_to[user.UID()], //might just want user here
|
||||
"idle_power" = module.idle_power_cost,
|
||||
"active_power" = module.active_power_cost,
|
||||
"use_power" = module.use_power_cost,
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
/obj/item/mod/module/Initialize(mapload)
|
||||
. = ..()
|
||||
module_UID = UID(src)
|
||||
module_UID = UID()
|
||||
if(module_type != MODULE_ACTIVE)
|
||||
return
|
||||
if(ispath(device))
|
||||
|
||||
@@ -540,10 +540,10 @@
|
||||
incompatible_modules = list(/obj/item/mod/module/anti_magic)
|
||||
|
||||
/obj/item/mod/module/anti_magic/on_suit_activation()
|
||||
ADD_TRAIT(mod.wearer, TRAIT_ANTIMAGIC, "[UID(src)]")
|
||||
ADD_TRAIT(mod.wearer, TRAIT_ANTIMAGIC, "[UID()]")
|
||||
|
||||
/obj/item/mod/module/anti_magic/on_suit_deactivation(deleting = FALSE)
|
||||
REMOVE_TRAIT(mod.wearer, TRAIT_ANTIMAGIC, "[UID(src)]")
|
||||
REMOVE_TRAIT(mod.wearer, TRAIT_ANTIMAGIC, "[UID()]")
|
||||
|
||||
/obj/item/mod/module/anomaly_locked/teslawall
|
||||
name = "MOD arc-shield module" // temp
|
||||
|
||||
Reference in New Issue
Block a user