mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 07:48:55 +00:00
cavalry's here
This commit is contained in:
@@ -1,33 +1,36 @@
|
||||
/datum/element/cleaning
|
||||
element_flags = ELEMENT_BESPOKE|ELEMENT_DETACH
|
||||
id_arg_index = 2
|
||||
/// Range of cleaning on moving
|
||||
var/range = 0
|
||||
|
||||
/datum/element/cleaning/Attach(datum/target, cleaning_range = 0)
|
||||
/datum/element/cleaning/Attach(atom/movable/cleaner, cleaning_range)
|
||||
. = ..()
|
||||
if(!ismovable(target))
|
||||
if(!istype(cleaner))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
range = cleaning_range
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(Clean))
|
||||
if(cleaning_range)
|
||||
range = cleaning_range
|
||||
RegisterSignal(cleaner, COMSIG_MOVABLE_MOVED, PROC_REF(Clean))
|
||||
|
||||
/datum/element/cleaning/Detach(datum/target)
|
||||
/datum/element/cleaning/Detach(atom/movable/cleaner)
|
||||
. = ..()
|
||||
UnregisterSignal(target, COMSIG_MOVABLE_MOVED)
|
||||
UnregisterSignal(cleaner, COMSIG_MOVABLE_MOVED)
|
||||
|
||||
/datum/element/cleaning/proc/Clean(datum/source)
|
||||
var/atom/movable/AM = source
|
||||
for (var/turf/T in RANGE_TURFS(range, AM.loc))
|
||||
SEND_SIGNAL(T, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
for(var/A in T)
|
||||
if(is_cleanable(A))
|
||||
qdel(A)
|
||||
else if(isitem(A))
|
||||
var/obj/item/cleaned_item = A
|
||||
/datum/element/cleaning/proc/Clean(atom/movable/cleaner)
|
||||
for (var/turf/turf in RANGE_TURFS(range, cleaner.loc))
|
||||
SEND_SIGNAL(turf, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
for(var/atom/atom as anything in turf)
|
||||
if(is_cleanable(atom))
|
||||
qdel(atom)
|
||||
else if(isitem(atom))
|
||||
var/obj/item/cleaned_item = atom
|
||||
SEND_SIGNAL(cleaned_item, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_item.clean_blood()
|
||||
if(ismob(cleaned_item.loc))
|
||||
var/mob/M = cleaned_item.loc
|
||||
M.regenerate_icons()
|
||||
else if(ishuman(A))
|
||||
var/mob/living/carbon/human/cleaned_human = A
|
||||
var/mob/mob = cleaned_item.loc
|
||||
mob.regenerate_icons()
|
||||
else if(ishuman(atom))
|
||||
var/mob/living/carbon/human/cleaned_human = atom
|
||||
if(cleaned_human.lying)
|
||||
if(cleaned_human.head)
|
||||
SEND_SIGNAL(cleaned_human.head, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
@@ -67,4 +70,4 @@
|
||||
cleaned_human.clean_blood()
|
||||
cleaned_human.wash_cream()
|
||||
cleaned_human.regenerate_icons()
|
||||
to_chat(cleaned_human, "<span class='danger'>[AM] cleans your face!</span>")
|
||||
to_chat(cleaned_human, span_danger("[cleaner] cleans your face!"))
|
||||
|
||||
@@ -937,9 +937,9 @@
|
||||
status_flags &= ~CANPUSH
|
||||
|
||||
if(module.clean_on_move)
|
||||
AddElement(/datum/element/cleaning, 1)
|
||||
AddElement(/datum/element/cleaning, range = 1)
|
||||
else
|
||||
RemoveElement(/datum/element/cleaning, 1)
|
||||
RemoveElement(/datum/element/cleaning)
|
||||
|
||||
hat_offset = module.hat_offset
|
||||
|
||||
@@ -1206,8 +1206,8 @@
|
||||
var/mob/unbuckle_me_now = i
|
||||
unbuckle_mob(unbuckle_me_now, FALSE)
|
||||
|
||||
/mob/living/silicon/robot/proc/TryConnectToAI()
|
||||
set_connected_ai(select_active_ai_with_fewest_borgs(z))
|
||||
/mob/living/silicon/robot/proc/TryConnectToAI(mob/living/silicon/ai/connect_to)
|
||||
set_connected_ai(connect_to || select_active_ai_with_fewest_borgs(z))
|
||||
if(connected_ai)
|
||||
lawsync()
|
||||
lawupdate = TRUE
|
||||
|
||||
@@ -40,6 +40,6 @@ $include entries/urls.txt
|
||||
$include entries/vote.txt
|
||||
|
||||
$include plushies/defines.txt
|
||||
# Special Sandstorm configs
|
||||
$include sandstorm/config.txt
|
||||
$include sandstorm/balance.txt
|
||||
|
||||
# Sandstorm configs
|
||||
$include sandstorm/includes.txt
|
||||
|
||||
4
config/sandstorm/includes.txt
Normal file
4
config/sandstorm/includes.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
# This file is mostly so main config file relays to here, and this one relays to the rest
|
||||
$include sandstorm/balance.txt
|
||||
$include sandstorm/config.txt
|
||||
$include sandstorm/qol.txt
|
||||
7
config/sandstorm/qol.txt
Normal file
7
config/sandstorm/qol.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
###
|
||||
## AI
|
||||
###
|
||||
|
||||
## How many shells would an AI gain at roundstart
|
||||
## Comment to disable
|
||||
ROUNDSTART_AI_SHELLS 1
|
||||
@@ -28,3 +28,6 @@
|
||||
value_mode = VALUE_MODE_TYPE
|
||||
splitter = " | "
|
||||
lowercase_key = FALSE
|
||||
|
||||
/datum/config_entry/number/roundstart_ai_shells // Per AI, if you ever do get a triumvirate!
|
||||
min_val = 0
|
||||
|
||||
@@ -1,6 +1,21 @@
|
||||
/datum/job/ai/after_spawn(mob/living/silicon/ai/AI, client/player_client, latejoin)
|
||||
. = ..()
|
||||
if(!istype(AI))
|
||||
setup_silicon_law_prefs(AI, player_client)
|
||||
|
||||
if(latejoin)
|
||||
return
|
||||
|
||||
setup_silicon_law_prefs(AI, player_client)
|
||||
var/free_shells = CONFIG_GET(number/roundstart_ai_shells)
|
||||
if(!free_shells)
|
||||
return
|
||||
|
||||
var/turf/open/turf = locate() in RANGE_TURFS(1, AI)
|
||||
|
||||
// Why the fuck is the station AI completely blocked
|
||||
var/turf/where = turf || get_turf(AI)
|
||||
|
||||
// Creating AI shells for the AI.
|
||||
for(var/iteration in 1 to free_shells)
|
||||
var/mob/living/silicon/robot/free_borg = new(where)
|
||||
free_borg.shell = TRUE
|
||||
free_borg.TryConnectToAI(AI)
|
||||
|
||||
@@ -1,16 +1,2 @@
|
||||
/mob/living/silicon/ai
|
||||
vore_flags = NO_VORE
|
||||
|
||||
/mob/living/silicon/ai/Initialize(mapload, datum/ai_laws/L, mob/target_ai)
|
||||
. = ..()
|
||||
if (!mapload)
|
||||
return
|
||||
|
||||
// Creating a AI shell for the AI.
|
||||
var/turf/open/T = locate() in RANGE_TURFS(1, src)
|
||||
if (T)
|
||||
new /mob/living/silicon/robot/shell(T)
|
||||
return
|
||||
|
||||
// Why the fuck is the station AI completely blocked
|
||||
new /mob/living/silicon/robot/shell(get_turf(src))
|
||||
|
||||
Reference in New Issue
Block a user