mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-10 07:30:36 +01:00
unregisters
This commit is contained in:
@@ -132,9 +132,12 @@ Icons, maybe?
|
||||
leash_pet.remove_status_effect(/datum/status_effect/leash_pet)
|
||||
|
||||
if(!leash_pet.has_status_effect(/datum/status_effect/leash_pet)) //If there is no pet, there is no dom. Loop breaks.
|
||||
QDEL_NULL(mobhook_leash_master)
|
||||
QDEL_NULL(mobhook_leash_pet)
|
||||
QDEL_NULL(mobhook_leash_freepet)
|
||||
//QDEL_NULL(mobhook_leash_master)
|
||||
UnregisterSignal(mobhook_leash_master, COMSIG_MOVABLE_MOVED)
|
||||
//QDEL_NULL(mobhook_leash_pet)
|
||||
UnregisterSignal(mobhook_leash_pet, COMSIG_MOVABLE_MOVED)
|
||||
//QDEL_NULL(mobhook_leash_freepet)
|
||||
UnregisterSignal(mobhook_leash_freepet, COMSIG_MOVABLE_MOVED)
|
||||
if(leash_pet.has_status_effect(/datum/status_effect/leash_freepet))
|
||||
leash_pet.remove_status_effect(/datum/status_effect/leash_freepet)
|
||||
if(leash_pet.has_movespeed_modifier(MOVESPEED_ID_LEASH))
|
||||
@@ -189,7 +192,8 @@ Icons, maybe?
|
||||
if(leash_pet == leash_master) //Pet is the master
|
||||
return
|
||||
if(!leash_pet.has_status_effect(/datum/status_effect/leash_pet))
|
||||
QDEL_NULL(mobhook_leash_master) //Probably redundant, but it's nice to be safe
|
||||
//QDEL_NULL(mobhook_leash_master) //Probably redundant, but it's nice to be safe
|
||||
UnregisterSignal(mobhook_leash_master, COMSIG_MOVABLE_MOVED)
|
||||
leash_master.remove_status_effect(/datum/status_effect/leash_dom)
|
||||
return
|
||||
|
||||
@@ -258,8 +262,10 @@ Icons, maybe?
|
||||
leash_pet.remove_status_effect(/datum/status_effect/leash_pet)
|
||||
leash_pet.remove_movespeed_modifier(MOVESPEED_ID_LEASH)
|
||||
leash_master.remove_status_effect(/datum/status_effect/leash_dom)
|
||||
QDEL_NULL(mobhook_leash_master)
|
||||
QDEL_NULL(mobhook_leash_pet)
|
||||
//QDEL_NULL(mobhook_leash_master)
|
||||
UnregisterSignal(mobhook_leash_master, COMSIG_MOVABLE_MOVED)
|
||||
//QDEL_NULL(mobhook_leash_pet)
|
||||
UnregisterSignal(mobhook_leash_pet, COMSIG_MOVABLE_MOVED)
|
||||
leash_pet = "null"
|
||||
leash_master = "null"
|
||||
leash_used = 0
|
||||
@@ -273,7 +279,8 @@ Icons, maybe?
|
||||
return
|
||||
//Make sure the pet is still a pet
|
||||
if(!leash_pet.has_status_effect(/datum/status_effect/leash_pet))
|
||||
QDEL_NULL(mobhook_leash_pet) //Probably redundant, but it's nice to be safe
|
||||
//QDEL_NULL(mobhook_leash_pet) //Probably redundant, but it's nice to be safe
|
||||
UnregisterSignal(mobhook_leash_pet, COMSIG_MOVABLE_MOVED)
|
||||
return
|
||||
|
||||
//The pet has escaped. There is no DOM. GO PET RUN.
|
||||
@@ -362,8 +369,10 @@ Icons, maybe?
|
||||
leash_pet.adjustOxyLoss(5)
|
||||
leash_pet.remove_status_effect(/datum/status_effect/leash_pet)
|
||||
leash_pet.remove_status_effect(/datum/status_effect/leash_freepet)
|
||||
QDEL_NULL(mobhook_leash_pet)
|
||||
QDEL_NULL(mobhook_leash_freepet)
|
||||
//QDEL_NULL(mobhook_leash_pet)
|
||||
UnregisterSignal(mobhook_leash_pet, COMSIG_MOVABLE_MOVED)
|
||||
//QDEL_NULL(mobhook_leash_freepet)
|
||||
UnregisterSignal(mobhook_leash_freepet, COMSIG_MOVABLE_MOVED)
|
||||
leash_pet = "null"
|
||||
leash_used = 0
|
||||
|
||||
@@ -386,7 +395,8 @@ Icons, maybe?
|
||||
mobhook_leash_freepet = leash_pet
|
||||
leash_master.remove_status_effect(/datum/status_effect/leash_dom) //No dom with no leash. We will get a new dom if the leash is picked back up.
|
||||
leash_master = "null"
|
||||
QDEL_NULL(mobhook_leash_master)
|
||||
//QDEL_NULL(mobhook_leash_master)
|
||||
UnregisterSignal(mobhook_leash_master, COMSIG_MOVABLE_MOVED)
|
||||
|
||||
/obj/item/leash/equipped(mob/user)
|
||||
. = ..()
|
||||
@@ -404,7 +414,8 @@ Icons, maybe?
|
||||
RegisterSignal(leash_master, COMSIG_MOVABLE_MOVED, .proc/on_master_move)
|
||||
mobhook_leash_master = leash_master
|
||||
leash_pet.remove_status_effect(/datum/status_effect/leash_freepet)
|
||||
QDEL_NULL(mobhook_leash_freepet)
|
||||
//QDEL_NULL(mobhook_leash_freepet)
|
||||
UnregisterSignal(mobhook_leash_freepet, COMSIG_MOVABLE_MOVED)
|
||||
leash_pet.add_movespeed_modifier(MOVESPEED_ID_LEASH, multiplicative_slowdown = 5)
|
||||
|
||||
/datum/crafting_recipe/leash
|
||||
|
||||
Reference in New Issue
Block a user