mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Synths now relies on access permissions as well.
Ensures station bound synthetics will not be able to utilize Syndicate/Heist equipment/vessels, as well as the opposite for potential syndicate synths.
This commit is contained in:
@@ -161,7 +161,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
|
|||||||
if(A.emagged) return
|
if(A.emagged) return
|
||||||
if(!A.requiresID() || A.check_access(null))
|
if(!A.requiresID() || A.check_access(null))
|
||||||
if(A.density) A.open()
|
if(A.density) A.open()
|
||||||
else A.close()
|
else A.close()
|
||||||
if(AIRLOCK_WIRE_SAFETY)
|
if(AIRLOCK_WIRE_SAFETY)
|
||||||
A.safe = !A.safe
|
A.safe = !A.safe
|
||||||
if(!A.density)
|
if(!A.density)
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
if(src.check_access(null))
|
if(src.check_access(null))
|
||||||
return 1
|
return 1
|
||||||
if(istype(M, /mob/living/silicon))
|
if(istype(M, /mob/living/silicon))
|
||||||
//AI can do whatever he wants
|
var/mob/living/silicon/S = M
|
||||||
return 1
|
return check_access_list(S.access_rights)
|
||||||
else if(istype(M, /mob/living/carbon/human))
|
else if(istype(M, /mob/living/carbon/human))
|
||||||
var/mob/living/carbon/human/H = M
|
var/mob/living/carbon/human/H = M
|
||||||
//if they are holding or wearing a card that has access, that works
|
//if they are holding or wearing a card that has access, that works
|
||||||
|
|||||||
@@ -33,9 +33,19 @@
|
|||||||
CouldNotUseTopic(usr)
|
CouldNotUseTopic(usr)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
/obj/CanUseTopic(var/mob/user, var/datum/topic_state/state)
|
||||||
|
if(user.CanUseObjTopic(src))
|
||||||
|
return ..()
|
||||||
|
return STATUS_CLOSE
|
||||||
|
|
||||||
|
/mob/living/silicon/CanUseObjTopic(var/obj/O)
|
||||||
|
return O.allowed(src)
|
||||||
|
|
||||||
|
/mob/proc/CanUseObjTopic()
|
||||||
|
|
||||||
/obj/proc/CouldUseTopic(var/mob/user)
|
/obj/proc/CouldUseTopic(var/mob/user)
|
||||||
var/atom/host = nano_host()
|
var/atom/host = nano_host()
|
||||||
host.add_fingerprint(user)
|
host.add_hiddenprint(user)
|
||||||
|
|
||||||
/obj/proc/CouldNotUseTopic(var/mob/user)
|
/obj/proc/CouldNotUseTopic(var/mob/user)
|
||||||
// Nada
|
// Nada
|
||||||
@@ -142,4 +152,4 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/proc/show_message(msg, type, alt, alt_type)//Message, type of message (1 or 2), alternative message, alt message type (1 or 2)
|
/obj/proc/show_message(msg, type, alt, alt_type)//Message, type of message (1 or 2), alternative message, alt message type (1 or 2)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -179,6 +179,7 @@
|
|||||||
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
|
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
|
||||||
|
|
||||||
/mob/living/silicon/robot/syndicate/init()
|
/mob/living/silicon/robot/syndicate/init()
|
||||||
|
access_rights = list(access_syndicate)
|
||||||
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
|
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
|
||||||
|
|
||||||
laws = new /datum/ai_laws/syndicate_override
|
laws = new /datum/ai_laws/syndicate_override
|
||||||
|
|||||||
@@ -105,13 +105,6 @@
|
|||||||
desc = "A circuit grafted onto the bottom of an ID card. It is used to transmit access codes into other robot chassis, \
|
desc = "A circuit grafted onto the bottom of an ID card. It is used to transmit access codes into other robot chassis, \
|
||||||
allowing you to lock and unlock other robots' panels."
|
allowing you to lock and unlock other robots' panels."
|
||||||
|
|
||||||
/obj/item/weapon/card/id/robot/attack_self() //override so borgs can't flash their IDs.
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/item/weapon/card/id/robot/read()
|
|
||||||
usr << "The ID card does not appear to have any writing on it."
|
|
||||||
return
|
|
||||||
|
|
||||||
//A harvest item for serviceborgs.
|
//A harvest item for serviceborgs.
|
||||||
/obj/item/weapon/robot_harvester
|
/obj/item/weapon/robot_harvester
|
||||||
name = "auto harvester"
|
name = "auto harvester"
|
||||||
|
|||||||
@@ -23,12 +23,16 @@
|
|||||||
var/next_alarm_notice
|
var/next_alarm_notice
|
||||||
var/list/datum/alarm/queued_alarms = new()
|
var/list/datum/alarm/queued_alarms = new()
|
||||||
|
|
||||||
|
var/list/access_rights
|
||||||
|
|
||||||
#define SEC_HUD 1 //Security HUD mode
|
#define SEC_HUD 1 //Security HUD mode
|
||||||
#define MED_HUD 2 //Medical HUD mode
|
#define MED_HUD 2 //Medical HUD mode
|
||||||
|
|
||||||
/mob/living/silicon/New()
|
/mob/living/silicon/New()
|
||||||
silicon_mob_list |= src
|
silicon_mob_list |= src
|
||||||
..()
|
..()
|
||||||
|
access_rights = get_all_station_access()
|
||||||
|
access_rights = access_rights.Copy()
|
||||||
add_language("Galactic Common")
|
add_language("Galactic Common")
|
||||||
init_subsystems()
|
init_subsystems()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user