forked from ParadiseSS13/Paradise
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement atom_emote * Buildmode say icon * Buildmode say * Better logging. * Apply suggestions from code review Co-authored-by: Luc <[email protected]> Signed-off-by: Charlie Nolan <[email protected]> --------- Signed-off-by: Charlie Nolan <[email protected]> Co-authored-by: Luc <[email protected]>
- Loading branch information
1 parent
77c5280
commit b665536
Showing
5 changed files
with
45 additions
and
1 deletion.
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,36 @@ | ||
/datum/buildmode_mode/say | ||
key = "say" | ||
|
||
/datum/buildmode_mode/say/show_help(mob/user) | ||
to_chat(user, "<span class='notice'>***********************************************************</span>") | ||
to_chat(user, "<span class='notice'>Left Mouse Button = Say</span>") | ||
to_chat(user, "<span class='notice'>Right Mouse Button = Emote</span>") | ||
to_chat(user, "<span class='notice'>***********************************************************</span>") | ||
|
||
/datum/buildmode_mode/say/handle_click(mob/user, params, atom/object) | ||
if(ismob(object)) | ||
var/mob/target = object | ||
if(!isnull(target.ckey)) | ||
alert("This cannot be used on mobs with a ckey. Use Forcesay in player panel instead.") | ||
return | ||
|
||
var/list/pa = params2list(params) | ||
var/left_click = pa.Find("left") | ||
var/right_click = pa.Find("right") | ||
|
||
if(left_click) | ||
var/say = tgui_input_text(user, "What should [object] say?", "Say what?") | ||
if(isnull(say)) | ||
return | ||
log_admin("Build Mode: [key_name(user)] made [object] at ([object.x],[object.y],[object.z] say [say].") | ||
message_admins("<span class='notice'>Build Mode: [key_name(user)] made [object] at ([object.x],[object.y],[object.z] say [say].</span>") | ||
user.create_log(MISC_LOG, "Made [object] at ([object.x],[object.y],[object.z] say [say].") | ||
object.atom_say(say) | ||
else if(right_click) | ||
var/emote = tgui_input_text(user, "What should [object] do?", "Emote what?") | ||
if(isnull(emote)) | ||
return | ||
log_admin("Build Mode: [key_name(user)] made [object] at ([object.x],[object.y],[object.z] emote *[emote].") | ||
message_admins("<span class='notice'>Build Mode: [key_name(user)] made [object] at ([object.x],[object.y],[object.z] emote *[emote].</span>") | ||
user.create_log(MISC_LOG, "Made [object] at ([object.x],[object.y],[object.z] emote *[emote].") | ||
object.atom_emote(emote) |
Binary file not shown.
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