# Conflicts:
#	code/modules/mob/living/silicon/robot/robot_modules/station.dm
#	code/modules/vore/eating/bellymodes_vr.dm
#	vorestation.dme
This commit is contained in:
Repede
2018-02-28 22:06:46 -05:00
175 changed files with 3659 additions and 3308 deletions

View File

@@ -48,8 +48,10 @@ var/global/ingredientLimit = 20000
return*/
user.drop_item()
I.forceMove(src)
S.reagents.trans_to(src,S.reagents.total_volume)
if(S.reagents)
S.reagents.trans_to(src,S.reagents.total_volume)
ingredients += S
if(src.addTop)

View File

@@ -160,8 +160,9 @@
return
var/mob/living/carbon/human/H = target
var/obj/item/organ/external/affected //VOREStation Edit - Moved this outside this if
if(istype(H))
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
affected = H.get_organ(user.zone_sel.selecting) //VOREStation Edit - See above comment.
if(!affected)
to_chat(user, "<span class='danger'>\The [H] is missing that limb!</span>")
return
@@ -202,6 +203,7 @@
if(ismob(target))
var/contained = reagentlist()
trans = reagents.trans_to_mob(target, amount_per_transfer_from_this, CHEM_BLOOD)
dirty(target,affected) //VOREStation Add
admin_inject_log(user, target, src, contained, trans)
else
trans = reagents.trans_to_obj(target, amount_per_transfer_from_this)
@@ -214,7 +216,7 @@
update_icon()
return
/* VOREStation Edit - See syringes_vr.dm
/obj/item/weapon/reagent_containers/syringe/update_icon()
overlays.Cut()
@@ -241,7 +243,7 @@
filling.color = reagents.get_color()
overlays += filling
*/
/obj/item/weapon/reagent_containers/syringe/proc/syringestab(mob/living/carbon/target as mob, mob/living/carbon/user as mob)
if(istype(target, /mob/living/carbon/human))

View File

@@ -0,0 +1,119 @@
#define SYRINGE_CAPPED 10
/obj/item/weapon/reagent_containers/syringe
icon = 'icons/goonstation/objects/syringe_vr.dmi'
mode = SYRINGE_CAPPED //Override
var/used = FALSE
var/dirtiness = 0
var/list/targets
var/list/datum/disease2/disease/viruses
/obj/item/weapon/reagent_containers/syringe/initialize()
. = ..()
update_icon()
/obj/item/weapon/reagent_containers/syringe/Destroy()
qdel_null_list(viruses)
targets.Cut()
return ..()
/obj/item/weapon/reagent_containers/syringe/process()
dirtiness = min(dirtiness + targets.len,75)
if(dirtiness >= 75)
processing_objects -= src
return 1
/obj/item/weapon/reagent_containers/syringe/proc/dirty(var/mob/living/carbon/human/target, var/obj/item/organ/external/eo)
if(!ishuman(loc))
return //Avoid borg syringe problems.
LAZYINITLIST(targets)
//We can't keep a mob reference, that's a bad idea, so instead name+ref should suffice.
var/hash = md5(target.real_name + "\ref[target]")
//Just once!
targets |= hash
//Grab any viruses they have
if(LAZYLEN(target.virus2.len))
LAZYINITLIST(viruses)
var/datum/disease2/disease/virus = pick(target.virus2.len)
viruses[hash] = virus.getcopy()
//Dirtiness should be very low if you're the first injectee. If you're spam-injecting 4 people in a row around you though,
//This gives the last one a 30% chance of infection.
if(prob(dirtiness+(targets.len-1)*10))
log_and_message_admins("[loc] infected [target]'s [eo.name] with \the [src].")
infect_limb(eo)
//75% chance to spread a virus if we have one
if(LAZYLEN(viruses) && prob(75))
var/old_hash = pick(viruses)
if(hash != old_hash) //Same virus you already had?
var/datum/disease2/disease/virus = viruses[old_hash]
infect_virus2(target,virus.getcopy())
if(!used)
processing_objects |= src
/obj/item/weapon/reagent_containers/syringe/proc/infect_limb(var/obj/item/organ/external/eo)
src = null
var/weakref/limb_ref = weakref(eo)
spawn(rand(5 MINUTES,10 MINUTES))
var/obj/item/organ/external/found_limb = limb_ref.resolve()
if(istype(found_limb))
eo.germ_level += INFECTION_LEVEL_ONE+30
//Allow for capped syringe mode
/obj/item/weapon/reagent_containers/syringe/attack_self(mob/user as mob)
switch(mode)
if(SYRINGE_CAPPED)
mode = SYRINGE_DRAW
to_chat(user,"<span class='notice'>You uncap the syringe.</span>")
if(SYRINGE_DRAW)
mode = SYRINGE_INJECT
if(SYRINGE_INJECT)
mode = SYRINGE_DRAW
if(SYRINGE_BROKEN)
return
update_icon()
//Allow for capped syringes
/obj/item/weapon/reagent_containers/syringe/update_icon()
cut_overlays(src)
var/matrix/tf = matrix()
if(isstorage(loc))
tf.Turn(-90) //Vertical for storing compact-ly
tf.Translate(-3,0) //Could do this with pixel_x but let's just update the appearance once.
transform = tf
if(mode == SYRINGE_BROKEN)
icon_state = "broken"
return
if(mode == SYRINGE_CAPPED)
icon_state = "capped"
return
var/list/new_overlays = list()
var/rounded_vol = round(reagents.total_volume, round(reagents.maximum_volume / 3))
if(reagents.total_volume)
filling = image(icon, src, "filler[rounded_vol]")
filling.color = reagents.get_color()
new_overlays += filling
if(ismob(loc))
var/injoverlay
switch(mode)
if (SYRINGE_DRAW)
injoverlay = "draw"
if (SYRINGE_INJECT)
injoverlay = "inject"
new_overlays += injoverlay
add_overlay(new_overlays)
icon_state = "[rounded_vol]"
item_state = "syringe_[rounded_vol]"
#undef SYRINGE_CAPPED