forked from NebulaSS13/Nebula
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'NebulaSS13:dev' into dev
- Loading branch information
Showing
228 changed files
with
47,567 additions
and
1,148 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
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,14 +1,5 @@ | ||
/proc/emissive_overlay(var/icon, var/icon_state, var/loc, var/dir, var/color) | ||
var/image/emissive/I = new(icon, icon_state) | ||
if(!isnull(loc)) | ||
I.loc = loc | ||
if(!isnull(dir)) | ||
I.dir = dir | ||
if(!isnull(color)) | ||
I.color = color | ||
var/image/I = image(icon, loc, icon_state, EMISSIVE_LAYER, dir) | ||
I.plane = EMISSIVE_PLANE | ||
I.color = color | ||
return I | ||
|
||
/image/emissive/New() | ||
..() | ||
layer = EMISSIVE_LAYER | ||
plane = EMISSIVE_PLANE |
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
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,55 @@ | ||
SUBSYSTEM_DEF(automove) | ||
name = "Automated Movement" | ||
wait = 1 | ||
flags = SS_NO_INIT | ||
priority = SS_PRIORITY_AUTO_MOVE | ||
|
||
var/list/moving_atoms = list() | ||
var/list/moving_metadata = list() | ||
var/list/processing_atoms | ||
|
||
/datum/controller/subsystem/automove/proc/unregister_mover(atom/movable/mover) | ||
if(!istype(mover)) | ||
CRASH("Invalid parameters to unregister_mover: [mover || "NULL"]") | ||
if(length(moving_atoms)) | ||
moving_atoms -= mover | ||
if(length(moving_metadata)) | ||
moving_metadata -= mover | ||
if(length(processing_atoms)) | ||
processing_atoms -= mover | ||
|
||
/datum/controller/subsystem/automove/proc/register_mover(atom/movable/mover, controller_type, datum/automove_metadata/metadata) | ||
if(!istype(mover) || (!ispath(controller_type, /decl/automove_controller) && !istype(controller_type, /decl/automove_controller))) | ||
CRASH("Invalid parameters to register_mover: [controller_type || "NULL"], [mover || "NULL"]") | ||
|
||
var/decl/automove_controller/controller = ispath(controller_type) ? GET_DECL(controller_type) : controller_type | ||
moving_atoms[mover] = controller | ||
if(istype(metadata)) | ||
moving_metadata[mover] = metadata | ||
else | ||
moving_metadata -= mover | ||
|
||
if(suspended) | ||
wake() | ||
|
||
/datum/controller/subsystem/automove/fire(resumed = FALSE) | ||
|
||
if(!resumed) | ||
processing_atoms = moving_atoms.Copy() | ||
|
||
if(!length(processing_atoms)) | ||
suspend() | ||
return | ||
|
||
var/i = 0 | ||
var/atom/movable/mover | ||
var/decl/automove_controller/controller | ||
while(i < processing_atoms.len) | ||
i++ | ||
mover = processing_atoms[i] | ||
controller = processing_atoms[mover] | ||
if(controller.handle_mover(mover, moving_metadata[mover]) == PROCESS_KILL && !QDELETED(mover)) | ||
mover.stop_automove() | ||
if(MC_TICK_CHECK) | ||
processing_atoms.Cut(1, i+1) | ||
return |
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,3 @@ | ||
PROCESSING_SUBSYSTEM_DEF(mob_ai) | ||
name = "Mob AI" | ||
priority = SS_PRIORITY_MOB_AI |
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.