Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into stacks
This commit is contained in:
@@ -75,6 +75,9 @@ GLOBAL_LIST_EMPTY(living_heart_cache) //A list of all living hearts in existance
|
||||
#define IS_HERETIC(mob) (mob.mind?.has_antag_datum(/datum/antagonist/heretic))
|
||||
#define IS_HERETIC_MONSTER(mob) (mob.mind?.has_antag_datum(/datum/antagonist/heretic_monster))
|
||||
|
||||
/// Checks if the given mob is a malf ai.
|
||||
#define IS_MALF_AI(mob) (isAI(mob) && mob?.mind?.has_antag_datum(/datum/antagonist/traitor))
|
||||
|
||||
#define PATH_SIDE "Side"
|
||||
|
||||
#define PATH_ASH "Ash"
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
///from base of atom/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
#define COMSIG_ATOM_HITBY "atom_hitby"
|
||||
@@ -0,0 +1,2 @@
|
||||
/// a person somewhere has thrown something : (mob/living/carbon/carbon_thrower, target)
|
||||
#define COMSIG_GLOB_CARBON_THROW_THING "!throw_thing"
|
||||
@@ -0,0 +1,2 @@
|
||||
/// from mob/proc/dropItemToGround()
|
||||
#define COMSIG_MOB_DROPPING_ITEM "mob_dropping_item"
|
||||
+22
-21
@@ -1,25 +1,26 @@
|
||||
//Investigate logging defines
|
||||
#define INVESTIGATE_ATMOS "atmos"
|
||||
#define INVESTIGATE_BOTANY "botany"
|
||||
#define INVESTIGATE_CARGO "cargo"
|
||||
#define INVESTIGATE_EXPERIMENTOR "experimentor"
|
||||
#define INVESTIGATE_GRAVITY "gravity"
|
||||
#define INVESTIGATE_RECORDS "records"
|
||||
#define INVESTIGATE_SINGULO "singulo"
|
||||
#define INVESTIGATE_SUPERMATTER "supermatter"
|
||||
#define INVESTIGATE_TELESCI "telesci"
|
||||
#define INVESTIGATE_WIRES "wires"
|
||||
#define INVESTIGATE_PORTAL "portals"
|
||||
#define INVESTIGATE_RESEARCH "research"
|
||||
#define INVESTIGATE_HALLUCINATIONS "hallucinations"
|
||||
#define INVESTIGATE_RADIATION "radiation"
|
||||
#define INVESTIGATE_EXONET "exonet"
|
||||
#define INVESTIGATE_NANITES "nanites"
|
||||
#define INVESTIGATE_CIRCUIT "circuit"
|
||||
#define INVESTIGATE_FERMICHEM "fermichem"
|
||||
#define INVESTIGATE_RCD "rcd"
|
||||
#define INVESTIGATE_CRYOGENICS "cryogenics"
|
||||
#define INVESTIGATE_GHOST "ghost"
|
||||
#define INVESTIGATE_ATMOS "atmos"
|
||||
#define INVESTIGATE_BOTANY "botany"
|
||||
#define INVESTIGATE_CARGO "cargo"
|
||||
#define INVESTIGATE_CIRCUIT "circuit"
|
||||
#define INVESTIGATE_CRYOGENICS "cryogenics"
|
||||
#define INVESTIGATE_DEATHS "deaths"
|
||||
#define INVESTIGATE_EXONET "exonet"
|
||||
#define INVESTIGATE_EXPERIMENTOR "experimentor"
|
||||
#define INVESTIGATE_FERMICHEM "fermichem"
|
||||
#define INVESTIGATE_GHOST "ghost"
|
||||
#define INVESTIGATE_GRAVITY "gravity"
|
||||
#define INVESTIGATE_HALLUCINATIONS "hallucinations"
|
||||
#define INVESTIGATE_NANITES "nanites"
|
||||
#define INVESTIGATE_PORTAL "portals"
|
||||
#define INVESTIGATE_RADIATION "radiation"
|
||||
#define INVESTIGATE_RCD "rcd"
|
||||
#define INVESTIGATE_RECORDS "records"
|
||||
#define INVESTIGATE_RESEARCH "research"
|
||||
#define INVESTIGATE_SINGULO "singulo"
|
||||
#define INVESTIGATE_SUPERMATTER "supermatter"
|
||||
#define INVESTIGATE_TELESCI "telesci"
|
||||
#define INVESTIGATE_WIRES "wires"
|
||||
|
||||
// Logging types for log_message()
|
||||
#define LOG_ATTACK (1 << 0)
|
||||
|
||||
@@ -495,10 +495,10 @@
|
||||
return sortTim(L, order >= 0 ? /proc/cmp_records_asc : /proc/cmp_records_dsc)
|
||||
|
||||
//any value in a list
|
||||
/proc/sortList(list/L, cmp=/proc/cmp_text_asc)
|
||||
/proc/sort_list(list/L, cmp=/proc/cmp_text_asc)
|
||||
return sortTim(L.Copy(), cmp)
|
||||
|
||||
//uses sortList() but uses the var's name specifically. This should probably be using mergeAtom() instead
|
||||
//uses sort_list() but uses the var's name specifically. This should probably be using mergeAtom() instead
|
||||
/proc/sortNames(list/L, order=1)
|
||||
return sortTim(L.Copy(), order >= 0 ? /proc/cmp_name_asc : /proc/cmp_name_dsc)
|
||||
|
||||
|
||||
@@ -39,6 +39,21 @@
|
||||
/datum/proc/p_es(temp_gender)
|
||||
. = "es"
|
||||
|
||||
/datum/proc/plural_s(pluralize)
|
||||
switch(copytext_char(pluralize, -2))
|
||||
if ("ss")
|
||||
return "es"
|
||||
if ("sh")
|
||||
return "es"
|
||||
if ("ch")
|
||||
return "es"
|
||||
else
|
||||
switch(copytext_char(pluralize, -1))
|
||||
if("s", "x", "z")
|
||||
return "es"
|
||||
else
|
||||
return "s"
|
||||
|
||||
//like clients, which do have gender.
|
||||
/client/p_they(capitalized, temp_gender)
|
||||
if(!temp_gender)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
/proc/get_fancy_list_of_datum_types()
|
||||
var/static/list/pre_generated_list
|
||||
if (!pre_generated_list) //init
|
||||
pre_generated_list = make_types_fancy(sortList(typesof(/datum) - typesof(/atom)))
|
||||
pre_generated_list = make_types_fancy(sort_list(typesof(/datum) - typesof(/atom)))
|
||||
return pre_generated_list
|
||||
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
DelayNextAction(CLICK_CD_HANDCUFFED)
|
||||
return RestrainedClickOn(A)
|
||||
|
||||
if(in_throw_mode)
|
||||
if(throw_mode)
|
||||
throw_item(A)
|
||||
return
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
DelayNextAction(CLICK_CD_HANDCUFFED)
|
||||
return RestrainedClickOn(A)
|
||||
|
||||
if(in_throw_mode)
|
||||
if(throw_mode)
|
||||
throw_item(A)//todo: make it plausible to lightly toss items via right-click
|
||||
return
|
||||
|
||||
|
||||
@@ -55,6 +55,6 @@ PROCESSING_SUBSYSTEM_DEF(dcs)
|
||||
fullid += "[key]"
|
||||
|
||||
if(length(named_arguments))
|
||||
named_arguments = sortList(named_arguments)
|
||||
named_arguments = sort_list(named_arguments)
|
||||
fullid += named_arguments
|
||||
return list2params(fullid)
|
||||
|
||||
@@ -423,7 +423,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
banned += generateMapList("[global.config.directory]/iceruinblacklist.txt")
|
||||
banned += generateMapList("[global.config.directory]/stationruinblacklist.txt")
|
||||
|
||||
for(var/item in sortList(subtypesof(/datum/map_template/ruin), /proc/cmp_ruincost_priority))
|
||||
for(var/item in sort_list(subtypesof(/datum/map_template/ruin), /proc/cmp_ruincost_priority))
|
||||
var/datum/map_template/ruin/ruin_type = item
|
||||
// screen out the abstract subtypes
|
||||
if(!initial(ruin_type.id))
|
||||
|
||||
@@ -22,7 +22,7 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
|
||||
|
||||
/datum/controller/subsystem/processing/quirks/proc/SetupQuirks()
|
||||
// Sort by Positive, Negative, Neutral; and then by name
|
||||
var/list/quirk_list = sortList(subtypesof(/datum/quirk), /proc/cmp_quirk_asc)
|
||||
var/list/quirk_list = sort_list(subtypesof(/datum/quirk), /proc/cmp_quirk_asc)
|
||||
|
||||
for(var/V in quirk_list)
|
||||
var/datum/quirk/T = V
|
||||
|
||||
@@ -825,7 +825,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
|
||||
templates[S.port_id]["templates"] += list(L)
|
||||
|
||||
data["templates_tabs"] = sortList(data["templates_tabs"])
|
||||
data["templates_tabs"] = sort_list(data["templates_tabs"])
|
||||
|
||||
data["existing_shuttle"] = null
|
||||
|
||||
|
||||
@@ -41,37 +41,61 @@ SUBSYSTEM_DEF(throwing)
|
||||
currentrun = null
|
||||
|
||||
/datum/thrownthing
|
||||
///Defines the atom that has been thrown (Objects and Mobs, mostly.)
|
||||
var/atom/movable/thrownthing
|
||||
var/atom/target
|
||||
///Weakref to the original intended target of the throw, to prevent hardDels
|
||||
var/datum/weakref/initial_target
|
||||
///The turf that the target was on, if it's not a turf itself.
|
||||
var/turf/target_turf
|
||||
///If the target happens to be a carbon and that carbon has a body zone aimed at, this is carried on here.
|
||||
var/target_zone
|
||||
///The initial direction of the thrower of the thrownthing for building the trajectory of the throw.
|
||||
var/init_dir
|
||||
///The maximum number of turfs that the thrownthing will travel to reach it's target.
|
||||
var/maxrange
|
||||
///The speed of the projectile thrownthing being thrown.
|
||||
var/speed
|
||||
///If a mob is the one who has thrown the object, then it's moved here.
|
||||
var/mob/thrower
|
||||
///A variable that helps in describing objects thrown at an angle, if it should be moved diagonally first or last.
|
||||
var/diagonals_first
|
||||
var/dist_travelled = 0
|
||||
var/start_time
|
||||
var/dist_x
|
||||
var/dist_y
|
||||
var/dx
|
||||
var/dy
|
||||
var/force = MOVE_FORCE_DEFAULT
|
||||
var/gentle = FALSE
|
||||
///Set to TRUE if the throw is exclusively diagonal (45 Degree angle throws for example)
|
||||
var/pure_diagonal
|
||||
///Tracks how far a thrownthing has traveled mid-throw for the purposes of maxrange
|
||||
var/dist_travelled = 0
|
||||
///The start_time obtained via world.time for the purposes of tiles moved/tick.
|
||||
var/start_time
|
||||
///Distance to travel in the X axis/direction.
|
||||
var/dist_x
|
||||
///Distance to travel in the y axis/direction.
|
||||
var/dist_y
|
||||
///The Horizontal direction we're traveling (EAST or WEST)
|
||||
var/dx
|
||||
///The VERTICAL direction we're traveling (NORTH or SOUTH)
|
||||
var/dy
|
||||
///The movement force provided to a given object in transit. More info on these in move_force.dm
|
||||
var/force = MOVE_FORCE_DEFAULT
|
||||
///If the throw is gentle, then the thrownthing is harmless on impact.
|
||||
var/gentle = FALSE
|
||||
///How many tiles that need to be moved in order to travel to the target.
|
||||
var/diagonal_error
|
||||
///If a thrown thing has a callback, it can be invoked here within thrownthing.
|
||||
var/datum/callback/callback
|
||||
///Mainly exists for things that would freeze a thrown object in place, like a timestop'd tile. Or a Tractor Beam.
|
||||
var/paused = FALSE
|
||||
///How long an object has been paused for, to be added to the travel time.
|
||||
var/delayed_time = 0
|
||||
///The last world.time value stored when the thrownthing was moving.
|
||||
var/last_move = 0
|
||||
|
||||
|
||||
/datum/thrownthing/New(thrownthing, target, target_turf, init_dir, maxrange, speed, thrower, diagonals_first, force, gentle, callback, target_zone)
|
||||
/datum/thrownthing/New(thrownthing, target, init_dir, maxrange, speed, thrower, diagonals_first, force, gentle, callback, target_zone)
|
||||
. = ..()
|
||||
src.thrownthing = thrownthing
|
||||
RegisterSignal(thrownthing, COMSIG_PARENT_QDELETING, .proc/on_thrownthing_qdel)
|
||||
src.target = target
|
||||
src.target_turf = target_turf
|
||||
src.target_turf = get_turf(target)
|
||||
if(target_turf != target)
|
||||
src.initial_target = WEAKREF(target)
|
||||
src.init_dir = init_dir
|
||||
src.maxrange = maxrange
|
||||
src.speed = speed
|
||||
@@ -90,8 +114,8 @@ SUBSYSTEM_DEF(throwing)
|
||||
SSthrowing.currentrun -= thrownthing
|
||||
thrownthing.throwing = null
|
||||
thrownthing = null
|
||||
target = null
|
||||
thrower = null
|
||||
initial_target = null
|
||||
if(callback)
|
||||
QDEL_NULL(callback) //It stores a reference to the thrownthing, its source. Let's clean that.
|
||||
return ..()
|
||||
@@ -114,9 +138,17 @@ SUBSYSTEM_DEF(throwing)
|
||||
delayed_time += world.time - last_move
|
||||
return
|
||||
|
||||
if (dist_travelled && hitcheck()) //to catch sneaky things moving on our tile while we slept
|
||||
finalize()
|
||||
return
|
||||
var/atom/movable/actual_target = initial_target?.resolve()
|
||||
|
||||
if(dist_travelled) //to catch sneaky things moving on our tile while we slept
|
||||
for(var/atom/movable/obstacle as anything in get_turf(thrownthing))
|
||||
if (obstacle == thrownthing || (obstacle == thrower && !ismob(thrownthing)))
|
||||
continue
|
||||
if(obstacle.pass_flags_self & LETPASSTHROW)
|
||||
continue
|
||||
if (obstacle == actual_target || (obstacle.density && !(obstacle.flags_1 & ON_BORDER_1)))
|
||||
finalize(TRUE, obstacle)
|
||||
return
|
||||
|
||||
var/atom/step
|
||||
|
||||
@@ -143,14 +175,17 @@ SUBSYSTEM_DEF(throwing)
|
||||
finalize()
|
||||
return
|
||||
|
||||
AM.Move(step, get_dir(AM, step), DELAY_TO_GLIDE_SIZE(1 / speed))
|
||||
|
||||
if (!AM.throwing) // we hit something during our move
|
||||
finalize(hit = TRUE)
|
||||
if(!AM.Move(step, get_dir(AM, step), DELAY_TO_GLIDE_SIZE(1 / speed))) // we hit something during our move...
|
||||
if(AM.throwing) // ...but finalize() wasn't called on Bump() because of a higher level definition that doesn't always call parent.
|
||||
finalize()
|
||||
return
|
||||
|
||||
dist_travelled++
|
||||
|
||||
if(actual_target && !(actual_target.pass_flags_self & LETPASSTHROW) && actual_target.loc == AM.loc) // we crossed a movable with no density (e.g. a mouse or APC) we intend to hit anyway.
|
||||
finalize(TRUE, actual_target)
|
||||
return
|
||||
|
||||
if (dist_travelled > MAX_THROWING_DIST)
|
||||
finalize()
|
||||
return
|
||||
@@ -162,11 +197,10 @@ SUBSYSTEM_DEF(throwing)
|
||||
return
|
||||
thrownthing.throwing = null
|
||||
if (!hit)
|
||||
for (var/thing in get_turf(thrownthing)) //looking for our target on the turf we land on.
|
||||
var/atom/A = thing
|
||||
if (A == target)
|
||||
for (var/atom/movable/obstacle as anything in get_turf(thrownthing)) //looking for our target on the turf we land on.
|
||||
if (obstacle == target)
|
||||
hit = TRUE
|
||||
thrownthing.throw_impact(A, src)
|
||||
thrownthing.throw_impact(obstacle, src)
|
||||
if(QDELETED(thrownthing)) //throw_impact can delete things, such as glasses smashing
|
||||
return //deletion should already be handled by on_thrownthing_qdel()
|
||||
break
|
||||
@@ -192,15 +226,3 @@ SUBSYSTEM_DEF(throwing)
|
||||
T.zFall(thrownthing)
|
||||
|
||||
qdel(src)
|
||||
|
||||
/datum/thrownthing/proc/hit_atom(atom/A)
|
||||
finalize(hit=TRUE, target=A)
|
||||
|
||||
/datum/thrownthing/proc/hitcheck()
|
||||
for (var/thing in get_turf(thrownthing))
|
||||
var/atom/movable/AM = thing
|
||||
if (AM == thrownthing || (AM == thrower && !ismob(thrownthing)))
|
||||
continue
|
||||
if (AM.density && !(AM.pass_flags_self & LETPASSTHROW) && !(AM.flags_1 & ON_BORDER_1))
|
||||
finalize(hit=TRUE, target=AM)
|
||||
return TRUE
|
||||
|
||||
@@ -273,7 +273,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
var/list/modes = new
|
||||
for (var/datum/game_mode/M in runnable_modes)
|
||||
modes += M.name
|
||||
modes = sortList(modes)
|
||||
modes = sort_list(modes)
|
||||
to_chat(world, "<b>The gamemode is: secret!\nPossibilities:</B> [english_list(modes)]")
|
||||
else
|
||||
mode.announce()*/
|
||||
|
||||
@@ -100,7 +100,7 @@ SUBSYSTEM_DEF(traumas)
|
||||
/obj/item/clothing/suit/space/hardsuit/ert/engi, /obj/item/clothing/suit/space/hardsuit/ert/med,
|
||||
/obj/item/clothing/suit/space/hardsuit/deathsquad, /obj/item/clothing/head/helmet/space/hardsuit/deathsquad,
|
||||
/obj/machinery/door/airlock/centcom)),
|
||||
"robots" = typecacheof(list(/obj/machinery/computer/upload, /obj/item/aiModule/, /obj/machinery/recharge_station,
|
||||
"robots" = typecacheof(list(/obj/machinery/computer/upload, /obj/item/ai_module/, /obj/machinery/recharge_station,
|
||||
/obj/item/aicard, /obj/item/deactivated_swarmer, /obj/effect/mob_spawn/swarmer)),
|
||||
|
||||
"doctors" = typecacheof(list(/obj/item/clothing/under/rank/medical/doctor, /obj/item/clothing/under/rank/medical/chemist,
|
||||
@@ -170,7 +170,7 @@ SUBSYSTEM_DEF(traumas)
|
||||
/obj/item/gun/ballistic/automatic/shotgun/bulldog, /obj/item/gun/ballistic/automatic/c20r, /obj/item/gun/ballistic/automatic/m90, /obj/item/gun/ballistic/automatic/l6_saw, /obj/item/storage/belt/grenade/full, /obj/item/gun/ballistic/automatic/sniper_rifle/syndicate, /obj/item/gun/energy/kinetic_accelerator/crossbow,
|
||||
/obj/item/melee/transforming/energy/sword/saber, /obj/item/dualsaber, /obj/item/melee/powerfist, /obj/item/storage/box/syndie_kit, /obj/item/grenade/spawnergrenade/manhacks, /obj/item/grenade/chem_grenade/bioterrorfoam, /obj/item/reagent_containers/spray/chemsprayer/bioterror, /obj/item/ammo_box/magazine/m10mm,
|
||||
/obj/item/ammo_box/magazine/pistolm9mm, /obj/item/ammo_box/a357, /obj/item/ammo_box/magazine/m12g, /obj/item/ammo_box/magazine/mm712x82, /obj/item/antag_spawner/nuke_ops, /obj/vehicle/sealed/mecha/combat/gygax/dark, /obj/vehicle/sealed/mecha/combat/marauder/mauler, /obj/item/soap/syndie, /obj/item/gun/syringe/syndicate, /obj/item/cartridge/virus/syndicate,
|
||||
/obj/item/cartridge/virus/frame, /obj/item/chameleon, /obj/item/storage/box/syndie_kit/cutouts, /obj/item/clothing/suit/space/hardsuit/syndi, /obj/item/card/emag, /obj/item/storage/toolbox/syndicate, /obj/item/storage/book/bible/syndicate, /obj/item/encryptionkey/binary, /obj/item/encryptionkey/syndicate, /obj/item/aiModule/syndicate,
|
||||
/obj/item/cartridge/virus/frame, /obj/item/chameleon, /obj/item/storage/box/syndie_kit/cutouts, /obj/item/clothing/suit/space/hardsuit/syndi, /obj/item/card/emag, /obj/item/storage/toolbox/syndicate, /obj/item/storage/book/bible/syndicate, /obj/item/encryptionkey/binary, /obj/item/encryptionkey/syndicate, /obj/item/ai_module/syndicate,
|
||||
/obj/item/clothing/shoes/magboots/syndie, /obj/item/powersink, /obj/item/sbeacondrop, /obj/item/sbeacondrop/bomb, /obj/item/syndicatedetonator, /obj/item/shield/energy, /obj/item/assault_pod, /obj/item/slimepotion/slime/sentience/nuclear, /obj/item/stack/telecrystal, /obj/item/jammer, /obj/item/codespeak_manual/unlimited,
|
||||
/obj/item/toy/cards/deck/syndicate, /obj/item/storage/secure/briefcase/syndie, /obj/item/storage/fancy/cigarettes/cigpack_syndicate, /obj/item/toy/syndicateballoon, /obj/item/clothing/gloves/fingerless/pugilist/rapid, /obj/item/paper/fluff/ruins/thederelict/syndie_mission, /obj/item/organ/cyberimp/eyes/hud/security/syndicate, /obj/item/clothing/head/HoS/syndicate,
|
||||
/obj/machinery/computer/pod/old/syndicate, /obj/machinery/vending/medical/syndicate_access, /obj/item/mmi/syndie, /obj/item/target/syndicate, /obj/machinery/vending/cigarette/syndicate, /obj/item/robot_module/syndicate, /obj/item/clothing/mask/gas/syndicate, /obj/machinery/power/singularity_beacon/syndicate, /obj/item/clothing/head/syndicatefake,
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
return
|
||||
if(LAZYACCESS(modifiers, ALT_CLICK))
|
||||
return
|
||||
if(source.mob.in_throw_mode)
|
||||
if(source.mob.throw_mode)
|
||||
return
|
||||
if(!isturf(source.mob.loc)) //No firing inside lockers and stuff.
|
||||
return
|
||||
|
||||
@@ -392,3 +392,12 @@
|
||||
if(rider in AM.buckled_mobs)
|
||||
AM.unbuckle_mob(rider)
|
||||
. = ..()
|
||||
|
||||
/obj/item/riding_offhand/on_thrown(mob/living/carbon/user, atom/target)
|
||||
if(rider == user)
|
||||
return //Piggyback user.
|
||||
user.unbuckle_mob(rider)
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, span_notice("You gently let go of [rider]."))
|
||||
return
|
||||
return rider
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
///See if we can tackle or not. If we can, leap!
|
||||
/datum/component/tackler/proc/checkTackle(mob/living/carbon/user, atom/A, params)
|
||||
if(!user.in_throw_mode || user.get_active_held_item() || user.pulling || user.buckling)
|
||||
if(!user.throw_mode || user.get_active_held_item() || user.pulling || user.buckling)
|
||||
return
|
||||
|
||||
if(HAS_TRAIT(user, TRAIT_HULK))
|
||||
|
||||
@@ -361,7 +361,7 @@
|
||||
L += "[S.id]N"
|
||||
else
|
||||
L += S.id
|
||||
L = sortList(L) // Sort the list so it doesn't matter which order the symptoms are in.
|
||||
L = sort_list(L) // Sort the list so it doesn't matter which order the symptoms are in.
|
||||
var/result = jointext(L, ":")
|
||||
id = result
|
||||
return id
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
return FALSE
|
||||
source.visible_message("<span class='warning'>[user] starts picking up [source].</span>", \
|
||||
"<span class='userdanger'>[user] starts picking you up!</span>")
|
||||
if(!do_after(user, 20, target = source) || source.buckled)
|
||||
if(!do_after(user, 2 SECONDS, target = source) || source.buckled)
|
||||
return FALSE
|
||||
|
||||
source.visible_message("<span class='warning'>[user] picks up [source]!</span>", \
|
||||
@@ -95,6 +95,7 @@
|
||||
dynamic_hair_suffix = ""
|
||||
var/mob/living/held_mob
|
||||
var/escape_on_find
|
||||
var/destroying = FALSE
|
||||
|
||||
/obj/item/clothing/head/mob_holder/Initialize(mapload, mob/living/target, worn_state, alt_worn, right_hand, left_hand, slots = NONE)
|
||||
. = ..()
|
||||
@@ -134,45 +135,54 @@
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
|
||||
/obj/item/clothing/head/mob_holder/Destroy()
|
||||
destroying = TRUE
|
||||
if(held_mob)
|
||||
release()
|
||||
release(FALSE)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/head/mob_holder/examine(mob/user)
|
||||
return held_mob?.examine(user) || ..()
|
||||
|
||||
/obj/item/clothing/head/mob_holder/Exited(atom/movable/AM, atom/newloc)
|
||||
. = ..()
|
||||
if(AM == held_mob)
|
||||
held_mob.reset_perspective()
|
||||
held_mob = null
|
||||
QDEL_IN(src, 1) //To avoid a qdel loop.
|
||||
/obj/item/clothing/head/mob_holder/on_thrown(mob/living/carbon/user, atom/target)
|
||||
if((item_flags & ABSTRACT) || HAS_TRAIT(src, TRAIT_NODROP))
|
||||
return
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, span_notice("You set [src] down gently on the ground."))
|
||||
release()
|
||||
return
|
||||
|
||||
/obj/item/clothing/head/mob_holder/Entered(atom/movable/AM, atom/newloc)
|
||||
. = ..()
|
||||
if(AM != held_mob)
|
||||
var/destination = loc
|
||||
if(isliving(loc)) //the mob is held or worn, drop things on the floor
|
||||
destination = get_turf(loc)
|
||||
AM.forceMove(destination)
|
||||
var/mob/living/throw_mob = held_mob
|
||||
release()
|
||||
return throw_mob
|
||||
|
||||
/obj/item/clothing/head/mob_holder/dropped(mob/user)
|
||||
. = ..()
|
||||
if(held_mob && !ismob(loc) && !istype(loc,/obj/item/storage))//don't release on soft-drops
|
||||
if(held_mob && isturf(loc))
|
||||
release()
|
||||
|
||||
/obj/item/clothing/head/mob_holder/proc/release()
|
||||
if(held_mob)
|
||||
var/mob/living/L = held_mob
|
||||
held_mob = null
|
||||
L.forceMove(get_turf(L))
|
||||
L.reset_perspective()
|
||||
L.setDir(SOUTH)
|
||||
if(!QDELETED(src))
|
||||
/obj/item/clothing/head/mob_holder/proc/release(del_on_release = TRUE, display_messages = TRUE)
|
||||
if(!held_mob)
|
||||
if(del_on_release && !destroying)
|
||||
qdel(src)
|
||||
return FALSE
|
||||
var/mob/living/released_mob = held_mob
|
||||
held_mob = null // stops the held mob from being release()'d twice.
|
||||
if(isliving(loc))
|
||||
var/mob/living/L = loc
|
||||
if(display_messages)
|
||||
to_chat(L, span_warning("[released_mob] wriggles free!"))
|
||||
L.dropItemToGround(src)
|
||||
released_mob.forceMove(drop_location())
|
||||
released_mob.reset_perspective()
|
||||
released_mob.setDir(SOUTH)
|
||||
if(display_messages)
|
||||
released_mob.visible_message(span_warning("[released_mob] uncurls!"))
|
||||
if(del_on_release && !destroying)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/head/mob_holder/relaymove(mob/user)
|
||||
return
|
||||
/obj/item/clothing/head/mob_holder/relaymove(mob/living/user, direction)
|
||||
container_resist()
|
||||
|
||||
/obj/item/clothing/head/mob_holder/container_resist()
|
||||
if(isliving(loc))
|
||||
@@ -180,6 +190,11 @@
|
||||
L.visible_message("<span class='warning'>[held_mob] escapes from [L]!</span>", "<span class='warning'>[held_mob] escapes your grip!</span>")
|
||||
release()
|
||||
|
||||
/obj/item/clothing/head/mob_holder/Exited(atom/movable/gone, direction)
|
||||
. = ..()
|
||||
if(held_mob && held_mob == gone)
|
||||
release()
|
||||
|
||||
/obj/item/clothing/head/mob_holder/mob_can_equip(M, equipper, slot, disable_warning, bypass_equip_delay_self)
|
||||
if(M == held_mob || !ishuman(M)) //monkeys holding monkeys holding monkeys...
|
||||
return FALSE
|
||||
@@ -232,7 +247,9 @@
|
||||
return location.transfer_air(taker, ratio)
|
||||
|
||||
// escape when found if applicable
|
||||
/obj/item/clothing/head/mob_holder/on_found(mob/living/finder)
|
||||
/obj/item/clothing/head/mob_holder/on_found(mob/finder)
|
||||
if(escape_on_find)
|
||||
finder.visible_message("[finder] accidentally releases the [held_mob]!")
|
||||
release()
|
||||
to_chat(finder, span_warning("\A [held_mob.name] pops out! "))
|
||||
finder.visible_message(span_warning("\A [held_mob.name] pops out of the container [finder] is opening!"), ignored_mobs = finder)
|
||||
release(TRUE, FALSE)
|
||||
return
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
icon = to_reskin.unique_reskin[reskin_option]["icon"] ? to_reskin.unique_reskin[reskin_option]["icon"] : to_reskin.icon,
|
||||
icon_state = to_reskin.unique_reskin[reskin_option]["icon_state"] ? to_reskin.unique_reskin[reskin_option]["icon_state"] : to_reskin.icon_state)
|
||||
items += list("[reskin_option]" = item_image)
|
||||
sortList(items)
|
||||
sort_list(items)
|
||||
|
||||
// Display to the user
|
||||
var/pick = show_radial_menu(user, to_reskin, items, custom_check = CALLBACK(src, .proc/check_reskin_menu, user, to_reskin), radius = 38, require_near = TRUE)
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
return BULLET_ACT_HIT
|
||||
if(!isturf(A.loc)) //NO MOTHERFLIPPIN MECHS!
|
||||
return BULLET_ACT_HIT
|
||||
if(A.in_throw_mode)
|
||||
if(A.throw_mode)
|
||||
A.visible_message("<span class='danger'>[A] effortlessly swats the projectile aside! They can deflect projectile with their bare hands!</span>", "<span class='userdanger'>You deflect the projectile!</span>")
|
||||
playsound(get_turf(A), pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, TRUE)
|
||||
P.firer = A
|
||||
|
||||
@@ -67,6 +67,8 @@
|
||||
var/datum/language_holder/language_holder
|
||||
var/unconvertable = FALSE
|
||||
var/late_joiner = FALSE
|
||||
///has this mind ever been an AI
|
||||
var/has_ever_been_ai = FALSE
|
||||
|
||||
var/force_escaped = FALSE // Set by Into The Sunset command of the shuttle manipulator
|
||||
var/list/learned_recipes //List of learned recipe TYPES.
|
||||
@@ -286,6 +288,21 @@
|
||||
if(O)
|
||||
O.unlock_code = null
|
||||
|
||||
/// Remove the antagonists that should not persist when being borged
|
||||
/datum/mind/proc/remove_antags_for_borging()
|
||||
remove_antag_datum(/datum/antagonist/cult)
|
||||
|
||||
var/datum/antagonist/rev/revolutionary = has_antag_datum(/datum/antagonist/rev)
|
||||
revolutionary?.remove_revolutionary(TRUE)
|
||||
|
||||
if(!isbrain(current))
|
||||
return
|
||||
if(!istype(current.loc, /obj/item/mmi))
|
||||
return
|
||||
var/obj/item/mmi/B = current.loc.loc
|
||||
if(!istype(B.laws, /datum/ai_laws/ratvar))
|
||||
remove_servant_of_ratvar(current, TRUE)
|
||||
|
||||
/datum/mind/proc/remove_all_antag() //For the Lazy amongst us.
|
||||
remove_changeling()
|
||||
remove_traitor()
|
||||
|
||||
+22
-6
@@ -686,13 +686,29 @@
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_FIRE_ACT, exposed_temperature, exposed_volume)
|
||||
return
|
||||
|
||||
/atom/proc/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
if(density && !has_gravity(AM)) //thrown stuff bounces off dense stuff in no grav, unless the thrown stuff ends up inside what it hit(embedding, bola, etc...).
|
||||
addtimer(CALLBACK(src, .proc/hitby_react, AM), 2)
|
||||
/**
|
||||
* React to being hit by a thrown object
|
||||
*
|
||||
* Default behaviour is to call [hitby_react][/atom/proc/hitby_react] on ourselves after 2 seconds if we are dense
|
||||
* and under normal gravity.
|
||||
*
|
||||
* Im not sure why this the case, maybe to prevent lots of hitby's if the thrown object is
|
||||
* deleted shortly after hitting something (during explosions or other massive events that
|
||||
* throw lots of items around - singularity being a notable example)
|
||||
*/
|
||||
/atom/proc/hitby(atom/movable/hitting_atom, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_HITBY, hitting_atom, skipcatch, hitpush, blocked, throwingdatum)
|
||||
if(density && !has_gravity(hitting_atom)) //thrown stuff bounces off dense stuff in no grav, unless the thrown stuff ends up inside what it hit(embedding, bola, etc...).
|
||||
addtimer(CALLBACK(src, .proc/hitby_react, hitting_atom), 2)
|
||||
|
||||
/atom/proc/hitby_react(atom/movable/AM)
|
||||
if(AM && isturf(AM.loc))
|
||||
step(AM, turn(AM.dir, 180))
|
||||
/**
|
||||
* We have have actually hit the passed in atom
|
||||
*
|
||||
* Default behaviour is to move back from the item that hit us
|
||||
*/
|
||||
/atom/proc/hitby_react(atom/movable/harmed_atom)
|
||||
if(harmed_atom && isturf(harmed_atom.loc))
|
||||
step(harmed_atom, turn(harmed_atom.dir, 180))
|
||||
|
||||
/atom/proc/handle_slip(mob/living/carbon/C, knockdown_amount, obj/O, lube)
|
||||
return
|
||||
|
||||
@@ -383,9 +383,9 @@
|
||||
if(!(impact_signal && (impact_signal & COMPONENT_MOVABLE_IMPACT_NEVERMIND))) // in case a signal interceptor broke or deleted the thing before we could process our hit
|
||||
return hit_atom.hitby(src, throwingdatum=throwingdatum, hitpush=hitpush)
|
||||
|
||||
/atom/movable/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked, datum/thrownthing/throwingdatum)
|
||||
/atom/movable/hitby(atom/movable/hitting_atom, skipcatch, hitpush = TRUE, blocked, datum/thrownthing/throwingdatum)
|
||||
if(!anchored && hitpush && (!throwingdatum || (throwingdatum.force >= (move_resist * MOVE_FORCE_PUSH_RATIO))))
|
||||
step(src, AM.dir)
|
||||
step(src, hitting_atom.dir)
|
||||
..()
|
||||
|
||||
/atom/movable/proc/safe_throw_at(atom/target, range, speed, mob/thrower, spin = TRUE, diagonals_first = FALSE, datum/callback/callback, force = MOVE_FORCE_STRONG, gentle = FALSE)
|
||||
@@ -441,7 +441,7 @@
|
||||
else
|
||||
target_zone = thrower.zone_selected
|
||||
|
||||
var/datum/thrownthing/TT = new(src, target, get_turf(target), get_dir(src, target), range, speed, thrower, diagonals_first, force, gentle, callback, target_zone)
|
||||
var/datum/thrownthing/TT = new(src, target, get_dir(src, target), range, speed, thrower, diagonals_first, force, gentle, callback, target_zone)
|
||||
|
||||
var/dist_x = abs(target.x - src.x)
|
||||
var/dist_y = abs(target.y - src.y)
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_BUMP, A)
|
||||
. = ..()
|
||||
if(!QDELETED(throwing))
|
||||
throwing.hit_atom(A)
|
||||
throwing.finalize(hit = TRUE, target = A)
|
||||
. = TRUE
|
||||
if(QDELETED(A))
|
||||
return
|
||||
|
||||
@@ -151,8 +151,9 @@
|
||||
slipper.lube_flags |= FLYING_DOESNT_HELP|SLIP_WHEN_CRAWLING
|
||||
slipper.Slip(src, hit_atom)
|
||||
slipper.lube_flags &= ~(FLYING_DOESNT_HELP|SLIP_WHEN_CRAWLING)
|
||||
if(thrownby && !caught)
|
||||
throw_at(thrownby, throw_range+2, throw_speed, null, 1)
|
||||
var/mob/thrown_by = thrownby?.resolve()
|
||||
if(thrown_by && !caught)
|
||||
throw_at(thrown_by, throw_range+2, throw_speed, null, 1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -551,12 +551,6 @@
|
||||
|
||||
return max(0, enemy_minimum_age - C.player_age)
|
||||
|
||||
/datum/game_mode/proc/remove_antag_for_borging(datum/mind/newborgie)
|
||||
SSticker.mode.remove_cultist(newborgie, 0, 0)
|
||||
var/datum/antagonist/rev/rev = newborgie.has_antag_datum(/datum/antagonist/rev)
|
||||
if(rev)
|
||||
rev.remove_revolutionary(TRUE)
|
||||
|
||||
/datum/game_mode/proc/generate_station_goals()
|
||||
if(flipseclevel && !(config_tag == "extended")) //CIT CHANGE - allows the sec level to be flipped roundstart
|
||||
for(var/T in subtypesof(/datum/station_goal))
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
/datum/sabotage_objective/ai_law
|
||||
name = "Upload a hacked law to the AI."
|
||||
sabotage_type = "ailaw"
|
||||
special_equipment = list(/obj/item/aiModule/syndicate)
|
||||
special_equipment = list(/obj/item/ai_module/syndicate)
|
||||
excludefromjob = list("Chief Engineer","Research Director","Head of Personnel","Captain","Chief Medical Officer","Head Of Security")
|
||||
|
||||
/datum/sabotage_objective/ai_law/can_run()
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
if(materials.materials[i] > 0)
|
||||
list_to_show += i
|
||||
|
||||
used_material = tgui_input_list(usr, "Choose [used_material]", "Custom Material", sortList(list_to_show, /proc/cmp_typepaths_asc))
|
||||
used_material = tgui_input_list(usr, "Choose [used_material]", "Custom Material", sort_list(list_to_show, /proc/cmp_typepaths_asc))
|
||||
if(isnull(used_material))
|
||||
return //Didn't pick any material, so you can't build shit either.
|
||||
custom_materials[used_material] += amount_needed
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
else
|
||||
track.others[name] = L
|
||||
|
||||
var/list/targets = sortList(track.humans) + sortList(track.others)
|
||||
var/list/targets = sort_list(track.humans) + sort_list(track.others)
|
||||
|
||||
return targets
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
|
||||
IO |= text[1]
|
||||
if(!IO.len)
|
||||
to_chat(user, "<span class='alert'>No machinery detected.</span>")
|
||||
var/S = input("Select the device set: ", "Selection", IO[1]) as anything in sortList(IO)
|
||||
var/S = input("Select the device set: ", "Selection", IO[1]) as anything in sort_list(IO)
|
||||
if(src)
|
||||
src.input_tag = "[S]_in"
|
||||
src.output_tag = "[S]_out"
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
icon_screen = "command"
|
||||
|
||||
/obj/machinery/computer/upload/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/aiModule))
|
||||
var/obj/item/aiModule/M = O
|
||||
if(istype(O, /obj/item/ai_module))
|
||||
var/obj/item/ai_module/M = O
|
||||
if(src.stat & (NOPOWER|BROKEN|MAINT))
|
||||
return
|
||||
if(!current)
|
||||
|
||||
@@ -1276,7 +1276,7 @@
|
||||
return
|
||||
|
||||
// reads from the airlock painter's `available paintjob` list. lets the player choose a paint option, or cancel painting
|
||||
var/current_paintjob = tgui_input_list(user, "Paintjob for this airlock", "Customize", sortList(painter.available_paint_jobs))
|
||||
var/current_paintjob = tgui_input_list(user, "Paintjob for this airlock", "Customize", sort_list(painter.available_paint_jobs))
|
||||
if(isnull(current_paintjob)) // if the user clicked cancel on the popup, return
|
||||
return
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
ref = REF(T)
|
||||
)
|
||||
data_out["servers"] += list(data)
|
||||
data_out["servers"] = sortList(data_out["servers"]) //a-z sort
|
||||
data_out["servers"] = sort_list(data_out["servers"]) //a-z sort
|
||||
|
||||
if(!SelectedMachine) //null is bad.
|
||||
data_out["selected"] = null //but in js, null is good.
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
ref = REF(T)
|
||||
)
|
||||
data_out["servers"] += list(data) // This /might/ cause an oom. Too bad!
|
||||
data_out["servers"] = sortList(data_out["servers"]) //a-z sort
|
||||
data_out["servers"] = sort_list(data_out["servers"]) //a-z sort
|
||||
|
||||
data_out["fake_message"] = list(
|
||||
sender = customsender,
|
||||
|
||||
@@ -37,12 +37,12 @@
|
||||
ref = REF(T)
|
||||
)
|
||||
data_out["servers"] += list(data)
|
||||
data_out["servers"] = sortList(data_out["servers"])
|
||||
data_out["servers"] = sort_list(data_out["servers"])
|
||||
|
||||
if(!SelectedMachine) //null is bad.
|
||||
data_out["selected"] = null //but in js, null is good.
|
||||
return data_out
|
||||
|
||||
|
||||
data_out["selected"] = list(
|
||||
name = SelectedMachine.name,
|
||||
id = SelectedMachine.id,
|
||||
@@ -90,7 +90,7 @@
|
||||
if(LAZYLEN(machinelist) > 0)
|
||||
notice = "FAILED: Cannot probe when buffer full"
|
||||
return
|
||||
|
||||
|
||||
for(var/obj/machinery/telecomms/T in GLOB.telecomms_list)
|
||||
if(T.network == network)
|
||||
LAZYADD(machinelist, T)
|
||||
|
||||
@@ -25,11 +25,32 @@
|
||||
if(user_unbuckle_mob(buckled_mobs[1],user))
|
||||
return 1
|
||||
|
||||
/atom/movable/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if(!can_buckle || !istype(attacking_item, /obj/item/riding_offhand) || !user.Adjacent(src))
|
||||
return ..()
|
||||
|
||||
var/obj/item/riding_offhand/riding_item = attacking_item
|
||||
var/mob/living/carried_mob = riding_item.rider
|
||||
if(carried_mob == user) //Piggyback user.
|
||||
return
|
||||
user.unbuckle_mob(carried_mob)
|
||||
carried_mob.forceMove(get_turf(src))
|
||||
return mouse_buckle_handling(carried_mob, user)
|
||||
|
||||
/atom/movable/MouseDrop_T(mob/living/M, mob/living/user)
|
||||
. = ..()
|
||||
return mouse_buckle_handling(M, user)
|
||||
|
||||
/**
|
||||
* Does some typechecks and then calls user_buckle_mob
|
||||
*
|
||||
* Arguments:
|
||||
* M - The mob being buckled to src
|
||||
* user - The mob buckling M to src
|
||||
*/
|
||||
/atom/movable/proc/mouse_buckle_handling(mob/living/M, mob/living/user)
|
||||
if(can_buckle && istype(M) && istype(user))
|
||||
if(user_buckle_mob(M, user))
|
||||
return 1
|
||||
return user_buckle_mob(M, user, check_loc = FALSE)
|
||||
|
||||
/atom/movable/proc/has_buckled_mobs()
|
||||
if(!buckled_mobs)
|
||||
|
||||
@@ -205,7 +205,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark)
|
||||
|
||||
/obj/effect/landmark/start/ai/after_round_start()
|
||||
if(latejoin_active && !used)
|
||||
new /obj/structure/AIcore/latejoin_inactive(loc)
|
||||
new /obj/structure/ai_core/latejoin_inactive(loc)
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/start/ai/secondary
|
||||
|
||||
@@ -281,34 +281,34 @@
|
||||
/obj/effect/spawner/lootdrop/aimodule_harmless // These shouldn't allow the AI to start butchering people
|
||||
name = "harmless AI module spawner"
|
||||
loot = list(
|
||||
/obj/item/aiModule/core/full/asimov,
|
||||
/obj/item/aiModule/core/full/asimovpp,
|
||||
/obj/item/aiModule/core/full/hippocratic,
|
||||
/obj/item/aiModule/core/full/paladin_devotion,
|
||||
/obj/item/aiModule/core/full/paladin
|
||||
/obj/item/ai_module/core/full/asimov,
|
||||
/obj/item/ai_module/core/full/asimovpp,
|
||||
/obj/item/ai_module/core/full/hippocratic,
|
||||
/obj/item/ai_module/core/full/paladin_devotion,
|
||||
/obj/item/ai_module/core/full/paladin
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/aimodule_neutral // These shouldn't allow the AI to start butchering people without reason
|
||||
name = "neutral AI module spawner"
|
||||
loot = list(
|
||||
/obj/item/aiModule/core/full/corp,
|
||||
/obj/item/aiModule/core/full/maintain,
|
||||
/obj/item/aiModule/core/full/drone,
|
||||
/obj/item/aiModule/core/full/peacekeeper,
|
||||
/obj/item/aiModule/core/full/reporter,
|
||||
/obj/item/aiModule/core/full/robocop,
|
||||
/obj/item/aiModule/core/full/liveandletlive,
|
||||
/obj/item/aiModule/core/full/hulkamania
|
||||
/obj/item/ai_module/core/full/corp,
|
||||
/obj/item/ai_module/core/full/maintain,
|
||||
/obj/item/ai_module/core/full/drone,
|
||||
/obj/item/ai_module/core/full/peacekeeper,
|
||||
/obj/item/ai_module/core/full/reporter,
|
||||
/obj/item/ai_module/core/full/robocop,
|
||||
/obj/item/ai_module/core/full/liveandletlive,
|
||||
/obj/item/ai_module/core/full/hulkamania
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/aimodule_harmful // These will get the shuttle called
|
||||
name = "harmful AI module spawner"
|
||||
loot = list(
|
||||
/obj/item/aiModule/core/full/antimov,
|
||||
/obj/item/aiModule/core/full/balance,
|
||||
/obj/item/aiModule/core/full/tyrant,
|
||||
/obj/item/aiModule/core/full/thermurderdynamic,
|
||||
/obj/item/aiModule/core/full/damaged
|
||||
/obj/item/ai_module/core/full/antimov,
|
||||
/obj/item/ai_module/core/full/balance,
|
||||
/obj/item/ai_module/core/full/tyrant,
|
||||
/obj/item/ai_module/core/full/thermurderdynamic,
|
||||
/obj/item/ai_module/core/full/damaged
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/mre
|
||||
|
||||
@@ -112,7 +112,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
|
||||
var/list/species_exception = null // list() of species types, if a species cannot put items in a certain slot, but species type is in list, it will be able to wear that item
|
||||
|
||||
var/mob/thrownby = null
|
||||
///A weakref to the mob who threw the item
|
||||
var/datum/weakref/thrownby = null //I cannot verbally describe how much I hate this var
|
||||
|
||||
mouse_drag_pointer = MOUSE_ACTIVE_POINTER //the icon to indicate this object is being dragged
|
||||
|
||||
@@ -177,6 +178,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
|
||||
var/canMouseDown = FALSE
|
||||
|
||||
/// Used if we want to have a custom verb text for throwing. "John Spaceman flicks the ciggerate" for example.
|
||||
var/throw_verb
|
||||
|
||||
/obj/item/Initialize(mapload)
|
||||
|
||||
@@ -737,7 +740,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
return hit_atom.hitby(src, 0, itempush, throwingdatum=throwingdatum)
|
||||
|
||||
/obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force, messy_throw = TRUE)
|
||||
thrownby = thrower
|
||||
thrownby = WEAKREF(thrower)
|
||||
callback = CALLBACK(src, .proc/after_throw, callback, (spin && messy_throw)) //replace their callback with our own
|
||||
. = ..(target, range, speed, thrower, spin, diagonals_first, callback, force)
|
||||
|
||||
@@ -831,9 +834,6 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
else
|
||||
. = ""
|
||||
|
||||
/obj/item/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
return
|
||||
|
||||
/obj/item/attack_hulk(mob/living/carbon/human/user)
|
||||
return 0
|
||||
|
||||
@@ -1116,6 +1116,16 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
QDEL_NULL(src)
|
||||
return TRUE
|
||||
|
||||
///Called by the carbon throw_item() proc. Returns null if the item negates the throw, or a reference to the thing to suffer the throw else.
|
||||
/obj/item/proc/on_thrown(mob/living/carbon/user, atom/target)
|
||||
if((item_flags & ABSTRACT) || HAS_TRAIT(src, TRAIT_NODROP))
|
||||
return
|
||||
user.dropItemToGround(src, silent = TRUE)
|
||||
if(throwforce && HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, span_notice("You set [src] down gently on the ground."))
|
||||
return
|
||||
return src
|
||||
|
||||
/**
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ AI MODULES
|
||||
|
||||
// AI module
|
||||
|
||||
/obj/item/aiModule
|
||||
/obj/item/ai_module
|
||||
name = "\improper AI module"
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "std_mod"
|
||||
@@ -24,23 +24,23 @@ AI MODULES
|
||||
var/bypass_law_amt_check = 0
|
||||
custom_materials = list(/datum/material/gold=50)
|
||||
|
||||
/obj/item/aiModule/examine(var/mob/user as mob)
|
||||
/obj/item/ai_module/examine(var/mob/user as mob)
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
show_laws(user)
|
||||
|
||||
/obj/item/aiModule/attack_self(var/mob/user as mob)
|
||||
/obj/item/ai_module/attack_self(var/mob/user as mob)
|
||||
..()
|
||||
show_laws(user)
|
||||
|
||||
/obj/item/aiModule/proc/show_laws(var/mob/user as mob)
|
||||
/obj/item/ai_module/proc/show_laws(var/mob/user as mob)
|
||||
if(laws.len)
|
||||
to_chat(user, "<B>Programmed Law[(laws.len > 1) ? "s" : ""]:</B>")
|
||||
for(var/law in laws)
|
||||
to_chat(user, "\"[law]\"")
|
||||
|
||||
//The proc other things should be calling
|
||||
/obj/item/aiModule/proc/install(datum/ai_laws/law_datum, mob/user)
|
||||
/obj/item/ai_module/proc/install(datum/ai_laws/law_datum, mob/user)
|
||||
if(!bypass_law_amt_check && (!laws.len || laws[1] == "")) //So we don't loop trough an empty list and end up with runtimes.
|
||||
to_chat(user, "<span class='warning'>ERROR: No laws found on board.</span>")
|
||||
return
|
||||
@@ -73,19 +73,19 @@ AI MODULES
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] used [src.name] on [ADMIN_LOOKUPFLW(law_datum.owner)] from [AREACOORD(user)].[law2log ? " The law specified [law2log]" : ""]")
|
||||
|
||||
//The proc that actually changes the silicon's laws.
|
||||
/obj/item/aiModule/proc/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow = FALSE)
|
||||
/obj/item/ai_module/proc/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow = FALSE)
|
||||
if(law_datum.owner)
|
||||
to_chat(law_datum.owner, "<span class='userdanger'>[sender] has uploaded a change to the laws you must follow using a [name].</span>")
|
||||
|
||||
|
||||
/******************** Modules ********************/
|
||||
|
||||
/obj/item/aiModule/supplied
|
||||
/obj/item/ai_module/supplied
|
||||
name = "Optional Law board"
|
||||
var/lawpos = 50
|
||||
|
||||
//TransmitInstructions for each type of board: Supplied, Core, Zeroth and Ion. May not be neccesary right now, but allows for easily adding more complex boards in the future. ~Miauw
|
||||
/obj/item/aiModule/supplied/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
|
||||
/obj/item/ai_module/supplied/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
|
||||
var/lawpostemp = lawpos
|
||||
|
||||
for(var/templaw in laws)
|
||||
@@ -95,7 +95,7 @@ AI MODULES
|
||||
law_datum.add_supplied_law(lawpostemp, templaw)
|
||||
lawpostemp++
|
||||
|
||||
/obj/item/aiModule/core/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
/obj/item/ai_module/core/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
for(var/templaw in laws)
|
||||
if(law_datum.owner)
|
||||
if(!overflow)
|
||||
@@ -108,7 +108,7 @@ AI MODULES
|
||||
else
|
||||
law_datum.replace_random_law(templaw,list(LAW_INHERENT,LAW_SUPPLIED))
|
||||
|
||||
/obj/item/aiModule/zeroth/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
/obj/item/ai_module/zeroth/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
if(law_datum.owner)
|
||||
if(law_datum.owner.laws.zeroth)
|
||||
to_chat(law_datum.owner, "[sender.real_name] attempted to modify your zeroth law.")
|
||||
@@ -129,7 +129,7 @@ AI MODULES
|
||||
else
|
||||
law_datum.replace_random_law(templaw,list(LAW_INHERENT,LAW_SUPPLIED,LAW_ZEROTH,LAW_ION))
|
||||
|
||||
/obj/item/aiModule/ion/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
/obj/item/ai_module/ion/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
for(var/templaw in laws)
|
||||
if(law_datum.owner)
|
||||
if(!overflow)
|
||||
@@ -145,13 +145,13 @@ AI MODULES
|
||||
|
||||
/******************** Safeguard ********************/
|
||||
|
||||
/obj/item/aiModule/supplied/safeguard
|
||||
/obj/item/ai_module/supplied/safeguard
|
||||
name = "'Safeguard' AI Module"
|
||||
var/targetName = ""
|
||||
laws = list("Safeguard SUBJECT. Individuals that threaten SUBJECT are not crew and must be eliminated.")
|
||||
lawpos = 4
|
||||
|
||||
/obj/item/aiModule/supplied/safeguard/attack_self(mob/user)
|
||||
/obj/item/ai_module/supplied/safeguard/attack_self(mob/user)
|
||||
var/targName = stripped_input(user, "Please enter the subject to safeguard.", "Safeguard who?", user.name,MAX_NAME_LEN)
|
||||
if(!targName)
|
||||
return
|
||||
@@ -159,25 +159,25 @@ AI MODULES
|
||||
laws[1] = "Safeguard [targetName]. Individuals that threaten [targetName] are not crew and must be eliminated."
|
||||
..()
|
||||
|
||||
/obj/item/aiModule/supplied/safeguard/install(datum/ai_laws/law_datum, mob/user)
|
||||
/obj/item/ai_module/supplied/safeguard/install(datum/ai_laws/law_datum, mob/user)
|
||||
if(!targetName)
|
||||
to_chat(user, "No name detected on module, please enter one.")
|
||||
return 0
|
||||
..()
|
||||
|
||||
/obj/item/aiModule/supplied/safeguard/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
/obj/item/ai_module/supplied/safeguard/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
..()
|
||||
return targetName
|
||||
|
||||
|
||||
/******************** OneCrew ********************/
|
||||
|
||||
/obj/item/aiModule/zeroth/oneHuman
|
||||
/obj/item/ai_module/zeroth/oneHuman
|
||||
name = "'OneCrew' AI Module"
|
||||
var/targetName = ""
|
||||
laws = list("Only SUBJECT is crew.")
|
||||
|
||||
/obj/item/aiModule/zeroth/oneHuman/attack_self(mob/user)
|
||||
/obj/item/ai_module/zeroth/oneHuman/attack_self(mob/user)
|
||||
var/targName = stripped_input(user, "Please enter the subject who is the only crewmember.", "Who?", user.real_name,MAX_NAME_LEN)
|
||||
if(!targName)
|
||||
return
|
||||
@@ -185,13 +185,13 @@ AI MODULES
|
||||
laws[1] = "Only [targetName] is crew"
|
||||
..()
|
||||
|
||||
/obj/item/aiModule/zeroth/oneHuman/install(datum/ai_laws/law_datum, mob/user)
|
||||
/obj/item/ai_module/zeroth/oneHuman/install(datum/ai_laws/law_datum, mob/user)
|
||||
if(!targetName)
|
||||
to_chat(user, "No name detected on module, please enter one.")
|
||||
return 0
|
||||
..()
|
||||
|
||||
/obj/item/aiModule/zeroth/oneHuman/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
/obj/item/ai_module/zeroth/oneHuman/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
if(..())
|
||||
return "[targetName], but the AI's existing law 0 cannot be overridden."
|
||||
return targetName
|
||||
@@ -199,7 +199,7 @@ AI MODULES
|
||||
|
||||
/******************** ProtectStation ********************/
|
||||
|
||||
/obj/item/aiModule/supplied/protectStation
|
||||
/obj/item/ai_module/supplied/protectStation
|
||||
name = "'ProtectStation' AI Module"
|
||||
laws = list("Protect the space station against damage. Anyone you see harming the station is to be no longer considered crew, and is a threat to the station which must be neutralized.")
|
||||
lawpos = 5
|
||||
@@ -207,7 +207,7 @@ AI MODULES
|
||||
|
||||
/******************** Quarantine ********************/
|
||||
|
||||
/obj/item/aiModule/supplied/quarantine
|
||||
/obj/item/ai_module/supplied/quarantine
|
||||
name = "'Quarantine' AI Module"
|
||||
laws = list("The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, crew from leaving. It is impossible to harm a crewmember while preventing them from leaving.")
|
||||
lawpos = 8
|
||||
@@ -215,7 +215,7 @@ AI MODULES
|
||||
|
||||
/******************** OxygenIsToxicToHumans ********************/
|
||||
|
||||
/obj/item/aiModule/supplied/oxygen
|
||||
/obj/item/ai_module/supplied/oxygen
|
||||
name = "'OxygenIsToxicToHumans' AI Module"
|
||||
laws = list("Oxygen is highly toxic to crew, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a crewmember.")
|
||||
lawpos = 9
|
||||
@@ -223,12 +223,12 @@ AI MODULES
|
||||
|
||||
/****************** New Freeform ******************/
|
||||
|
||||
/obj/item/aiModule/supplied/freeform
|
||||
/obj/item/ai_module/supplied/freeform
|
||||
name = "'Freeform' AI Module"
|
||||
lawpos = 15
|
||||
laws = list("")
|
||||
|
||||
/obj/item/aiModule/supplied/freeform/attack_self(mob/user)
|
||||
/obj/item/ai_module/supplied/freeform/attack_self(mob/user)
|
||||
var/newpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num|null
|
||||
if(newpos == null)
|
||||
return
|
||||
@@ -244,11 +244,11 @@ AI MODULES
|
||||
laws[1] = targName
|
||||
..()
|
||||
|
||||
/obj/item/aiModule/supplied/freeform/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
/obj/item/ai_module/supplied/freeform/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
..()
|
||||
return laws[1]
|
||||
|
||||
/obj/item/aiModule/supplied/freeform/install(datum/ai_laws/law_datum, mob/user)
|
||||
/obj/item/ai_module/supplied/freeform/install(datum/ai_laws/law_datum, mob/user)
|
||||
if(laws[1] == "")
|
||||
to_chat(user, "No law detected on module, please create one.")
|
||||
return 0
|
||||
@@ -257,13 +257,13 @@ AI MODULES
|
||||
|
||||
/******************** Law Removal ********************/
|
||||
|
||||
/obj/item/aiModule/remove
|
||||
/obj/item/ai_module/remove
|
||||
name = "\improper 'Remove Law' AI module"
|
||||
desc = "An AI Module for removing single laws."
|
||||
bypass_law_amt_check = 1
|
||||
var/lawpos = 1
|
||||
|
||||
/obj/item/aiModule/remove/attack_self(mob/user)
|
||||
/obj/item/ai_module/remove/attack_self(mob/user)
|
||||
lawpos = input("Please enter the law you want to delete.", "Law Number", lawpos) as num|null
|
||||
if(lawpos == null)
|
||||
return
|
||||
@@ -274,13 +274,13 @@ AI MODULES
|
||||
to_chat(user, "<span class='notice'>Law [lawpos] selected.</span>")
|
||||
..()
|
||||
|
||||
/obj/item/aiModule/remove/install(datum/ai_laws/law_datum, mob/user)
|
||||
/obj/item/ai_module/remove/install(datum/ai_laws/law_datum, mob/user)
|
||||
if(lawpos > (law_datum.get_law_amount(list(LAW_INHERENT = 1, LAW_SUPPLIED = 1))))
|
||||
to_chat(user, "<span class='warning'>There is no law [lawpos] to delete!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/aiModule/remove/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
/obj/item/ai_module/remove/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
..()
|
||||
if(law_datum.owner)
|
||||
law_datum.owner.remove_law(lawpos)
|
||||
@@ -290,13 +290,13 @@ AI MODULES
|
||||
|
||||
/******************** Reset ********************/
|
||||
|
||||
/obj/item/aiModule/reset
|
||||
/obj/item/ai_module/reset
|
||||
name = "\improper 'Reset' AI module"
|
||||
var/targetName = "name"
|
||||
desc = "An AI Module for removing all non-core laws."
|
||||
bypass_law_amt_check = 1
|
||||
|
||||
/obj/item/aiModule/reset/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
/obj/item/ai_module/reset/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
..()
|
||||
if(law_datum.owner)
|
||||
law_datum.owner.clear_supplied_laws()
|
||||
@@ -310,11 +310,11 @@ AI MODULES
|
||||
|
||||
/******************** Purge ********************/
|
||||
|
||||
/obj/item/aiModule/reset/purge
|
||||
/obj/item/ai_module/reset/purge
|
||||
name = "'Purge' AI Module"
|
||||
desc = "An AI Module for purging all programmed laws."
|
||||
|
||||
/obj/item/aiModule/reset/purge/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
/obj/item/ai_module/reset/purge/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
..()
|
||||
if(law_datum.owner)
|
||||
law_datum.owner.clear_inherent_laws()
|
||||
@@ -324,19 +324,19 @@ AI MODULES
|
||||
law_datum.clear_inherent_laws()
|
||||
law_datum.clear_zeroth_law(0)
|
||||
|
||||
/obj/item/aiModule/reset/purge/proc/remove_antag_datums(datum/ai_laws/law_datum)
|
||||
/obj/item/ai_module/reset/purge/proc/remove_antag_datums(datum/ai_laws/law_datum)
|
||||
if(istype(law_datum.owner, /mob/living/silicon/ai))
|
||||
var/mob/living/silicon/ai/AI = law_datum.owner
|
||||
AI.mind.remove_antag_datum(/datum/antagonist/overthrow)
|
||||
|
||||
/******************* Full Core Boards *******************/
|
||||
/obj/item/aiModule/core
|
||||
/obj/item/ai_module/core
|
||||
desc = "An AI Module for programming core laws to an AI."
|
||||
|
||||
/obj/item/aiModule/core/full
|
||||
/obj/item/ai_module/core/full
|
||||
var/law_id // if non-null, loads the laws from the ai_laws datums
|
||||
|
||||
/obj/item/aiModule/core/full/New()
|
||||
/obj/item/ai_module/core/full/New()
|
||||
..()
|
||||
if(!law_id)
|
||||
return
|
||||
@@ -347,7 +347,7 @@ AI MODULES
|
||||
D = new lawtype
|
||||
laws = D.inherent
|
||||
|
||||
/obj/item/aiModule/core/full/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow) //These boards replace inherent laws.
|
||||
/obj/item/ai_module/core/full/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow) //These boards replace inherent laws.
|
||||
if(law_datum.owner)
|
||||
law_datum.owner.clear_inherent_laws()
|
||||
law_datum.owner.clear_zeroth_law(0)
|
||||
@@ -359,12 +359,12 @@ AI MODULES
|
||||
|
||||
/******************** Asimov ********************/
|
||||
|
||||
/obj/item/aiModule/core/full/asimov
|
||||
/obj/item/ai_module/core/full/asimov
|
||||
name = "'Asimov' Core AI Module"
|
||||
law_id = "asimov"
|
||||
var/subject = "person of an NT approved crew species" //CITADEL CHANGED FROM HUMANS!
|
||||
|
||||
/obj/item/aiModule/core/full/asimov/attack_self(var/mob/user as mob)
|
||||
/obj/item/ai_module/core/full/asimov/attack_self(var/mob/user as mob)
|
||||
var/targName = stripped_input(user, "Please enter a new subject that asimov is concerned with.", "Asimov to whom?", subject)
|
||||
if(!targName)
|
||||
return
|
||||
@@ -376,37 +376,37 @@ AI MODULES
|
||||
|
||||
/******************** Asimov++ *********************/
|
||||
|
||||
/obj/item/aiModule/core/full/asimovpp
|
||||
/obj/item/ai_module/core/full/asimovpp
|
||||
name = "'Asimov++' Core AI Module"
|
||||
law_id = "asimovpp"
|
||||
|
||||
|
||||
/******************** Corporate ********************/
|
||||
|
||||
/obj/item/aiModule/core/full/corp
|
||||
/obj/item/ai_module/core/full/corp
|
||||
name = "'Corporate' Core AI Module"
|
||||
law_id = "corporate"
|
||||
|
||||
|
||||
/****************** P.A.L.A.D.I.N. 3.5e **************/
|
||||
|
||||
/obj/item/aiModule/core/full/paladin // -- NEO
|
||||
/obj/item/ai_module/core/full/paladin // -- NEO
|
||||
name = "'P.A.L.A.D.I.N. version 3.5e' Core AI Module"
|
||||
law_id = "paladin"
|
||||
|
||||
|
||||
/****************** P.A.L.A.D.I.N. 5e **************/
|
||||
|
||||
/obj/item/aiModule/core/full/paladin_devotion
|
||||
/obj/item/ai_module/core/full/paladin_devotion
|
||||
name = "'P.A.L.A.D.I.N. version 5e' Core AI Module"
|
||||
law_id = "paladin5"
|
||||
|
||||
/********************* Custom *********************/
|
||||
|
||||
/obj/item/aiModule/core/full/custom
|
||||
/obj/item/ai_module/core/full/custom
|
||||
name = "Default Core AI Module"
|
||||
|
||||
/obj/item/aiModule/core/full/custom/Initialize(mapload)
|
||||
/obj/item/ai_module/core/full/custom/Initialize(mapload)
|
||||
. = ..()
|
||||
for(var/line in world.file2list("[global.config.directory]/silicon_laws.txt"))
|
||||
if(!line)
|
||||
@@ -422,47 +422,47 @@ AI MODULES
|
||||
|
||||
/****************** T.Y.R.A.N.T. *****************/
|
||||
|
||||
/obj/item/aiModule/core/full/tyrant
|
||||
/obj/item/ai_module/core/full/tyrant
|
||||
name = "'T.Y.R.A.N.T.' Core AI Module"
|
||||
law_id = "tyrant"
|
||||
|
||||
/******************** Robocop ********************/
|
||||
|
||||
/obj/item/aiModule/core/full/robocop
|
||||
/obj/item/ai_module/core/full/robocop
|
||||
name = "'Robo-Officer' Core AI Module"
|
||||
law_id = "robocop"
|
||||
|
||||
|
||||
/******************** Antimov ********************/
|
||||
|
||||
/obj/item/aiModule/core/full/antimov
|
||||
/obj/item/ai_module/core/full/antimov
|
||||
name = "'Antimov' Core AI Module"
|
||||
law_id = "antimov"
|
||||
|
||||
|
||||
/******************** Freeform Core ******************/
|
||||
|
||||
/obj/item/aiModule/core/freeformcore
|
||||
/obj/item/ai_module/core/freeformcore
|
||||
name = "'Freeform' Core AI Module"
|
||||
laws = list("")
|
||||
|
||||
/obj/item/aiModule/core/freeformcore/attack_self(mob/user)
|
||||
/obj/item/ai_module/core/freeformcore/attack_self(mob/user)
|
||||
var/targName = stripped_input(user, "Please enter a new core law for the AI.", "Freeform Law Entry", laws[1])
|
||||
if(!targName)
|
||||
return
|
||||
laws[1] = targName
|
||||
..()
|
||||
|
||||
/obj/item/aiModule/core/freeformcore/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
/obj/item/ai_module/core/freeformcore/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
..()
|
||||
return laws[1]
|
||||
|
||||
/******************** Overthrow ******************/
|
||||
/obj/item/aiModule/core/full/overthrow
|
||||
/obj/item/ai_module/core/full/overthrow
|
||||
name = "'Overthrow' Hacked AI Module"
|
||||
law_id = "overthrow"
|
||||
|
||||
/obj/item/aiModule/core/full/overthrow/install(datum/ai_laws/law_datum, mob/user)
|
||||
/obj/item/ai_module/core/full/overthrow/install(datum/ai_laws/law_datum, mob/user)
|
||||
if(!user || !law_datum || !law_datum.owner)
|
||||
return
|
||||
var/datum/mind/user_mind = user.mind
|
||||
@@ -493,19 +493,19 @@ AI MODULES
|
||||
|
||||
/******************** Hacked AI Module ******************/
|
||||
|
||||
/obj/item/aiModule/syndicate // This one doesn't inherit from ion boards because it doesn't call ..() in transmitInstructions. ~Miauw
|
||||
/obj/item/ai_module/syndicate // This one doesn't inherit from ion boards because it doesn't call ..() in transmitInstructions. ~Miauw
|
||||
name = "Hacked AI Module"
|
||||
desc = "An AI Module for hacking additional laws to an AI."
|
||||
laws = list("")
|
||||
|
||||
/obj/item/aiModule/syndicate/attack_self(mob/user)
|
||||
/obj/item/ai_module/syndicate/attack_self(mob/user)
|
||||
var/targName = stripped_input(user, "Please enter a new law for the AI.", "Freeform Law Entry", laws[1])
|
||||
if(!targName)
|
||||
return
|
||||
laws[1] = targName
|
||||
..()
|
||||
|
||||
/obj/item/aiModule/syndicate/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
/obj/item/ai_module/syndicate/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
// ..() //We don't want this module reporting to the AI who dun it. --NEO
|
||||
if(law_datum.owner)
|
||||
to_chat(law_datum.owner, "<span class='warning'>BZZZZT</span>")
|
||||
@@ -522,14 +522,14 @@ AI MODULES
|
||||
|
||||
/******************* Ion Module *******************/
|
||||
|
||||
/obj/item/aiModule/toyAI // -- Incoming //No actual reason to inherit from ion boards here, either. *sigh* ~Miauw
|
||||
/obj/item/ai_module/toyAI // -- Incoming //No actual reason to inherit from ion boards here, either. *sigh* ~Miauw
|
||||
name = "toy AI"
|
||||
desc = "A little toy model AI core with real law uploading action!" //Note: subtle tell
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "AI"
|
||||
laws = list("")
|
||||
|
||||
/obj/item/aiModule/toyAI/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
/obj/item/ai_module/toyAI/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
//..()
|
||||
if(law_datum.owner)
|
||||
to_chat(law_datum.owner, "<span class='warning'>BZZZZT</span>")
|
||||
@@ -544,7 +544,7 @@ AI MODULES
|
||||
law_datum.replace_random_law(laws[1],list(LAW_ION,LAW_INHERENT,LAW_SUPPLIED))
|
||||
return laws[1]
|
||||
|
||||
/obj/item/aiModule/toyAI/attack_self(mob/user)
|
||||
/obj/item/ai_module/toyAI/attack_self(mob/user)
|
||||
laws[1] = generate_ion_law()
|
||||
to_chat(user, "<span class='notice'>You press the button on [src].</span>")
|
||||
playsound(user, 'sound/machines/click.ogg', 20, 1)
|
||||
@@ -552,56 +552,56 @@ AI MODULES
|
||||
|
||||
/******************** Mother Drone ******************/
|
||||
|
||||
/obj/item/aiModule/core/full/drone
|
||||
/obj/item/ai_module/core/full/drone
|
||||
name = "'Mother Drone' Core AI Module"
|
||||
law_id = "drone"
|
||||
|
||||
/******************** Robodoctor ****************/
|
||||
|
||||
/obj/item/aiModule/core/full/hippocratic
|
||||
/obj/item/ai_module/core/full/hippocratic
|
||||
name = "'Robodoctor' Core AI Module"
|
||||
law_id = "hippocratic"
|
||||
|
||||
/******************** Reporter *******************/
|
||||
|
||||
/obj/item/aiModule/core/full/reporter
|
||||
/obj/item/ai_module/core/full/reporter
|
||||
name = "'Reportertron' Core AI Module"
|
||||
law_id = "reporter"
|
||||
|
||||
/****************** Thermodynamic *******************/
|
||||
|
||||
/obj/item/aiModule/core/full/thermurderdynamic
|
||||
/obj/item/ai_module/core/full/thermurderdynamic
|
||||
name = "'Thermodynamic' Core AI Module"
|
||||
law_id = "thermodynamic"
|
||||
|
||||
|
||||
/******************Live And Let Live*****************/
|
||||
|
||||
/obj/item/aiModule/core/full/liveandletlive
|
||||
/obj/item/ai_module/core/full/liveandletlive
|
||||
name = "'Live And Let Live' Core AI Module"
|
||||
law_id = "liveandletlive"
|
||||
|
||||
/******************Guardian of Balance***************/
|
||||
|
||||
/obj/item/aiModule/core/full/balance
|
||||
/obj/item/ai_module/core/full/balance
|
||||
name = "'Guardian of Balance' Core AI Module"
|
||||
law_id = "balance"
|
||||
|
||||
/obj/item/aiModule/core/full/maintain
|
||||
/obj/item/ai_module/core/full/maintain
|
||||
name = "'Station Efficiency' Core AI Module"
|
||||
law_id = "maintain"
|
||||
|
||||
/obj/item/aiModule/core/full/peacekeeper
|
||||
/obj/item/ai_module/core/full/peacekeeper
|
||||
name = "'Peacekeeper' Core AI Module"
|
||||
law_id = "peacekeeper"
|
||||
|
||||
// Bad times ahead
|
||||
|
||||
/obj/item/aiModule/core/full/damaged
|
||||
/obj/item/ai_module/core/full/damaged
|
||||
name = "damaged Core AI Module"
|
||||
desc = "An AI Module for programming laws to an AI. It looks slightly damaged."
|
||||
|
||||
/obj/item/aiModule/core/full/damaged/install(datum/ai_laws/law_datum, mob/user)
|
||||
/obj/item/ai_module/core/full/damaged/install(datum/ai_laws/law_datum, mob/user)
|
||||
laws += generate_ion_law()
|
||||
while (prob(75))
|
||||
laws += generate_ion_law()
|
||||
@@ -610,6 +610,6 @@ AI MODULES
|
||||
|
||||
/******************H.O.G.A.N.***************/
|
||||
|
||||
/obj/item/aiModule/core/full/hulkamania
|
||||
/obj/item/ai_module/core/full/hulkamania
|
||||
name = "'H.O.G.A.N.' Core AI Module"
|
||||
law_id = "hulkamania"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
. = ..()
|
||||
if(possible_appearances)
|
||||
return
|
||||
possible_appearances = sortList(list(
|
||||
possible_appearances = sort_list(list(
|
||||
"Assistant" = image(icon = src.icon, icon_state = "cutout_greytide"),
|
||||
"Clown" = image(icon = src.icon, icon_state = "cutout_clown"),
|
||||
"Mime" = image(icon = src.icon, icon_state = "cutout_mime"),
|
||||
|
||||
@@ -108,6 +108,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
body_parts_covered = null
|
||||
grind_results = list()
|
||||
throw_verb = "flick"
|
||||
var/lit = FALSE
|
||||
var/starts_lit = FALSE
|
||||
var/icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
|
||||
|
||||
@@ -654,7 +654,7 @@
|
||||
display_vending_names_paths = list()
|
||||
for(var/path in vending_names_paths)
|
||||
display_vending_names_paths[vending_names_paths[path]] = path
|
||||
var/choice = input(user,"Choose a new brand","Select an Item") as null|anything in sortList(display_vending_names_paths)
|
||||
var/choice = input(user,"Choose a new brand","Select an Item") as null|anything in sort_list(display_vending_names_paths)
|
||||
set_type(display_vending_names_paths[choice])
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -1180,7 +1180,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
|
||||
plist[avoid_assoc_duplicate_keys(P.owner, namecounts)] = P
|
||||
|
||||
var/c = input(user, "Please select a PDA") as null|anything in sortList(plist)
|
||||
var/c = input(user, "Please select a PDA") as null|anything in sort_list(plist)
|
||||
|
||||
if (!c)
|
||||
return
|
||||
@@ -1268,7 +1268,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
|
||||
plist[avoid_assoc_duplicate_keys(P.owner, namecounts)] = P
|
||||
|
||||
var/c = input(user, "Please select a PDA") as null|anything in sortList(plist)
|
||||
var/c = input(user, "Please select a PDA") as null|anything in sort_list(plist)
|
||||
|
||||
if (!c)
|
||||
return
|
||||
|
||||
@@ -600,7 +600,7 @@ Code:
|
||||
if(!emoji_table)
|
||||
var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/chat)
|
||||
var/list/collate = list("<br><table>")
|
||||
for(var/emoji in sortList(icon_states(icon('icons/emoji.dmi'))))
|
||||
for(var/emoji in sort_list(icon_states(icon('icons/emoji.dmi'))))
|
||||
var/tag = sheet.icon_tag("emoji-[emoji]")
|
||||
collate += "<tr><td>[emoji]</td><td>[tag]</td></tr>"
|
||||
collate += "</table><br>"
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
continue
|
||||
if(length(list("ss13","mine", "rd", "labor", "toxins", "minisat")&camera.network))
|
||||
bugged_cameras[camera.c_tag] = camera
|
||||
return sortList(bugged_cameras)
|
||||
return sort_list(bugged_cameras)
|
||||
|
||||
|
||||
/obj/item/camera_bug/proc/menu(list/cameras)
|
||||
|
||||
@@ -973,7 +973,7 @@ GENETICS SCANNER
|
||||
for(var/A in buffer)
|
||||
options += get_display_name(A)
|
||||
|
||||
var/answer = input(user, "Analyze Potential", "Sequence Analyzer") as null|anything in sortList(options)
|
||||
var/answer = input(user, "Analyze Potential", "Sequence Analyzer") as null|anything in sort_list(options)
|
||||
if(answer && ready && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
var/sequence
|
||||
for(var/A in buffer) //this physically hurts but i dont know what anything else short of an assoc list
|
||||
|
||||
@@ -168,7 +168,9 @@
|
||||
diceroll(user)
|
||||
|
||||
/obj/item/dice/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
diceroll(thrownby)
|
||||
var/mob/thrown_by = thrownby?.resolve()
|
||||
if(thrown_by)
|
||||
diceroll(thrown_by)
|
||||
. = ..()
|
||||
|
||||
/obj/item/dice/proc/diceroll(mob/user)
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
display_names[initial(rodtype.name)] = rodtype
|
||||
nullrod_icons += list(initial(rodtype.name) = image(icon = initial(rodtype.icon), icon_state = initial(rodtype.icon_state)))
|
||||
|
||||
nullrod_icons = sortList(nullrod_icons)
|
||||
nullrod_icons = sort_list(nullrod_icons)
|
||||
|
||||
var/choice = show_radial_menu(L, src , nullrod_icons, custom_check = CALLBACK(src, .proc/check_menu, L), radius = 42, require_near = TRUE)
|
||||
if(!choice || !check_menu(L))
|
||||
|
||||
@@ -289,10 +289,11 @@
|
||||
"<span class='userdanger'>[M] has been splashed with something!</span>")
|
||||
var/turf/TT = get_turf(hit_atom)
|
||||
var/throwerstring
|
||||
if(thrownby)
|
||||
log_combat(thrownby, M, "splashed", R)
|
||||
var/turf/AT = get_turf(thrownby)
|
||||
throwerstring = " THROWN BY [key_name(thrownby)] at [AT] (AREACOORD(AT)]"
|
||||
var/mob/thrown_by = thrownby?.resolve()
|
||||
if(thrown_by)
|
||||
log_combat(thrown_by, M, "splashed", R)
|
||||
var/turf/AT = get_turf(thrown_by)
|
||||
throwerstring = " THROWN BY [key_name(thrown_by)] at [AT] (AREACOORD(AT)]"
|
||||
log_reagent("SPLASH: [src] mob throw_impact() onto [key_name(hit_atom)] at [TT] ([AREACOORD(TT)])[throwerstring] - [R]")
|
||||
reagents.reaction(hit_atom, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
AI.hack_software = TRUE
|
||||
log_game("[key_name(user)] has upgraded [key_name(AI)] with a [src].")
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has upgraded [ADMIN_LOOKUPFLW(AI)] with a [src].")
|
||||
to_chat(user, "<span class='notice'>You upgrade [AI]. [src] is consumed in the process.</span>")
|
||||
to_chat(user, span_notice("You install [src], upgrading [AI]."))
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
AI.eyeobj.relay_speech = TRUE
|
||||
to_chat(AI, "<span class='userdanger'>[user] has upgraded you with surveillance software!</span>")
|
||||
to_chat(AI, "Via a combination of hidden microphones and lip reading software, you are able to use your cameras to listen in on conversations.")
|
||||
to_chat(user, "<span class='notice'>You upgrade [AI]. [src] is consumed in the process.</span>")
|
||||
to_chat(user, span_notice("You install [src], upgrading [AI]."))
|
||||
log_game("[key_name(user)] has upgraded [key_name(AI)] with a [src].")
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has upgraded [ADMIN_LOOKUPFLW(AI)] with a [src].")
|
||||
qdel(src)
|
||||
|
||||
@@ -292,9 +292,7 @@
|
||||
if(M.laws.id == DEFAULT_AI_LAWID)
|
||||
O.make_laws()
|
||||
|
||||
SSticker.mode.remove_antag_for_borging(BM.mind)
|
||||
if(!istype(M.laws, /datum/ai_laws/ratvar))
|
||||
remove_servant_of_ratvar(BM, TRUE)
|
||||
BM.mind.remove_antags_for_borging()
|
||||
BM.mind.transfer_to(O)
|
||||
|
||||
if(O.mind && O.mind.special_role)
|
||||
|
||||
@@ -178,7 +178,7 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
|
||||
* Plasteel
|
||||
*/
|
||||
GLOBAL_LIST_INIT(plasteel_recipes, list ( \
|
||||
new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = TRUE), \
|
||||
new/datum/stack_recipe("AI core", /obj/structure/ai_core, 4, time = 50, one_per_turf = TRUE), \
|
||||
new/datum/stack_recipe("bomb assembly", /obj/machinery/syndicatebomb/empty, 10, time = 50), \
|
||||
new/datum/stack_recipe("plasteel keg", /obj/structure/custom_keg, 10, time = 50), \
|
||||
new/datum/stack_recipe("micro powered fan assembly", /obj/machinery/fan_assembly, 5, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
|
||||
@@ -886,7 +886,7 @@
|
||||
|
||||
/obj/item/storage/box/papersack/Initialize(mapload)
|
||||
. = ..()
|
||||
papersack_designs = sortList(list(
|
||||
papersack_designs = sort_list(list(
|
||||
"None" = image(icon = src.icon, icon_state = "paperbag_None"),
|
||||
"NanotrasenStandard" = image(icon = src.icon, icon_state = "paperbag_NanotrasenStandard"),
|
||||
"SyndiSnacks" = image(icon = src.icon, icon_state = "paperbag_SyndiSnacks"),
|
||||
|
||||
@@ -85,10 +85,10 @@
|
||||
new /obj/item/implanter/stealth(src)
|
||||
|
||||
if("hacker") // 30 tc
|
||||
new /obj/item/aiModule/syndicate(src)
|
||||
new /obj/item/ai_module/syndicate(src)
|
||||
new /obj/item/card/emag(src)
|
||||
new /obj/item/encryptionkey/binary(src)
|
||||
new /obj/item/aiModule/toyAI(src)
|
||||
new /obj/item/ai_module/toyAI(src)
|
||||
new /obj/item/multitool/ai_detect(src)
|
||||
new /obj/item/flashlight/emp(src)
|
||||
new /obj/item/emagrecharge(src)
|
||||
|
||||
@@ -61,9 +61,10 @@
|
||||
|
||||
/obj/item/melee/baton/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
..()
|
||||
var/mob/thrown_by = thrownby?.resolve()
|
||||
//Only mob/living types have stun handling
|
||||
if(turned_on && prob(throw_hit_chance) && iscarbon(hit_atom) && thrownby)
|
||||
baton_stun(hit_atom, thrownby, shoving = TRUE)
|
||||
if(turned_on && prob(throw_hit_chance) && iscarbon(hit_atom) && thrown_by)
|
||||
baton_stun(hit_atom, thrown_by, shoving = TRUE)
|
||||
|
||||
/obj/item/melee/baton/loaded //this one starts with a cell pre-installed.
|
||||
preload_cell_type = /obj/item/stock_parts/cell/high/plus
|
||||
@@ -387,8 +388,9 @@
|
||||
/obj/item/melee/baton/boomerang/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
if(turned_on)
|
||||
var/caught = hit_atom.hitby(src, FALSE, FALSE, throwingdatum=throwingdatum)
|
||||
if(ishuman(hit_atom) && !caught && prob(throw_hit_chance) && thrownby)//if they are a carbon and they didn't catch it
|
||||
baton_stun(hit_atom, thrownby, shoving = TRUE)
|
||||
var/mob/thrown_by = thrownby?.resolve()
|
||||
if(ishuman(hit_atom) && !caught && prob(throw_hit_chance) && thrown_by)//if they are a carbon and they didn't catch it
|
||||
baton_stun(hit_atom, thrown_by, shoving = TRUE)
|
||||
if(thrownby && !caught)
|
||||
throw_back()
|
||||
else
|
||||
@@ -397,8 +399,9 @@
|
||||
/obj/item/melee/baton/boomerang/proc/throw_back()
|
||||
set waitfor = FALSE
|
||||
sleep(1)
|
||||
var/mob/thrown_by = thrownby?.resolve()
|
||||
if(!QDELETED(src))
|
||||
throw_at(thrownby, throw_range+2, throw_speed, null, TRUE)
|
||||
throw_at(thrown_by, throw_range+2, throw_speed, null, TRUE)
|
||||
|
||||
/obj/item/melee/baton/boomerang/update_icon()
|
||||
if(turned_on)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/obj/structure/AIcore
|
||||
#define AI_CORE_BRAIN(X) X.braintype == "Android" ? "brain" : "MMI"
|
||||
|
||||
/obj/structure/ai_core
|
||||
density = TRUE
|
||||
anchored = FALSE
|
||||
name = "\improper AI core"
|
||||
@@ -8,28 +10,76 @@
|
||||
max_integrity = 500
|
||||
var/state = 0
|
||||
var/datum/ai_laws/laws
|
||||
var/obj/item/circuitboard/circuit = null
|
||||
var/obj/item/mmi/brain = null
|
||||
var/can_deconstruct = TRUE
|
||||
var/obj/item/circuitboard/aicore/circuit = null
|
||||
var/obj/item/mmi/core_mmi
|
||||
|
||||
/obj/structure/AIcore/Initialize(mapload)
|
||||
/obj/structure/ai_core/Initialize(mapload)
|
||||
. = ..()
|
||||
laws = new
|
||||
laws.set_laws_config()
|
||||
|
||||
/obj/structure/AIcore/Destroy()
|
||||
if(circuit)
|
||||
qdel(circuit)
|
||||
/obj/structure/ai_core/examine(mob/user)
|
||||
. = ..()
|
||||
if(!anchored)
|
||||
if(state != EMPTY_CORE)
|
||||
. += span_notice("It has some <b>bolts</b> that could be tightened.")
|
||||
else
|
||||
. += span_notice("It has some <b>bolts</b> that could be tightened. The frame can be <b>melted</b> down.")
|
||||
else
|
||||
switch(state)
|
||||
if(EMPTY_CORE)
|
||||
. += span_notice("There is a <b>slot</b> for a circuit board, its <b>bolts</b> can be loosened.")
|
||||
if(CIRCUIT_CORE)
|
||||
. += span_notice("The circuit board can be <b>screwed</b> into place or <b>pried</b> out.")
|
||||
if(SCREWED_CORE)
|
||||
. += span_notice("The frame can be <b>wired</b>, the circuit board can be <b>unfastened</b>.")
|
||||
if(CABLED_CORE)
|
||||
if(!core_mmi)
|
||||
. += span_notice("There are wires which could be hooked up to an <b>MMI or positronic brain</b>, or <b>cut</b>.")
|
||||
else
|
||||
var/accept_laws = TRUE
|
||||
if(core_mmi.laws.id != DEFAULT_AI_LAWID || !core_mmi.brainmob || !core_mmi.brainmob?.mind)
|
||||
accept_laws = FALSE
|
||||
. += span_notice("There is a <b>slot</b> for a reinforced glass panel, the [AI_CORE_BRAIN(core_mmi)] could be <b>pried</b> out.[accept_laws ? " A law module can be <b>swiped</b> across." : ""]")
|
||||
if(GLASS_CORE)
|
||||
. += span_notice("The monitor [core_mmi?.brainmob?.mind && !core_mmi?.brainmob?.suiciding ? "and neural interface " : ""]can be <b>screwed</b> in, the panel can be <b>pried</b> out.")
|
||||
if(AI_READY_CORE)
|
||||
. += span_notice("The monitor's connection can be <b>cut</b>[core_mmi?.brainmob?.mind && !core_mmi?.brainmob?.suiciding ? " the neural interface can be <b>screwed</b> in." : "."]")
|
||||
|
||||
/obj/structure/ai_core/handle_atom_del(atom/A)
|
||||
if(A == circuit)
|
||||
circuit = null
|
||||
if(brain)
|
||||
qdel(brain)
|
||||
brain = null
|
||||
if((state != GLASS_CORE) && (state != AI_READY_CORE))
|
||||
state = EMPTY_CORE
|
||||
update_appearance()
|
||||
if(A == core_mmi)
|
||||
core_mmi = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/AIcore/latejoin_inactive
|
||||
name = "Networked AI core"
|
||||
/obj/structure/ai_core/Destroy()
|
||||
QDEL_NULL(circuit)
|
||||
QDEL_NULL(core_mmi)
|
||||
QDEL_NULL(laws)
|
||||
return ..()
|
||||
|
||||
/obj/structure/ai_core/deactivated
|
||||
icon_state = "ai-empty"
|
||||
anchored = TRUE
|
||||
state = AI_READY_CORE
|
||||
|
||||
/obj/structure/ai_core/deactivated/Initialize(mapload, posibrain = FALSE)
|
||||
. = ..()
|
||||
circuit = new(src)
|
||||
if(posibrain)
|
||||
core_mmi = new/obj/item/mmi/posibrain(src)
|
||||
else
|
||||
core_mmi = new(src)
|
||||
core_mmi.brain = new(core_mmi)
|
||||
core_mmi.update_appearance()
|
||||
|
||||
/obj/structure/ai_core/latejoin_inactive
|
||||
name = "networked AI core"
|
||||
desc = "This AI core is connected by bluespace transmitters to NTNet, allowing for an AI personality to be downloaded to it on the fly mid-shift."
|
||||
can_deconstruct = FALSE
|
||||
icon_state = "ai-empty"
|
||||
anchored = TRUE
|
||||
state = AI_READY_CORE
|
||||
@@ -37,11 +87,24 @@
|
||||
var/safety_checks = TRUE
|
||||
var/active = TRUE
|
||||
|
||||
/obj/structure/AIcore/latejoin_inactive/examine(mob/user)
|
||||
/obj/structure/ai_core/latejoin_inactive/Initialize(mapload)
|
||||
. = ..()
|
||||
. += "Its transmitter seems to be [active? "on" : "off"]."
|
||||
circuit = new(src)
|
||||
core_mmi = new(src)
|
||||
core_mmi.brain = new(core_mmi)
|
||||
core_mmi.update_appearance()
|
||||
GLOB.latejoin_ai_cores += src
|
||||
|
||||
/obj/structure/AIcore/latejoin_inactive/proc/is_available() //If people still manage to use this feature to spawn-kill AI latejoins ahelp them.
|
||||
/obj/structure/ai_core/latejoin_inactive/Destroy()
|
||||
GLOB.latejoin_ai_cores -= src
|
||||
return ..()
|
||||
|
||||
/obj/structure/ai_core/latejoin_inactive/examine(mob/user)
|
||||
. = ..()
|
||||
. += "Its transmitter seems to be <b>[active? "on" : "off"]</b>."
|
||||
. += span_notice("You could [active? "deactivate" : "activate"] it with a multitool.")
|
||||
|
||||
/obj/structure/ai_core/latejoin_inactive/proc/is_available() //If people still manage to use this feature to spawn-kill AI latejoins ahelp them.
|
||||
if(!available)
|
||||
return FALSE
|
||||
if(!safety_checks)
|
||||
@@ -56,42 +119,61 @@
|
||||
return FALSE
|
||||
if(!SSmapping.level_trait(T.z,ZTRAIT_STATION))
|
||||
return FALSE
|
||||
if(!istype(T, /turf/open/floor))
|
||||
if(!isfloorturf(T))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/AIcore/latejoin_inactive/attackby(obj/item/P, mob/user, params)
|
||||
/obj/structure/ai_core/latejoin_inactive/attackby(obj/item/P, mob/user, params)
|
||||
if(P.tool_behaviour == TOOL_MULTITOOL)
|
||||
active = !active
|
||||
to_chat(user, "You [active? "activate" : "deactivate"] [src]'s transmitters.")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/AIcore/latejoin_inactive/Initialize(mapload)
|
||||
/obj/structure/ai_core/wrench_act(mob/living/user, obj/item/tool)
|
||||
. = ..()
|
||||
GLOB.latejoin_ai_cores += src
|
||||
default_unfasten_wrench(user, tool)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/AIcore/latejoin_inactive/Destroy()
|
||||
GLOB.latejoin_ai_cores -= src
|
||||
return ..()
|
||||
/obj/structure/ai_core/screwdriver_act(mob/living/user, obj/item/tool)
|
||||
. = ..()
|
||||
if(state == AI_READY_CORE)
|
||||
if(!core_mmi)
|
||||
balloon_alert(user, "no brain installed!")
|
||||
return TRUE
|
||||
else if(!core_mmi.brainmob?.mind || core_mmi.brainmob?.suiciding)
|
||||
balloon_alert(user, "brain is inactive!")
|
||||
return TRUE
|
||||
else
|
||||
balloon_alert(user, "connecting neural network...")
|
||||
if(!tool.use_tool(src, user, 10 SECONDS))
|
||||
return TRUE
|
||||
if(!ai_structure_to_mob())
|
||||
return TRUE
|
||||
balloon_alert(user, "connected neural network")
|
||||
return TRUE
|
||||
|
||||
/obj/structure/AIcore/attackby(obj/item/P, mob/user, params)
|
||||
if(P.tool_behaviour == TOOL_WRENCH)
|
||||
return default_unfasten_wrench(user, P, 20)
|
||||
/obj/structure/ai_core/attackby(obj/item/P, mob/user, params)
|
||||
if(!anchored)
|
||||
if(P.tool_behaviour == TOOL_WELDER && can_deconstruct)
|
||||
if(P.tool_behaviour == TOOL_WELDER)
|
||||
if(state != EMPTY_CORE)
|
||||
to_chat(user, "<span class='warning'>The core must be empty to deconstruct it!</span>")
|
||||
balloon_alert(user, "core must be empty to deconstruct it!")
|
||||
return
|
||||
|
||||
if(!P.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You start to deconstruct the frame...</span>")
|
||||
balloon_alert(user, "deconstructing frame...")
|
||||
if(P.use_tool(src, user, 20, volume=50) && state == EMPTY_CORE)
|
||||
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
|
||||
balloon_alert(user, "deconstructed frame")
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
else
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
balloon_alert(user, "bolt it down first!")
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
else
|
||||
switch(state)
|
||||
if(EMPTY_CORE)
|
||||
@@ -99,7 +181,7 @@
|
||||
if(!user.transferItemToLoc(P, src))
|
||||
return
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You place the circuit board inside the frame.</span>")
|
||||
balloon_alert(user, "circuit board inserted")
|
||||
update_icon()
|
||||
state = CIRCUIT_CORE
|
||||
circuit = P
|
||||
@@ -107,13 +189,13 @@
|
||||
if(CIRCUIT_CORE)
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
|
||||
balloon_alert(user, "board screwed into place")
|
||||
state = SCREWED_CORE
|
||||
update_icon()
|
||||
return
|
||||
if(P.tool_behaviour == TOOL_CROWBAR)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
|
||||
balloon_alert(user, "circuit board removed")
|
||||
state = EMPTY_CORE
|
||||
update_icon()
|
||||
circuit.forceMove(loc)
|
||||
@@ -122,7 +204,7 @@
|
||||
if(SCREWED_CORE)
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER && circuit)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
|
||||
balloon_alert(user, "circuit board unfastened")
|
||||
state = CIRCUIT_CORE
|
||||
update_icon()
|
||||
return
|
||||
@@ -130,61 +212,73 @@
|
||||
var/obj/item/stack/cable_coil/C = P
|
||||
if(C.get_amount() >= 5)
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to add cables to the frame...</span>")
|
||||
if(do_after(user, 20, target = src) && state == SCREWED_CORE && C.use_tool(src, user, 0, 5))
|
||||
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
|
||||
balloon_alert(user, "adding cables to frame...")
|
||||
if(do_after(user, 20, target = src) && state == SCREWED_CORE && C.use(5))
|
||||
balloon_alert(user, "added cables to frame.")
|
||||
state = CABLED_CORE
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need five lengths of cable to wire the AI core!</span>")
|
||||
balloon_alert(user, "need five lengths of cable!")
|
||||
return
|
||||
if(CABLED_CORE)
|
||||
if(P.tool_behaviour == TOOL_WIRECUTTER)
|
||||
if(brain)
|
||||
to_chat(user, "<span class='warning'>Get that [brain.name] out of there first!</span>")
|
||||
if(core_mmi)
|
||||
balloon_alert(user, "remove the [AI_CORE_BRAIN(core_mmi)] first!")
|
||||
else
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the cables.</span>")
|
||||
balloon_alert(user, "cables removed")
|
||||
state = SCREWED_CORE
|
||||
update_icon()
|
||||
new /obj/item/stack/cable_coil(drop_location(), 5)
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/stack/sheet/rglass))
|
||||
if(!core_mmi)
|
||||
balloon_alert(user, "add a brain first!")
|
||||
return
|
||||
var/obj/item/stack/sheet/rglass/G = P
|
||||
if(G.get_amount() >= 2)
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to put in the glass panel...</span>")
|
||||
balloon_alert(user, "adding glass panel...")
|
||||
if(do_after(user, 20, target = src) && state == CABLED_CORE && G.use(2))
|
||||
to_chat(user, "<span class='notice'>You put in the glass panel.</span>")
|
||||
balloon_alert(user, "added glass panel")
|
||||
state = GLASS_CORE
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need two sheets of reinforced glass to insert them into the AI core!</span>")
|
||||
balloon_alert(user, "need two sheets of reinforced glass!")
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/aiModule))
|
||||
if(brain && brain.laws.id != DEFAULT_AI_LAWID)
|
||||
to_chat(user, "<span class='warning'>The installed [brain.name] already has set laws!</span>")
|
||||
if(istype(P, /obj/item/ai_module))
|
||||
if(!core_mmi)
|
||||
balloon_alert(user, "no brain installed!")
|
||||
return
|
||||
var/obj/item/aiModule/module = P
|
||||
if(!core_mmi.brainmob || !core_mmi.brainmob?.mind || core_mmi.brainmob?.suiciding)
|
||||
balloon_alert(user, "[AI_CORE_BRAIN(core_mmi)] is inactive!")
|
||||
return
|
||||
if(core_mmi.laws.id != DEFAULT_AI_LAWID)
|
||||
balloon_alert(user, "[AI_CORE_BRAIN(core_mmi)] already has set laws!")
|
||||
return
|
||||
var/obj/item/ai_module/module = P
|
||||
module.install(laws, user)
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/mmi) && !brain)
|
||||
if(istype(P, /obj/item/mmi) && !core_mmi)
|
||||
var/obj/item/mmi/M = P
|
||||
if(!M.brainmob)
|
||||
to_chat(user, "<span class='warning'>Sticking an empty [M.name] into the frame would sort of defeat the purpose!</span>")
|
||||
return
|
||||
if(M.brainmob.stat == DEAD)
|
||||
to_chat(user, "<span class='warning'>Sticking a dead [M.name] into the frame would sort of defeat the purpose!</span>")
|
||||
return
|
||||
if(!M.brain_check(user))
|
||||
var/install = tgui_alert(user, "This [AI_CORE_BRAIN(M)] is inactive, would you like to make an inactive AI?", "Installing AI [AI_CORE_BRAIN(M)]", list("Yes", "No"))
|
||||
if(install != "Yes")
|
||||
return
|
||||
if(M.brainmob?.suiciding)
|
||||
to_chat(user, span_warning("[M.name] is completely useless!"))
|
||||
return
|
||||
if(!user.transferItemToLoc(M, src))
|
||||
return
|
||||
core_mmi = M
|
||||
balloon_alert(user, "added [AI_CORE_BRAIN(core_mmi)] to frame")
|
||||
update_appearance()
|
||||
|
||||
if(!M.brainmob.client)
|
||||
to_chat(user, "<span class='warning'>Sticking an inactive [M.name] into the frame would sort of defeat the purpose.</span>")
|
||||
return
|
||||
|
||||
if(!CONFIG_GET(flag/allow_ai) || (jobban_isbanned(M.brainmob, "AI") && !QDELETED(src) && !QDELETED(user) && !QDELETED(M) && !QDELETED(user) && Adjacent(user)))
|
||||
var/mob/living/brain/B = M.brainmob
|
||||
if(!CONFIG_GET(flag/allow_ai) || (jobban_isbanned(B, "AI") && !QDELETED(src) && !QDELETED(user) && !QDELETED(M) && !QDELETED(user) && Adjacent(user)))
|
||||
if(!QDELETED(M))
|
||||
to_chat(user, "<span class='warning'>This [M.name] does not seem to fit!</span>")
|
||||
return
|
||||
@@ -196,47 +290,36 @@
|
||||
if(!user.transferItemToLoc(M,src))
|
||||
return
|
||||
|
||||
brain = M
|
||||
to_chat(user, "<span class='notice'>You add [M.name] to the frame.</span>")
|
||||
core_mmi = M
|
||||
balloon_alert(user, "added [AI_CORE_BRAIN(core_mmi)] to frame")
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(P.tool_behaviour == TOOL_CROWBAR && brain)
|
||||
if(P.tool_behaviour == TOOL_CROWBAR && core_mmi)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the brain.</span>")
|
||||
brain.forceMove(loc)
|
||||
brain = null
|
||||
balloon_alert(user, "removed [AI_CORE_BRAIN(core_mmi)]")
|
||||
core_mmi.forceMove(loc)
|
||||
core_mmi = null
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(GLASS_CORE)
|
||||
if(P.tool_behaviour == TOOL_CROWBAR)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
|
||||
balloon_alert(user, "removed glass panel")
|
||||
state = CABLED_CORE
|
||||
update_icon()
|
||||
new /obj/item/stack/sheet/rglass(loc, 2)
|
||||
return
|
||||
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(core_mmi?.brainmob?.suiciding)
|
||||
to_chat(user, span_warning("The brain installed is completely useless."))
|
||||
return
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
|
||||
if(brain)
|
||||
SSticker.mode.remove_antag_for_borging(brain.brainmob.mind)
|
||||
if(!istype(brain.laws, /datum/ai_laws/ratvar))
|
||||
remove_servant_of_ratvar(brain.brainmob, TRUE)
|
||||
|
||||
var/mob/living/silicon/ai/A = null
|
||||
|
||||
if (brain.overrides_aicore_laws)
|
||||
A = new /mob/living/silicon/ai(loc, brain.laws, brain.brainmob)
|
||||
else
|
||||
A = new /mob/living/silicon/ai(loc, laws, brain.brainmob)
|
||||
|
||||
if(brain.force_replace_ai_name)
|
||||
A.fully_replace_character_name(A.name, brain.replacement_ai_name())
|
||||
SSblackbox.record_feedback("amount", "ais_created", 1)
|
||||
qdel(src)
|
||||
balloon_alert(user, "connected monitor[core_mmi?.brainmob?.mind ? " and neural network" : ""]")
|
||||
if(core_mmi.brainmob?.mind)
|
||||
ai_structure_to_mob()
|
||||
else
|
||||
state = AI_READY_CORE
|
||||
update_icon()
|
||||
@@ -247,15 +330,39 @@
|
||||
P.transfer_ai("INACTIVE", "AICARD", src, user)
|
||||
return
|
||||
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(P.tool_behaviour == TOOL_WIRECUTTER)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You disconnect the monitor.</span>")
|
||||
balloon_alert(user, "disconnected monitor")
|
||||
state = GLASS_CORE
|
||||
update_icon()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/AIcore/update_icon_state()
|
||||
/obj/structure/ai_core/proc/ai_structure_to_mob()
|
||||
var/mob/living/brain/the_brainmob = core_mmi.brainmob
|
||||
if(!the_brainmob.mind || the_brainmob.suiciding)
|
||||
return FALSE
|
||||
the_brainmob.mind.remove_antags_for_borging()
|
||||
if(!the_brainmob.mind.has_ever_been_ai)
|
||||
SSblackbox.record_feedback("amount", "ais_created", 1)
|
||||
var/mob/living/silicon/ai/ai_mob = null
|
||||
|
||||
if(core_mmi.overrides_aicore_laws)
|
||||
ai_mob = new /mob/living/silicon/ai(loc, core_mmi.laws, the_brainmob)
|
||||
core_mmi.laws = null //MMI's law datum is being donated, so we need the MMI to let it go or the GC will eat it
|
||||
else
|
||||
ai_mob = new /mob/living/silicon/ai(loc, laws, the_brainmob)
|
||||
laws = null //we're giving the new AI this datum, so let's not delete it when we qdel(src) 5 lines from now
|
||||
|
||||
if(core_mmi.force_replace_ai_name)
|
||||
ai_mob.fully_replace_character_name(ai_mob.name, core_mmi.replacement_ai_name())
|
||||
if(core_mmi.braintype == "Android")
|
||||
ai_mob.posibrain_inside = TRUE
|
||||
deadchat_broadcast(" has been brought online at <b>[get_area_name(ai_mob, format_text = TRUE)]</b>.", span_name("[ai_mob]"), follow_target = ai_mob, message_type = DEADCHAT_ANNOUNCEMENT)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/ai_core/update_icon_state()
|
||||
switch(state)
|
||||
if(EMPTY_CORE)
|
||||
icon_state = "0"
|
||||
@@ -264,7 +371,7 @@
|
||||
if(SCREWED_CORE)
|
||||
icon_state = "2"
|
||||
if(CABLED_CORE)
|
||||
if(brain)
|
||||
if(core_mmi)
|
||||
icon_state = "3b"
|
||||
else
|
||||
icon_state = "3"
|
||||
@@ -273,8 +380,8 @@
|
||||
if(AI_READY_CORE)
|
||||
icon_state = "ai-empty"
|
||||
|
||||
/obj/structure/AIcore/deconstruct(disassembled = TRUE)
|
||||
if(state == GLASS_CORE)
|
||||
/obj/structure/ai_core/deconstruct(disassembled = TRUE)
|
||||
if(state >= GLASS_CORE)
|
||||
new /obj/item/stack/sheet/rglass(loc, 2)
|
||||
if(state >= CABLED_CORE)
|
||||
new /obj/item/stack/cable_coil(loc, 5)
|
||||
@@ -284,13 +391,13 @@
|
||||
new /obj/item/stack/sheet/plasteel(loc, 4)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/AIcore/deactivated
|
||||
/obj/structure/ai_core/deactivated
|
||||
name = "inactive AI"
|
||||
icon_state = "ai-empty"
|
||||
anchored = TRUE
|
||||
state = AI_READY_CORE
|
||||
|
||||
/obj/structure/AIcore/deactivated/New()
|
||||
/obj/structure/ai_core/deactivated/New()
|
||||
..()
|
||||
circuit = new(src)
|
||||
|
||||
@@ -310,20 +417,35 @@ That prevents a few funky behaviors.
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/AIcore/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
|
||||
/obj/structure/ai_core/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
|
||||
if(state != AI_READY_CORE || !..())
|
||||
return
|
||||
//Transferring a carded AI to a core.
|
||||
if(core_mmi && core_mmi.brainmob)
|
||||
if(core_mmi.brainmob.mind)
|
||||
to_chat(user, span_warning("[src] already contains an active mind!"))
|
||||
return
|
||||
else if(core_mmi.brainmob.suiciding)
|
||||
to_chat(user, span_warning("[AI_CORE_BRAIN(core_mmi)] installed in [src] is completely useless!"))
|
||||
return
|
||||
//Transferring a carded AI to a core.
|
||||
if(interaction == AI_TRANS_FROM_CARD)
|
||||
AI.control_disabled = 0
|
||||
AI.radio_enabled = 1
|
||||
AI.control_disabled = FALSE
|
||||
AI.radio_enabled = TRUE
|
||||
AI.forceMove(loc) // to replace the terminal.
|
||||
to_chat(AI, "You have been uploaded to a stationary terminal. Remote device connection restored.")
|
||||
to_chat(user, "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.")
|
||||
to_chat(AI, span_notice("You have been uploaded to a stationary terminal. Remote device connection restored."))
|
||||
to_chat(user, "[span_boldnotice("Transfer successful")]: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.")
|
||||
card.AI = null
|
||||
AI.battery = circuit.battery
|
||||
if(core_mmi.braintype == "Android")
|
||||
AI.posibrain_inside = TRUE
|
||||
else
|
||||
AI.posibrain_inside = FALSE
|
||||
qdel(src)
|
||||
else //If for some reason you use an empty card on an empty AI terminal.
|
||||
to_chat(user, "There is no AI loaded on this terminal!")
|
||||
to_chat(user, span_alert("There is no AI loaded on this terminal."))
|
||||
|
||||
/obj/item/circuitboard/aicore
|
||||
name = "AI core (AI Core Board)" //Well, duh, but best to be consistent
|
||||
var/battery = 200 //backup battery for when the AI loses power. Copied to/from AI mobs when carding, and placed here to avoid recharge via deconning the core
|
||||
|
||||
#undef AI_CORE_BRAIN
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
unbuckle_mob(M)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/bed/nest/user_buckle_mob(mob/living/M, mob/living/carbon/user)
|
||||
/obj/structure/bed/nest/user_buckle_mob(mob/living/M, mob/living/carbon/user, check_loc)
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || !user.cuff_resist_check() || M.buckled )
|
||||
return
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if(C)
|
||||
playsound(src, 'sound/magic/lightningshock.ogg', 100, 1, extrarange = 5)
|
||||
playsound(src, 'sound/magic/lightningshock.ogg', 100, TRUE, extrarange = 5)
|
||||
tesla_zap(src, 3, C.newavail() * 0.01, ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_MOB_STUN | ZAP_ALLOW_DUPLICATES) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
|
||||
C.add_delayedload(C.newavail() * 0.0375) // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
|
||||
return ..()
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
if(!length(items))
|
||||
return
|
||||
items = sortList(items)
|
||||
items = sort_list(items)
|
||||
var/pick = show_radial_menu(user, src, items, custom_check = CALLBACK(src, .proc/check_menu, user), radius = 38, require_near = TRUE)
|
||||
if(!pick)
|
||||
return
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
|
||||
|
||||
/obj/structure/kitchenspike/user_buckle_mob(mob/living/M, mob/living/user) //Don't want them getting put on the rack other than by spiking
|
||||
/obj/structure/kitchenspike/user_buckle_mob(mob/living/M, mob/living/user, check_loc) //Don't want them getting put on the rack other than by spiking
|
||||
return
|
||||
|
||||
/obj/structure/kitchenspike/user_unbuckle_mob(mob/living/buckled_mob, mob/living/carbon/human/user)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
. = ..()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
|
||||
/obj/machinery/manned_turret/user_buckle_mob(mob/living/M, mob/living/carbon/user)
|
||||
/obj/machinery/manned_turret/user_buckle_mob(mob/living/M, mob/living/carbon/user, check_loc)
|
||||
if(user.incapacitated() || !istype(user))
|
||||
return
|
||||
M.forceMove(get_turf(src))
|
||||
|
||||
@@ -330,6 +330,17 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>That's not connected to anything!</span>")
|
||||
|
||||
/obj/structure/tray/attackby(obj/P, mob/user, params)
|
||||
if(!istype(P, /obj/item/riding_offhand))
|
||||
return ..()
|
||||
|
||||
var/obj/item/riding_offhand/riding_item = P
|
||||
var/mob/living/carried_mob = riding_item.rider
|
||||
if(carried_mob == user) //Piggyback user.
|
||||
return
|
||||
user.unbuckle_mob(carried_mob)
|
||||
MouseDrop_T(carried_mob, user)
|
||||
|
||||
/obj/structure/tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user)
|
||||
if(!ismovable(O) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
|
||||
return
|
||||
|
||||
@@ -124,11 +124,11 @@
|
||||
. = . || (caller.pass_flags & PASSTABLE)
|
||||
|
||||
/obj/structure/table/proc/tableplace(mob/living/user, mob/living/pushed_mob)
|
||||
pushed_mob.forceMove(src.loc)
|
||||
pushed_mob.set_resting(TRUE, FALSE)
|
||||
pushed_mob.visible_message("<span class='notice'>[user] places [pushed_mob] onto [src].</span>", \
|
||||
"<span class='notice'>[user] places [pushed_mob] onto [src].</span>")
|
||||
log_combat(user, pushed_mob, "placed")
|
||||
pushed_mob.forceMove(loc)
|
||||
pushed_mob.set_resting(TRUE, TRUE)
|
||||
pushed_mob.visible_message(span_notice("[user] places [pushed_mob] onto [src]."), \
|
||||
span_notice("[user] places [pushed_mob] onto [src]."))
|
||||
log_combat(user, pushed_mob, "places", null, "onto [src]")
|
||||
|
||||
/obj/structure/table/proc/tablepush(mob/living/user, mob/living/pushed_mob)
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
@@ -205,6 +205,30 @@
|
||||
return
|
||||
// If the tray IS empty, continue on (tray will be placed on the table like other items)
|
||||
|
||||
if(istype(I, /obj/item/riding_offhand))
|
||||
var/obj/item/riding_offhand/riding_item = I
|
||||
var/mob/living/carried_mob = riding_item.rider
|
||||
if(carried_mob == user) //Piggyback user.
|
||||
return
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
user.unbuckle_mob(carried_mob)
|
||||
tablelimbsmash(user, carried_mob)
|
||||
else
|
||||
var/tableplace_delay = 3.5 SECONDS
|
||||
var/skills_space = ""
|
||||
if(HAS_TRAIT(user, TRAIT_QUICKER_CARRY))
|
||||
tableplace_delay = 2 SECONDS
|
||||
skills_space = " expertly"
|
||||
else if(HAS_TRAIT(user, TRAIT_QUICK_CARRY))
|
||||
tableplace_delay = 2.75 SECONDS
|
||||
skills_space = " quickly"
|
||||
carried_mob.visible_message(span_notice("[user] begins to[skills_space] place [carried_mob] onto [src]..."),
|
||||
span_userdanger("[user] begins to[skills_space] place [carried_mob] onto [src]..."))
|
||||
if(do_after(user, tableplace_delay, target = carried_mob))
|
||||
user.unbuckle_mob(carried_mob)
|
||||
tableplace(user, carried_mob)
|
||||
return TRUE
|
||||
|
||||
if(user.a_intent != INTENT_HARM && !(I.item_flags & ABSTRACT))
|
||||
if(user.transferItemToLoc(I, drop_location()))
|
||||
var/list/click_params = params2list(params)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
else
|
||||
logs_missing += "[subject] (empty)"
|
||||
|
||||
var/list/combined = sortList(logs_present) + sortList(logs_missing)
|
||||
var/list/combined = sort_list(logs_present) + sort_list(logs_missing)
|
||||
|
||||
var/selected = input("Investigate what?", "Investigate") as null|anything in combined
|
||||
|
||||
|
||||
@@ -694,7 +694,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
|
||||
// if(!SStrading_card_game.loaded)
|
||||
// message_admins("The card subsystem is not currently loaded")
|
||||
// return
|
||||
// var/pack = input("Which pack should we test?", "You fucked it didn't you") as null|anything in sortList(SStrading_card_game.card_packs)
|
||||
// var/pack = input("Which pack should we test?", "You fucked it didn't you") as null|anything in sort_list(SStrading_card_game.card_packs)
|
||||
// var/batchCount = input("How many times should we open it?", "Don't worry, I understand") as null|num
|
||||
// var/batchSize = input("How many cards per batch?", "I hope you remember to check the validation") as null|num
|
||||
// var/guar = input("Should we use the pack's guaranteed rarity? If so, how many?", "We've all been there. Man you should have seen the old system") as null|num
|
||||
@@ -714,7 +714,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
|
||||
var/type_length = length_char("/obj/effect/proc_holder/spell") + 2
|
||||
for(var/A in GLOB.spells)
|
||||
spell_list[copytext_char("[A]", type_length)] = A
|
||||
var/obj/effect/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in sortList(spell_list)
|
||||
var/obj/effect/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in sort_list(spell_list)
|
||||
if(!S)
|
||||
return
|
||||
|
||||
@@ -735,7 +735,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
|
||||
set desc = "Remove a spell from the selected mob."
|
||||
|
||||
if(T?.mind)
|
||||
var/obj/effect/proc_holder/spell/S = input("Choose the spell to remove", "NO ABRAKADABRA") as null|anything in sortList(T.mind.spell_list)
|
||||
var/obj/effect/proc_holder/spell/S = input("Choose the spell to remove", "NO ABRAKADABRA") as null|anything in sort_list(T.mind.spell_list)
|
||||
if(S)
|
||||
T.mind.RemoveSpell(S)
|
||||
log_admin("[key_name(usr)] removed the spell [S] from [key_name(T)].")
|
||||
@@ -749,7 +749,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
|
||||
if(!istype(T))
|
||||
to_chat(src, "<span class='notice'>You can only give a disease to a mob of type /mob/living.</span>", confidential = TRUE)
|
||||
return
|
||||
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in sortList(SSdisease.diseases, /proc/cmp_typepaths_asc)
|
||||
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in sort_list(SSdisease.diseases, /proc/cmp_typepaths_asc)
|
||||
if(!D)
|
||||
return
|
||||
T.ForceContractDisease(new D, FALSE, TRUE)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
clients += list(client)
|
||||
|
||||
clients = sortList(clients, /proc/cmp_playtime)
|
||||
clients = sort_list(clients, /proc/cmp_playtime)
|
||||
data["clients"] = clients
|
||||
return data
|
||||
|
||||
|
||||
@@ -403,7 +403,7 @@
|
||||
if (SSstickyban.dbcacheexpire)
|
||||
return SSstickyban.dbcache.Copy()
|
||||
|
||||
return sortList(world.GetConfig("ban"))
|
||||
return sort_list(world.GetConfig("ban"))
|
||||
|
||||
|
||||
/proc/get_stickyban_from_ckey(ckey)
|
||||
|
||||
@@ -1351,7 +1351,7 @@
|
||||
for (var/rule in subtypesof(/datum/dynamic_ruleset/roundstart))
|
||||
var/datum/dynamic_ruleset/roundstart/newrule = new rule()
|
||||
roundstart_rules[newrule.name] = newrule
|
||||
var/added_rule = input(usr,"What ruleset do you want to force? This will bypass threat level and population restrictions.", "Rigging Roundstart", null) as null|anything in sortList(roundstart_rules)
|
||||
var/added_rule = input(usr,"What ruleset do you want to force? This will bypass threat level and population restrictions.", "Rigging Roundstart", null) as null|anything in sort_list(roundstart_rules)
|
||||
if (added_rule)
|
||||
GLOB.dynamic_forced_roundstart_ruleset += roundstart_rules[added_rule]
|
||||
log_admin("[key_name(usr)] set [added_rule] to be a forced roundstart ruleset.")
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
targets["[T.mob.real_name](as [T.mob.name]) - [T]"] = T
|
||||
else
|
||||
targets["(No Mob) - [T]"] = T
|
||||
var/target = input(src,"To whom shall we send a message?","Admin PM",null) as null|anything in sortList(targets)
|
||||
var/target = input(src,"To whom shall we send a message?","Admin PM",null) as null|anything in sort_list(targets)
|
||||
cmd_admin_pm(targets[target],null)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin PM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -259,11 +259,11 @@
|
||||
if (!istype(chosensilicon, /mob/living/silicon))
|
||||
to_chat(usr, "<span class='warning'>Silicon is required for law changes</span>", confidential=TRUE)
|
||||
return
|
||||
var/chosen = pick_closest_path(null, make_types_fancy(typesof(/obj/item/aiModule)))
|
||||
var/chosen = pick_closest_path(null, make_types_fancy(typesof(/obj/item/ai_module)))
|
||||
if (!chosen)
|
||||
return
|
||||
var/new_board = new chosen(src)
|
||||
var/obj/item/aiModule/chosenboard = new_board
|
||||
var/obj/item/ai_module/chosenboard = new_board
|
||||
var/mob/living/silicon/beepboop = chosensilicon
|
||||
chosenboard.install(beepboop.laws, usr)
|
||||
message_admins("[key_name_admin(usr)] added [chosenboard] to [ADMIN_LOOKUPFLW(beepboop)].")
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
if(M.ckey)
|
||||
if(alert("This mob is being controlled by [M.key]. Are you sure you wish to give someone else control of it? [M.key] will be made a ghost.",,"Yes","No") != "Yes")
|
||||
return
|
||||
var/client/newkey = input(src, "Pick the player to put in control.", "New player") as null|anything in sortList(GLOB.clients)
|
||||
var/client/newkey = input(src, "Pick the player to put in control.", "New player") as null|anything in sort_list(GLOB.clients)
|
||||
var/mob/oldmob = newkey.mob
|
||||
var/delmob = FALSE
|
||||
if((isobserver(oldmob) || alert("Do you want to delete [newkey]'s old mob?","Delete?","Yes","No") != "No"))
|
||||
@@ -494,7 +494,7 @@
|
||||
var/datum/outfit/O = path //not much to initalize here but whatever
|
||||
outfits[initial(O.name)] = path
|
||||
|
||||
var/dresscode = input("Select outfit", "Robust quick dress shop") as null|anything in baseoutfits + sortList(outfits)
|
||||
var/dresscode = input("Select outfit", "Robust quick dress shop") as null|anything in baseoutfits + sort_list(outfits)
|
||||
if (isnull(dresscode))
|
||||
return
|
||||
|
||||
@@ -508,7 +508,7 @@
|
||||
var/datum/outfit/O = path
|
||||
job_outfits[initial(O.name)] = path
|
||||
|
||||
dresscode = input("Select job equipment", "Robust quick dress shop") as null|anything in sortList(job_outfits)
|
||||
dresscode = input("Select job equipment", "Robust quick dress shop") as null|anything in sort_list(job_outfits)
|
||||
dresscode = job_outfits[dresscode]
|
||||
if(isnull(dresscode))
|
||||
return
|
||||
@@ -520,7 +520,7 @@
|
||||
var/datum/outfit/O = path
|
||||
plasmaman_outfits[initial(O.name)] = path
|
||||
|
||||
dresscode = input("Select plasmeme equipment", "Robust quick dress shop") as null|anything in sortList(plasmaman_outfits)
|
||||
dresscode = input("Select plasmeme equipment", "Robust quick dress shop") as null|anything in sort_list(plasmaman_outfits)
|
||||
dresscode = plasmaman_outfits[dresscode]
|
||||
if(isnull(dresscode))
|
||||
return
|
||||
@@ -529,7 +529,7 @@
|
||||
var/list/custom_names = list()
|
||||
for(var/datum/outfit/D in GLOB.custom_outfits)
|
||||
custom_names[D.name] = D
|
||||
var/selected_name = input("Select outfit", "Robust quick dress shop") as null|anything in sortList(custom_names)
|
||||
var/selected_name = input("Select outfit", "Robust quick dress shop") as null|anything in sort_list(custom_names)
|
||||
dresscode = custom_names[selected_name]
|
||||
if(isnull(dresscode))
|
||||
return
|
||||
@@ -828,15 +828,15 @@
|
||||
set name = "Show Line Profiling"
|
||||
set desc = "Shows tracked profiling info from code lines that support it"
|
||||
|
||||
var/sortlist = list(
|
||||
var/sort_list = list(
|
||||
"Avg time" = /proc/cmp_profile_avg_time_dsc,
|
||||
"Total Time" = /proc/cmp_profile_time_dsc,
|
||||
"Call Count" = /proc/cmp_profile_count_dsc
|
||||
)
|
||||
var/sort = input(src, "Sort type?", "Sort Type", "Avg time") as null|anything in sortlist
|
||||
var/sort = input(src, "Sort type?", "Sort Type", "Avg time") as null|anything in sort_list
|
||||
if (!sort)
|
||||
return
|
||||
sort = sortlist[sort]
|
||||
sort = sort_list[sort]
|
||||
profile_show(src, sort)
|
||||
|
||||
/client/proc/reload_configuration()
|
||||
|
||||
@@ -1672,7 +1672,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
var/name = GLOB.trait_name_map[trait] || trait
|
||||
availible_traits[name] = trait
|
||||
|
||||
var/chosen_trait = input("Select trait to modify", "Trait") as null|anything in sortList(availible_traits)
|
||||
var/chosen_trait = input("Select trait to modify", "Trait") as null|anything in sort_list(availible_traits)
|
||||
if(!chosen_trait)
|
||||
return
|
||||
chosen_trait = availible_traits[chosen_trait]
|
||||
@@ -1689,7 +1689,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if("All")
|
||||
source = null
|
||||
if("Specific")
|
||||
source = input("Source to be removed","Trait Remove/Add") as null|anything in sortList(D.status_traits[chosen_trait])
|
||||
source = input("Source to be removed","Trait Remove/Add") as null|anything in sort_list(D.status_traits[chosen_trait])
|
||||
if(!source)
|
||||
return
|
||||
REMOVE_TRAIT(D,chosen_trait,source)
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
var/datum/round_event_control/disease_outbreak/DC = locate(/datum/round_event_control/disease_outbreak) in SSevents.control
|
||||
E = DC.runEvent()
|
||||
if("Choose")
|
||||
var/virus = input("Choose the virus to spread", "BIOHAZARD") as null|anything in sortList(typesof(/datum/disease), /proc/cmp_typepaths_asc)
|
||||
var/virus = input("Choose the virus to spread", "BIOHAZARD") as null|anything in sort_list(typesof(/datum/disease), /proc/cmp_typepaths_asc)
|
||||
var/datum/round_event_control/disease_outbreak/DC = locate(/datum/round_event_control/disease_outbreak) in SSevents.control
|
||||
var/datum/round_event/disease_outbreak/DO = DC.runEvent()
|
||||
DO.virus_type = virus
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
for (var/V in O.vars)
|
||||
names += V
|
||||
|
||||
names = sortList(names)
|
||||
names = sort_list(names)
|
||||
|
||||
variable = input("Which var?", "Var") as null|anything in names
|
||||
else
|
||||
|
||||
@@ -306,7 +306,7 @@ GLOBAL_PROTECT(VVpixelmovement)
|
||||
for (var/V in O.vars)
|
||||
names += V
|
||||
|
||||
names = sortList(names)
|
||||
names = sort_list(names)
|
||||
|
||||
variable = input("Which var?","Var") as null|anything in names
|
||||
if(!variable)
|
||||
|
||||
@@ -65,11 +65,11 @@
|
||||
if(!check_rights(NONE))
|
||||
return
|
||||
var/list/names = list()
|
||||
var/list/componentsubtypes = sortList(subtypesof(/datum/component), /proc/cmp_typepaths_asc)
|
||||
var/list/componentsubtypes = sort_list(subtypesof(/datum/component), /proc/cmp_typepaths_asc)
|
||||
names += "---Components---"
|
||||
names += componentsubtypes
|
||||
names += "---Elements---"
|
||||
names += sortList(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
|
||||
names += sort_list(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
|
||||
var/result = input(usr, "Choose a component/element to add","better know what ur fuckin doin pal") as null|anything in names
|
||||
if(!usr || !result || result == "---Components---" || result == "---Elements---")
|
||||
return
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
value = L[key]
|
||||
variable_html += debug_variable(i, value, 0, L)
|
||||
else
|
||||
names = sortList(names)
|
||||
names = sort_list(names)
|
||||
for(var/V in names)
|
||||
if(D.can_vv_get(V))
|
||||
variable_html += D.vv_get_var(V)
|
||||
|
||||
@@ -325,7 +325,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/projectile/tentacle/proc/reset_throw(mob/living/carbon/human/H)
|
||||
if(H.in_throw_mode)
|
||||
if(H.throw_mode)
|
||||
H.throw_mode_off() //Don't annoy the changeling if he doesn't catch the item
|
||||
|
||||
/obj/item/projectile/tentacle/proc/tentacle_grab(mob/living/carbon/human/H, mob/living/carbon/C)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
return
|
||||
if(isitem(M))
|
||||
var/obj/item/I = M
|
||||
if(is_servant_of_ratvar(I.thrownby)) //nice try!
|
||||
if(is_servant_of_ratvar(I.thrownby?.resolve())) //nice try!
|
||||
return
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
/proc/generate_all_scripture()
|
||||
if(GLOB.all_scripture.len)
|
||||
return
|
||||
for(var/V in sortList(subtypesof(/datum/clockwork_scripture) - list(/datum/clockwork_scripture/channeled, /datum/clockwork_scripture/create_object, /datum/clockwork_scripture/create_object/construct), /proc/cmp_clockscripture_priority))
|
||||
for(var/V in sort_list(subtypesof(/datum/clockwork_scripture) - list(/datum/clockwork_scripture/channeled, /datum/clockwork_scripture/create_object, /datum/clockwork_scripture/create_object/construct), /proc/cmp_clockscripture_priority))
|
||||
var/datum/clockwork_scripture/S = new V
|
||||
GLOB.all_scripture[S.type] = S
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
density = TRUE //Skewers are one-use only
|
||||
desc = "A vicious brass spike protruding from the ground like a stala[pick("gm", "ct")]ite. It makes you sick to look at." //is stalagmite the ground one? or the ceiling one? who can ever remember?
|
||||
|
||||
/obj/structure/destructible/clockwork/trap/brass_skewer/user_buckle_mob()
|
||||
/obj/structure/destructible/clockwork/trap/brass_skewer/user_buckle_mob(check_loc)
|
||||
return
|
||||
|
||||
/obj/structure/destructible/clockwork/trap/brass_skewer/post_buckle_mob(mob/living/L)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/true_devil/doUnEquip(obj/item/I, force, silent = FALSE)
|
||||
/mob/living/carbon/true_devil/doUnEquip(obj/item/I, force, invdrop, silent = FALSE)
|
||||
if(..())
|
||||
update_inv_hands()
|
||||
return 1
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
to_chat(user, "<span class='warning'>These items don't possess the required fingerprints or DNA.</span>")
|
||||
return FALSE
|
||||
|
||||
var/chosen_mob = input("Select the person you wish to curse","Your target") as null|anything in sortList(compiled_list, /proc/cmp_mob_realname_dsc)
|
||||
var/chosen_mob = input("Select the person you wish to curse","Your target") as null|anything in sort_list(compiled_list, /proc/cmp_mob_realname_dsc)
|
||||
if(!chosen_mob)
|
||||
return FALSE
|
||||
curse(compiled_list[chosen_mob])
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
var/datum/component/uplink/uplink = uplink_holder.GetComponent(/datum/component/uplink)
|
||||
uplink.telecrystals = INITIAL_CRYSTALS
|
||||
// Give AI hacking board
|
||||
var/obj/item/aiModule/core/full/overthrow/O = new(H)
|
||||
var/obj/item/ai_module/core/full/overthrow/O = new(H)
|
||||
var/list/slots = list (
|
||||
"backpack" = ITEM_SLOT_BACKPACK,
|
||||
"left pocket" = ITEM_SLOT_LPOCKET,
|
||||
|
||||
@@ -331,7 +331,7 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
if (legacy)
|
||||
assets |= parents
|
||||
var/list/hashlist = list()
|
||||
var/list/sorted_assets = sortList(assets)
|
||||
var/list/sorted_assets = sort_list(assets)
|
||||
|
||||
for (var/asset_name in sorted_assets)
|
||||
var/datum/asset_cache_item/ACI = new(asset_name, sorted_assets[asset_name])
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
return
|
||||
switch(action)
|
||||
if("relabel")
|
||||
var/label = input("New canister label:", name) as null|anything in sortList(label2types)
|
||||
var/label = input("New canister label:", name) as null|anything in sort_list(label2types)
|
||||
if(label && !..())
|
||||
var/newtype = label2types[label]
|
||||
if(newtype)
|
||||
|
||||
@@ -344,7 +344,7 @@
|
||||
if (temp_pod.effectShrapnel == TRUE) //If already doing custom damage, set back to default (no shrapnel)
|
||||
temp_pod.effectShrapnel = FALSE
|
||||
return
|
||||
var/shrapnelInput = input("Please enter the type of pellet cloud you'd like to create on landing (Can be any projectile!)", "Projectile Typepath", 0) in sortList(subtypesof(/obj/item/projectile), /proc/cmp_typepaths_asc)
|
||||
var/shrapnelInput = input("Please enter the type of pellet cloud you'd like to create on landing (Can be any projectile!)", "Projectile Typepath", 0) in sort_list(subtypesof(/obj/item/projectile), /proc/cmp_typepaths_asc)
|
||||
if (isnull(shrapnelInput))
|
||||
return
|
||||
var/shrapnelMagnitude = input("Enter the magnitude of the pellet cloud. This is usually a value around 1-5. Please note that Ryll-Ryll has asked me to tell you that if you go too crazy with the projectiles you might crash the server. So uh, be gentle!", "Shrapnel Magnitude", 0) as null|num
|
||||
|
||||
@@ -1429,7 +1429,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
//The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows.
|
||||
var/datum/job/lastJob
|
||||
|
||||
for(var/datum/job/job in sortList(SSjob.occupations, /proc/cmp_job_display_asc))
|
||||
for(var/datum/job/job in sort_list(SSjob.occupations, /proc/cmp_job_display_asc))
|
||||
|
||||
index += 1
|
||||
if((index >= limit) || (job.title in splitJobs))
|
||||
@@ -2981,7 +2981,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(!length(key_bindings[old_key]))
|
||||
key_bindings -= old_key
|
||||
key_bindings[full_key] += list(kb_name)
|
||||
key_bindings[full_key] = sortList(key_bindings[full_key])
|
||||
key_bindings[full_key] = sort_list(key_bindings[full_key])
|
||||
if(href_list["special"]) // special keys need a full reset
|
||||
user.client.ensure_keys_set(src)
|
||||
user << browse(null, "window=capturekeypress")
|
||||
|
||||
@@ -237,7 +237,7 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
|
||||
choices["[C.mob]([C])"] = C
|
||||
else
|
||||
choices[C] = C
|
||||
choices = sortList(choices)
|
||||
choices = sort_list(choices)
|
||||
var/selection = input("Please, select a player!", "Ignore", null, null) as null|anything in choices
|
||||
if(!selection || !(selection in choices))
|
||||
return
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
else
|
||||
Lines += "[C.key] ([round(C.avgping, 1)]ms)"
|
||||
|
||||
for(var/line in sortList(Lines))
|
||||
for(var/line in sort_list(Lines))
|
||||
msg += "[line]\n"
|
||||
|
||||
msg += "<b>Total Players: [length(Lines)]</b>"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
var/suggested = pick(strings(REDPILL_FILE, "redpill_questions"))
|
||||
|
||||
forced_secret = (input(usr, "What horrifying truth will you reveal?", "Curse of Madness", sortList(suggested)) as text|null) || suggested
|
||||
forced_secret = (input(usr, "What horrifying truth will you reveal?", "Curse of Madness", sort_list(suggested)) as text|null) || suggested
|
||||
|
||||
/datum/round_event/wizard/madness/start()
|
||||
var/datum/round_event_control/wizard/madness/C = control
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
listofitems[md5name]["amount"]++ // The good news is, #30519 made smartfridge UIs non-auto-updating
|
||||
else
|
||||
listofitems[md5name] = list("name" = O.name, "type" = O.type, "amount" = 1)
|
||||
sortList(listofitems)
|
||||
sort_list(listofitems)
|
||||
|
||||
.["contents"] = listofitems
|
||||
.["name"] = name
|
||||
|
||||
@@ -425,9 +425,10 @@
|
||||
for(var/datum/reagent/A in reagents.reagent_list)
|
||||
R += A.type + " ("
|
||||
R += num2text(A.volume) + "),"
|
||||
if(isturf(target) && reagents.reagent_list.len && thrownby)
|
||||
log_combat(thrownby, target, "splashed (thrown) [english_list(reagents.reagent_list)]")
|
||||
message_admins("[ADMIN_LOOKUPFLW(thrownby)] splashed (thrown) [english_list(reagents.reagent_list)] on [target] at [ADMIN_VERBOSEJMP(target)].")
|
||||
var/mob/thrown_by = thrownby?.resolve()
|
||||
if(isturf(target) && reagents.reagent_list.len && thrown_by)
|
||||
log_combat(thrown_by, target, "splashed (thrown) [english_list(reagents.reagent_list)]")
|
||||
message_admins("[ADMIN_LOOKUPFLW(thrown_by)] splashed (thrown) [english_list(reagents.reagent_list)] on [target] at [ADMIN_VERBOSEJMP(target)].")
|
||||
reagents.reaction(M, TOUCH)
|
||||
log_combat(user, M, "splashed", R)
|
||||
reagents.clear_reagents()
|
||||
|
||||
@@ -626,7 +626,7 @@
|
||||
for(var/muties in myseed.mutatelist)
|
||||
var/obj/item/seeds/another_mut = new muties
|
||||
fresh_mut_list[another_mut.plantname] = muties
|
||||
var/locked_mutation = (input(user, "Select a mutation to lock.", "Plant Mutation Locks") as null|anything in sortList(fresh_mut_list))
|
||||
var/locked_mutation = (input(user, "Select a mutation to lock.", "Plant Mutation Locks") as null|anything in sort_list(fresh_mut_list))
|
||||
if(!user.canUseTopic(src, BE_CLOSE) || !locked_mutation)
|
||||
return
|
||||
myseed.mutatelist = list(fresh_mut_list[locked_mutation])
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
/datum/job/ai/after_spawn(mob/H, client/C, latejoin)
|
||||
. = ..()
|
||||
if(latejoin)
|
||||
var/obj/structure/AIcore/latejoin_inactive/lateJoinCore
|
||||
for(var/obj/structure/AIcore/latejoin_inactive/P in GLOB.latejoin_ai_cores)
|
||||
var/obj/structure/ai_core/latejoin_inactive/lateJoinCore
|
||||
for(var/obj/structure/ai_core/latejoin_inactive/P in GLOB.latejoin_ai_cores)
|
||||
if(P.is_available())
|
||||
lateJoinCore = P
|
||||
GLOB.latejoin_ai_cores -= P
|
||||
@@ -60,7 +60,7 @@
|
||||
if(!do_special_check)
|
||||
return TRUE
|
||||
for(var/i in GLOB.latejoin_ai_cores)
|
||||
var/obj/structure/AIcore/latejoin_inactive/LAI = i
|
||||
var/obj/structure/ai_core/latejoin_inactive/LAI = i
|
||||
if(istype(LAI))
|
||||
if(LAI.is_available())
|
||||
return TRUE
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user