mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2026-08-27 06:37:07 +01:00
small talk and railings
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
//Spans. Robot speech, italics, etc. Applied in compose_message().
|
||||
#define SPAN_SMALL "small"
|
||||
@@ -0,0 +1,7 @@
|
||||
/atom/proc/do_twist(targetangle = 45, timer = 20)
|
||||
var/matrix/OM = matrix(transform)
|
||||
var/matrix/M = matrix(transform)
|
||||
var/halftime = timer * 0.5
|
||||
M.Turn(pick(-targetangle, targetangle))
|
||||
animate(src, transform = M, time = halftime, easing = ELASTIC_EASING)
|
||||
animate(src, transform = OM, time = halftime, easing = QUAD_EASING)
|
||||
@@ -0,0 +1,17 @@
|
||||
//For small players and such
|
||||
/datum/element/smalltalk
|
||||
element_flags = ELEMENT_DETACH
|
||||
|
||||
/datum/element/smalltalk/Attach(datum/target, force = FALSE)
|
||||
. = ..()
|
||||
if(!(isliving(target) || (force && istype(target, /atom/movable))))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
|
||||
RegisterSignal(target, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/datum/element/smalltalk/Detach(datum/source, force)
|
||||
. = ..()
|
||||
UnregisterSignal(source, COMSIG_MOB_SAY)
|
||||
|
||||
/datum/element/smalltalk/proc/handle_speech(datum/source, list/speech_args)
|
||||
speech_args[SPEECH_SPANS] |= SPAN_SMALL
|
||||
@@ -151,15 +151,18 @@
|
||||
|
||||
usr.visible_message("<span class='warning'>[user] starts climbing onto \the [src]!</span>")
|
||||
|
||||
if(!do_after(user, 20, target = src))
|
||||
if(!do_after(user, 15, target = src))
|
||||
return
|
||||
|
||||
if(get_turf(user) == get_turf(src))
|
||||
usr.dir = get_dir(usr.loc, get_step(src, src.dir))//turn and face railing
|
||||
usr.forceMove(get_step(src, src.dir))
|
||||
else
|
||||
usr.dir = get_dir(usr.loc, loc)//turn and face railing
|
||||
usr.forceMove(get_turf(src))
|
||||
|
||||
usr.visible_message("<span class='warning'>[user] climbed over \the [src]!</span>")
|
||||
usr.do_twist(targetangle = 45, timer = 8)
|
||||
|
||||
/obj/structure/railing/handrail
|
||||
name = "handrail"
|
||||
|
||||
@@ -28,3 +28,10 @@
|
||||
to_chat(src, "<span class='userdanger'>An admin has [!admin_sleeping ? "un": ""]slept you.</span>")
|
||||
log_admin("[key_name(admin)] toggled admin-sleep on [key_name(src)].")
|
||||
message_admins("[key_name_admin(admin)] toggled admin-sleep on [key_name_admin(src)].")
|
||||
|
||||
/mob/living/adjust_mobsize()
|
||||
. = ..()
|
||||
if(mob_size == 0)
|
||||
AddElement(/datum/element/smalltalk)
|
||||
else
|
||||
RemoveElement(/datum/element/smalltalk)
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
/*
|
||||
/mob/living/update_size(new_size)
|
||||
. = ..()
|
||||
if(!small_sprite)
|
||||
small_sprite = new(src)
|
||||
|
||||
if(new_size >= (RESIZE_A_BIGNORMAL + RESIZE_NORMAL) / 2)
|
||||
small_sprite.Grant(src)
|
||||
else
|
||||
small_sprite.Remove(src)
|
||||
*/
|
||||
+3
-1
@@ -247,6 +247,7 @@
|
||||
#include "code\__SPLURTCODE\DEFINES\is_helpers.dm"
|
||||
#include "code\__SPLURTCODE\DEFINES\mobs.dm"
|
||||
#include "code\__SPLURTCODE\DEFINES\radiation.dm"
|
||||
#include "code\__SPLURTCODE\DEFINES\say.dm"
|
||||
#include "code\__SPLURTCODE\DEFINES\signals.dm"
|
||||
#include "code\__SPLURTCODE\DEFINES\sound.dm"
|
||||
#include "code\__SPLURTCODE\DEFINES\subsystems.dm"
|
||||
@@ -4192,6 +4193,7 @@
|
||||
#include "modular_splurt\code\__HELPERS\_cit_helpers.dm"
|
||||
#include "modular_splurt\code\__HELPERS\icons.dm"
|
||||
#include "modular_splurt\code\__HELPERS\matrices.dm"
|
||||
#include "modular_splurt\code\__HELPERS\unsorted.dm"
|
||||
#include "modular_splurt\code\_DEFINES\is_helpers.dm"
|
||||
#include "modular_splurt\code\_globalvars\lists\global_lewd.dm"
|
||||
#include "modular_splurt\code\_globalvars\lists\mapping.dm"
|
||||
@@ -4218,6 +4220,7 @@
|
||||
#include "modular_splurt\code\datums\components\crafting\recipes\recipes_misc.dm"
|
||||
#include "modular_splurt\code\datums\components\crafting\recipes\recipes_primal.dm"
|
||||
#include "modular_splurt\code\datums\components\crafting\recipes\recipes_robot.dm"
|
||||
#include "modular_splurt\code\datums\elements\smalltalk.dm"
|
||||
#include "modular_splurt\code\datums\components\storage\concrete\pockets.dm"
|
||||
#include "modular_splurt\code\datums\elements\crawl_under.dm"
|
||||
#include "modular_splurt\code\datums\elements\spooky.dm"
|
||||
@@ -4548,7 +4551,6 @@
|
||||
#include "modular_splurt\code\modules\research\techweb\nodes\bluespace_nodes.dm"
|
||||
#include "modular_splurt\code\modules\research\techweb\nodes\medical_nodes.dm"
|
||||
#include "modular_splurt\code\modules\research\techweb\nodes\misc_nodes.dm"
|
||||
#include "modular_splurt\code\modules\resize\resizing.dm"
|
||||
#include "modular_splurt\code\modules\resize\smallsprite_action.dm"
|
||||
#include "modular_splurt\code\modules\ruins\objects_and_mobs\ash_walker_den.dm"
|
||||
#include "modular_splurt\code\modules\ruins\spaceruin_code\hilbertshotel.dm"
|
||||
|
||||
Reference in New Issue
Block a user