mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-29 03:21:42 +00:00
Merge branch 'master' of https://github.com/PolarisSS13/Polaris into MultiTile
# Fix Conflicts: # polaris.dme
This commit is contained in:
@@ -83,8 +83,8 @@
|
||||
bot[ai.name] = "Artificial Intelligence"
|
||||
|
||||
for(var/mob/living/silicon/robot/robot in mob_list)
|
||||
// No combat/syndicate cyborgs, no drones.
|
||||
if(!robot.scrambledcodes && !(robot.module && robot.module.hide_on_manifest))
|
||||
// No combat/syndicate cyborgs, no drones, and no AI shells.
|
||||
if(!robot.scrambledcodes && !robot.shell && !(robot.module && robot.module.hide_on_manifest))
|
||||
bot[robot.name] = "[robot.modtype] [robot.braintype]"
|
||||
|
||||
|
||||
|
||||
@@ -7,11 +7,6 @@
|
||||
id_pda_assignment = "Visitor"
|
||||
uniform = /obj/item/clothing/under/assistantformal
|
||||
|
||||
/decl/hierarchy/outfit/job/assistant/resident
|
||||
name = OUTFIT_JOB_NAME("Resident")
|
||||
id_pda_assignment = "Resident"
|
||||
uniform = /obj/item/clothing/under/color/white
|
||||
|
||||
/decl/hierarchy/outfit/job/service
|
||||
l_ear = /obj/item/device/radio/headset/headset_service
|
||||
hierarchy_type = /decl/hierarchy/outfit/job/service
|
||||
|
||||
70
code/datums/repositories/unique.dm
Normal file
70
code/datums/repositories/unique.dm
Normal file
@@ -0,0 +1,70 @@
|
||||
var/repository/unique/uniqueness_repository = new()
|
||||
|
||||
/repository/unique
|
||||
var/list/generators
|
||||
|
||||
/repository/unique/New()
|
||||
..()
|
||||
generators = list()
|
||||
|
||||
/repository/unique/proc/Generate()
|
||||
var/generator_type = args[1]
|
||||
var/datum/uniqueness_generator/generator = generators[generator_type]
|
||||
if(!generator)
|
||||
generator = new generator_type()
|
||||
generators[generator_type] = generator
|
||||
var/list/generator_args = args.Copy() // Cannot cut args directly, BYOND complains about it being readonly.
|
||||
generator_args -= generator_type
|
||||
return generator.Generate(arglist(generator_args))
|
||||
|
||||
/datum/uniqueness_generator/proc/Generate()
|
||||
return
|
||||
|
||||
/datum/uniqueness_generator/id_sequential
|
||||
var/list/ids_by_key
|
||||
|
||||
/datum/uniqueness_generator/id_sequential/New()
|
||||
..()
|
||||
ids_by_key = list()
|
||||
|
||||
/datum/uniqueness_generator/id_sequential/Generate(var/key, var/default_id = 100)
|
||||
var/id = ids_by_key[key]
|
||||
if(id)
|
||||
id++
|
||||
else
|
||||
id = default_id
|
||||
|
||||
ids_by_key[key] = id
|
||||
. = id
|
||||
|
||||
/datum/uniqueness_generator/id_random
|
||||
var/list/ids_by_key
|
||||
|
||||
/datum/uniqueness_generator/id_random/New()
|
||||
..()
|
||||
ids_by_key = list()
|
||||
|
||||
/datum/uniqueness_generator/id_random/Generate(var/key, var/min, var/max)
|
||||
var/list/ids = ids_by_key[key]
|
||||
if(!ids)
|
||||
ids = list()
|
||||
ids_by_key[key] = ids
|
||||
|
||||
if(ids.len >= (max - min) + 1)
|
||||
error("Random ID limit reached for key [key].")
|
||||
ids.Cut()
|
||||
|
||||
if(ids.len >= 0.6 * ((max-min) + 1)) // if more than 60% of possible ids used
|
||||
. = list()
|
||||
for(var/i = min to max)
|
||||
if(i in ids)
|
||||
continue
|
||||
. += i
|
||||
var/id = pick(.)
|
||||
ids += id
|
||||
return id
|
||||
else
|
||||
do
|
||||
. = rand(min, max)
|
||||
while(. in ids)
|
||||
ids += .
|
||||
@@ -33,8 +33,3 @@
|
||||
name = "Voice Changer"
|
||||
item_cost = 15
|
||||
path = /obj/item/clothing/mask/gas/voice
|
||||
|
||||
/datum/uplink_item/item/stealth_items/camera_floppy
|
||||
name = "Camera Network Access - Floppy"
|
||||
item_cost = 15
|
||||
path = /obj/item/weapon/disk/file/cameras/syndicate
|
||||
|
||||
@@ -57,9 +57,6 @@ var/const/CAMERA_WIRE_NOTHING2 = 32
|
||||
var/new_range = (C.view_range == initial(C.view_range) ? C.short_range : initial(C.view_range))
|
||||
C.setViewRange(new_range)
|
||||
|
||||
if(CAMERA_WIRE_POWER)
|
||||
C.kick_viewers() // Kicks anyone watching the camera
|
||||
|
||||
if(CAMERA_WIRE_LIGHT)
|
||||
C.light_disabled = !C.light_disabled
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ var/const/BORG_WIRE_CAMERA = 16
|
||||
if (BORG_WIRE_CAMERA)
|
||||
if(!isnull(R.camera) && !R.scrambledcodes)
|
||||
R.camera.status = mended
|
||||
R.camera.kick_viewers() // Will kick anyone who is watching the Cyborg's camera.
|
||||
|
||||
if(BORG_WIRE_LAWCHECK) //Forces a law update if the borg is set to receive them. Since an update would happen when the borg checks its laws anyway, not much use, but eh
|
||||
if (R.lawupdate)
|
||||
@@ -59,7 +58,6 @@ var/const/BORG_WIRE_CAMERA = 16
|
||||
|
||||
if (BORG_WIRE_CAMERA)
|
||||
if(!isnull(R.camera) && R.camera.can_use() && !R.scrambledcodes)
|
||||
R.camera.kick_viewers() // Kick anyone watching the Cyborg's camera
|
||||
R.visible_message("[R]'s camera lense focuses loudly.")
|
||||
R << "Your camera lense focuses loudly."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user