Skip to content

Commit

Permalink
bugfix: few runtime fixes (ss220-space#4052)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimach authored and Etrnlmelancholy committed Jan 3, 2024
1 parent 1f36ce4 commit 5013f6c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
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

0 comments on commit 5013f6c

Please sign in to comment.