Moved a batch of unchecked and a few unused files into the unused folder.

Remember if your scrolling though the list and something is unchecked it should almost certainly be checked.
Simple animals moved over to the actual mob code area and out of the defines.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2868 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
mport2004@gmail.com
2011-12-30 16:43:41 +00:00
parent 4ad793af53
commit ec0cd3b973
27 changed files with 16 additions and 19 deletions

View File

@@ -1,310 +0,0 @@
//All credit for this goes to Uristqwerty.
/turf
var/image/obscured
var/image/dim
/turf/proc/visibilityChanged()
cameranet.updateVisibility(src)
/datum/camerachunk
var/list/obscuredTurfs = list()
var/list/visibleTurfs = list()
var/list/dimTurfs = list()
var/list/obscured = list()
var/list/dim = list()
var/list/cameras = list()
var/list/turfs = list()
var/list/seenby = list()
var/visible = 0
var/changed = 0
var/updating = 0
/mob/aiEye
var/list/visibleCameraChunks = list()
var/mob/ai = null
density = 0
/datum/camerachunk/proc/add(mob/aiEye/ai)
ai.visibleCameraChunks += src
if(ai.ai.client)
ai.ai.client.images += obscured
ai.ai.client.images += dim
visible++
seenby += ai
if(changed && !updating)
update()
/datum/camerachunk/proc/remove(mob/aiEye/ai)
ai.visibleCameraChunks -= src
if(ai.ai.client)
ai.ai.client.images -= obscured
ai.ai.client.images -= dim
seenby -= ai
if(visible > 0)
visible--
/datum/camerachunk/proc/visibilityChanged(turf/loc)
if(!(loc in visibleTurfs))
return
hasChanged()
/datum/camerachunk/proc/hasChanged()
if(visible)
if(!updating)
updating = 1
spawn(10)//Batch large changes, such as many doors opening or closing at once
update()
updating = 0
else
changed = 1
/datum/camerachunk/proc/update()
var/list/newDimTurfs = list()
var/list/newVisibleTurfs = list()
for(var/obj/machinery/camera/c in cameras)
var/lum = c.luminosity
c.luminosity = 6
for(var/turf/t in view(7, c))
if(t in turfs)
newDimTurfs += t
for(var/turf/t in view(6, c))
if(t in turfs)
newVisibleTurfs += t
c.luminosity = lum
var/list/dimAdded = newDimTurfs - dimTurfs
var/list/dimRemoved = dimTurfs - newDimTurfs
var/list/visAdded = newVisibleTurfs - visibleTurfs
var/list/visRemoved = visibleTurfs - newVisibleTurfs
visibleTurfs = newVisibleTurfs
dimTurfs = newDimTurfs
obscuredTurfs = turfs - dimTurfs
dimTurfs -= visibleTurfs
for(var/turf/t in dimRemoved)
if(t.dim)
dim -= t.dim
for(var/mob/aiEye/m in seenby)
if(m.ai.client)
m.ai.client.images -= t.dim
if(!(t in visibleTurfs))
if(!t.obscured)
t.obscured = image('cameravis.dmi', t, "black", 15)
obscured += t.obscured
for(var/mob/aiEye/m in seenby)
if(m.ai.client)
m.ai.client.images += t.obscured
for(var/turf/t in dimAdded)
if(!(t in visibleTurfs))
if(!t.dim)
t.dim = image('cameravis.dmi', t, "dim", 15)
t.mouse_opacity = 0
dim += t.dim
for(var/mob/aiEye/m in seenby)
if(m.ai.client)
m.ai.client.images += t.dim
if(t.obscured)
obscured -= t.obscured
for(var/mob/aiEye/m in seenby)
if(m.ai.client)
m.ai.client.images -= t.obscured
for(var/turf/t in visAdded)
if(t.obscured)
obscured -= t.obscured
for(var/mob/aiEye/m in seenby)
if(m.ai.client)
m.ai.client.images -= t.obscured
for(var/turf/t in visRemoved)
if(t in obscuredTurfs)
if(!t.obscured)
t.obscured = image('cameravis.dmi', t, "black", 15)
obscured += t.obscured
for(var/mob/aiEye/m in seenby)
if(m.ai.client)
m.ai.client.images += t.obscured
/datum/camerachunk/New(loc, x, y, z)
x &= ~0xf
y &= ~0xf
for(var/obj/machinery/camera/c in range(16, locate(x + 8, y + 8, z)))
if(c.status)
cameras += c
for(var/turf/t in range(10, locate(x + 8, y + 8, z)))
if(t.x >= x && t.y >= y && t.x < x + 16 && t.y < y + 16)
turfs += t
for(var/obj/machinery/camera/c in cameras)
var/lum = c.luminosity
c.luminosity = 6
for(var/turf/t in view(7, c))
if(t in turfs)
dimTurfs += t
for(var/turf/t in view(6, c))
if(t in turfs)
visibleTurfs += t
c.luminosity = lum
obscuredTurfs = turfs - dimTurfs
dimTurfs -= visibleTurfs
for(var/turf/t in obscuredTurfs)
if(!t.obscured)
t.obscured = image('cameravis.dmi', t, "black", 15)
obscured += t.obscured
for(var/turf/t in dimTurfs)
if(!(t in visibleTurfs))
if(!t.dim)
t.dim = image('cameravis.dmi', t, "dim", TURF_LAYER)
dim += t.dim
var/datum/cameranet/cameranet = new()
/datum/cameranet
var/list/cameras = list()
var/list/chunks = list()
var/network = "net1"
var/ready = 0
/datum/cameranet/New()
..()
/datum/cameranet/proc/chunkGenerated(x, y, z)
var/key = "[x],[y],[z]"
return key in chunks
/datum/cameranet/proc/getCameraChunk(x, y, z)
var/key = "[x],[y],[z]"
if(!(key in chunks))
chunks[key] = new /datum/camerachunk(null, x, y, z)
return chunks[key]
/datum/cameranet/proc/visibility(mob/aiEye/ai)
var/x1 = max(0, ai.x - 16) & ~0xf
var/y1 = max(0, ai.y - 16) & ~0xf
var/x2 = min(world.maxx, ai.x + 16) & ~0xf
var/y2 = min(world.maxy, ai.y + 16) & ~0xf
var/list/visibleChunks = list()
for(var/x = x1; x <= x2; x += 16)
for(var/y = y1; y <= y2; y += 16)
visibleChunks += getCameraChunk(x, y, ai.z)
var/list/remove = ai.visibleCameraChunks - visibleChunks
var/list/add = visibleChunks - ai.visibleCameraChunks
for(var/datum/camerachunk/c in remove)
c.remove(ai)
for(var/datum/camerachunk/c in add)
c.add(ai)
/datum/cameranet/proc/updateVisibility(turf/loc)
if(!chunkGenerated(loc.x & ~0xf, loc.y & ~0xf, loc.z))
return
var/datum/camerachunk/chunk = getCameraChunk(loc.x & ~0xf, loc.y & ~0xf, loc.z)
chunk.visibilityChanged(loc)
/datum/cameranet/proc/addCamera(obj/machinery/camera/c)
var/x1 = max(0, c.x - 16) & ~0xf
var/y1 = max(0, c.y - 16) & ~0xf
var/x2 = min(world.maxx, c.x + 16) & ~0xf
var/y2 = min(world.maxy, c.y + 16) & ~0xf
for(var/x = x1; x <= x2; x += 16)
for(var/y = y1; y <= y2; y += 16)
if(chunkGenerated(x, y, c.z))
var/datum/camerachunk/chunk = getCameraChunk(x, y, c.z)
if(!(c in chunk.cameras))
chunk.cameras += c
chunk.hasChanged()
/mob/living/silicon/ai/var/mob/aiEye/eyeobj = new()
/mob/living/silicon/ai/New()
..()
eyeobj.ai = src
/mob/living/silicon/ai/verb/freelook()
set category = "AI Commands"
set name = "freelook"
current = null //cancel camera view first, it causes problems
cameraFollow = null
machine = null
if(client.eye == eyeobj)
client.eye = src
for(var/datum/camerachunk/c in eyeobj.visibleCameraChunks)
c.remove(eyeobj)
else
client.eye = eyeobj
eyeobj.loc = loc
cameranet.visibility(eyeobj)
cameraFollow = null
/mob/aiEye/Move()
. = ..()
if(.)
cameranet.visibility(src)
/client/AIMove(n, direct, var/mob/living/silicon/ai/user)
if(eye == user.eyeobj)
user.eyeobj.loc = get_step(user.eyeobj, direct)
cameranet.visibility(user.eyeobj)
else
return ..()
/*
/client/AIMoveZ(direct, var/mob/living/silicon/ai/user)
if(eye == user.eyeobj)
var/dif = 0
if(direct == UP && user.eyeobj.z > 1)
dif = -1
else if(direct == DOWN && user.eyeobj.z < 4)
dif = 1
user.eyeobj.loc = locate(user.eyeobj.x, user.eyeobj.y, user.eyeobj.z + dif)
cameranet.visibility(user.eyeobj)
else
return ..()
*/
/turf/move_camera_by_click()
if(istype(usr, /mob/living/silicon/ai))
var/mob/living/silicon/ai/AI = usr
if(AI.client.eye == AI.eyeobj)
return
return ..()
/obj/machinery/door/update_nearby_tiles(need_rebuild)
. = ..(need_rebuild)
cameranet.updateVisibility(loc)
/obj/machinery/camera/New()
..()
cameranet.addCamera(src)

View File

@@ -1,291 +0,0 @@
//WORK IN PROGRESS CONTENT
//Project coder: Errorage
//Readme: As part of the UI upgrade project, the intention here is for each job to have
//somewhat customizable loadouts. Players will be able to pick between jumpsuits, shoes,
//and other items. This datum will be used for all jobs and code will reference it.
//adding new jobs will be a matter of adding this datum.to a list of jobs.
#define VITAL_PRIORITY_JOB 5
#define HIGH_PRIORITY_JOB 4
#define PRIORITY_JOB 3
#define LOW_PRIORITY_JOB 2
#define ASSISTANT_PRIORITY_JOB 1
#define NO_PRIORITY_JOB 0
/datum/job
//Basic information
var/title = "Untitled" //The main (default) job title/name
var/list/alternative_titles = list() //Alternative job titles/names (alias)
var/job_number_at_round_start = 0 //Number of jobs that can be assigned at round start
var/job_number_total = 0 //Number of jobs that can be assigned total
var/list/bosses = list() //List of jobs which have authority over this job by default.
var/admin_only = 0 //If this is set to 1, the job is not available on the spawn screen
var/description = "" //A description of the job to be displayed when requested on the spawn screen
var/guides = "" //A string with links to relevent guides (likely the wiki)
var/department = "" //This is used to group jobs into departments, which means that if you don't get your desired jobs, you get another job from the same department
var/job_type = "SS13" //SS13, NT or ANTAGONIST
var/can_be_traitor = 1
var/can_be_changeling = 1
var/can_be_wizard = 1
var/can_be_cultist = 1
var/can_be_rev_head = 1
var/is_head_position = 0
//Job conditions
var/change_to_mob = "Human" //The type of mob which this job will change you to (alien,cyborg,human...)
var/change_to_mutantrace = "" //What mutantrace you will be once you get this job
//Random job assignment priority
var/assignment_priority = NO_PRIORITY_JOB //This variable determins the priority of assignment
//VITAL_PRIORITY_JOB = Absolutely vital (Someone will get assigned every round) - Use VERY, VERY lightly
//HIGH_PRIORITY_JOB = High priority - Assibned before the other jobs, candidates compete on equal terms
//PRIORITY_JOB = Priorized (Standard priority) - Candidates compete by virtue of priority (choice 1 > choice 2 > choice 3...)
//LOW_PRIORITY_JOB = Low priority (Low-priority (librarian))
//ASSISTANT_PRIORITY_JOB = Assistant-level (Only filled when all the other jobs have been assigned)
//NO_PRIORITY_JOB = Skipped om assignment (Admin-only jobs should have this level)
//Available equipment - The first thing listed is understood as the default setup.
var/list/equipment_ears = list() //list of possible ear-wear items
var/list/equipment_glasses = list() //list of possible glasses
var/list/equipment_gloves = list() //list of possible gloves
var/list/equipment_head = list() //list of possible headgear/helmets/hats
var/list/equipment_mask = list() //list of possible masks
var/list/equipment_shoes = list() //list of possible shoes
var/list/equipment_suit = list() //list of possible suits
var/list/equipment_under = list() //list of possible jumpsuits
var/list/equipment_belt = list() //list of possible belt-slot items
var/list/equipment_back = list() //list of possible back-slot items
var/obj/equipment_pda //default pda type
var/obj/equipment_id //default id type
New(var/param_title, var/list/param_alternative_titles = list(), var/param_jobs_at_round_start = 0, var/param_global_max = 0, var/list/param_bosses = list(), var/param_admin_only = 0)
title = param_title
alternative_titles = param_alternative_titles
job_number_at_round_start = param_jobs_at_round_start
job_number_total = param_global_max
bosses = param_bosses
admin_only = param_admin_only
//This proc tests to see if the given alias (job title/alternative job title) corresponds to this job.
//Returns 1 if it is, else returns 0
proc/is_job_alias(var/alias)
if(alias == title)
return 1
if(alias in alternative_titles)
return 1
return 0
/datum/jobs
var/list/datum/job/all_jobs = list()
proc/get_all_jobs()
return all_jobs
//This proc returns all the jobs which are NOT admin only
proc/get_normal_jobs()
var/list/datum/job/normal_jobs = list()
for(var/datum/job/J in all_jobs)
if(!J.admin_only)
normal_jobs += J
return normal_jobs
//This proc returns all the jobs which are admin only
proc/get_admin_jobs()
var/list/datum/job/admin_jobs = list()
for(var/datum/job/J in all_jobs)
if(J.admin_only)
admin_jobs += J
return admin_jobs
//This proc returns the job datum of the job with the alias or job title given as the argument. Returns an empty string otherwise.
proc/get_job(var/alias)
for(var/datum/job/J in all_jobs)
if(J.is_job_alias(alias))
return J
return ""
//This proc returns a string with the default job title for the job with the given alias. Returns an empty string otherwise.
proc/get_job_title(var/alias)
for(var/datum/job/J in all_jobs)
if(J.is_job_alias(alias))
return J.title
return ""
//This proc returns all the job datums of the workers whose boss has the alias provided. (IE Engineer under Chief Engineer, etc.)
proc/get_jobs_under(var/boss_alias)
var/boss_title = get_job_title(boss_alias)
var/list/datum/job/employees = list()
for(var/datum/job/J in all_jobs)
if(boss_title in J.bosses)
employees += J
return employees
//This proc returns the chosen vital and high priority jobs that the person selected. It goes from top to bottom of the list, until it finds a job which does not have such priority.
//Example: Choosing (in this order): CE, Captain, Engineer, RD will only return CE and Captain, as RD is assumed as being an unwanted choice.
//This proc is used in the allocation algorithm when deciding vital and high priority jobs.
proc/get_prefered_high_priority_jobs()
var/list/datum/job/hp_jobs = list()
for(var/datum/job/J in all_jobs)
if(J.assignment_priority == HIGH_PRIORITY_JOB || J.assignment_priority == VITAL_PRIORITY_JOB)
hp_jobs += J
else
break
return hp_jobs
//If only priority is given, it will return the jobs of only that priority, if end_priority is set it will return the jobs with their priority higher or equal to var/priority and lower or equal to end_priority. end_priority must be higher than 0.
proc/get_jobs_by_priority(var/priority, var/end_priority = 0)
var/list/datum/job/priority_jobs = list()
if(end_priority)
if(end_priority < priority)
return
for(var/datum/job/J in all_jobs)
if(J.assignment_priority >= priority && J.assignment_priority <= end_priority)
priority_jobs += J
else
for(var/datum/job/J in all_jobs)
if(J.assignment_priority == priority)
priority_jobs += J
return priority_jobs
//This datum is used in the plb allocation algorithm to make life easier, not used anywhere else.
/datum/player_jobs
var/mob/new_player/player
var/datum/jobs/selected_jobs
var/datum/jobs/jobs = new/datum/jobs()
proc/setup_jobs()
var/datum/job/JOB
JOB = new/datum/job("Station Engineer")
JOB.alternative_titles = list("Structural Engineer","Engineer","Student of Engineering")
JOB.job_number_at_round_start = 5
JOB.job_number_total = 5
JOB.bosses = list("Chief Engineer")
JOB.admin_only = 0
JOB.description = "Engineers are tasked with the maintenance of the station. Be it maintaining the power grid or rebuilding damaged sections."
JOB.guides = ""
JOB.equipment_ears = list(/obj/item/device/radio/headset/headset_eng)
JOB.equipment_glasses = list()
JOB.equipment_gloves = list()
JOB.equipment_head = list(/obj/item/clothing/head/helmet/hardhat)
JOB.equipment_mask = list()
JOB.equipment_shoes = list(/obj/item/clothing/shoes/orange,/obj/item/clothing/shoes/brown,/obj/item/clothing/shoes/black)
JOB.equipment_suit = list(/obj/item/clothing/suit/hazardvest)
JOB.equipment_under = list(/obj/item/clothing/under/rank/engineer,/obj/item/clothing/under/color/yellow)
JOB.equipment_belt = list(/obj/item/weapon/storage/belt/utility/full)
JOB.equipment_back = list(/obj/item/weapon/storage/backpack/industrial,/obj/item/weapon/storage/backpack)
JOB.equipment_pda = /obj/item/device/pda/engineering
JOB.equipment_id = /obj/item/weapon/card/id
jobs.all_jobs += JOB
//This proc will dress the mob (employee) in the default way for the specified job title/job alias
proc/dress_for_job_default(var/mob/living/carbon/human/employee as mob, var/job_alias)
if(!ishuman(employee))
return
//TODO ERRORAGE - UNFINISHED
var/datum/job/JOB = jobs.get_job(job_alias)
if(JOB)
var/item = JOB.equipment_ears[1]
employee.equip_if_possible(new item(employee), employee.slot_ears)
item = JOB.equipment_under[1]
employee.equip_if_possible(new item(employee), employee.slot_w_uniform)
/*
src.equip_if_possible(new /obj/item/weapon/storage/backpack/industrial (src), slot_back)
src.equip_if_possible(new /obj/item/weapon/storage/box/engineer(src), slot_in_backpack)
src.equip_if_possible(new /obj/item/device/radio/headset/headset_eng (src), slot_ears) // -- TLE
src.equip_if_possible(new /obj/item/device/pda/engineering(src), slot_belt)
src.equip_if_possible(new /obj/item/clothing/under/rank/engineer(src), slot_w_uniform)
src.equip_if_possible(new /obj/item/clothing/shoes/orange(src), slot_shoes)
src.equip_if_possible(new /obj/item/clothing/head/helmet/hardhat(src), slot_head)
src.equip_if_possible(new /obj/item/weapon/storage/utilitybelt/full(src), slot_l_hand) //currently spawns in hand due to traitor assignment requiring a PDA to be on the belt. --Errorage
//src.equip_if_possible(new /obj/item/clothing/gloves/yellow(src), slot_gloves) removed as part of Dangercon 2011, approved by Urist_McDorf --Errorage
src.equip_if_possible(new /obj/item/device/t_scanner(src), slot_r_store)
*/
//This algorithm works in 5 steps:
//1: Assignment of wizard / nuke members (if appropriate game mode)
//2: Assignment of jobs based on preferenes
// 2.1: Assignment of vital and high priority jobs. Candidates compete on equal terms. If the vital jobs are not filled, a random candidate is chosen to fill them,
// 2.2: Assignment of the rest of the jobs based on player preference,
//3: Assignment of remaining jobs for remaining players based on chosen departments
//4: Random assignment of remaining jobs for remaining players based on assignment priority
//5: Assignment of traitor / changeling to assigned roles (if appropriate game mode)
proc/assignment_algorithm(var/list/mob/new_player/players)
for(var/mob/new_player/PLAYER in players)
if(!PLAYER.client)
players -= PLAYER
continue
if(!PLAYER.ready)
players -= PLAYER
continue
var/list/datum/job/vital_jobs = list()
var/list/datum/job/high_priority_jobs = list()
var/list/datum/job/priority_jobs = list()
var/list/datum/job/low_priority_jobs = list()
var/list/datum/job/assistant_jobs = list()
var/list/datum/job/not_assigned_jobs = list()
for(var/datum/job/J in jobs)
switch(J.assignment_priority)
if(5)
vital_jobs += J
if(4)
high_priority_jobs += J
if(3)
priority_jobs += J
if(2)
low_priority_jobs += J
if(1)
assistant_jobs += J
if(0)
not_assigned_jobs += J
var/list/datum/player_jobs/player_jobs = list() //This datum only holds a mob/new_player and a datum/jobs. The first is the player, the 2nd is the player's selected jobs, from the preferences datum.
for(var/mob/new_player/NP in players)
var/datum/player_jobs/PJ = new/datum/player_jobs
PJ.player = NP
PJ.selected_jobs = NP.preferences.wanted_jobs
player_jobs += PJ
//At this point we have the player_jobs list filled. Next up we have to assign all vital and high priority positions.
var/list/datum/job/hp_jobs = jobs.get_jobs_by_priority( HIGH_PRIORITY_JOB, VITAL_PRIORITY_JOB )
for(var/datum/job/J in hp_jobs)
var/list/mob/new_player/candidates = list()
for(var/datum/player_jobs/PJ in player_jobs)
if(J in PJ.selected_jobs)
candidates += PJ.player
var/mob/new_player/chosen_player
if(candidates)
chosen_player = pick(candidates)
else
if(J.assignment_priority == VITAL_PRIORITY_JOB)
if(players) //Just in case there are more vital jobs than there are players.
chosen_player = pick(players)
if(chosen_player)
chosen_player.mind.assigned_job = J
players -= chosen_player
//TODO ERRORAGE - add capability for hp jobs with more than one slots.
//1: vital and high priority jobs, assigned on equal terms
//TODO ERRORAGE - UNFINISHED
//END OF WORK IN PROGRESS CONTENT

View File

@@ -1,13 +0,0 @@
/*------
SPELL IMPLANTS
+ Most diverse effects
- Limited charges, failure rate
CYBERNETIC IMPLANTS
+ Easiest to make
- Require power
GRAFTS (includes basic human bodyparts)
+ Permanent effects
- Horrible side effects
*/

View File

@@ -1,349 +0,0 @@
/obj/organstructure //used obj for the "contents" var
name = "organs"
var/species = "mob" //for speaking in unknown languages purposes
var/obj/organ/limb/arms/arms = null
var/obj/organ/limb/legs/legs = null
var/obj/organ/torso/torso = null
var/obj/organ/head/head = null
proc/GetSpeciesName()
var/list/speciesPresent = list()
for(var/obj/organ/organ in src) //only external organs count, since it's judging by the appearance
if(speciesPresent[organ.species])
speciesPresent[organ.species]++
else
speciesPresent[organ.species] = 1 //not sure, but I think it's not initialised before that, so can't ++
var/list/dominantSpecies = list()
for(var/speciesName in speciesPresent)
if(!dominantSpecies.len)
dominantSpecies += speciesName
else
if(speciesPresent[dominantSpecies[1]] == speciesPresent[speciesName])
dominantSpecies += speciesName
else if(speciesPresent[dominantSpecies[1]] < speciesPresent[speciesName])
dominantSpecies = list(speciesName)
if(!dominantSpecies.len)
species = "mob"
else
species = pick(dominantSpecies)
return species
proc/RecalculateStructure()
var/list/organs = GetAllContents()
arms = locate(/obj/organ/limb/arms) in organs
legs = locate(/obj/organ/limb/legs) in organs
torso = locate(/obj/organ/torso) in organs
head = locate(/obj/organ/head) in organs
GetSpeciesName()
return
proc/ProcessOrgans()
set background = 1
var/list/organs = GetAllContents()
for(var/obj/organ/organ in organs)
organ.ProcessOrgan()
return
New()
..()
RecalculateStructure()
/obj/organstructure/human
name = "human organs"
New()
new /obj/organ/torso/human(src)
..()
/obj/organstructure/alien
name = "alien organs"
New()
new /obj/organ/torso/alien(src)
..()
/obj/organ
name = "organ"
//All types
var/organType = 0 //CYBER and SPELL go here
var/species = "mob"
var/obj/organstructure/rootOrganStructure = null
New(location)
..()
rootOrganStructure = FindRootStructure()
proc/FindRootStructure()
if(istype(loc,/obj/organ))
var/obj/organ/parent = loc
return parent.FindRootStructure()
else if(istype(loc,/obj/organstructure))
return loc
return null
proc/ProcessOrgan()
return
/obj/organ/torso
name = "torso"
var/maxHealth = 50 //right now, the mob's (only humans for now) health depends only on it. Will be fixed later
/obj/organ/torso/human
name = "human torso"
species = "human"
maxHealth = 100
New()
..()
new /obj/organ/limb/arms/human(src)
new /obj/organ/limb/legs/human(src)
new /obj/organ/head/human(src)
/obj/organ/torso/alien
name = "alien torso"
species = "alien"
maxHealth = 100
New()
..()
new /obj/organ/limb/arms/alien(src)
new /obj/organ/limb/legs/alien(src)
new /obj/organ/head/alien(src)
/obj/organ/limb
name = "limb"
/obj/organ/limb/arms
name = "arms"
var/minDamage = 5 //punching damage
var/maxDamage = 5
/obj/organ/limb/arms/alien
name = "alien arms"
species = "alien"
minDamage = 5
maxDamage = 15
/obj/organ/limb/arms/human
name = "human arms"
species = "human"
minDamage = 1
maxDamage = 9
/obj/organ/limb/legs
name = "legs"
/obj/organ/limb/legs/human
name = "human legs"
species = "human"
/obj/organ/limb/legs/alien
name = "alien legs"
species = "alien"
/obj/organ/head
name = "head"
/obj/organ/head/human
name = "human head"
species = "human"
/obj/organ/head/alien
name = "alien head"
species = "alien"
/obj/organ/limb/arms/alien
name = "alien arms"
species = "alien"
minDamage = 5
maxDamage = 15
/obj/organ/limb/legs/alien
name = "alien legs"
species = "alien"
/obj/organ/head/alien
name = "alien head"
species = "alien"
// ++++STUB ORGAN STRUCTURE. THIS IS THE DEFAULT STRUCTURE. USED TO PREVENT EXCEPTIONS++++
/obj/organstructure/stub
name = "stub organs"
New()
new /obj/organ/torso/stub(src)
..()
/obj/organ/torso/stub
name = "stub torso"
species = "stub"
maxHealth = 100
New()
..()
new /obj/organ/limb/arms/stub(src)
new /obj/organ/limb/legs/stub(src)
new /obj/organ/head/stub(src)
/obj/organ/limb/arms/stub
name = "stub arms"
species = "stub"
/obj/organ/limb/legs/stub
name = "stub legs"
species = "stub"
/obj/organ/head/stub
name = "stub head"
species = "stub"
// ++++STUB ORGAN STRUCTURE. END++++
// ++++MONKEY++++
/obj/organstructure/monkey
name = "monkey organs"
New()
new /obj/organ/torso/monkey(src)
..()
/obj/organ/torso/monkey
name = "monkey torso"
species = "monkey"
maxHealth = 100
New()
..()
new /obj/organ/limb/arms/monkey(src)
new /obj/organ/limb/legs/monkey(src)
new /obj/organ/head/monkey(src)
/obj/organ/limb/arms/monkey
name = "monkey arms"
species = "monkey"
/obj/organ/limb/legs/monkey
name = "monkey legs"
species = "monkey"
/obj/organ/head/monkey
name = "monkey head"
species = "monkey"
// +++++CYBORG+++++
/obj/organstructure/cyborg
name = "cyborg organs"
New()
new /obj/organ/torso/cyborg(src)
..()
/obj/organ/torso/cyborg
name = "cyborg torso"
species = "cyborg"
maxHealth = 100
New()
..()
new /obj/organ/limb/arms/cyborg(src)
new /obj/organ/limb/legs/cyborg(src)
new /obj/organ/head/cyborg(src)
/obj/organ/limb/arms/cyborg
name = "cyborg arms"
species = "cyborg"
/obj/organ/limb/legs/cyborg
name = "cyborg legs"
species = "cyborg"
/obj/organ/head/cyborg
name = "cyborg head"
species = "cyborg"
// +++++AI++++++
/obj/organstructure/AI
name = "AI organs"
New()
new /obj/organ/torso/AI(src)
..()
/obj/organ/torso/AI
name = "AI torso"
species = "AI"
maxHealth = 100
New()
..()
new /obj/organ/limb/arms/AI(src)
new /obj/organ/limb/legs/AI(src)
new /obj/organ/head/AI(src)
/obj/organ/limb/arms/AI
name = "AI arms"
species = "AI"
/obj/organ/limb/legs/AI
name = "AI legs"
species = "AI"
/obj/organ/head/AI
name = "AI head"
species = "AI"
/* New organ structure template
/obj/organstructure/template
name = "template organs"
New()
new /obj/organ/torso/template(src)
..()
/obj/organ/torso/template
name = "template torso"
species = "template"
maxHealth = 100
New()
..()
new /obj/organ/limb/arms/template(src)
new /obj/organ/limb/legs/template(src)
new /obj/organ/head/template(src)
/obj/organ/limb/arms/template
name = "template arms"
species = "template"
/obj/organ/limb/legs/template
name = "template legs"
species = "template"
/obj/organ/head/template
name = "template head"
species = "template"
*/

View File

@@ -1,75 +0,0 @@
/obj/machinery/disease2/diseaseanalyser
name = "Disease Analyser"
icon = 'virology.dmi'
icon_state = "analyser"
anchored = 1
density = 1
var/scanning = 0
var/pause = 0
var/obj/item/weapon/virusdish/dish = null
/obj/machinery/disease2/diseaseanalyser/attackby(var/obj/I as obj, var/mob/user as mob)
if(istype(I,/obj/item/weapon/virusdish))
var/mob/living/carbon/c = user
if(!dish)
dish = I
c.drop_item()
I.loc = src
for(var/mob/M in viewers(src))
if(M == user) continue
M.show_message("\blue [user.name] inserts the [dish.name] in the [src.name]", 3)
else
user << "There is already a dish inserted"
//else
return
/obj/machinery/disease2/diseaseanalyser/process()
if(stat & (NOPOWER|BROKEN))
return
use_power(500)
src.updateDialog()
if(scanning)
scanning -= 1
if(scanning == 0)
var/r = "GNAv2 based virus lifeform"
r += "<BR>Infection rate : [dish.virus2.infectionchance * 10]"
r += "<BR>Spread form : [dish.virus2.spreadtype]"
r += "<BR>Progress Speed : [dish.virus2.stageprob * 10]"
for(var/datum/disease2/effectholder/E in dish.virus2.effects)
r += "<BR>Effect:[E.effect.name]. Strength : [E.multiplier * 8]. Verosity : [E.chance * 15]. Type : [5-E.stage]."
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src.loc)
P.info = r
dish.info = r
dish.analysed = 1
dish.loc = src.loc
dish = null
icon_state = "analyser"
for(var/mob/O in hearers(src, null))
O.show_message("\icon[src] \blue The [src.name] prints a sheet of paper", 3)
else if(dish && !scanning && !pause)
if(dish.virus2 && dish.growth > 50)
dish.growth -= 10
scanning = 25
icon_state = "analyser_processing"
else
pause = 1
spawn(25)
dish.loc = src.loc
dish = null
for(var/mob/M in viewers(src))
M.show_message("\icon[src] \blue The [src.name] buzzes", 2)
pause = 0
return

View File

@@ -1,331 +0,0 @@
//To simplify, all diseases have 4 stages, with effects starting at stage 2
//Stage 1 = Rest,Minor disease
//Stage 2 = Minimal effect
//Stage 3 = Medium effect
//Stage 4 = Death/Really Really really bad effect
/proc/infect_virus2(var/mob/living/carbon/M,var/datum/disease2/disease/disease,var/forced = 0)
if(prob(disease.infectionchance))
if(M.virus2)
return
else
var/score = 0
if(!forced)
if(istype(M, /mob/living/carbon/human))
if(M:gloves)
score += 5
if(istype(M:wear_suit, /obj/item/clothing/suit/space)) score += 10
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit)) score += 10
if(istype(M:head, /obj/item/clothing/head/helmet/space)) score += 5
if(istype(M:head, /obj/item/clothing/head/bio_hood)) score += 5
if(M.wear_mask)
score += 5
if((istype(M:wear_mask, /obj/item/clothing/mask) || istype(M:wear_mask, /obj/item/clothing/mask/surgical)) && !M.internal)
score += 5
if(M.internal)
score += 5
if(score > 15)
return
// else if(score == 20 && prob(95))
// return
else if(score == 15 && prob(75))
return
else if(score == 10 && prob(55))
return
else if(score == 5 && prob(35))
return
M.virus2 = disease.getcopy()
M.virus2.minormutate()
for(var/datum/disease2/resistance/res in M.resistances)
if(res.resistsdisease(M.virus2))
M.virus2 = null
/datum/disease2/resistance
var/list/datum/disease2/effect/resistances = list()
proc/resistsdisease(var/datum/disease2/disease/virus2)
var/list/res2 = list()
for(var/datum/disease2/effect/e in resistances)
res2 += e.type
for(var/datum/disease2/effectholder/holder in virus2)
if(!(holder.effect.type in res2))
return 0
else
res2 -= holder.effect.type
if(res2.len > 0)
return 0
else
return 1
New(var/datum/disease2/disease/virus2)
for(var/datum/disease2/effectholder/h in virus2.effects)
resistances += h.effect.type
/proc/infect_mob_random(var/mob/living/carbon/M)
if(!M.virus2)
M.virus2 = new /datum/disease2/disease
M.virus2.makerandom()
/datum/disease2/disease
var/infectionchance = 10
var/spreadtype = "Blood" // Can also be "Airborne"
var/stage = 1
var/stageprob = 2
var/dead = 0
var/clicks = 0
var/uniqueID = 0
var/list/datum/disease2/effectholder/effects = list()
proc/makerandom()
var/datum/disease2/effectholder/holder = new /datum/disease2/effectholder
holder.stage = 1
holder.getrandomeffect()
effects += holder
holder = new /datum/disease2/effectholder
holder.stage = 2
holder.getrandomeffect()
effects += holder
holder = new /datum/disease2/effectholder
holder.stage = 3
holder.getrandomeffect()
effects += holder
holder = new /datum/disease2/effectholder
holder.stage = 4
holder.getrandomeffect()
effects += holder
uniqueID = rand(0,10000)
infectionchance = rand(1,10)
spreadtype = "Airborne"
proc/minormutate()
var/datum/disease2/effectholder/holder = pick(effects)
holder.minormutate()
infectionchance = min(10,infectionchance + rand(0,1))
proc/issame(var/datum/disease2/disease/disease)
var/list/types = list()
var/list/types2 = list()
for(var/datum/disease2/effectholder/d in effects)
types += d.effect.type
var/equal = 1
for(var/datum/disease2/effectholder/d in disease.effects)
types2 += d.effect.type
for(var/type in types)
if(!(type in types2))
equal = 0
return equal
proc/activate(var/mob/living/carbon/mob)
if(dead)
mob.virus2 = null
return
if(mob.stat == 2)
return
if(mob.radiation > 50)
if(prob(1))
majormutate()
if(mob.reagents.has_reagent("spaceacillin"))
return
if(prob(stageprob) && prob(25 + (clicks/100)) && stage != 4)
stage++
clicks = 0
for(var/datum/disease2/effectholder/e in effects)
e.runeffect(mob,stage)
proc/cure_added(var/datum/disease2/resistance/res)
if(res.resistsdisease(src))
dead = 1
proc/majormutate()
var/datum/disease2/effectholder/holder = pick(effects)
holder.majormutate()
proc/getcopy()
// world << "getting copy"
var/datum/disease2/disease/disease = new /datum/disease2/disease
disease.infectionchance = infectionchance
disease.spreadtype = spreadtype
disease.stageprob = stageprob
for(var/datum/disease2/effectholder/holder in effects)
// world << "adding effects"
var/datum/disease2/effectholder/newholder = new /datum/disease2/effectholder
newholder.effect = new holder.effect.type
newholder.chance = holder.chance
newholder.cure = holder.cure
newholder.multiplier = holder.multiplier
newholder.happensonce = holder.happensonce
newholder.stage = holder.stage
disease.effects += newholder
// world << "[newholder.effect.name]"
// world << "[disease]"
return disease
/datum/disease2/effect
var/name = "Blanking effect"
var/stage = 4
var/maxm = 1
proc/activate(var/mob/living/carbon/mob,var/multiplier)
/datum/disease2/effect/gibbingtons
name = "Gibbingtons Syndrome"
stage = 4
activate(var/mob/living/carbon/mob,var/multiplier)
mob.gib()
/datum/disease2/effect/radian
name = "Radian's syndrome"
stage = 4
maxm = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.radiation += (2*multiplier)
/datum/disease2/effect/toxins
name = "Hyperacid Syndrome"
stage = 3
maxm = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.adjustToxLoss(2*multiplier)
/datum/disease2/effect/scream
name = "Random screaming syndrome"
stage = 2
activate(var/mob/living/carbon/mob,var/multiplier)
mob.say("*scream")
/datum/disease2/effect/drowsness
name = "Automated sleeping syndrome"
stage = 2
activate(var/mob/living/carbon/mob,var/multiplier)
mob.drowsyness += 10
/datum/disease2/effect/shakey
name = "World Shaking syndrome"
stage = 3
maxm = 3
activate(var/mob/living/carbon/mob,var/multiplier)
shake_camera(mob,5*multiplier)
/datum/disease2/effect/deaf
name = "Hard of hearing syndrome"
stage = 4
activate(var/mob/living/carbon/mob,var/multiplier)
mob.ear_deaf += 20
/datum/disease2/effect/invisible
name = "Waiting Syndrome"
stage = 1
activate(var/mob/living/carbon/mob,var/multiplier)
return
/*
/datum/disease2/effect/telepathic
name = "Telepathy Syndrome"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.mutations |= 512
*/
/datum/disease2/effect/noface
name = "Identity Loss syndrome"
stage = 4
activate(var/mob/living/carbon/mob,var/multiplier)
mob.real_name = "Unknown"
/datum/disease2/effect/monkey
name = "Monkism syndrome"
stage = 4
activate(var/mob/living/carbon/mob,var/multiplier)
if(istype(mob,/mob/living/carbon/human))
var/mob/living/carbon/human/h = mob
h.monkeyize()
/datum/disease2/effect/sneeze
name = "Coldingtons Effect"
stage = 1
activate(var/mob/living/carbon/mob,var/multiplier)
mob.say("*sneeze")
/datum/disease2/effect/gunck
name = "Flemmingtons"
stage = 1
activate(var/mob/living/carbon/mob,var/multiplier)
mob << "\red Mucous runs down the back of your throat."
/datum/disease2/effect/killertoxins
name = "Toxification syndrome"
stage = 4
activate(var/mob/living/carbon/mob,var/multiplier)
mob.adjustToxLoss(15)
/*
/datum/disease2/effect/hallucinations
name = "Hallucinational Syndrome"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.hallucination += 25
*/
/datum/disease2/effect/sleepy
name = "Resting syndrome"
stage = 2
activate(var/mob/living/carbon/mob,var/multiplier)
mob.say("*collapse")
/datum/disease2/effect/mind
name = "Lazy mind syndrome"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.brainloss = 50
/datum/disease2/effect/suicide
name = "Suicidal syndrome"
stage = 4
activate(var/mob/living/carbon/mob,var/multiplier)
mob.suiciding = 1
//instead of killing them instantly, just put them at -175 health and let 'em gasp for a while
viewers(mob) << "\red <b>[mob.name] is attempting to bite off \his tongue. It looks like \he's trying to commit suicide.</b>"
mob.oxyloss = max(175 - mob.getToxLoss() - mob.getFireLoss() - mob.getBruteLoss(), mob.getOxyLoss())
mob.updatehealth()
spawn(200) //in case they get revived by cryo chamber or something stupid like that, let them suicide again in 20 seconds
mob.suiciding = 0
/datum/disease2/effectholder
var/name = "Holder"
var/datum/disease2/effect/effect
var/chance = 0 //Chance in percentage each tick
var/cure = "" //Type of cure it requires
var/happensonce = 0
var/multiplier = 1 //The chance the effects are WORSE
var/stage = 0
proc/runeffect(var/mob/living/carbon/human/mob,var/stage)
if(happensonce > -1 && effect.stage <= stage && prob(chance))
effect.activate(mob)
if(happensonce == 1)
happensonce = -1
proc/getrandomeffect()
var/list/datum/disease2/effect/list = list()
for(var/e in (typesof(/datum/disease2/effect) - /datum/disease2/effect))
// world << "Making [e]"
var/datum/disease2/effect/f = new e
if(f.stage == src.stage)
list += f
effect = pick(list)
chance = rand(1,6)
proc/minormutate()
switch(pick(1,2,3,4,5))
if(1)
chance = rand(0,100)
if(2)
multiplier = rand(1,effect.maxm)
proc/majormutate()
getrandomeffect()
/proc/dprob(var/p)
return(prob(sqrt(p)) && prob(sqrt(p)))

View File

@@ -1,20 +0,0 @@
/obj/machinery/disease2/biodestroyer
name = "Biohazard destroyer"
icon = 'disposal.dmi'
icon_state = "disposal"
var/list/accepts = list(/obj/item/clothing,/obj/item/weapon/virusdish/,/obj/item/weapon/cureimplanter,/obj/item/weapon/diseasedisk)
density = 1
anchored = 1
/obj/machinery/disease2/biodestroyer/attackby(var/obj/I as obj, var/mob/user as mob)
for(var/path in accepts)
if(I.type in typesof(path))
user.drop_item()
del(I)
overlays += image('disposal.dmi', "dispover-handle")
return
user.drop_item()
I.loc = src.loc
for(var/mob/O in hearers(src, null))
O.show_message("\icon[src] \blue The [src.name] beeps", 2)

View File

@@ -1,42 +0,0 @@
/obj/item/weapon/cureimplanter
name = "Hypospray injector"
icon = 'items.dmi'
icon_state = "implanter1"
var/datum/disease2/resistance/resistance = null
var/works = 0
var/datum/disease2/disease/virus2 = null
item_state = "syringe_0"
throw_speed = 1
throw_range = 5
w_class = 2.0
/obj/item/weapon/cureimplanter/attack(mob/target as mob, mob/user as mob)
if(ismob(target))
for(var/mob/O in viewers(world.view, user))
if (target != user)
O.show_message(text("\red <B>[] is trying to inject [] with [src.name]!</B>", user, target), 1)
else
O.show_message("\red <B>[user] is trying to inject themselves with [src.name]!</B>", 1)
if(!do_mob(user, target,60)) return
for(var/mob/O in viewers(world.view, user))
if (target != user)
O.show_message(text("\red [] injects [] with [src.name]!", user, target), 1)
else
O.show_message("\red [user] injects themself with [src.name]!", 1)
var/mob/living/carbon/M = target
if(works == 0 && prob(25))
M.resistances2 += resistance
if(M.virus2)
M.virus2.cure_added(resistance)
else if(works == 1)
M.adjustToxLoss(rand(20,50))
else if(works == 2)
M.adjustToxLoss(rand(50,100))
else if(works == 3)
infect_virus2(M,virus2,1)

View File

@@ -1,154 +0,0 @@
/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/structure/computerframe/A = new /obj/structure/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/structure/computerframe/A = new /obj/structure/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

@@ -1,202 +0,0 @@
/obj/machinery/computer/diseasesplicer
name = "Disease Splicer"
icon = 'computer.dmi'
icon_state = "crew"
//brightnessred = 0
// brightnessgreen = 2
// brightnessblue = 2
// broken_icon
var/datum/disease2/effectholder/memorybank = null
var/analysed = 0
var/obj/item/weapon/virusdish/dish = null
var/burning = 0
var/splicing = 0
var/scanning = 0
/obj/machinery/computer/diseasesplicer/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/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
var/obj/item/weapon/circuitboard/diseasesplicer/M = new /obj/item/weapon/circuitboard/diseasesplicer( 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/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/diseasesplicer/M = new /obj/item/weapon/circuitboard/diseasesplicer( 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
if(istype(I,/obj/item/weapon/diseasedisk))
user << "You upload the contents of the disk into the buffer"
memorybank = I:effect
//else
src.attack_hand(user)
return
/obj/machinery/computer/diseasesplicer/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
/obj/machinery/computer/diseasesplicer/attack_paw(var/mob/user as mob)
return src.attack_hand(user)
return
/obj/machinery/computer/diseasesplicer/attack_hand(var/mob/user as mob)
if(..())
return
user.machine = src
var/dat
if(splicing)
dat = "Splicing in progress"
else if(scanning)
dat = "Splicing in progress"
else if(burning)
dat = "Data disk burning in progress"
else
if(dish)
dat = "Virus dish inserted"
dat += "<BR>Current DNA strand : "
if(memorybank)
dat += "<A href='?src=\ref[src];splice=1'>"
if(analysed)
dat += "[memorybank.effect.name] ([5-memorybank.effect.stage])"
else
dat += "Unknown DNA strand ([5-memorybank.effect.stage])"
dat += "</a>"
dat += "<BR><A href='?src=\ref[src];disk=1'>Burn DNA Sequence to data storage disk</a>"
else
dat += "Empty"
dat += "<BR><BR>"
if(dish)
if(dish.virus2)
if(dish.growth >= 50)
for(var/datum/disease2/effectholder/e in dish.virus2.effects)
dat += "<BR><A href='?src=\ref[src];grab=\ref[e]'> DNA strand"
if(dish.analysed)
dat += ": [e.effect.name]"
dat += " (5-[e.effect.stage])</a>"
else
dat += "<BR>Insufficent cells to attempt gene splicing"
else
dat += "<BR>No virus found in dish"
dat += "<BR><BR><A href='?src=\ref[src];eject=1'>Eject disk</a>"
else
dat += "<BR>Please insert dish"
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
/obj/machinery/computer/diseasesplicer/process()
if(stat & (NOPOWER|BROKEN))
return
use_power(500)
src.updateDialog()
if(scanning)
scanning -= 1
if(!scanning)
state("The [src.name] beeps")
icon_state = "crew"
if(splicing)
splicing -= 1
if(!splicing)
state("The [src.name] pings")
icon_state = "crew"
if(burning)
burning -= 1
if(!burning)
var/obj/item/weapon/diseasedisk/d = new /obj/item/weapon/diseasedisk(src.loc)
if(analysed)
d.name = "[memorybank.effect.name] GNA disk (Stage: [5-memorybank.effect.stage])"
else
d.name = "Unknown GNA disk (Stage: [5-memorybank.effect.stage])"
d.effect = memorybank
state("The [src.name] zings")
icon_state = "crew"
return
/obj/machinery/computer/diseasesplicer/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["grab"])
memorybank = locate(href_list["grab"])
analysed = dish.analysed
del(dish)
dish = null
scanning = 30
icon_state = "crew"
else if(href_list["eject"])
dish.loc = src.loc
dish = null
else if(href_list["splice"])
for(var/datum/disease2/effectholder/e in dish.virus2.effects)
if(e.stage == memorybank.stage)
e.effect = memorybank.effect
splicing = 50
dish.virus2.spreadtype = "Blood"
icon_state = "crew"
else if(href_list["disk"])
burning = 20
icon_state = "crew"
src.add_fingerprint(usr)
src.updateUsrDialog()
return
/obj/machinery/computer/diseasesplicer/proc/state(var/msg)
for(var/mob/O in hearers(src, null))
O.show_message("\icon[src] \blue [msg]", 2)
/obj/item/weapon/diseasedisk
name = "Blank GNA disk"
icon = 'cloning.dmi'
icon_state = "datadisk2"
var/datum/disease2/effectholder/effect = null
var/stage = 1
/obj/item/weapon/diseasedisk/premade/New()
name = "Blank GNA disk (stage: [5-stage])"
effect = new /datum/disease2/effectholder
effect.effect = new /datum/disease2/effect/invisible
effect.stage = stage

View File

@@ -1,176 +0,0 @@
/obj/machinery/disease2/incubator/
name = "Pathogenic incubator"
density = 1
anchored = 1
icon = 'virology.dmi'
icon_state = "incubator"
var/obj/item/weapon/virusdish/dish
var/obj/item/weapon/reagent_containers/glass/beaker = null
var/radiation = 0
var/on = 0
var/power = 0
var/foodsupply = 0
var/toxins = 0
ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(50))
del(src)
return
blob_act()
if (prob(25))
del(src)
meteorhit()
del(src)
return
attackby(var/obj/B as obj, var/mob/user as mob)
if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B,/obj/item/weapon/reagent_containers/syringe))
if(src.beaker)
if(istype(beaker,/obj/item/weapon/reagent_containers/syringe))
user << "A syringe is already loaded into the machine."
else
user << "A beaker is already loaded into the machine."
return
src.beaker = B
user.drop_item()
B.loc = src
if(istype(B,/obj/item/weapon/reagent_containers/syringe))
user << "You add the syringe to the machine!"
src.updateUsrDialog()
else
user << "You add the beaker to the machine!"
src.updateUsrDialog()
else
if(istype(B,/obj/item/weapon/virusdish))
if(src.dish)
user << "A dish is already loaded into the machine."
return
src.dish = B
user.drop_item()
B.loc = src
if(istype(B,/obj/item/weapon/virusdish))
user << "You add the dish to the machine!"
src.updateUsrDialog()
Topic(href, href_list)
if(stat & BROKEN) return
if(usr.stat || usr.restrained()) return
if(!in_range(src, usr)) return
usr.machine = src
if(!dish) return
if (href_list["power"])
on = !on
if(on)
icon_state = "incubator_on"
else
icon_state = "incubator"
if (href_list["ejectchem"])
if(beaker)
beaker.loc = src.loc
beaker = null
if (href_list["ejectdish"])
if(dish)
dish.loc = src.loc
dish = null
if (href_list["rad"])
radiation += 10
if (href_list["flush"])
radiation = 0
toxins = 0
foodsupply = 0
src.add_fingerprint(usr)
src.updateUsrDialog()
attack_hand(mob/user as mob)
if(stat & BROKEN)
return
user.machine = src
var/dat = ""
if(!dish)
dat = "Please insert dish into the incubator.<BR>"
dat += "<A href='?src=\ref[src];close=1'>Close</A>"
var/string = "Off"
if(on)
string = "On"
dat += "Power status : <A href='?src=\ref[src];power=1'>[string]</a>"
dat += "<BR>"
dat += "Food supply : [foodsupply]"
dat += "<BR>"
dat += "Radiation Levels : [radiation] RADS : <A href='?src=\ref[src];rad=1'>Radiate</a>"
dat += "<BR>"
dat += "Toxins : [toxins]"
dat += "<BR><BR>"
if(beaker)
dat += "Eject chemicals : <A href='?src=\ref[src];ejectchem=1'> Eject</a>"
dat += "<BR>"
if(dish)
dat += "Eject Virus dish : <A href='?src=\ref[src];ejectdish=1'> Eject</a>"
dat += "<BR>"
dat += "<BR><BR>"
dat += "<A href='?src=\ref[src];flush=1'>Flush system</a>"
user << browse("<TITLE>Pathogenic incubator</TITLE>incubator menu:<BR><BR>[dat]", "window=incubator;size=575x400")
onclose(user, "incubator")
return
process()
if(dish && on && dish.virus2)
use_power(50,EQUIP)
if(!powered(EQUIP))
on = 0
icon_state = "incubator"
if(foodsupply)
foodsupply -= 1
dish.growth += 1
if(dish.growth == 100)
state("The [src.name] pings")
if(radiation)
if(radiation > 50 & prob(5))
dish.virus2.majormutate()
if(dish.info)
dish.info = "OUTDATED : [dish.info]"
dish.analysed = 0
state("The [src.name] beeps")
else if(prob(5))
dish.virus2.minormutate()
radiation -= 1
if(toxins && prob(5))
dish.virus2.infectionchance -= 1
if(toxins > 50)
dish.virus2 = null
else if(!dish)
on = 0
icon_state = "incubator"
if(beaker)
if(!beaker.reagents.remove_reagent("virusfood",5))
foodsupply += 20
if(!beaker.reagents.remove_reagent("toxins",1))
toxins += 1
proc/state(var/msg)
for(var/mob/O in hearers(src, null))
O.show_message("\icon[src] \blue [msg]", 2)

View File

@@ -1,139 +0,0 @@
/obj/machinery/disease2/isolator/
name = "Pathogenic Isolator"
density = 1
anchored = 1
icon = 'virology.dmi'
icon_state = "isolator"
var/datum/disease2/disease/virus2 = null
var/isolating = 0
var/beaker = null
ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(50))
del(src)
return
blob_act()
if (prob(25))
del(src)
meteorhit()
del(src)
return
attackby(var/obj/item/weapon/reagent_containers/glass/B as obj, var/mob/user as mob)
if(!istype(B,/obj/item/weapon/reagent_containers/syringe))
return
if(src.beaker)
user << "A syringe is already loaded into the machine."
return
src.beaker = B
user.drop_item()
B.loc = src
if(istype(B,/obj/item/weapon/reagent_containers/syringe))
user << "You add the syringe to the machine!"
src.updateUsrDialog()
icon_state = "isolator_in"
Topic(href, href_list)
if(stat & BROKEN) return
if(usr.stat || usr.restrained()) return
if(!in_range(src, usr)) return
usr.machine = src
if(!beaker) return
var/datum/reagents/R = beaker:reagents
if (href_list["isolate"])
var/datum/reagent/blood/Blood
for(var/datum/reagent/blood/B in R.reagent_list)
if(B)
Blood = B
break
if(Blood.data["virus2"])
virus2 = Blood.data["virus2"]
isolating = 40
icon_state = "isolator_processing"
src.updateUsrDialog()
return
else if (href_list["main"])
attack_hand(usr)
return
else if (href_list["eject"])
beaker:loc = src.loc
beaker = null
icon_state = "isolator"
src.updateUsrDialog()
return
attack_hand(mob/user as mob)
if(stat & BROKEN)
return
user.machine = src
var/dat = ""
if(!beaker)
dat = "Please insert sample into the isolator.<BR>"
dat += "<A href='?src=\ref[src];close=1'>Close</A>"
else if(isolating)
dat = "Isolating"
else
var/datum/reagents/R = beaker:reagents
dat += "<A href='?src=\ref[src];eject=1'>Eject</A><BR><BR>"
if(!R.total_volume)
dat += "[beaker] is empty."
else
dat += "Contained reagents:<BR>"
for(var/datum/reagent/blood/G in R.reagent_list)
dat += " [G.name]: <A href='?src=\ref[src];isolate=[G.id]'>Isolate</a>"
user << browse("<TITLE>Pathogenic Isolator</TITLE>Isolator menu:<BR><BR>[dat]", "window=isolator;size=575x400")
onclose(user, "isolator")
return
process()
if(isolating > 0)
isolating -= 1
if(isolating == 0)
var/obj/item/weapon/virusdish/d = new /obj/item/weapon/virusdish(src.loc)
d.virus2 = virus2.getcopy()
virus2 = null
icon_state = "isolator_in"
/obj/item/weapon/virusdish
name = "Virus containment/growth dish"
icon = 'items.dmi'
icon_state = "implantcase-b"
var/datum/disease2/disease/virus2 = null
var/growth = 0
var/info = 0
var/analysed = 0
/obj/item/weapon/virusdish/attackby(var/obj/item/weapon/W as obj,var/mob/living/carbon/user as mob)
if(istype(W,/obj/item/weapon/hand_labeler))
return
..()
if(prob(50))
user << "The dish shatters"
if(virus2.infectionchance > 0)
infect_virus2(user,virus2)
del src
/obj/item/weapon/virusdish/examine()
usr << "This is a virus containment dish"
if(src.info)
usr << "It has the following information about its contents"
usr << src.info

View File

@@ -1,30 +0,0 @@
/obj/machinery/disease2/monkeycloner
name = "Monkey dispensor"
icon = 'cloning.dmi'
icon_state = "pod_0"
density = 1
anchored = 1
var/cloning = 0
/obj/machinery/disease2/monkeycloner/attack_hand()
if(!cloning)
cloning = 150
icon_state = "pod_g"
/obj/machinery/disease2/monkeycloner/process()
if(stat & (NOPOWER|BROKEN))
return
use_power(500)
src.updateDialog()
if(cloning)
cloning -= 1
if(!cloning)
new /mob/living/carbon/monkey(src.loc)
icon_state = "pod_0"
return

View File

@@ -1,12 +0,0 @@
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