forked from Sandstorm-Station/Sandstorm-Station-13
-
-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
14 changed files
with
133 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,73 @@ | ||
/datum/element/cleaning/Attach(datum/target) | ||
/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(atom/movable/cleaner, cleaning_range) | ||
. = ..() | ||
if(!ismovable(target)) | ||
if(!istype(cleaner)) | ||
return ELEMENT_INCOMPATIBLE | ||
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 | ||
var/turf/T = 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 | ||
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 | ||
if(cleaned_human.lying) | ||
if(cleaned_human.head) | ||
SEND_SIGNAL(cleaned_human.head, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) | ||
cleaned_human.head.clean_blood() | ||
cleaned_human.update_inv_head() | ||
if(cleaned_human.wear_suit) | ||
SEND_SIGNAL(cleaned_human.wear_suit, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) | ||
cleaned_human.wear_suit.clean_blood() | ||
cleaned_human.update_inv_wear_suit() | ||
else if(cleaned_human.w_uniform) | ||
SEND_SIGNAL(cleaned_human.w_uniform, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) | ||
cleaned_human.w_uniform.clean_blood() | ||
cleaned_human.update_inv_w_uniform() | ||
//skyrat edit | ||
else if(cleaned_human.w_underwear) | ||
SEND_SIGNAL(cleaned_human.w_underwear, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) | ||
cleaned_human.w_underwear.clean_blood() | ||
cleaned_human.update_inv_w_underwear() | ||
else if(cleaned_human.w_socks) | ||
SEND_SIGNAL(cleaned_human.w_socks, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) | ||
cleaned_human.w_socks.clean_blood() | ||
cleaned_human.update_inv_w_socks() | ||
else if(cleaned_human.w_shirt) | ||
SEND_SIGNAL(cleaned_human.w_shirt, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) | ||
cleaned_human.w_shirt.clean_blood() | ||
cleaned_human.update_inv_w_shirt() | ||
else if(cleaned_human.wrists) | ||
SEND_SIGNAL(cleaned_human.wrists, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) | ||
cleaned_human.w_shirt.clean_blood() | ||
cleaned_human.update_inv_wrists() | ||
// | ||
if(cleaned_human.shoes) | ||
SEND_SIGNAL(cleaned_human.shoes, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) | ||
cleaned_human.shoes.clean_blood() | ||
cleaned_human.update_inv_shoes() | ||
SEND_SIGNAL(cleaned_human, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) | ||
cleaned_human.clean_blood() | ||
cleaned_human.wash_cream() | ||
cleaned_human.regenerate_icons() | ||
to_chat(cleaned_human, "<span class='danger'>[AM] cleans your face!</span>") | ||
/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/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) | ||
cleaned_human.head.clean_blood() | ||
cleaned_human.update_inv_head() | ||
if(cleaned_human.wear_suit) | ||
SEND_SIGNAL(cleaned_human.wear_suit, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) | ||
cleaned_human.wear_suit.clean_blood() | ||
cleaned_human.update_inv_wear_suit() | ||
else if(cleaned_human.w_uniform) | ||
SEND_SIGNAL(cleaned_human.w_uniform, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) | ||
cleaned_human.w_uniform.clean_blood() | ||
cleaned_human.update_inv_w_uniform() | ||
//skyrat edit | ||
else if(cleaned_human.w_underwear) | ||
SEND_SIGNAL(cleaned_human.w_underwear, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) | ||
cleaned_human.w_underwear.clean_blood() | ||
cleaned_human.update_inv_w_underwear() | ||
else if(cleaned_human.w_socks) | ||
SEND_SIGNAL(cleaned_human.w_socks, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) | ||
cleaned_human.w_socks.clean_blood() | ||
cleaned_human.update_inv_w_socks() | ||
else if(cleaned_human.w_shirt) | ||
SEND_SIGNAL(cleaned_human.w_shirt, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) | ||
cleaned_human.w_shirt.clean_blood() | ||
cleaned_human.update_inv_w_shirt() | ||
else if(cleaned_human.wrists) | ||
SEND_SIGNAL(cleaned_human.wrists, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) | ||
cleaned_human.w_shirt.clean_blood() | ||
cleaned_human.update_inv_wrists() | ||
// | ||
if(cleaned_human.shoes) | ||
SEND_SIGNAL(cleaned_human.shoes, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) | ||
cleaned_human.shoes.clean_blood() | ||
cleaned_human.update_inv_shoes() | ||
SEND_SIGNAL(cleaned_human, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) | ||
cleaned_human.clean_blood() | ||
cleaned_human.wash_cream() | ||
cleaned_human.regenerate_icons() | ||
to_chat(cleaned_human, span_danger("[cleaner] cleans your face!")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
### | ||
## AI | ||
### | ||
|
||
## How many shells would an AI gain at roundstart | ||
## Comment to disable | ||
ROUNDSTART_AI_SHELLS 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.