mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge branch 'master' into wideborgs
This commit is contained in:
@@ -5,7 +5,7 @@ sudo: false
|
||||
env:
|
||||
global:
|
||||
- BYOND_MAJOR="512"
|
||||
- BYOND_MINOR="1411"
|
||||
- BYOND_MINOR="1412"
|
||||
- MACRO_COUNT=4
|
||||
matrix:
|
||||
- TEST_DEFINE="MAP_TEST" TEST_FILE="code/_map_tests.dm" RUN="0"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,14 +2,14 @@
|
||||
// Tanks - These are implemented as pipes with large volume
|
||||
//
|
||||
/obj/machinery/atmospherics/pipe/tank
|
||||
icon = 'icons/atmos/tank.dmi'
|
||||
icon = 'icons/atmos/tank_vr.dmi' //VOREStation Edit - New Icons
|
||||
icon_state = "air_map"
|
||||
|
||||
name = "Pressure Tank"
|
||||
desc = "A large vessel containing pressurized gas."
|
||||
|
||||
volume = 10000 //in liters, 1 meters by 1 meters by 2 meters ~tweaked it a little to simulate a pressure tank without needing to recode them yet
|
||||
var/start_pressure = 25*ONE_ATMOSPHERE
|
||||
var/start_pressure = 75*ONE_ATMOSPHERE //Vorestation edit
|
||||
|
||||
level = 1
|
||||
dir = SOUTH
|
||||
@@ -106,6 +106,7 @@
|
||||
/obj/machinery/atmospherics/pipe/tank/nitrogen
|
||||
name = "Pressure Tank (Nitrogen)"
|
||||
icon_state = "n2_map"
|
||||
volume = 40000 //Vorestation edit
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/nitrogen/New()
|
||||
air_temporary = new
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
#define isbelly(A) istype(A, /obj/belly)
|
||||
#define isbelly(A) istype(A, /obj/belly)
|
||||
#define isstorage(A) istype(A, /obj/item/weapon/storage)
|
||||
@@ -96,7 +96,8 @@
|
||||
name = "box of syringes"
|
||||
desc = "A box full of syringes."
|
||||
icon_state = "syringe"
|
||||
starts_with = list(/obj/item/weapon/reagent_containers/syringe = 7)
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/syringe) //VOREStation Edit
|
||||
starts_with = list(/obj/item/weapon/reagent_containers/syringe = 20) //VOREStation Edit
|
||||
|
||||
/obj/item/weapon/storage/box/syringegun
|
||||
name = "box of syringe gun cartridges"
|
||||
|
||||
@@ -87,8 +87,9 @@
|
||||
/mob/living/silicon/robot/proc/vr_sprite_check()
|
||||
if(wideborg == TRUE)
|
||||
return
|
||||
if((icon_state in vr_icons) && (icon == 'icons/mob/robots.dmi'))
|
||||
if((!(original_icon == icon)) && (!(icon == 'icons/mob/robots_vr.dmi')))
|
||||
original_icon = icon
|
||||
if((icon_state in vr_icons) && (icon == 'icons/mob/robots.dmi'))
|
||||
icon = 'icons/mob/robots_vr.dmi'
|
||||
else if(!(icon_state in vr_icons))
|
||||
icon = original_icon
|
||||
icon = original_icon
|
||||
|
||||
@@ -48,8 +48,10 @@ var/global/ingredientLimit = 20
|
||||
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)
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
119
code/modules/reagents/reagent_containers/syringes_vr.dm
Normal file
119
code/modules/reagents/reagent_containers/syringes_vr.dm
Normal 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
|
||||
2
icons/goonstation/LICENSE.md
Normal file
2
icons/goonstation/LICENSE.md
Normal file
@@ -0,0 +1,2 @@
|
||||
All files located in this directory and any subdirectories are licensed under the
|
||||
Creative Commons 3.0 BY-NC-SA license (https://creativecommons.org/licenses/by-nc-sa/3.0)
|
||||
BIN
icons/goonstation/objects/syringe.dmi
Normal file
BIN
icons/goonstation/objects/syringe.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
BIN
icons/goonstation/objects/syringe_vr.dmi
Normal file
BIN
icons/goonstation/objects/syringe_vr.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -2482,6 +2482,7 @@
|
||||
#include "code\modules\reagents\reagent_containers\spray.dm"
|
||||
#include "code\modules\reagents\reagent_containers\spray_vr.dm"
|
||||
#include "code\modules\reagents\reagent_containers\syringes.dm"
|
||||
#include "code\modules\reagents\reagent_containers\syringes_vr.dm"
|
||||
#include "code\modules\reagents\reagent_containers\drinkingglass\drinkingglass.dm"
|
||||
#include "code\modules\reagents\reagent_containers\drinkingglass\extras.dm"
|
||||
#include "code\modules\reagents\reagent_containers\drinkingglass\glass_boxes.dm"
|
||||
|
||||
Reference in New Issue
Block a user