Adds Halloss as a damage type weapons can do. Halloss can be healed by sleeping. Halloss now effects the interface more fully.

Adds a holodeck to fitness!  
Tensioner now respects antagonist preferences (Mmph.  More antagonist for me.)
More flailing attempts to fix the tensioner assigning braindead people.  (How?)

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3341 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
VivianFoxfoot@gmail.com
2012-03-23 04:39:38 +00:00
parent d22c7cd6d5
commit e14671e234
13 changed files with 8725 additions and 8343 deletions

View File

@@ -255,10 +255,25 @@ var/global/datum/tension/tension_master
themind.make_AI_Malf() themind.make_AI_Malf()
return 1 return 1
/*
if(BE_CHANGELING) roletext="changeling"
if(BE_TRAITOR) roletext="traitor"
if(BE_OPERATIVE) roletext="operative"
if(BE_WIZARD) roletext="wizard"
if(BE_REV) roletext="revolutionary"
if(BE_CULTIST) roletext="cultist"
for(var/mob/new_player/player in world)
if(player.client && player.ready)
if(player.preferences.be_special & role)
*/
proc/makeTratiors() proc/makeTratiors()
var/datum/game_mode/traitor/temp = new var/datum/game_mode/traitor/temp = new
if(config.protect_roles_from_antagonist) if(config.protect_roles_from_antagonist)
temp.restricted_jobs += temp.protected_jobs temp.restricted_jobs += temp.protected_jobs
@@ -266,13 +281,18 @@ var/global/datum/tension/tension_master
var/mob/living/carbon/human/H = null var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in world) for(var/mob/living/carbon/human/applicant in world)
var/datum/preferences/preferences = new
if(applicant.stat < 2) if(applicant.stat < 2)
if(applicant.mind) if(applicant.mind)
if (!applicant.mind.special_role) if (!applicant.mind.special_role)
if(!jobban_isbanned(applicant, "traitor") && !jobban_isbanned(applicant, "Syndicate")) if(!jobban_isbanned(applicant, "traitor") && !jobban_isbanned(applicant, "Syndicate"))
if(!(applicant.job in temp.restricted_jobs)) if(!(applicant.job in temp.restricted_jobs))
if(applicant.client) if(applicant.client)
candidates += applicant if(preferences.savefile_load(applicant, 0))
if(preferences.be_special & BE_TRAITOR)
candidates += applicant
if(candidates.len) if(candidates.len)
var/numTratiors = min(candidates.len, 3) var/numTratiors = min(candidates.len, 3)
@@ -297,13 +317,18 @@ var/global/datum/tension/tension_master
var/mob/living/carbon/human/H = null var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in world) for(var/mob/living/carbon/human/applicant in world)
var/datum/preferences/preferences = new
if(applicant.stat < 2) if(applicant.stat < 2)
if(applicant.mind) if(applicant.mind)
if (!applicant.mind.special_role) if (!applicant.mind.special_role)
if(!jobban_isbanned(applicant, "changeling") && !jobban_isbanned(applicant, "Syndicate")) if(!jobban_isbanned(applicant, "changeling") && !jobban_isbanned(applicant, "Syndicate"))
if(!(applicant.job in temp.restricted_jobs)) if(!(applicant.job in temp.restricted_jobs))
if(applicant.client) if(applicant.client)
candidates += applicant if(preferences.savefile_load(applicant, 0))
if(preferences.be_special & BE_CHANGELING)
candidates += applicant
if(candidates.len) if(candidates.len)
var/numChanglings = min(candidates.len, 3) var/numChanglings = min(candidates.len, 3)
@@ -327,13 +352,19 @@ var/global/datum/tension/tension_master
var/mob/living/carbon/human/H = null var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in world) for(var/mob/living/carbon/human/applicant in world)
var/datum/preferences/preferences = new
if(applicant.stat < 2) if(applicant.stat < 2)
if(applicant.mind) if(applicant.mind)
if (!applicant.mind.special_role) if (!applicant.mind.special_role)
if(!jobban_isbanned(applicant, "revolutionary") && !jobban_isbanned(applicant, "Syndicate")) if(!jobban_isbanned(applicant, "revolutionary") && !jobban_isbanned(applicant, "Syndicate"))
if(!(applicant.job in temp.restricted_jobs)) if(!(applicant.job in temp.restricted_jobs))
if(applicant.client) if(applicant.client)
candidates += applicant if(preferences.savefile_load(applicant, 0))
if(preferences.be_special & BE_REV)
candidates += applicant
if(candidates.len) if(candidates.len)
var/numRevs = min(candidates.len, 3) var/numRevs = min(candidates.len, 3)
@@ -362,8 +393,8 @@ var/global/datum/tension/tension_master
if("No") if("No")
return return
sleep(300)
spawn(300) spawn(0)
if(candidates.len) if(candidates.len)
while(!theghost && candidates.len) while(!theghost && candidates.len)
theghost = pick(candidates) theghost = pick(candidates)
@@ -389,13 +420,18 @@ var/global/datum/tension/tension_master
var/mob/living/carbon/human/H = null var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in world) for(var/mob/living/carbon/human/applicant in world)
var/datum/preferences/preferences = new
if(applicant.stat < 2) if(applicant.stat < 2)
if(applicant.mind) if(applicant.mind)
if (!applicant.mind.special_role) if (!applicant.mind.special_role)
if(!jobban_isbanned(applicant, "cultist") && !jobban_isbanned(applicant, "Syndicate")) if(!jobban_isbanned(applicant, "cultist") && !jobban_isbanned(applicant, "Syndicate"))
if(!(applicant.job in temp.restricted_jobs)) if(!(applicant.job in temp.restricted_jobs))
if(applicant.client) if(applicant.client)
candidates += applicant if(preferences.savefile_load(applicant, 0))
if(preferences.be_special & BE_CULTIST)
candidates += applicant
if(candidates.len) if(candidates.len)
var/numCultists = min(candidates.len, 4) var/numCultists = min(candidates.len, 4)
@@ -429,8 +465,8 @@ var/global/datum/tension/tension_master
if("No") if("No")
return return
sleep(300)
spawn(300) spawn(0)
if(candidates.len) if(candidates.len)
var/numagents = 5 var/numagents = 5
syndicate_begin() syndicate_begin()
@@ -531,8 +567,8 @@ var/global/datum/tension/tension_master
candidates += G candidates += G
if("No") if("No")
return return
sleep(300)
spawn(300) spawn(0)
if(candidates.len) if(candidates.len)
var/numagents = 6 var/numagents = 6

View File

@@ -712,6 +712,54 @@ proc/process_ghost_teleport_locs()
name = "Law Office" name = "Law Office"
icon_state = "law" icon_state = "law"
/area/holodeck
name = "Holodeck"
icon_state = "Holodeck"
luminosity = 1
sd_lighting = 0
/area/holodeck/alphadeck
name = "Holodeck Alpha"
/area/holodeck/source_plating
name = "Holodeck - Off"
icon_state = "Holodeck"
/area/holodeck/source_emptycourt
name = "Holodeck - Empty Court"
/area/holodeck/source_boxingcourt
name = "Holodeck - Boxing Court"
/area/holodeck/source_thunderdomecourt
name = "Holodeck - Thunderdome Court"
/area/holodeck/source_beach
name = "Holodeck - Beach"
icon_state = "Holodeck" // Lazy.
/area/holodeck/source_burntest
name = "Holodeck - Atmospheric Burn Test"
//Engineering //Engineering
/area/engine /area/engine
@@ -1320,6 +1368,7 @@ var/list/the_station_areas = list (
/area/hallway, /area/hallway,
/area/bridge, /area/bridge,
/area/crew_quarters, /area/crew_quarters,
/area/holodeck,
/area/mint, /area/mint,
/area/library, /area/library,
/area/chapel, /area/chapel,

View File

@@ -1490,6 +1490,172 @@ proc/listclearnulls(list/list)
proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
if(!original)
return null
var/obj/O = null
if(sameloc)
O=new original.type(original.loc)
else
O=new original.type(locate(0,0,0))
if(perfectcopy)
if((O) && (original))
for(var/V in original.vars)
if(!(V in list("type","loc","locs","vars", "parent", "parent_type","verbs","ckey","key")))
O.vars[V] = original.vars[V]
return O
/area/proc/copy_contents_to(var/area/A , var/platingRequired = 0 )
//Takes: Area. Optional: If it should copy to areas that don't have plating
//Returns: Nothing.
//Notes: Attempts to move the contents of one area to another area.
// Movement based on lower left corner. Tiles that do not fit
// into the new area will not be moved.
if(!A || !src) return 0
var/list/turfs_src = get_area_turfs(src.type)
var/list/turfs_trg = get_area_turfs(A.type)
var/src_min_x = 0
var/src_min_y = 0
for (var/turf/T in turfs_src)
if(T.x < src_min_x || !src_min_x) src_min_x = T.x
if(T.y < src_min_y || !src_min_y) src_min_y = T.y
var/trg_min_x = 0
var/trg_min_y = 0
for (var/turf/T in turfs_trg)
if(T.x < trg_min_x || !trg_min_x) trg_min_x = T.x
if(T.y < trg_min_y || !trg_min_y) trg_min_y = T.y
var/list/refined_src = new/list()
for(var/turf/T in turfs_src)
refined_src += T
refined_src[T] = new/datum/coords
var/datum/coords/C = refined_src[T]
C.x_pos = (T.x - src_min_x)
C.y_pos = (T.y - src_min_y)
var/list/refined_trg = new/list()
for(var/turf/T in turfs_trg)
refined_trg += T
refined_trg[T] = new/datum/coords
var/datum/coords/C = refined_trg[T]
C.x_pos = (T.x - trg_min_x)
C.y_pos = (T.y - trg_min_y)
var/list/toupdate = new/list()
var/copiedobjs = list()
moving:
for (var/turf/T in refined_src)
var/datum/coords/C_src = refined_src[T]
for (var/turf/B in refined_trg)
var/datum/coords/C_trg = refined_trg[B]
if(C_src.x_pos == C_trg.x_pos && C_src.y_pos == C_trg.y_pos)
var/old_dir1 = T.dir
var/old_icon_state1 = T.icon_state
var/old_icon1 = T.icon
if(platingRequired)
if(istype(B, /turf/space))
continue moving
var/turf/X = new T.type(B)
X.dir = old_dir1
X.icon_state = old_icon_state1
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
var/list/objs = new/list()
var/list/newobjs = new/list()
var/list/mobs = new/list()
var/list/newmobs = new/list()
for(var/obj/O in T)
if(!istype(O,/obj))
continue
objs += O
for(var/obj/O in objs)
newobjs += DuplicateObject(O , 1)
for(var/obj/O in newobjs)
O.loc = X
for(var/mob/M in T)
if(!istype(M,/mob))
continue
mobs += M
for(var/mob/M in mobs)
newmobs += DuplicateObject(M , 1)
for(var/mob/M in newmobs)
M.loc = X
copiedobjs += newobjs
copiedobjs += newmobs
for(var/V in T.vars)
if(!(V in list("type","loc","locs","vars", "parent", "parent_type","verbs","ckey","key","x","y","z","contents", "luminosity", "sd_light_spill",)))
X.vars[V] = T.vars[V]
var/area/AR = X.loc
if(AR.sd_lighting)
X.opacity = !X.opacity
X.sd_SetOpacity(!X.opacity)
toupdate += X
refined_src -= T
refined_trg -= B
continue moving
var/list/doors = new/list()
if(toupdate.len)
for(var/turf/simulated/T1 in toupdate)
for(var/obj/machinery/door/D2 in T1)
doors += D2
if(T1.parent)
air_master.groups_to_rebuild += T1.parent
else
air_master.tiles_to_update += T1
for(var/obj/O in doors)
O:update_nearby_tiles(1)
return copiedobjs
proc/get_cardinal_dir(atom/A, atom/B) proc/get_cardinal_dir(atom/A, atom/B)
var/dx = abs(B.x - A.x) var/dx = abs(B.x - A.x)
var/dy = abs(B.y - A.y) var/dy = abs(B.y - A.y)

View File

@@ -191,7 +191,7 @@
if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything
var/health_deficiency = (100 - health) var/health_deficiency = (100 - health - halloss)
if(health_deficiency >= 40) tally += (health_deficiency / 25) if(health_deficiency >= 40) tally += (health_deficiency / 25)
var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80 var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80

View File

@@ -30,6 +30,30 @@
visible_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>") visible_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>")
return return
if(istype(M.gloves , /obj/item/clothing/gloves/boxing/hologlove))
var/damage = rand(0, 9)
if(!damage)
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
visible_message("\red <B>[M] has attempted to punch [src]!</B>")
return 0
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
var/armor_block = run_armor_check(affecting, "melee")
if(M.mutations & HULK) damage += 5
playsound(loc, "punch", 25, 1, -1)
visible_message("\red <B>[M] has punched [src]!</B>")
apply_damage(damage, HALLOSS, affecting, armor_block)
if(damage >= 9)
visible_message("\red <B>[M] has weakened [src]!</B>")
apply_effect(4, WEAKEN, armor_block)
UpdateDamageIcon()
return
switch(M.a_intent) switch(M.a_intent)
if("help") if("help")
if(health > 0) if(health > 0)
@@ -81,6 +105,8 @@
log_attack("<font color='red'>[M.name] ([M.ckey]) punched [src.name] ([src.ckey])</font>") log_attack("<font color='red'>[M.name] ([M.ckey]) punched [src.name] ([src.ckey])</font>")
var/damage = rand(0, 9) var/damage = rand(0, 9)
if(!damage) if(!damage)
playsound(loc, 'punchmiss.ogg', 25, 1, -1) playsound(loc, 'punchmiss.ogg', 25, 1, -1)

View File

@@ -124,7 +124,7 @@ emp_act
apply_damage(I.force, I.damtype, affecting, armor) apply_damage(I.force, I.damtype, affecting, armor)
var/bloody = 0 var/bloody = 0
if((I.damtype == BRUTE) && prob(25 + (I.force * 2))) if(((I.damtype == BRUTE) || (I.damtype == HALLOSS)) && prob(25 + (I.force * 2)))
I.add_blood(src) //Make the weapon bloody, not the person. I.add_blood(src) //Make the weapon bloody, not the person.
if(prob(33)) if(prob(33))
bloody = 1 bloody = 1

View File

@@ -129,14 +129,29 @@
// a.hallucinate(src) // a.hallucinate(src)
if(!handling_hal && hallucination > 20) if(!handling_hal && hallucination > 20)
spawn handle_hallucinations() //The not boring kind! spawn handle_hallucinations() //The not boring kind!
hallucination -= 2
if(hallucination <= 2)
halloss = 0
hallucination = 0
//hallucination -= 2
//if(health < 0) //if(health < 0)
// for(var/obj/a in hallucinations) // for(var/obj/a in hallucinations)
// del a // del a
else else
halloss = 0 //halloss = 0
for(var/atom/a in hallucinations) for(var/atom/a in hallucinations)
del a del a
if(halloss > 100)
src << "You're too tired to keep going..."
for(var/mob/O in viewers(src, null))
if(O == src)
continue
O.show_message(text("\red <B>[src] slumps to the ground panting, too weak to continue fighting."), 1)
Paralyse(15)
setHalLoss(99)
if (disabilities & 2) if (disabilities & 2)
if ((prob(1) && paralysis < 1 && r_epil < 1)) if ((prob(1) && paralysis < 1 && r_epil < 1))
src << "\red You have a seizure!" src << "\red You have a seizure!"
@@ -697,6 +712,7 @@
if(getOxyLoss() > 50) Paralyse(3) if(getOxyLoss() > 50) Paralyse(3)
if(sleeping) if(sleeping)
adjustHalLoss(-5)
if(paralysis <= 0) if(paralysis <= 0)
Paralyse(2) Paralyse(2)
if (prob(10) && health && !hal_crit) spawn(0) emote("snore") if (prob(10) && health && !hal_crit) spawn(0) emote("snore")

View File

@@ -22,18 +22,21 @@
adjustOxyLoss(damage/(blocked+1)) adjustOxyLoss(damage/(blocked+1))
if(CLONE) if(CLONE)
adjustCloneLoss(damage/(blocked+1)) adjustCloneLoss(damage/(blocked+1))
if(HALLOSS)
adjustHalLoss(damage/(blocked+1))
UpdateDamageIcon() UpdateDamageIcon()
updatehealth() updatehealth()
return 1 return 1
/mob/living/proc/apply_damages(var/brute = 0, var/burn = 0, var/tox = 0, var/oxy = 0, var/clone = 0, var/def_zone = null, var/blocked = 0) /mob/living/proc/apply_damages(var/brute = 0, var/burn = 0, var/tox = 0, var/oxy = 0, var/clone = 0, var/def_zone = null, var/blocked = 0, var/halloss = 0)
if(blocked >= 2) return 0 if(blocked >= 2) return 0
if(brute) apply_damage(brute, BRUTE, def_zone, blocked) if(brute) apply_damage(brute, BRUTE, def_zone, blocked)
if(burn) apply_damage(burn, BURN, def_zone, blocked) if(burn) apply_damage(burn, BURN, def_zone, blocked)
if(tox) apply_damage(tox, TOX, def_zone, blocked) if(tox) apply_damage(tox, TOX, def_zone, blocked)
if(oxy) apply_damage(oxy, OXY, def_zone, blocked) if(oxy) apply_damage(oxy, OXY, def_zone, blocked)
if(clone) apply_damage(clone, CLONE, def_zone, blocked) if(clone) apply_damage(clone, CLONE, def_zone, blocked)
if(halloss) apply_damage(halloss, HALLOSS, def_zone, blocked)
return 1 return 1

View File

@@ -1140,6 +1140,17 @@ note dizziness decrements automatically in the mob's Life() proc.
/mob/proc/setCloneLoss(var/amount) /mob/proc/setCloneLoss(var/amount)
cloneloss = amount cloneloss = amount
/mob/proc/getHalLoss()
return halloss
/mob/proc/adjustHalLoss(var/amount)
halloss = max(halloss + amount, 0)
/mob/proc/setHalLoss(var/amount)
halloss = amount
/mob/proc/getBrainLoss() /mob/proc/getBrainLoss()
return brainloss return brainloss

View File

@@ -246,6 +246,7 @@ var/list/global_mutations = list() // list of hidden mutation things
#define TOX "tox" #define TOX "tox"
#define OXY "oxy" #define OXY "oxy"
#define CLONE "clone" #define CLONE "clone"
#define HALLOSS "halloss"
#define STUN "stun" #define STUN "stun"
#define WEAKEN "weaken" #define WEAKEN "weaken"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -496,6 +496,7 @@
#include "code\game\machinery\computer\communications.dm" #include "code\game\machinery\computer\communications.dm"
#include "code\game\machinery\computer\computer.dm" #include "code\game\machinery\computer\computer.dm"
#include "code\game\machinery\computer\crew.dm" #include "code\game\machinery\computer\crew.dm"
#include "code\game\machinery\computer\HolodeckControl.dm"
#include "code\game\machinery\computer\hologram.dm" #include "code\game\machinery\computer\hologram.dm"
#include "code\game\machinery\computer\law.dm" #include "code\game\machinery\computer\law.dm"
#include "code\game\machinery\computer\medical.dm" #include "code\game\machinery\computer\medical.dm"