mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-12 08:36:00 +01:00
Componentizes menucrafting (#44221)
Fixes menucrafting opening a new window when finishing construction
This commit is contained in:
@@ -23,11 +23,10 @@
|
||||
create_internal_organs() //most of it is done in set_species now, this is only for parent call
|
||||
physiology = new()
|
||||
|
||||
handcrafting = new()
|
||||
|
||||
. = ..()
|
||||
|
||||
AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT = CALLBACK(src, .proc/clean_blood)))
|
||||
AddComponent(/datum/component/personal_crafting)
|
||||
|
||||
/mob/living/carbon/human/proc/setup_human_dna()
|
||||
//initialize dna. for spawned humans; overwritten by other code
|
||||
@@ -45,9 +44,6 @@
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/living/carbon/human/OpenCraftingMenu()
|
||||
handcrafting.ui_interact(src)
|
||||
|
||||
/mob/living/carbon/human/prepare_data_huds()
|
||||
//Update med hud images...
|
||||
..()
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
|
||||
var/name_override //For temporary visible name changes
|
||||
|
||||
var/datum/personal_crafting/handcrafting
|
||||
var/datum/physiology/physiology
|
||||
|
||||
var/list/datum/bioware = list()
|
||||
|
||||
@@ -80,7 +80,6 @@
|
||||
|
||||
var/dextrous = FALSE //If the creature has, and can use, hands
|
||||
var/dextrous_hud_type = /datum/hud/dextrous
|
||||
var/datum/personal_crafting/handcrafting
|
||||
|
||||
var/AIStatus = AI_ON //The Status of our AI, can be set to AI_ON (On, usual processing), AI_IDLE (Will not process, but will return to AI_ON if an enemy comes near), AI_OFF (Off, Not processing ever), AI_Z_OFF (Temporarily off due to nonpresence of players)
|
||||
var/can_have_ai = TRUE //once we have become sentient, we can never go back
|
||||
@@ -97,7 +96,6 @@
|
||||
/mob/living/simple_animal/Initialize()
|
||||
. = ..()
|
||||
GLOB.simple_animals[AIStatus] += src
|
||||
handcrafting = new()
|
||||
if(gender == PLURAL)
|
||||
gender = pick(MALE,FEMALE)
|
||||
if(!real_name)
|
||||
@@ -105,6 +103,8 @@
|
||||
if(!loc)
|
||||
stack_trace("Simple animal being instantiated in nullspace")
|
||||
update_simplemob_varspeed()
|
||||
if(dextrous)
|
||||
AddComponent(/datum/component/personal_crafting)
|
||||
|
||||
/mob/living/simple_animal/Destroy()
|
||||
GLOB.simple_animals[AIStatus] -= src
|
||||
@@ -429,9 +429,9 @@
|
||||
mobility_flags = MOBILITY_FLAGS_DEFAULT
|
||||
else
|
||||
mobility_flags = NONE
|
||||
if(!(mobility_flags & MOBILITY_MOVE))
|
||||
if(!(mobility_flags & MOBILITY_MOVE))
|
||||
walk(src, 0) //stop mid walk
|
||||
|
||||
|
||||
update_transform()
|
||||
update_action_buttons_icon()
|
||||
|
||||
@@ -473,10 +473,6 @@
|
||||
/mob/living/simple_animal/get_idcard(hand_first)
|
||||
return access_card
|
||||
|
||||
/mob/living/simple_animal/OpenCraftingMenu()
|
||||
if(dextrous)
|
||||
handcrafting.ui_interact(src)
|
||||
|
||||
/mob/living/simple_animal/can_hold_items()
|
||||
return dextrous
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
auto_deadmin_on_login()
|
||||
|
||||
log_message("Client [key_name(src)] has taken ownership of mob [src]([src.type])", LOG_OWNERSHIP)
|
||||
SEND_SIGNAL(src, COMSIG_MOB_CLIENT_LOGIN, client)
|
||||
|
||||
/mob/proc/auto_deadmin_on_login() //return true if they're not an admin at the end.
|
||||
if(!client?.holder)
|
||||
|
||||
Reference in New Issue
Block a user