-
-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
70 changed files
with
1,057 additions
and
507 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//* This file is explicitly licensed under the MIT license. *// | ||
//* Copyright (c) 2023 Citadel Station developers. *// | ||
|
||
/// from base of /atom/proc/context_query: (list/options, datum/event_args/actor/e_args) | ||
/// options list is the same format as /atom/proc/context_query, insert directly to it. | ||
#define COMSIG_ATOM_CONTEXT_QUERY "atom_context_query" | ||
/// from base of /atom/proc/context_act: (key, datum/event_args/actor/e_args) | ||
#define COMSIG_ATOM_CONTEXT_ACT "atom_context_act" | ||
#define RAISE_ATOM_CONTEXT_ACT_HANDLED (1<<0) | ||
|
||
/// create context | ||
/// * name: name | ||
/// * image: context menu image | ||
/// * distance: distance where this is valid; much be reachable or actable; null = requires adjacency or adjacency-equivalence | ||
/// * mobility: mobility flags required | ||
#define ATOM_CONTEXT_TUPLE(name, image, distance, mobility) list(name, image, distance, mobility) | ||
|
||
/// when used as distance, telekinetics and other things do not count as adjacency | ||
// todo: currently not implemented | ||
#define ATOM_CONTEXT_FORCE_PHYSICAL_ADJACENCY null |
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,10 @@ | ||
//* This file is explicitly licensed under the MIT license. *// | ||
//* Copyright (c) 2023 Citadel Station developers. *// | ||
|
||
/// from base of _tool_act: (I, user, function, flags, hint) where I = item, e_args = clickchain data, function = tool behaviour, flags = tool operation flags, hint = set by dynamic tool system | ||
/// return CLICKCHAIN_COMPONENT_SIGNAL_HANDLED to abort normal tool_act handling. | ||
#define COMSIG_ATOM_TOOL_ACT "tool_act" | ||
/// from base of dynamic_tool_query: (I, datum/event_args/actor/clickchain/e_args, functions) where I = item, e_args = clickchain data. | ||
/// inject by merging into functions | ||
/// remember to use merge_double_lazy_assoc_list() to merge function lists! | ||
#define COMSIG_ATOM_TOOL_QUERY "tool_functions" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//? for /datum/event_args/actor | ||
|
||
#define WRAP_MOB_TO_ACTOR_EVENT_ARGS(VARNAME) VARNAME = ismob(VARNAME)? new /datum/event_args/actor(VARNAME) : VARNAME | ||
|
||
//? for /datum/event_args/actor/clickchain | ||
|
||
#define WRAP_MOB_TO_CLICKCHAIN_EVENT_ARGS(VARNAME) VARNAME = ismob(VARNAME)? new /datum/event_args/actor/clickchain(VARNAME) : VARNAME |
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,5 @@ | ||
/** | ||
* datums used to hold data for procs without having to pass too many args around | ||
*/ | ||
/datum/event_args | ||
abstract_type = /datum/event_args |
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,57 @@ | ||
/** | ||
* used to hold semantic data about an action being done by an actor vs initiator (controller) | ||
*/ | ||
/datum/event_args/actor | ||
/// the mob performing the action | ||
var/mob/performer | ||
/// the mob actually initiating the action, e.g. a remote controller. | ||
var/mob/initiator | ||
|
||
/datum/event_args/actor/New(mob/performer, mob/initiator) | ||
src.performer = performer | ||
src.initiator = isnull(initiator)? performer : initiator | ||
|
||
/datum/event_args/actor/proc/chat_feedback(msg, atom/target) | ||
performer.action_feedback(msg, target) | ||
if(performer != initiator) | ||
initiator.action_feedback(msg, target) | ||
|
||
/datum/event_args/actor/proc/bubble_feedback(msg, atom/target) | ||
performer.bubble_action_feedback(msg, target) | ||
if(performer != initiator) | ||
initiator.bubble_action_feedback(msg, target) | ||
|
||
/** | ||
* It is highly recommended to use named parameters with this. | ||
*/ | ||
/datum/event_args/actor/proc/visible_feedback(atom/target, range, visible, audible, visible_self, otherwise_self, visible_them, otherwise_them) | ||
performer.visible_action_feedback( | ||
target = target, | ||
initiator = initiator, | ||
hard_range = range, | ||
visible_hard = visible, | ||
audible_hard = audible, | ||
visible_self = visible_self, | ||
otherwise_self = otherwise_self, | ||
visible_them = visible_them, | ||
otherwise_them = otherwise_them, | ||
) | ||
|
||
/** | ||
* It is highly recommended to use named parameters with this. | ||
*/ | ||
/datum/event_args/actor/proc/visible_dual_feedback(atom/target, range_hard, range_soft, visible_hard, visible_soft, audible_hard, audible_soft, visible_self, otherwise_self, visible_them, otherwise_them) | ||
performer.visible_action_feedback( | ||
target = target, | ||
initiator = initiator, | ||
hard_range = range_hard, | ||
soft_range = range_soft, | ||
visible_hard = visible_hard, | ||
visible_soft = visible_soft, | ||
audible_hard = audible_hard, | ||
audible_soft = audible_soft, | ||
visible_self = visible_self, | ||
otherwise_self = otherwise_self, | ||
visible_them = visible_them, | ||
otherwise_them = otherwise_them, | ||
) |
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,13 @@ | ||
/** | ||
* used to hold data about a click action | ||
*/ | ||
/datum/event_args/actor/clickchain | ||
/// a_intent | ||
var/intent | ||
/// click params | ||
var/list/params | ||
|
||
/datum/event_args/actor/clickchain/New(mob/performer, mob/initiator, intent, list/params) | ||
..() | ||
src.intent = isnull(intent)? performer.a_intent : intent | ||
src.params = isnull(params)? list() : params |
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.