Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
amylizzle committed Oct 18, 2023
2 parents e831563 + 215f3e1 commit c891c48
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions code/modules/events/radiation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
animate_flash_color_fill_inherit(T,"#FFDD00",1,5)
return
animate_flash_color_fill_inherit(T,"#00FF00",1,5)
T.AddComponent(/datum/component/radioactive, 40, TRUE, FALSE, 1)
for (var/mob/living/carbon/M in T.contents)
M.take_radiation_dose(rad_strength)
if (prob(mutate_prob) && M.bioHolder)
Expand Down Expand Up @@ -102,6 +101,7 @@
sleep(lifespan)
playsound(src,pulse_sound,50,TRUE)
irradiate_turf(get_turf(src))
shoot_projectile_ST_pixel_spread(get_turf(src), new/datum/projectile/neutron{shot_number = 10}(10), get_step_rand(get_turf(src)), spread_angle = 360)
for (var/turf/T in circular_range(src,pulse_range))
irradiate_turf(T)
SPAWN(0)
Expand All @@ -123,7 +123,7 @@
animate_flash_color_fill_inherit(T,"#FFDD00",1,5)
return
animate_flash_color_fill_inherit(T,"#0084ff",1,5)
T.AddComponent(/datum/component/radioactive, 40, TRUE, TRUE, 1)
T.AddComponent(/datum/component/radioactive, 25, TRUE, FALSE, 1)
for (var/mob/A in T.contents)
A.take_radiation_dose(rad_strength)
if(iscarbon(A))
Expand Down
29 changes: 15 additions & 14 deletions code/obj/item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -606,28 +606,29 @@ ABSTRACT_TYPE(/obj/item)
var/added = 0
var/imrobot
var/imdrone
var/obj/item/stacker
var/obj/item/stackee
if(QDELETED(other))
return added

if((imrobot = isrobot(other.loc)) || (imdrone = isghostdrone(other.loc)) || istype(other.loc, /obj/item/magtractor))
if (imrobot)
max_stack = 300
else if (imdrone)
max_stack = 1000
if (other != src && check_valid_stack(src))
if (src.amount + other.amount > max_stack)
added = max_stack - other.amount
else
added = src.amount
src.change_stack_amount(-added)
other.change_stack_amount(added)
stacker = other
stackee = src
else
if (other != src && check_valid_stack(other))
if (src.amount + other.amount > max_stack)
added = max_stack - src.amount
else
added = other.amount
src.change_stack_amount(added)
other.change_stack_amount(-added)
stacker = src
stackee = other

if (stacker == stackee || !check_valid_stack(stackee))
return added

added = clamp(stackee.amount, 0, max_stack - stacker.amount)

stacker.change_stack_amount(added)
stackee.change_stack_amount(-added)

return added

Expand Down

0 comments on commit c891c48

Please sign in to comment.