Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: few runtime fixes #4052

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions code/datums/browser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,16 @@
[get_footer()]
"}

/datum/browser/proc/open(var/use_onclose = 1, var/no_focus = 0)
/datum/browser/proc/open(use_onclose = TRUE, no_focus = FALSE)
set waitfor = FALSE
var/window_size = ""
if(width && height)
window_size = "size=[width]x[height];"
user << browse(get_content(), "window=[window_id];[window_size][window_options]")
for(var/i in 1 to 1000)
if(winexists(user,window_id))
if(!user || !user.client)
return
if(winexists(user, window_id))
break
sleep(1)
if(no_focus)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/human_organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
var/ue_to_compare = (old_ue) ? old_ue : dna.unique_enzymes
var/list/all_bits = internal_organs|bodyparts
for(var/obj/item/organ/organ as anything in all_bits)
if(assimilate || organ.dna.unique_enzymes == ue_to_compare)
if(assimilate || organ.dna?.unique_enzymes == ue_to_compare)
organ.update_DNA(dna)


Expand Down
17 changes: 8 additions & 9 deletions code/modules/surgery/organs_internal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -243,21 +243,20 @@
user.visible_message("[user] notices that no dead organs in [target]'s [affected.name].", \
"You notice that no dead organs in [target]'s [affected.name].")
return FALSE
else if(C.reagents.has_reagent("mitocholide"))
if(C.reagents.has_reagent("mitocholide"))
user.visible_message("[user] notices there is not enough mitocholide in [tool].", \
"You notice there is not enough mitocholide in [tool].")
return FALSE
if(C.reagents.total_volume <= 0) //end_step handles if there is not enough reagent
user.visible_message("[user] notices [tool] is empty.", "You notice [tool] is empty.")
return FALSE

for(var/obj/item/organ/internal/organ as anything in affected.internal_organs)
if(C.reagents.total_volume <= 0) //end_step handles if there is not enough reagent
user.visible_message("[user] notices [tool] is empty.", "You notice [tool] is empty.")
return FALSE

var/msg = "[user] starts pouring some of [tool] over [target]'s [I.name]."
var/self_msg = "You start pouring some of [tool] over [target]'s [I.name]."
var/msg = "[user] starts pouring some of [tool] over [target]'s [organ.name]."
var/self_msg = "You start pouring some of [tool] over [target]'s [organ.name]."
if(istype(C,/obj/item/reagent_containers/syringe))
msg = "[user] begins injecting [tool] into [target]'s [I.name]."
self_msg = "You begin injecting [tool] into [target]'s [I.name]."
msg = "[user] begins injecting [tool] into [target]'s [organ.name]."
self_msg = "You begin injecting [tool] into [target]'s [organ.name]."
user.visible_message(msg, self_msg)
if(H && affected)
H.custom_pain("Something burns horribly in your [affected.name]!")
Expand Down
Loading