mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
Traits
This commit is contained in:
@@ -253,6 +253,7 @@
|
|||||||
|
|
||||||
// item traits
|
// item traits
|
||||||
#define TRAIT_NODROP "nodrop"
|
#define TRAIT_NODROP "nodrop"
|
||||||
|
#define TRAIT_SPOOKY_THROW "spooky_throw"
|
||||||
|
|
||||||
// common trait sources
|
// common trait sources
|
||||||
#define TRAIT_GENERIC "generic"
|
#define TRAIT_GENERIC "generic"
|
||||||
|
|||||||
@@ -130,7 +130,8 @@ GLOBAL_LIST_INIT(traits_by_type, list(
|
|||||||
),
|
),
|
||||||
/obj/item = list(
|
/obj/item = list(
|
||||||
"TRAIT_NODROP" = TRAIT_NODROP,
|
"TRAIT_NODROP" = TRAIT_NODROP,
|
||||||
"TRAIT_NO_TELEPORT" = TRAIT_NO_TELEPORT
|
"TRAIT_NO_TELEPORT" = TRAIT_NO_TELEPORT,
|
||||||
|
"TRAIT_SPOOKY_THROW" = TRAIT_SPOOKY_THROW
|
||||||
)
|
)
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|||||||
@@ -454,6 +454,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
|||||||
/obj/item/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params) //Copypaste of /atom/MouseDrop() since this requires code in a very specific spot
|
/obj/item/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params) //Copypaste of /atom/MouseDrop() since this requires code in a very specific spot
|
||||||
if(!usr || !over)
|
if(!usr || !over)
|
||||||
return
|
return
|
||||||
|
message_admins("[src], [usr], [over], [src_location], [over_location], [src_control], [over_control], [params]")
|
||||||
if(SEND_SIGNAL(src, COMSIG_MOUSEDROP_ONTO, over, usr) & COMPONENT_NO_MOUSEDROP) //Whatever is receiving will verify themselves for adjacency.
|
if(SEND_SIGNAL(src, COMSIG_MOUSEDROP_ONTO, over, usr) & COMPONENT_NO_MOUSEDROP) //Whatever is receiving will verify themselves for adjacency.
|
||||||
return
|
return
|
||||||
if(over == src)
|
if(over == src)
|
||||||
@@ -472,14 +473,19 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
|||||||
if(!anchored && !spooker.telekinesis_cooldown)
|
if(!anchored && !spooker.telekinesis_cooldown)
|
||||||
spooker.change_essence_amount(-5, FALSE, "telekinesis")
|
spooker.change_essence_amount(-5, FALSE, "telekinesis")
|
||||||
spooker.stun(10)
|
spooker.stun(10)
|
||||||
spooker.reveal(20)
|
spooker.reveal(30)
|
||||||
spooker.telekinesis_cooldown = TRUE
|
spooker.telekinesis_cooldown = TRUE
|
||||||
float(TRUE, 2)
|
float(TRUE, 2)
|
||||||
sleep(10)
|
sleep(10)
|
||||||
throw_at(src_location)
|
safe_throw_at(over, 10, 2)
|
||||||
new /obj/effect/temp_visual/telekinesis(get_turf(src))
|
ADD_TRAIT(src, TRAIT_SPOOKY_THROW)
|
||||||
|
src.DoRevenantThrowEffects()
|
||||||
|
var/obj/effect/temp_visual/telekinesis/T = new(get_turf(src))
|
||||||
|
T.color = purple
|
||||||
addtimer(CALLBACK(src, /atom/movable.proc/float, FALSE), 2)
|
addtimer(CALLBACK(src, /atom/movable.proc/float, FALSE), 2)
|
||||||
addtimer(CALLBACK(spooker, /mob/living/simple_animal/revenant.proc/telekinesis_cooldown_end), 30)
|
addtimer(CALLBACK(spooker, /mob/living/simple_animal/revenant.proc/telekinesis_cooldown_end), 50)
|
||||||
|
sleep(2)
|
||||||
|
REMOVE_TRAIT(src, TRAIT_SPOOKY_THROW)
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!Adjacent(usr) || !over.Adjacent(usr))
|
if(!Adjacent(usr) || !over.Adjacent(usr))
|
||||||
@@ -487,7 +493,32 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
|||||||
|
|
||||||
over.MouseDrop_T(src,usr)
|
over.MouseDrop_T(src,usr)
|
||||||
return
|
return
|
||||||
|
/obj/item/proc/DoRevenantThrowEffects()
|
||||||
|
var/hijink_to_do
|
||||||
|
switch(istype)
|
||||||
|
if(obj/item/gun)
|
||||||
|
hijink_to_do = "shoot"
|
||||||
|
if(obj/item/storage)
|
||||||
|
if(GetComponent(datum/component/storage))
|
||||||
|
hijink_to_do = "scatter items"
|
||||||
|
if(obj/item/card/id)
|
||||||
|
hijink_to_do = "flash id"
|
||||||
|
if(obj/item/weldingtool)
|
||||||
|
hijink_to_do = "welder toggle"
|
||||||
|
if(obj/item/tank)
|
||||||
|
hijink_to_do = "toggle tank"
|
||||||
|
if(obj/item/paper)
|
||||||
|
hijink_to_do = "paper into plane"
|
||||||
|
if(obj/item/paper_bin)
|
||||||
|
hijink_to_do = "paperbin scatter"
|
||||||
|
if(obj/item/assembly/flash)
|
||||||
|
hijink_to_do = "flash randomly"
|
||||||
|
if(obj/item/flashlight)
|
||||||
|
hijinks_to_do = "toggle flashlight"
|
||||||
|
if(obj/item/grenade/flashbang)
|
||||||
|
|
||||||
|
if(obj/item/grenade/stingbang)
|
||||||
|
while(HAS_TRAIT(src, TRAIT_SPOOKY_THROW))
|
||||||
// called after an item is placed in an equipment slot
|
// called after an item is placed in an equipment slot
|
||||||
// user is mob that equipped it
|
// user is mob that equipped it
|
||||||
// slot uses the slot_X defines found in setup.dm
|
// slot uses the slot_X defines found in setup.dm
|
||||||
|
|||||||
Reference in New Issue
Block a user