Merge remote-tracking branch 'origin/master' into TGUI-3.0

This commit is contained in:
Artur
2020-06-09 11:07:39 +03:00
177 changed files with 249863 additions and 2481 deletions
+12 -13
View File
@@ -326,19 +326,18 @@
var/datum/reagent/R = addiction
if(C && R)
R.addiction_stage++
switch(R.addiction_stage)
if(1 to R.addiction_stage1_end)
need_mob_update += R.addiction_act_stage1(C)
if(R.addiction_stage1_end to R.addiction_stage2_end)
need_mob_update += R.addiction_act_stage2(C)
if(R.addiction_stage2_end to R.addiction_stage3_end)
need_mob_update += R.addiction_act_stage3(C)
if(R.addiction_stage3_end to R.addiction_stage4_end)
need_mob_update += R.addiction_act_stage4(C)
if(R.addiction_stage4_end to INFINITY)
remove_addiction(R)
else
SEND_SIGNAL(C, COMSIG_CLEAR_MOOD_EVENT, "[R.type]_overdose")
if(1 <= R.addiction_stage && R.addiction_stage <= R.addiction_stage1_end)
need_mob_update += R.addiction_act_stage1(C)
else if(R.addiction_stage1_end < R.addiction_stage && R.addiction_stage <= R.addiction_stage2_end)
need_mob_update += R.addiction_act_stage2(C)
else if(R.addiction_stage2_end < R.addiction_stage && R.addiction_stage <= R.addiction_stage3_end)
need_mob_update += R.addiction_act_stage3(C)
else if(R.addiction_stage3_end < R.addiction_stage && R.addiction_stage <= R.addiction_stage4_end)
need_mob_update += R.addiction_act_stage4(C)
else if(R.addiction_stage4_end < R.addiction_stage)
remove_addiction(R)
else
SEND_SIGNAL(C, COMSIG_CLEAR_MOOD_EVENT, "[R.type]_overdose")
addiction_tick++
if(C && need_mob_update) //some of the metabolized reagents had effects on the mob that requires some updates.
C.updatehealth()
@@ -213,6 +213,11 @@
for(var/datum/reagent/R in beaker.reagents.reagent_list)
. += "<span class='notice'>- [R.volume] units of [R.name].</span>"
/obj/machinery/reagentgrinder/AltClick(mob/user)
. = ..()
if(istype(user) && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
replace_beaker(user)
/obj/machinery/reagentgrinder/proc/eject(mob/user)
for(var/i in holdingitems)
var/obj/item/O = i
@@ -25,14 +25,8 @@
/obj/item/reagent_containers/pill/attack_self(mob/user)
return
/obj/item/reagent_containers/pill/get_w_volume()
switch(reagents.total_volume)
if(0 to 9.5)
return 1
if(9.5 to 25)
return DEFAULT_VOLUME_TINY
else
return DEFAULT_VOLUME_SMALL
/obj/item/reagent_containers/pill/get_w_volume() // DEFAULT_VOLUME_TINY at 25u, DEFAULT_VOLUME_SMALL at 50u
return DEFAULT_VOLUME_TINY/2 + reagents.total_volume / reagents.maximum_volume * DEFAULT_VOLUME_TINY
/obj/item/reagent_containers/pill/attack(mob/M, mob/user, def_zone)
if(!canconsume(M, user))