I ain't gonna lie, this is a pretty big revision.

Chemistry:
     I added a new variable to each reagent called "color". It's a hexadecimal string used to give a reagent a unique color for use in future shenanigans that are in development atm. Updooted the Chemistry-Readme.dm file to include some other variables I included into the recipie system as well as this new color variable. Implementing these colors is still an ongoing effort, and yes you will be able to "blend" these colors.


Viruses:
     Nothing has been CHANGED (yet) but there is some framework for a new virus system to work alongside our current one, special thanks to Googolplexed of Baystation 12! If this weren't tied to some other things I changed, I wouldn't be committing this in the first place. While experimental, you shouldn't even notice this exists.


!!BUGFIXES!!:
     Wow, there's so many I'm having a hard time keeping track of it all!

     A bunch of runtime errors were hopefully fixed. There were some problems with slicing stuff spitting out runtime errors because an istype() was missing. The same goes for ritual tomes and some other things. Medical cyborgs were also fixed: their pills will now recharge properly and stop spitting out atrocious runtime errors. 

     It was intended for it to be possible to shoot people on top of Mulebots, but a runtime error always cut the proc off before it could execute. This has been fixed.

     There are probably some other things I'm missing, but all in all, that's about it for the bugfixes.
     


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1905 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
vageyenaman@gmail.com
2011-07-22 22:42:59 +00:00
parent c8a01f0b29
commit c9d1e3452f
21 changed files with 673 additions and 34 deletions

View File

@@ -165,6 +165,15 @@ About Reagents:
toxins to make them work slowly instead of instantly. You could also use this
for DNA in a blood reagent or ... well whatever you want.
color
This is a hexadecimal color that represents the reagent outside of containers,
you define it as "#RRGGBB", or, red green blue. You can also define it using the
rgb() proc, which returns a hexadecimal value too. The color is black by default.
A good website for color calculations: http://www.psyclops.com/tools/rgb/
About Recipes:
@@ -199,6 +208,14 @@ About Recipes:
This is the amount of the resulting reagent this recipe will produce.
I recommend you set this to the total volume of all required reagent.
required_container
The container the recipe has to take place in in order to happen. Leave this blank/null
if you want the reaction to happen anywhere.
required_other
Basically like a reagent's data variable. You can set extra requirements for a
reaction with this.
About the Tools:

File diff suppressed because it is too large Load Diff

View File

@@ -609,7 +609,10 @@
/obj/item/weapon/chem_grenade,
/obj/machinery/bot/medbot,
/obj/machinery/computer/pandemic,
/obj/item/weapon/secstorage/ssafe
/obj/item/weapon/secstorage/ssafe,
/obj/machinery/disease2/incubator,
/obj/machinery/disease2/isolator,
/obj/machinery/disease2/biodestroyer
)
examine()
@@ -878,6 +881,8 @@
B.data["viruses"] += new D.type
B.data["virus2"] = T.virus2.getcopy()
B.data["blood_DNA"] = copytext(T.dna.unique_enzymes,1,0)
if(T.resistances&&T.resistances.len)
B.data["resistances"] = T.resistances.Copy()
@@ -1294,6 +1299,9 @@
var/slice_path
var/slices_num
attackby(obj/item/weapon/W as obj, mob/user as mob)
if((slices_num <= 0 || !slices_num) || !slice_path)
return 1
var/inaccurate = 0
if( \
istype(W, /obj/item/weapon/kitchenknife) || \
@@ -1327,8 +1335,8 @@
)
else
user.visible_message( \
"\blue [user] inaccurate slices \the [src] with [W]!", \
"\blue You inaccurate slice \the [src] with your [W]!" \
"\blue [user] inaccurately slices \the [src] with [W]!", \
"\blue You inaccurately slice \the [src] with your [W]!" \
)
slices_lost = rand(1,min(1,round(slices_num/2)))
var/reagents_per_slice = reagents.total_volume/slices_num

View File

@@ -4,4 +4,7 @@
var/brain_op_stage = 0.0
var/eye_op_stage = 0.0
var/appendix_op_stage = 0.0
var/appendix_op_stage = 0.0
var/datum/disease2/disease/virus2 = null
var/list/datum/disease2/disease/resistances2 = list()

View File

@@ -51,6 +51,7 @@
var/list/viruses = list()
blood_DNA = null
blood_type = null
var/datum/disease2/disease/virus2 = null
Del()
for(var/datum/disease/D in viruses)

View File

@@ -158,6 +158,15 @@
build_path = "/obj/machinery/computer/security/mining"
origin_tech = "programming=2"
/obj/item/weapon/circuitboard/curefab
name = "Circuit board (Cure fab)"
build_path = "/obj/machinery/computer/curer"
/obj/item/weapon/circuitboard/splicer
name = "Circuit board (Disease Splicer)"
build_path = "/obj/machinery/computer/diseasesplicer"
/obj/computerframe/attackby(obj/item/P as obj, mob/user as mob)
switch(state)

View File

@@ -534,17 +534,18 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
return
attackby(obj/item/weapon/tome/T as obj, mob/living/user as mob)
switch(alert("Copy the runes from your tome?",,"Copy", "Cancel"))
if("cancel")
return
// var/list/nearby = viewers(1,src) //- Fuck this as well. No clue why this doesnt work. -K0000
// if (T.loc != user)
// return
// for(var/mob/M in nearby)
// if(M == user)
for(var/w in words)
words[w] = T.words[w]
user << "You copy the translation notes from your tome."
if(istype(T, /obj/item/weapon/tome)) // sanity check to prevent a runtime error
switch(alert("Copy the runes from your tome?",,"Copy", "Cancel"))
if("cancel")
return
// var/list/nearby = viewers(1,src) //- Fuck this as well. No clue why this doesnt work. -K0000
// if (T.loc != user)
// return
// for(var/mob/M in nearby)
// if(M == user)
for(var/w in words)
words[w] = T.words[w]
user << "You copy the translation notes from your tome."
examine()

View File

@@ -247,8 +247,7 @@
//trg.virus.cure(0)//You need to either cure() or del() them to stop their processing.
trg.contract_disease(new /datum/disease/alien_embryo(0))//So after that you need to infect the target anew.
for(var/datum/disease/alien_embryo/A in trg.viruses)
if(target.virus)//If they actually get infected. They may not.
target.alien_egg_flag = 1//We finally set their flag to 1.
target.alien_egg_flag = 1//We finally set their flag to 1.
return
else
sleep(50)

View File

@@ -194,7 +194,16 @@
if(istype(A,/turf) && !istype(src, /obj/item/projectile/beam))
for(var/obj/O in A)
O.bullet_act(src, def_zone)
del(src)
// Okay this code, along with the sleep(10) {del(src)} up ahead is to make
// sure the projectile doesn't cut off any procs it's executing. this may seem
// incredibly stupid, I know, but it's to workaround pesky runtime error spam
invisibility = 101
loc = locate(1,1,1)
sleep(10)
del(src) // wait exactly 1 second, then delete itself. See above comments ^
return
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
@@ -432,18 +441,22 @@
load_method = 0 //0 = Single shells or quick loader, 1 = magazine
// Shotgun variables
pumped = 1
pumped = 0
maxpump = 1
list/Storedshots = list() // a list where "used" shots are stored to be dumped or something
load_into_chamber()
if(!loaded.len)
return 0
if(pumped >= maxpump && istype(src, /obj/item/weapon/gun/projectile/shotgun))
return 1
var/obj/item/ammo_casing/AC = loaded[1] //load next casing.
loaded -= AC //Remove casing from loaded list.
AC.loc = get_turf(src) //Eject casing onto ground.
if(!istype(src, /obj/item/weapon/gun/projectile/shotgun))
AC.loc = get_turf(src) //Eject casing onto ground.
else
Storedshots += AC
if(AC.BB)
in_chamber = AC.BB //Load projectile into chamber.
AC.BB.loc = src //Set projectile loc to gun.
@@ -451,6 +464,7 @@
else
return 0
New()
for(var/i = 1, i <= max_shells, i++)
loaded += new /obj/item/ammo_casing(src)
@@ -542,7 +556,10 @@
for(var/i = 1, i <= max_shells, i++)
loaded += new /obj/item/ammo_casing/shotgun/beanbag(src)
update_icon()
pumped = maxpump
attack_self(mob/living/user as mob)
pump()
return
combat
name = "combat shotgun"
@@ -561,6 +578,9 @@
proc/pump(mob/M)
playsound(M, 'shotgunpump.ogg', 60, 1)
pumped = 0
for(var/obj/item/ammo_casing/AC in Storedshots)
Storedshots -= AC //Remove casing from loaded list.
AC.loc = get_turf(src) //Eject casing onto ground.
automatic //Hopefully someone will find a way to make these fire in bursts or something. --Superxpdude
name = "Submachine Gun"

View File

@@ -135,6 +135,7 @@
verbs += /client/proc/jumptokey
verbs += /client/proc/jumptomob
verbs += /client/proc/jumptoturf
//verbs += /client/proc/givedisease
verbs += /client/proc/cmd_admin_add_freeform_ai_law
verbs += /client/proc/cmd_admin_add_random_ai_law
@@ -268,7 +269,6 @@
verbs += /client/proc/cmd_admin_ninjafy //N
//verbs += /client/proc/makepAI // -- TLE
verbs += /client/proc/respawn_character //N
verbs += /client/proc/Getmob
verbs += /client/proc/sendmob
verbs += /client/proc/Jump
@@ -1488,6 +1488,17 @@
kill_air = 1
usr << "<b>Disabled air processing.</b>"
/*
/client/proc/givedisease(var/mob/living/carbon/M in world)
set category = "Debug"
set name = "Give disease 2.0"
set desc = "Does what it says on the tin"
infect_mob_random(M)
message_admins("\blue [src.ckey] infected [M.real_name]([M.ckey]) with a random disease 2.0")
*/
/client/proc/unstealthadmin()
set name = "Toggle admin verb visibility"
set category = "Admin"

View File

@@ -156,6 +156,11 @@ I kind of like the right click only--the window version can get a little confusi
var/obj/selection = input("Select a destination.", "Duct System") in choices
var/selection_position = choices.Find(selection)
if(loc==startloc)
// Hacky way of hopefully preventing a runtime error from happening
if(vents.len < selection_position)
vents.len = selection_position
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[selection_position]
if(target_vent)
for(var/mob/O in viewers(src, null))

View File

@@ -252,7 +252,7 @@
var/obj/item/weapon.grab/G = r_hand
if ((G.state == 3 && get_dir(src, A) == dir))
safe = G.affecting
if (safe)
if (safe && A)
return safe.bullet_act(A)
var/absorb

View File

@@ -864,6 +864,9 @@
if(!D.hidden[SCANNER])
foundVirus++
if(patient.virus2)
foundVirus++
client.images += image(tempHud,patient,"hud[RoundHealth(patient.health)]")
if(patient.stat == 2)
client.images += image(tempHud,patient,"huddead")
@@ -1013,6 +1016,20 @@
if(bodytemperature > 406)
for(var/datum/disease/D in viruses)
D.cure()
if(!virus2)
for(var/mob/living/carbon/M in oviewers(4,src))
if(M.virus2)
infect_virus2(src,M.virus2)
for(var/obj/decal/cleanable/blood/B in view(4, src))
if(B.virus2)
infect_virus2(src,B.virus2)
else
virus2.activate(src)
return

View File

@@ -569,6 +569,17 @@
D.cure()
return
if(!virus2)
for(var/mob/living/carbon/M in oviewers(4,src))
if(M.virus2)
infect_virus2(src,M.virus2)
for(var/obj/decal/cleanable/blood/B in view(4, src))
if(B.virus2)
infect_virus2(src,B.virus2)
else
virus2.activate(src)
check_if_buckled()
if (src.buckled)
src.lying = istype(src.buckled, /obj/stool/bed) || istype(src.buckled, /obj/machinery/conveyor)

View File

@@ -127,14 +127,15 @@ obj/item/weapon/robot_module/syndicate
var/list/what = list (
/obj/item/weapon/reagent_containers/pill/kelotane,
/obj/item/weapon/reagent_containers/pill/dexalin,
/obj/item/weapon/reagent_containers/pill/cyanide,
)
for (var/T in what)
if (!(locate(T) in src.modules))
src.modules -= null
var/O = new T(src)
src.modules += O
O:amount = 1
if (R.emagged && !src.emag) //thanks to cyborg-900 for uncovering this
src.emag = new /obj/item/weapon/reagent_containers/pill/cyanide(src)
/obj/item/weapon/robot_module/medical/New()

View File

@@ -148,7 +148,7 @@ mob/new_player
return 1
if(href_list["ready"])
if (!usr.client.authenticated)
if (!src.client.authenticated)
src << "You are not authorized to enter the game."
return

View File

@@ -0,0 +1,154 @@
/obj/machinery/computer/curer
name = "Cure Research Machine"
icon = 'computer.dmi'
icon_state = "dna"
// brightnessred = 0
// brightnessgreen = 2 //Used for multicoloured lighting on BS12
// brightnessblue = 2
var/curing
var/virusing
circuit = "/obj/item/weapon/circuitboard/mining"
var/obj/item/weapon/virusdish/dish = null
/obj/machinery/computer/curer/attackby(var/obj/I as obj, var/mob/user as mob)
/*if(istype(I, /obj/item/weapon/screwdriver))
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/computerframe/A = new /obj/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
var/obj/item/weapon/circuitboard/curer/M = new /obj/item/weapon/circuitboard/curer( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
del(src)
else
user << "\blue You disconnect the monitor."
var/obj/computerframe/A = new /obj/computerframe( src.loc )
var/obj/item/weapon/circuitboard/curer/M = new /obj/item/weapon/circuitboard/curer( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
del(src)*/
if(istype(I,/obj/item/weapon/virusdish))
var/mob/living/carbon/c = user
if(!dish)
dish = I
c.drop_item()
I.loc = src
//else
src.attack_hand(user)
return
/obj/machinery/computer/curer/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
/obj/machinery/computer/curer/attack_paw(var/mob/user as mob)
return src.attack_hand(user)
return
/obj/machinery/computer/curer/attack_hand(var/mob/user as mob)
if(..())
return
user.machine = src
var/dat
if(curing)
dat = "Antibody production in progress"
else if(virusing)
dat = "Virus production in progress"
else if(dish)
dat = "Virus dish inserted"
if(dish.virus2)
if(dish.growth >= 100)
dat += "<BR><A href='?src=\ref[src];antibody=1'>Begin antibody production</a>"
dat += "<BR><A href='?src=\ref[src];virus=1'>Begin virus production</a>"
else
dat += "<BR>Insufficent cells to attempt to create cure"
else
dat += "<BR>Please check dish contents"
dat += "<BR><A href='?src=\ref[src];eject=1'>Eject disk</a>"
else
dat = "Please insert dish"
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
/obj/machinery/computer/curer/process()
..()
if(stat & (NOPOWER|BROKEN))
return
use_power(500)
src.updateDialog()
if(curing)
curing -= 1
if(curing == 0)
icon_state = "dna"
if(dish.virus2)
createcure(dish.virus2)
if(virusing)
virusing -= 1
if(virusing == 0)
icon_state = "dna"
if(dish.virus2)
createvirus(dish.virus2)
return
/obj/machinery/computer/curer/Topic(href, href_list)
if(..())
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
if (href_list["antibody"])
curing = 30
dish.growth -= 50
src.icon_state = "dna"
if (href_list["virus"])
virusing = 30
dish.growth -= 100
src.icon_state = "dna"
else if(href_list["eject"])
dish.loc = src.loc
dish = null
src.add_fingerprint(usr)
src.updateUsrDialog()
return
/obj/machinery/computer/curer/proc/createcure(var/datum/disease2/disease/virus2)
var/obj/item/weapon/cureimplanter/implanter = new /obj/item/weapon/cureimplanter(src.loc)
implanter.resistance = new /datum/disease2/resistance(dish.virus2)
if(probG("Virus curing",3))
implanter.works = 0
else
implanter.works = rand(1,2)
state("The [src.name] Buzzes")
/obj/machinery/computer/curer/proc/createvirus(var/datum/disease2/disease/virus2)
var/obj/item/weapon/cureimplanter/implanter = new /obj/item/weapon/cureimplanter(src.loc)
implanter.name = "Viral implanter (MAJOR BIOHAZARD)"
implanter.virus2 = dish.virus2.getcopy()
implanter.works = 3
state("The [src.name] Buzzes")
/obj/machinery/computer/curer/proc/state(var/msg)
for(var/mob/O in hearers(src, null))
O.show_message("\icon[src] \blue [msg]", 2)

View File

@@ -0,0 +1,12 @@
var/list/prob_G_list = list()
/proc/probG(var/define,var/everyother)
if(prob_G_list["[define]"])
prob_G_list["[define]"] += 1
if(prob_G_list["[define]"] == everyother)
prob_G_list["[define]"] = 0
return 1
else
(prob_G_list["[define]"]) = 0
(prob_G_list["[define]"]) = rand(1,everyother-1)
return 0

BIN
icons/obj/chempuff.dmi Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
icons/obj/virology.dmi Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@@ -106,6 +106,8 @@
#define FILE_DIR "code/modules/power/antimatter"
#define FILE_DIR "code/modules/power/singularity"
#define FILE_DIR "code/modules/power/singularity/particle_accelerator"
#define FILE_DIR "code/modules/virus2"
#define FILE_DIR "code/modules/virus2/Disease2"
#define FILE_DIR "code/unused"
#define FILE_DIR "code/unused/gamemodes"
#define FILE_DIR "code/WorkInProgress"
@@ -131,6 +133,7 @@
#define FILE_DIR "icons/turf"
#define FILE_DIR "interface"
#define FILE_DIR "maps"
#define FILE_DIR "maps/backup"
#define FILE_DIR "sound"
#define FILE_DIR "sound/ambience"
#define FILE_DIR "sound/announcer"
@@ -201,6 +204,7 @@
#include "code\datums\diseases\gbs.dm"
#include "code\datums\diseases\jungle_fever.dm"
#include "code\datums\diseases\magnitis.dm"
#include "code\datums\diseases\metroid_transformation.dm"
#include "code\datums\diseases\pierrot_throat.dm"
#include "code\datums\diseases\plasmatoid.dm"
#include "code\datums\diseases\rhumba_beat.dm"
@@ -822,6 +826,16 @@
#include "code\modules\power\singularity\particle_accelerator\particle_control.dm"
#include "code\modules\power\singularity\particle_accelerator\particle_emitter.dm"
#include "code\modules\power\singularity\particle_accelerator\particle_power.dm"
#include "code\modules\virus2\Prob.dm"
#include "code\modules\virus2\Disease2\analyser.dm"
#include "code\modules\virus2\Disease2\base.dm"
#include "code\modules\virus2\Disease2\biohazard destroyer.dm"
#include "code\modules\virus2\Disease2\cureimplanter.dm"
#include "code\modules\virus2\Disease2\curer.dm"
#include "code\modules\virus2\Disease2\diseasesplicer.dm"
#include "code\modules\virus2\Disease2\dishincubator.dm"
#include "code\modules\virus2\Disease2\isolator.dm"
#include "code\modules\virus2\Disease2\monkeydispensor.dm"
#include "code\unused\vehicle.dm"
#include "code\unused\gamemodes\monkey.dm"
#include "code\WorkInProgress\BrokenInhands.dm"
@@ -845,5 +859,5 @@
#include "code\WorkInProgress\recycling\scrap.dm"
#include "code\WorkInProgress\recycling\sortingmachinery.dm"
#include "interface\skin.dmf"
#include "maps\tgstation.2.0.7.dmm"
#include "maps\Ttgstation.2.0.7.dmm"
// END_INCLUDE