refactor a bit

This commit is contained in:
silicons
2021-06-12 04:41:58 -07:00
parent 85b1125c83
commit 55e8d67521
4 changed files with 25 additions and 10 deletions
+1 -1
View File
@@ -532,7 +532,7 @@
// /datum/component/storage signals
#define COMSIG_CONTAINS_STORAGE "is_storage" //() - returns bool.
#define COMSIG_TRY_STORAGE_INSERT "storage_try_insert" //(obj/item/inserting, mob/user, silent, force) - returns bool
#define COMSIG_TRY_STORAGE_SHOW "storage_show_to" //(mob/show_to, force) - returns bool.
#define COMSIG_TRY_STORAGE_SHOW "storage_show_to" //(mob/show_to, force, trigger_on_found) - returns bool.
#define COMSIG_TRY_STORAGE_HIDE_FROM "storage_hide_from" //(mob/hide_from) - returns bool
#define COMSIG_TRY_STORAGE_HIDE_ALL "storage_hide_all" //returns bool
#define COMSIG_TRY_STORAGE_SET_LOCKSTATE "storage_lock_set_state" //(newstate)
+6 -6
View File
@@ -429,7 +429,7 @@
return FALSE
// this must come before the screen objects only block, dunno why it wasn't before
if(over_object == M)
user_show_to_mob(M)
user_show_to_mob(M, trigger_on_found = TRUE)
return
if(isrevenant(M))
RevenantThrow(over_object, M, source)
@@ -448,7 +448,7 @@
return
A.add_fingerprint(M)
/datum/component/storage/proc/user_show_to_mob(mob/M, force = FALSE, trigger_on_found = TRUE)
/datum/component/storage/proc/user_show_to_mob(mob/M, force = FALSE, trigger_on_found = FALSE)
var/atom/A = parent
if(!istype(M))
return FALSE
@@ -592,8 +592,8 @@
/datum/component/storage/proc/show_to_ghost(datum/source, mob/dead/observer/M)
return user_show_to_mob(M, TRUE)
/datum/component/storage/proc/signal_show_attempt(datum/source, mob/showto, force = FALSE)
return user_show_to_mob(showto, force)
/datum/component/storage/proc/signal_show_attempt(datum/source, mob/showto, force = FALSE, trigger_on_found = TRUE)
return user_show_to_mob(showto, force, trigger_on_found = trigger_on_found)
/datum/component/storage/proc/on_check()
return TRUE
@@ -662,7 +662,7 @@
if(A.loc == user)
. = COMPONENT_NO_ATTACK_HAND
if(!check_locked(source, user, TRUE))
ui_show(user)
user_show_to_mob(user, trigger_on_found = TRUE)
A.do_jiggle()
/datum/component/storage/proc/signal_on_pickup(datum/source, mob/user)
@@ -692,7 +692,7 @@
var/atom/A = parent
if(!quickdraw)
A.add_fingerprint(user)
user_show_to_mob(user)
user_show_to_mob(user, trigger_on_found = TRUE)
if(rustle_sound)
playsound(A, "rustle", 50, 1, -5)
return TRUE
File diff suppressed because one or more lines are too long
+17 -2
View File
@@ -7563,7 +7563,7 @@ __metadata:
glob: ^7.1.6
source-map: ^0.7.3
stacktrace-parser: ^0.1.10
ws: ^7.4.3
ws: ^7.4.6
languageName: unknown
linkType: soft
@@ -8311,7 +8311,7 @@ typescript@^4.1.5:
languageName: node
linkType: hard
"ws@npm:^7.2.3, ws@npm:^7.3.1, ws@npm:^7.4.3":
"ws@npm:^7.2.3, ws@npm:^7.3.1":
version: 7.4.3
resolution: "ws@npm:7.4.3"
peerDependencies:
@@ -8326,6 +8326,21 @@ typescript@^4.1.5:
languageName: node
linkType: hard
"ws@npm:^7.4.6":
version: 7.4.6
resolution: "ws@npm:7.4.6"
peerDependencies:
bufferutil: ^4.0.1
utf-8-validate: ^5.0.2
peerDependenciesMeta:
bufferutil:
optional: true
utf-8-validate:
optional: true
checksum: ffeb626d92f14aa3a67aa3784824c1d290131e25d225f4ca6b1b6b6d7ea754fca67694d89a5b99b144382365e1bccf1f7ec2f92df56f0d25f44939b070452f06
languageName: node
linkType: hard
"xml-name-validator@npm:^3.0.0":
version: 3.0.0
resolution: "xml-name-validator@npm:3.0.0"