mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
[MIRROR] Converts a shitload of istypes to their more concise macros [MDB IGNORE] (#15702)
Converts a shitload of istypes to their more concise macros Co-authored-by: Seth Scherer <supernovaa41@gmx.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
This commit is contained in:
co-authored by
Seth Scherer
GoldenAlpharex
parent
d9e2f62a24
commit
a8c10d1659
@@ -657,7 +657,7 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
|
||||
/obj/item/modular_computer/attackby(obj/item/attacking_item, mob/user, params)
|
||||
// Check for ID first
|
||||
if(istype(attacking_item, /obj/item/card/id) && InsertID(attacking_item))
|
||||
if(isidcard(attacking_item) && InsertID(attacking_item))
|
||||
return
|
||||
|
||||
// Insert a PAI.
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
/obj/item/modular_computer/tablet/integrated/ui_data(mob/user)
|
||||
. = ..()
|
||||
.["has_light"] = TRUE
|
||||
if(istype(borgo, /mob/living/silicon/robot))
|
||||
if(iscyborg(borgo))
|
||||
var/mob/living/silicon/robot/robo = borgo
|
||||
.["light_on"] = robo.lamp_enabled
|
||||
.["comp_light_color"] = robo.lamp_color
|
||||
@@ -237,7 +237,7 @@
|
||||
/obj/item/modular_computer/tablet/integrated/toggle_flashlight()
|
||||
if(!borgo || QDELETED(borgo))
|
||||
return FALSE
|
||||
if(istype(borgo, /mob/living/silicon/robot))
|
||||
if(iscyborg(borgo))
|
||||
var/mob/living/silicon/robot/robo = borgo
|
||||
robo.toggle_headlamp()
|
||||
return TRUE
|
||||
@@ -246,7 +246,7 @@
|
||||
/obj/item/modular_computer/tablet/integrated/set_flashlight_color(color)
|
||||
if(!borgo || QDELETED(borgo) || !color)
|
||||
return FALSE
|
||||
if(istype(borgo, /mob/living/silicon/robot))
|
||||
if(iscyborg(borgo))
|
||||
var/mob/living/silicon/robot/robo = borgo
|
||||
robo.lamp_color = color
|
||||
robo.toggle_headlamp(FALSE, TRUE)
|
||||
@@ -270,7 +270,7 @@
|
||||
|
||||
/obj/item/modular_computer/tablet/integrated/syndicate/Initialize(mapload)
|
||||
. = ..()
|
||||
if(istype(borgo, /mob/living/silicon/robot))
|
||||
if(iscyborg(borgo))
|
||||
var/mob/living/silicon/robot/robo = borgo
|
||||
robo.lamp_color = COLOR_RED //Syndicate likes it red
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
return card_slot.try_eject(user)
|
||||
else
|
||||
var/obj/item/I = user.get_active_held_item()
|
||||
if(istype(I, /obj/item/card/id))
|
||||
if(isidcard(I))
|
||||
return card_slot.try_insert(I, user)
|
||||
// Eject the ID being modified.
|
||||
if("PRG_ejectmodid")
|
||||
@@ -152,7 +152,7 @@
|
||||
return card_slot2.try_eject(user)
|
||||
else
|
||||
var/obj/item/I = user.get_active_held_item()
|
||||
if(istype(I, /obj/item/card/id))
|
||||
if(isidcard(I))
|
||||
return card_slot2.try_insert(I, user)
|
||||
return TRUE
|
||||
// Used to fire someone. Wipes all access from their card and modifies their assignment.
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
photo_path = deter_path
|
||||
|
||||
/datum/computer_file/program/messenger/ui_state(mob/user)
|
||||
if(istype(user, /mob/living/silicon))
|
||||
if(issilicon(user))
|
||||
return GLOB.reverse_contained_state
|
||||
return GLOB.default_state
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
if(!holder)
|
||||
return FALSE
|
||||
|
||||
if(!istype(I, /obj/item/card/id))
|
||||
if(!isidcard(I))
|
||||
return FALSE
|
||||
|
||||
if(stored_card)
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
visible_message(span_info("[user] inserts a [HC.credits] cr holocredit chip into [src]."))
|
||||
qdel(HC)
|
||||
return
|
||||
else if(istype(I, /obj/item/card/id))
|
||||
else if(isidcard(I))
|
||||
if(state != 2)
|
||||
return
|
||||
var/obj/item/card/id/ID = I
|
||||
|
||||
Reference in New Issue
Block a user