Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
fira committed Dec 4, 2023
1 parent 0b13392 commit 3094687
Show file tree
Hide file tree
Showing 145 changed files with 109 additions and 7,954 deletions.
6 changes: 0 additions & 6 deletions code/__DEFINES/typecheck/mobs_generic.dm
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#define isAI(A) (istype(A, /mob/living/silicon/ai))
#define isARES(A) (istype(A, /mob/living/silicon/decoy/ship_ai))
#define isSilicon(A) (istype(A, /mob/living/silicon))
#define isRemoteControlling(M) (M && M.client && M.client.remote_control)
#define isRemoteControllingOrAI(M) ((M && M.client && M.client.remote_control) || (istype(M, /mob/living/silicon/ai)))

#define isbrain(A) (istype(A, /mob/living/brain))
#define isrobot(A) (istype(A, /mob/living/silicon/robot))
#define isanimal(A) (istype(A, /mob/living/simple_animal))
#define isanimalhostile(A) (istype(A, /mob/living/simple_animal/hostile))
#define isanimalretaliate(A) (istype(A, /mob/living/simple_animal/hostile/retaliate))
Expand All @@ -17,12 +14,9 @@
#define iscarp(A) (istype(A, /mob/living/simple_animal/hostile/carp))
#define isclown(A) (istype(A, /mob/living/simple_animal/hostile/retaliate/clown))
#define iscarbon(A) (istype(A, /mob/living/carbon))
#define isborg(A) (isrobot(A) && !ismaintdrone(A))
#define ishighersilicon(A) (isborg(A) || isRemoteControllingOrAI(A))
#define isliving(A) (istype(A, /mob/living))
#define isobserver(A) (istype(A, /mob/dead/observer))
#define isorgan(A) (istype(A, /obj/limb))
#define isnewplayer(A) (istype(A, /mob/new_player))
#define ismaintdrone(A) (istype(A,/mob/living/silicon/robot/drone))
#define isHellhound(A) (istype(A, /mob/living/carbon/xenomorph/hellhound))
#define isaghost(A) (copytext(A.key, 1, 2) == "@")
10 changes: 0 additions & 10 deletions code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,6 @@
var/list/speaker_coverage = list()
for(var/obj/item/device/radio/R in radios)
if(R)
//Cyborg checks. Receiving message uses a bit of cyborg's charge.
var/obj/item/device/radio/borg/BR = R
if(istype(BR) && BR.myborg)
var/mob/living/silicon/robot/borg = BR.myborg
var/datum/robot_component/CO = borg.get_component("radio")
if(!CO)
continue //No radio component (Shouldn't happen)
if(!borg.is_component_functioning("radio") || !borg.cell_use_power(CO.active_usage))
continue //No power.

var/turf/speaker = get_turf(R)
if(speaker)
for(var/turf/T in hear(R.canhear_range,speaker))
Expand Down
42 changes: 1 addition & 41 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -330,56 +330,17 @@
if(!newname) //we'll stick with the oldname then
return

if(cmptext("ai",role))
if(isAI(src))
var/mob/living/silicon/ai/A = src
oldname = null//don't bother with the records update crap
A.SetName(newname)

fully_replace_character_name(oldname,newname)



//When a borg is activated, it can choose which AI it wants to be slaved to
/proc/active_ais()
. = list()
for(var/mob/living/silicon/ai/A in GLOB.alive_mob_list)
if(A.stat == DEAD)
continue
if(A.control_disabled == 1)
continue
. += A
return .

//Find an active ai with the least borgs. VERBOSE PROCNAME HUH!
/proc/select_active_ai_with_fewest_borgs()
var/mob/living/silicon/ai/selected
var/list/active = active_ais()
for(var/mob/living/silicon/ai/A in active)
if(!selected || (selected.connected_robots > A.connected_robots))
selected = A

return selected

/proc/select_active_ai(mob/user)
var/list/ais = active_ais()
if(ais.len)
if(user) . = tgui_input_list(usr,"AI signals detected:", "AI selection", ais)
else . = pick(ais)
return .

/proc/get_sorted_mobs()
var/list/old_list = getmobs()
var/list/AI_list = list()
var/list/Dead_list = list()
var/list/keyclient_list = list()
var/list/key_list = list()
var/list/logged_list = list()
for(var/named in old_list)
var/mob/M = old_list[named]
if(isSilicon(M))
AI_list |= M
else if(isobserver(M) || M.stat == 2)
if(isobserver(M) || M.stat == 2)
Dead_list |= M
else if(M.key && M.client)
keyclient_list |= M
Expand All @@ -389,7 +350,6 @@
logged_list |= M
old_list.Remove(named)
var/list/new_list = list()
new_list += AI_list
new_list += keyclient_list
new_list += key_list
new_list += logged_list
Expand Down
4 changes: 0 additions & 4 deletions code/_globalvars/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ GLOBAL_LIST_INIT(reverse_dir, list(2, 1, 3, 8, 10, 9, 11, 4, 6, 5, 7, 12, 14, 13
GLOBAL_VAR(join_motd)
GLOBAL_VAR(current_tms)

GLOBAL_LIST_INIT(BorgWireColorToFlag, RandomBorgWires())
GLOBAL_LIST(BorgIndexToFlag)
GLOBAL_LIST(BorgIndexToWireColor)
GLOBAL_LIST(BorgWireColorToIndex)
GLOBAL_LIST_INIT(AAlarmWireColorToFlag, RandomAAlarmWires())
GLOBAL_LIST(AAlarmIndexToFlag)
GLOBAL_LIST(AAlarmIndexToWireColor)
Expand Down
143 changes: 0 additions & 143 deletions code/_onclick/cyborg.dm

This file was deleted.

Loading

0 comments on commit 3094687

Please sign in to comment.