mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 04:57:12 +01:00
makes some uis no longer automatically update (#25121)
* makes some uis no longer automatically update
* fixes cloning sporadically not working
* Revert "fixes cloning sporadically not working"
This reverts commit 2d88887cf6.
* Update code/modules/hydroponics/seed_extractor.dm
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
* Update code/modules/hydroponics/seed_extractor.dm
* Update code/modules/hydroponics/seed_extractor.dm
---------
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
C.forceMove(src)
|
||||
case = C
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
SStgui.update_uis(src)
|
||||
|
||||
/obj/item/bio_chip_pad/proc/eject_case(mob/user)
|
||||
if(!case)
|
||||
@@ -53,13 +54,9 @@
|
||||
if(user.put_in_hands(case))
|
||||
add_fingerprint(user)
|
||||
case.add_fingerprint(user)
|
||||
case = null
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
|
||||
case.forceMove(get_turf(src))
|
||||
case = null
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
SStgui.update_uis(src)
|
||||
|
||||
/obj/item/bio_chip_pad/AltClick(mob/user)
|
||||
if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user))
|
||||
@@ -74,6 +71,7 @@
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "BioChipPad", name)
|
||||
ui.set_autoupdate(FALSE)
|
||||
ui.open()
|
||||
|
||||
/obj/item/bio_chip_pad/ui_data(mob/user)
|
||||
@@ -97,7 +95,7 @@
|
||||
/obj/item/bio_chip_pad/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
||||
if(..())
|
||||
return
|
||||
|
||||
. = TRUE
|
||||
switch(action)
|
||||
if("eject_case")
|
||||
eject_case(ui.user)
|
||||
|
||||
@@ -171,6 +171,7 @@
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "GeneModder", name)
|
||||
ui.set_autoupdate(FALSE)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/plantgenes/ui_data(mob/user)
|
||||
|
||||
@@ -96,6 +96,7 @@
|
||||
|
||||
if(loaded)
|
||||
to_chat(user, "<span class='notice'>You transfer [loaded] seeds from [O] into [src].</span>")
|
||||
SStgui.update_uis(src)
|
||||
else
|
||||
var/seedable = 0
|
||||
for(var/obj/item/food/snacks/grown/ignored in P)
|
||||
@@ -115,10 +116,10 @@
|
||||
else if(istype(O, /obj/item/unsorted_seeds))
|
||||
to_chat(user, "<span class='warning'>You need to sort [O] first!</span>")
|
||||
return ..()
|
||||
else if(istype(O,/obj/item/seeds))
|
||||
if(add_seed(O, user))
|
||||
to_chat(user, "<span class='notice'>You add [O] to [name].</span>")
|
||||
updateUsrDialog()
|
||||
else if(istype(O, /obj/item/seeds))
|
||||
add_seed(O, user)
|
||||
to_chat(user, "<span class='notice'>You add [O] to [name].</span>")
|
||||
SStgui.update_uis(src)
|
||||
return
|
||||
else if(seedify(O,-1, src, user))
|
||||
to_chat(user, "<span class='notice'>You extract some seeds.</span>")
|
||||
@@ -143,6 +144,7 @@
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "SeedExtractor", name)
|
||||
ui.set_autoupdate(FALSE)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/seed_extractor/ui_data(mob/user)
|
||||
@@ -177,18 +179,14 @@
|
||||
/obj/machinery/seed_extractor/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
||||
if(..())
|
||||
return
|
||||
. = FALSE
|
||||
. = TRUE
|
||||
switch(action)
|
||||
if("vend")
|
||||
vend_seed(params["seed_id"], params["seed_variant"], params["vend_amount"])
|
||||
add_fingerprint(usr)
|
||||
. = TRUE
|
||||
if("set_vend_amount")
|
||||
if(!length(params["vend_amount"]))
|
||||
return
|
||||
vend_amount = clamp(params["vend_amount"], 1, MAX_DISPENSE_SEEDS)
|
||||
add_fingerprint(usr)
|
||||
. = TRUE
|
||||
|
||||
/obj/machinery/seed_extractor/proc/vend_seed(seed_id, seed_variant, amount)
|
||||
if(!seed_id)
|
||||
@@ -241,7 +239,6 @@
|
||||
pile_count++
|
||||
piles += new_pile
|
||||
O.forceMove(src)
|
||||
return
|
||||
|
||||
/datum/seed_pile
|
||||
var/path
|
||||
|
||||
Reference in New Issue
Block a user