-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into Adds-Pilot,-Crew-Chief,-Synth-to-Low-Pop
- Loading branch information
Showing
43 changed files
with
537 additions
and
302 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
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,60 @@ | ||
#define NARRATION_METHOD_SAY "Say" | ||
#define NARRATION_METHOD_ME "Me" | ||
#define NARRATION_METHOD_DIRECT "Direct" | ||
|
||
/datum/component/atom_narrate | ||
var/message | ||
var/narration_type | ||
var/narrator | ||
|
||
/datum/component/atom_narrate/Initialize(message, narration_type, delayed, narrator) | ||
. = ..() | ||
|
||
src.message = message | ||
src.narration_type = narration_type | ||
src.narrator = narrator | ||
|
||
if(!delayed) | ||
send_narration() | ||
return | ||
|
||
var/turf/parent_turf = get_turf(parent) | ||
|
||
if(!parent_turf) | ||
return COMPONENT_INCOMPATIBLE | ||
|
||
var/list/message_turfs = block(locate(max(parent_turf.x - 4, 1), max(parent_turf.y - 4, 1), parent_turf.z), locate(parent_turf.x + 4, parent_turf.y + 4, parent_turf.z)) | ||
|
||
for(var/turf/cycled_turf as anything in message_turfs) | ||
RegisterSignal(cycled_turf, COMSIG_TURF_ENTERED, PROC_REF(send_message_on_movement)) | ||
|
||
/datum/component/atom_narrate/proc/send_message_on_movement(turf/source, atom/movable/entered) | ||
SIGNAL_HANDLER | ||
|
||
if(!istype(entered, /mob/living/carbon/human)) | ||
return | ||
|
||
send_narration() | ||
qdel(src) | ||
|
||
/datum/component/atom_narrate/proc/send_narration() | ||
var/atom/atom_parent = parent | ||
|
||
if(!atom_parent) | ||
qdel(src) | ||
return | ||
|
||
var/list/heard = get_mobs_in_view(world_view_size, atom_parent) | ||
|
||
switch(narration_type) | ||
if(NARRATION_METHOD_SAY) | ||
atom_parent.langchat_speech(message, heard, GLOB.all_languages, skip_language_check = TRUE) | ||
atom_parent.visible_message("<b>[atom_parent]</b> says, \"[message]\"") | ||
if(NARRATION_METHOD_ME) | ||
atom_parent.langchat_speech(message, heard, GLOB.all_languages, skip_language_check = TRUE, animation_style = 2, additional_styles = list("langchat_small", "emote")) | ||
atom_parent.visible_message("<b>[atom_parent]</b> [message]") | ||
if(NARRATION_METHOD_DIRECT) | ||
atom_parent.visible_message("[message]") | ||
|
||
log_admin("[narrator] sent an Atom Narrate with message \"[message]\" from [atom_parent].") | ||
message_admins("[narrator] sent an Atom Narrate with message \"[message]\" from [atom_parent].") |
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,74 @@ | ||
/// Generic deployable beacon for objectives | ||
/obj/item/deployable_beacon | ||
name = "deployable beacon" | ||
desc = "A standard deployable beacon. Generally used by teams who may be out of regular communications range but must signal for various reasons. This one is branded with a Weyland Yutani symbol and sold en masse." | ||
icon = 'icons/obj/items/deployable_beacon.dmi' | ||
icon_state = "beacon_inactive" | ||
w_class = SIZE_SMALL | ||
|
||
/// The type of beacon it turns into | ||
var/beacon_type = /obj/structure/deployable_beacon | ||
|
||
/// Color of the beacon's light | ||
var/beacon_light_color = COLOR_WHITE | ||
|
||
/obj/item/deployable_beacon/Initialize(mapload, ...) | ||
. = ..() | ||
|
||
var/image/overlay_image = new('icons/obj/items/deployable_beacon.dmi', icon_state = "beacon_inactive_overlay") | ||
overlay_image.color = beacon_light_color | ||
|
||
overlays += overlay_image | ||
|
||
/obj/item/deployable_beacon/attack_self(mob/user) | ||
. = ..() | ||
|
||
var/turf/deploying_turf = get_turf(user) | ||
|
||
var/blocked = FALSE | ||
for(var/obj/potential_blocking_object in deploying_turf) | ||
if(potential_blocking_object.density || potential_blocking_object.can_block_movement) | ||
blocked = potential_blocking_object | ||
break | ||
|
||
if(!istype(deploying_turf, /turf/open)) | ||
blocked = deploying_turf | ||
|
||
var/turf/open/floor = deploying_turf | ||
if(!floor.allow_construction) | ||
to_chat(user, SPAN_WARNING("You cannot deploy \a [src] here, find a more secure surface!")) | ||
return FALSE | ||
|
||
if(blocked) | ||
to_chat(usr, SPAN_WARNING("You need a clear, open area to deploy [src], [blocked] is blocking the way!")) | ||
return | ||
|
||
if(user.action_busy) | ||
return | ||
|
||
if(!do_after(user, (1 SECONDS), INTERRUPT_ALL, BUSY_ICON_BUILD, src)) | ||
return | ||
|
||
playsound(deploying_turf, 'sound/mecha/mechmove01.ogg', 30, 1) | ||
|
||
var/obj/structure/deployable_beacon/deployed_beacon = new beacon_type(get_turf(src), user) | ||
transfer_label_component(deployed_beacon) | ||
|
||
qdel(src) | ||
|
||
/obj/item/deployable_beacon/red | ||
beacon_type = /obj/structure/deployable_beacon/red | ||
beacon_light_color = COLOR_RED | ||
|
||
/obj/item/deployable_beacon/green | ||
beacon_type = /obj/structure/deployable_beacon/green | ||
beacon_light_color = COLOR_GREEN | ||
|
||
/obj/item/deployable_beacon/blue | ||
beacon_type = /obj/structure/deployable_beacon/blue | ||
beacon_light_color = COLOR_BLUE | ||
|
||
/obj/item/deployable_beacon/purple | ||
beacon_type = /obj/structure/deployable_beacon/purple | ||
beacon_light_color = COLOR_PURPLE | ||
|
Oops, something went wrong.