Conflicts:
	baystation12.dme

Signed-off-by: caelaislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
caelaislinn
2012-05-31 19:23:11 +10:00
408 changed files with 18131 additions and 13985 deletions
-2
View File
@@ -2,9 +2,7 @@ SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
CREATE SCHEMA IF NOT EXISTS `mydb` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ;
CREATE SCHEMA IF NOT EXISTS `tgstation` DEFAULT CHARACTER SET latin1 ;
USE `mydb` ;
USE `tgstation` ;
-- -----------------------------------------------------
+21 -26
View File
@@ -103,6 +103,7 @@
#define FILE_DIR "code/modules/DetectiveWork"
#define FILE_DIR "code/modules/flufftext"
#define FILE_DIR "code/modules/food"
#define FILE_DIR "code/modules/icon generation"
#define FILE_DIR "code/modules/maps"
#define FILE_DIR "code/modules/mining"
#define FILE_DIR "code/modules/mob"
@@ -362,12 +363,6 @@
#include "code\defines\sd_procs\constants.dm"
#include "code\defines\sd_procs\direction.dm"
#include "code\defines\sd_procs\math.dm"
#include "code\FEA\FEA_airgroup.dm"
#include "code\FEA\FEA_fire.dm"
#include "code\FEA\FEA_gas_mixture.dm"
#include "code\FEA\FEA_group_helpers.dm"
#include "code\FEA\FEA_system.dm"
#include "code\FEA\FEA_turf_tile.dm"
#include "code\game\algorithm.dm"
#include "code\game\atom_procs.dm"
#include "code\game\cellautomata.dm"
@@ -455,6 +450,7 @@
#include "code\game\gamemodes\sandbox\h_sandbox.dm"
#include "code\game\gamemodes\sandbox\sandbox.dm"
#include "code\game\gamemodes\traitor\traitor.dm"
#include "code\game\gamemodes\traitor\traitor_info.dm"
#include "code\game\gamemodes\wizard\rightandwrong.dm"
#include "code\game\gamemodes\wizard\soulstone.dm"
#include "code\game\gamemodes\wizard\spellbook.dm"
@@ -593,6 +589,7 @@
#include "code\game\magic\archived_book.dm"
#include "code\game\magic\library.dm"
#include "code\game\magic\musician.dm"
#include "code\game\magic\Uristrunes.dm"
#include "code\game\magic\cultist\ritual.dm"
#include "code\game\magic\cultist\runes.dm"
#include "code\game\magic\cultist\talisman.dm"
@@ -648,6 +645,7 @@
#include "code\game\objects\tank.dm"
#include "code\game\objects\toys.dm"
#include "code\game\objects\transfer_valve.dm"
#include "code\game\objects\uplinks.dm"
#include "code\game\objects\washing_machine.dm"
#include "code\game\objects\watercloset.dm"
#include "code\game\objects\weapons.dm"
@@ -773,6 +771,7 @@
#include "code\game\objects\storage\lockbox.dm"
#include "code\game\objects\storage\storage.dm"
#include "code\game\objects\storage\toolbox.dm"
#include "code\game\objects\storage\uplink_kits.dm"
#include "code\game\objects\tanks\emergency.dm"
#include "code\game\objects\tanks\jetpack.dm"
#include "code\game\objects\tanks\oxygen.dm"
@@ -789,6 +788,7 @@
#include "code\js\byjax.dm"
#include "code\js\menus.dm"
#include "code\modules\admin\admin.dm"
#include "code\modules\admin\admin_memo.dm"
#include "code\modules\admin\admin_verbs.dm"
#include "code\modules\admin\banjob.dm"
#include "code\modules\admin\create_mob.dm"
@@ -963,6 +963,7 @@
#include "code\modules\mob\living\carbon\human\emote.dm"
#include "code\modules\mob\living\carbon\human\examine.dm"
#include "code\modules\mob\living\carbon\human\hud.dm"
#include "code\modules\mob\living\carbon\human\hud_overlays.dm"
#include "code\modules\mob\living\carbon\human\human.dm"
#include "code\modules\mob\living\carbon\human\human_attackalien.dm"
#include "code\modules\mob\living\carbon\human\human_attackhand.dm"
@@ -1151,8 +1152,7 @@
#include "code\WorkInProgress\AI_Visibility\minimap.dm"
#include "code\WorkInProgress\AI_Visibility\util.dm"
#include "code\WorkInProgress\animusstation\atm.dm"
#include "code\WorkInProgress\Cael_Aislinn\BirdMan\bird_transformation.dm"
#include "code\WorkInProgress\Cael_Aislinn\BirdMan\birdman.dm"
#include "code\WorkInProgress\Cael_Aislinn\power_monitor.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\core_field.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\core_gen.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\core_monitor.dm"
@@ -1168,24 +1168,9 @@
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\LaserComputer.dm"
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\SuperMatter.dm"
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\ZeroPointLaser.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\death.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\emote.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\examine.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\hud.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\life.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\login.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\pain.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\say.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\tajara_transformation.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\tajaran.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\tajaran_algorithm.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\tajaran_attackalien.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\tajaran_attackhand.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\tajaran_attackpaw.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\tajaran_damage.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\tajaran_defense.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\tajaran_movement.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\tajaran_transform_procs.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\whisper.dm"
#include "code\WorkInProgress\Chinsky\ashtray.dm"
#include "code\WorkInProgress\Mini\atmos_control.dm"
@@ -1193,10 +1178,8 @@
#include "code\WorkInProgress\Mloc\Shortcuts.dm"
#include "code\WorkInProgress\organs\implants.dm"
#include "code\WorkInProgress\organs\organs.dm"
#include "code\WorkInProgress\Ported\head.dm"
#include "code\WorkInProgress\Ported\policetape.dm"
#include "code\WorkInProgress\Ported\Abi79\uplink_kits.dm"
#include "code\WorkInProgress\Ported\Abi79\uplinks.dm"
#include "code\WorkInProgress\Ported\sql.dm"
#include "code\WorkInProgress\Ported\Bureaucracy\copier.dm"
#include "code\WorkInProgress\Ported\Bureaucracy\filing.dm"
#include "code\WorkInProgress\SkyMarshal\coatrack.dm"
@@ -1222,6 +1205,18 @@
#include "code\WorkInProgress\virus2\monkeydispensor.dm"
#include "code\WorkInProgress\virus2\Prob.dm"
#include "code\WorkInProgress\Wrongnumber\weldbackpack.dm"
#include "code\ZAS\Airflow.dm"
#include "code\ZAS\Connection.dm"
#include "code\ZAS\Creation.dm"
#include "code\ZAS\Definition.dm"
#include "code\ZAS\FEA_gas_mixture.dm"
#include "code\ZAS\FEA_system.dm"
#include "code\ZAS\FEA_turf_tile.dm"
#include "code\ZAS\Fire.dm"
#include "code\ZAS\Functions.dm"
#include "code\ZAS\Plasma.dm"
#include "code\ZAS\Processing.dm"
#include "code\ZAS\Variable Settings.dm"
#include "interface\interface.dm"
#include "interface\skin.dmf"
#include "maps\tgstation.2.0.8.dmm"
+10 -25
View File
@@ -128,28 +128,19 @@ datum/pipeline
var/datum/gas_mixture/air_sample = air.remove_ratio(mingle_volume/air.volume)
air_sample.volume = mingle_volume
if(istype(target) && target.parent && target.parent.group_processing)
if(istype(target) && target.zone)
//Have to consider preservation of group statuses
var/datum/gas_mixture/turf_copy = new
turf_copy.copy_from(target.parent.air)
turf_copy.volume = target.parent.air.volume //Copy a good representation of the turf from parent group
turf_copy.copy_from(target.zone.air)
turf_copy.volume = target.zone.air.volume //Copy a good representation of the turf from parent group
equalize_gases(list(air_sample, turf_copy))
air.merge(air_sample)
if(target.parent.air.compare(turf_copy))
//The new turf would be an acceptable group member so permit the integration
turf_copy.subtract(target.zone.air)
turf_copy.subtract(target.parent.air)
target.parent.air.merge(turf_copy)
else
//Comparison failure so dissemble group and copy turf
target.parent.suspend_group_processing()
target.air.copy_from(turf_copy)
target.zone.air.merge(turf_copy)
else
var/datum/gas_mixture/turf_air = target.return_air()
@@ -187,9 +178,9 @@ datum/pipeline
var/delta_temperature = 0
var/sharer_heat_capacity = 0
if(modeled_location.parent && modeled_location.parent.group_processing)
delta_temperature = (air.temperature - modeled_location.parent.air.temperature)
sharer_heat_capacity = modeled_location.parent.air.heat_capacity()
if(modeled_location.zone)
delta_temperature = (air.temperature - modeled_location.zone.air.temperature)
sharer_heat_capacity = modeled_location.zone.air.heat_capacity()
else
delta_temperature = (air.temperature - modeled_location.air.temperature)
sharer_heat_capacity = modeled_location.air.heat_capacity()
@@ -208,14 +199,8 @@ datum/pipeline
air.temperature += self_temperature_delta
if(modeled_location.parent && modeled_location.parent.group_processing)
if((abs(sharer_temperature_delta) > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND) && (abs(sharer_temperature_delta) > MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND*modeled_location.parent.air.temperature))
modeled_location.parent.suspend_group_processing()
modeled_location.air.temperature += sharer_temperature_delta
else
modeled_location.parent.air.temperature += sharer_temperature_delta/modeled_location.parent.air.group_multiplier
if(modeled_location.zone)
modeled_location.zone.air.temperature += sharer_temperature_delta/modeled_location.zone.air.group_multiplier
else
modeled_location.air.temperature += sharer_temperature_delta
+7 -6
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
atom
proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
//Purpose: Managing temperature exposure.
@@ -67,13 +69,12 @@ obj
layer = TURF_LAYER
var
volume = 125
temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
var/volume = 125
var/temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
just_spawned = 1
var/just_spawned = 1
bypassing = 0
var/bypassing = 0
proc/perform_exposure()
var/turf/simulated/floor/location = loc
@@ -179,4 +180,4 @@ obj
loc = null
..()
..()
+6 -5
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/*
What are the archived variables for?
Calculations are done using the archived variables with the results merged into the regular variables.
@@ -22,11 +24,10 @@ datum
volatile_fuel
specific_heat = 30
var
moles = 0
specific_heat = 0
var/moles = 0
var/specific_heat = 0
moles_archived = 0
var/moles_archived = 0
gas_mixture
var //Holds the "moles" of each of the four gases.
@@ -1006,4 +1007,4 @@ datum
corresponding.moles -= trace_gas.moles
update_values()
return 1
return 1
+15 -14
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
atom/movable/var/pressure_resistance = 20
atom/movable/var/last_forced_movement = 0
@@ -91,23 +93,22 @@ turf
var/current_graphic = null
var/tmp
datum/gas_mixture/air
var/tmp/datum/gas_mixture/air
processing = 1
datum/air_group/parent
group_border = 0
length_space_border = 0
var/tmp/processing = 1
var/tmp/datum/air_group/parent
var/tmp/group_border = 0
var/tmp/length_space_border = 0
air_check_directions = 0 //Do not modify this, just add turf to air_master.tiles_to_update
var/tmp/air_check_directions = 0 //Do not modify this, just add turf to air_master.tiles_to_update
archived_cycle = 0
current_cycle = 0
var/tmp/archived_cycle = 0
var/tmp/current_cycle = 0
obj/effect/hotspot/active_hotspot
var/tmp/obj/effect/hotspot/active_hotspot
temperature_archived //USED ONLY FOR SOLIDS
being_superconductive = 0
var/tmp/temperature_archived //USED ONLY FOR SOLIDS
var/tmp/being_superconductive = 0
proc
@@ -132,9 +133,9 @@ turf
overlays += image('floors.dmi',siding_icon_state)
switch(model.graphic)
if("plasma")
if(1)
overlays.Add(plmaster)
if("sleeping_agent")
if(2)
overlays.Add(slmaster)
@@ -55,7 +55,7 @@
O.update_body()
O.update_face()
spawn(1)
O.update_clothing()
O.rebuild_appearance()
O << "<B>You are now a Tajara.</B>"
spawn(0)//To prevent the proc from returning null.
del(src)
@@ -22,11 +22,17 @@
if(!lying_icon)
lying_icon = new /icon('tajaran.dmi', "body_[g]_l")
icon = stand_icon
update_clothing()
rebuild_appearance()
src << "\blue Your icons have been generated!"
..()
/mob/living/carbon/human/tajaran/rebuild_appearance()
update_clothing()
/mob/living/carbon/human/tajaran/update_body_appearance()
update_clothing()
/mob/living/carbon/human/tajaran/update_clothing()
// ..()
@@ -303,12 +309,7 @@
if ( istype(wear_suit, /obj/item/clothing/suit/bio_suit) || istype(wear_suit, /obj/item/clothing/suit/bomb_suit) || istype(wear_suit, /obj/item/clothing/suit/space) )
tail_shown = 0
if(tail_shown)
var/icon/tail_icon = image("icon" = icon('tajaran.dmi', "tail_[gender==FEMALE ? "f" : "m"]_[lying ? "l" : "s"]"), "layer" = MOB_LAYER)
if (s_tone >= 0)
tail_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
else
tail_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
overlays += tail_icon
overlays += image("icon" = icon('tajaran.dmi', "tail_[gender==FEMALE ? "f" : "m"]_[lying ? "l" : "s"]"), "layer" = MOB_LAYER)
if (lying)
if (face_lying)
@@ -344,12 +345,7 @@
var/datum/organ/external/head = organs["head"]
if(!head.destroyed)
//if not wearing anything on the head, show the ears
var/icon/ears_icon = image("icon" = icon('tajaran.dmi', "ears_[gender==FEMALE ? "f" : "m"]_[lying ? "l" : "s"]"), "layer" = MOB_LAYER)
if (s_tone >= 0)
ears_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
else
ears_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
overlays += ears_icon
overlays += image("icon" = icon('tajaran.dmi', "ears_[gender==FEMALE ? "f" : "m"]_[lying ? "l" : "s"]"), "layer" = MOB_LAYER)
// Belt
if (belt)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

+10 -10
View File
@@ -21,7 +21,7 @@ log transactions
/obj/machinery/atm/attackby(obj/item/I as obj, mob/user as mob)
if(ishuman(user))
var/obj/item/weapon/card/id/user_id = src.scan_user(user)
if(istype(I,/obj/item/weapon/spacecash))
if(istype(I,/obj/item/weapon/money))
user_id.money += I:worth
del I
@@ -29,7 +29,7 @@ log transactions
if(istype(user, /mob/living/silicon))
user << "\red Artificial unit recognized. Artificial units do not currently receive monetary compensation, as per NanoTrasen regulation #1005."
return
var/obj/item/weapon/card/id/user_id = src.scan_user(user)
if(..())
return
@@ -51,21 +51,21 @@ log transactions
//hueg switch for giving moneh out
switch(amount)
if(1)
new /obj/item/weapon/spacecash(loc)
new /obj/item/weapon/money(loc)
if(10)
new /obj/item/weapon/spacecash/c10(loc)
new /obj/item/weapon/money/c10(loc)
if(20)
new /obj/item/weapon/spacecash/c20(loc)
new /obj/item/weapon/money/c20(loc)
if(50)
new /obj/item/weapon/spacecash/c50(loc)
new /obj/item/weapon/money/c50(loc)
if(100)
new /obj/item/weapon/spacecash/c100(loc)
new /obj/item/weapon/money/c100(loc)
if(200)
new /obj/item/weapon/spacecash/c200(loc)
new /obj/item/weapon/money/c200(loc)
if(500)
new /obj/item/weapon/spacecash/c500(loc)
new /obj/item/weapon/money/c500(loc)
if(1000)
new /obj/item/weapon/spacecash/c1000(loc)
new /obj/item/weapon/money/c1000(loc)
else
usr << browse("You don't have that much money!<br/><a href=\"?src=\ref[src]\">Back</a>","window=atm")
return
+32
View File
@@ -7,27 +7,59 @@
if("help")
usr.a_intent = "disarm"
usr.hud_used.action_intent.icon_state = "disarm"
usr.hud_used.hurt_intent.icon_state = "harm_small"
usr.hud_used.help_intent.icon_state = "help_small"
usr.hud_used.grab_intent.icon_state = "grab_small"
usr.hud_used.disarm_intent.icon_state = "disarm_small_active"
if("disarm")
usr.a_intent = "hurt"
usr.hud_used.action_intent.icon_state = "harm"
usr.hud_used.hurt_intent.icon_state = "harm_small_active"
usr.hud_used.help_intent.icon_state = "help_small"
usr.hud_used.grab_intent.icon_state = "grab_small"
usr.hud_used.disarm_intent.icon_state = "disarm_small"
if("hurt")
usr.a_intent = "grab"
usr.hud_used.action_intent.icon_state = "grab"
usr.hud_used.hurt_intent.icon_state = "harm_small"
usr.hud_used.help_intent.icon_state = "help_small"
usr.hud_used.grab_intent.icon_state = "grab_small_active"
usr.hud_used.disarm_intent.icon_state = "disarm_small"
if("grab")
usr.a_intent = "help"
usr.hud_used.action_intent.icon_state = "help"
usr.hud_used.hurt_intent.icon_state = "harm_small"
usr.hud_used.help_intent.icon_state = "help_small_active"
usr.hud_used.grab_intent.icon_state = "grab_small"
usr.hud_used.disarm_intent.icon_state = "disarm_small"
else if(changeto == -1)
switch(usr.a_intent)
if("help")
usr.a_intent = "grab"
usr.hud_used.action_intent.icon_state = "grab"
usr.hud_used.hurt_intent.icon_state = "harm_small"
usr.hud_used.help_intent.icon_state = "help_small"
usr.hud_used.grab_intent.icon_state = "grab_small_active"
usr.hud_used.disarm_intent.icon_state = "disarm_small"
if("disarm")
usr.a_intent = "help"
usr.hud_used.action_intent.icon_state = "help"
usr.hud_used.hurt_intent.icon_state = "harm_small"
usr.hud_used.help_intent.icon_state = "help_small_active"
usr.hud_used.grab_intent.icon_state = "grab_small"
usr.hud_used.disarm_intent.icon_state = "disarm_small"
if("hurt")
usr.a_intent = "disarm"
usr.hud_used.action_intent.icon_state = "disarm"
usr.hud_used.hurt_intent.icon_state = "harm_small"
usr.hud_used.help_intent.icon_state = "help_small"
usr.hud_used.grab_intent.icon_state = "grab_small"
usr.hud_used.disarm_intent.icon_state = "disarm_small_active"
if("grab")
usr.a_intent = "hurt"
usr.hud_used.action_intent.icon_state = "harm"
usr.hud_used.hurt_intent.icon_state = "harm_small_active"
usr.hud_used.help_intent.icon_state = "help_small"
usr.hud_used.grab_intent.icon_state = "grab_small"
usr.hud_used.disarm_intent.icon_state = "disarm_small"
return
+5 -5
View File
@@ -175,9 +175,9 @@ A list of items and costs is stored under the datum of every game mode, alongsid
if(text2num(href_list["cost"]) > uses) // Not enough crystals for the item
return 0
//if(usr:mind && ticker.mode.traitors[usr:mind])
//var/datum/traitorinfo/info = ticker.mode.traitors[usr:mind]
//info.spawnlist += href_list["buy_item"]
if(usr:mind && ticker.mode.traitors[usr:mind])
var/datum/traitorinfo/info = ticker.mode.traitors[usr:mind]
info.spawnlist += href_list["buy_item"]
uses -= text2num(href_list["cost"])
@@ -268,7 +268,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
else
item:loc = get_turf(A)
usr.update_clothing()
// usr.client.onBought("[item:name]") When we have the stats again, uncomment.
usr.client.onBought("[item:name]")
/* if(istype(item, /obj/spawner)) // Spawners need to have del called on them to avoid leaving a marker behind
del item*/
//HEADFINDBACK
@@ -371,7 +371,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
item:loc = get_turf(A)
/* if(istype(item, /obj/spawner)) // Spawners need to have del called on them to avoid leaving a marker behind
del item*/
// usr.client.onBought("[item:name]") When we have the stats again, uncomment.
usr.client.onBought("[item:name]")
src.attack_self(usr)
return
+11 -3
View File
@@ -49,11 +49,19 @@
end = get_turf(locate(end.x+d,end.y,end.z))
dir = "h"
while (cur!=end)
var/can_place = 1
while (cur!=end && can_place)
if(cur.density == 1)
usr << "\blue You can't run [src] through a wall!"
return
can_place = 0
else
for(var/obj/O in cur)
if(O.density)
can_place = 0
break
cur = get_step_towards(cur,end)
if (!can_place)
usr << "\blue You can't run \the [src] through that!"
return
cur = start
var/tapetest = 0
@@ -1,48 +1,65 @@
//This looks to be the traitor win tracker code. Gonna comment it out as we lack it currently.
/*
//This looks to be the traitor win tracker code.
client/proc/add_roundsjoined()
if(!makejson)
return
var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
if(!dbcon.IsConnected()) return
var/DBQuery/cquery = dbcon.NewQuery("INSERT INTO `roundsjoined` (`ckey`) VALUES ('[ckey(src.key)]')")
if(!cquery.Execute()) message_admins(cquery.ErrorMsg())
client/proc/add_roundssurvived()
if(!makejson)
return
var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
if(!dbcon.IsConnected()) return
var/DBQuery/cquery = dbcon.NewQuery("INSERT INTO `roundsurvived` (`ckey`) VALUES ('[ckey(src.key)]')")
if(!cquery.Execute()) message_admins(cquery.ErrorMsg())
client/proc/onDeath(var/mob/A = src.mob)
client/proc/onDeath()
if(!makejson)
return
roundinfo.deaths++
if(!ismob(A))
if(!ismob(mob))
return
var/ckey = src.ckey
var/area
var/area = get_area(mob)
var/attacker
var/tod = time2text(world.realtime)
var/health
var/last
if(isturf(A.loc))
area = A.loc:loc:name
else
area = A.loc:name
if(ishuman(A.lastattacker))
attacker = A.lastattacker:name
if(ishuman(mob.lastattacker))
attacker = mob.lastattacker:name
else
attacker = "None"
health = "Oxy:[A.oxyloss]Brute:[A.bruteloss]Burn:[A.fireloss]Toxins:[A.toxloss]"
if(A.logs.len >= 1)
last = A.logs[A.logs.len]
health = "Oxy:[mob.oxyloss]Brute:[mob.bruteloss]Burn:[mob.fireloss]Toxins:[mob.toxloss]Brain:[mob.brainloss]"
if(mob.attack_log.len >= 1)
last = mob.attack_log[mob.attack_log.len]
else
last = "None"
var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
if(!dbcon.IsConnected()) return
var/DBQuery/cquery = dbcon.NewQuery("INSERT INTO `deathlog` (`ckey`,`location`,`lastattacker`,`ToD`,`health`,`lasthit`) VALUES ('[ckey]',[dbcon.Quote(area)],[dbcon.Quote(attacker)],'[tod]','[health]',[dbcon.Quote(last)])")
if(!cquery.Execute()) message_admins(cquery.ErrorMsg())
client/proc/onBought(names)
if(!makejson) return
if(!names) return
var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
if(!dbcon.IsConnected()) return
var/DBQuery/cquery = dbcon.NewQuery("INSERT INTO `traitorbuy` (`type`) VALUES ([dbcon.Quote(names)])")
if(!cquery.Execute()) message_admins(cquery.ErrorMsg())
*/
datum/roundinfo
var/core = 0
+5 -4
View File
@@ -1,8 +1,9 @@
//May expand later, but right now it just repairs lights.
/obj/item/device/portalathe
name = "\improper Portable Autolathe"
desc = "It blinks and has an antenna on it. It must be advanced."
icon_state = "t-ray0"
name = "portable autolathe"
desc = "A device which can repair broken lights instantly. Must be advanced."
icon = 'janitor.dmi'
icon_state = "portalathe"
afterattack(var/atom/target, mob/user as mob)
if(!target || !user)
@@ -16,5 +17,5 @@
L.status = 0
L.on = 1
L.update()
user.visible_message("[user] repairs \the [target] on the spot with their [src]!","You repair the lightbulb!")
user.visible_message("[user] repairs \the [target] on the spot with their [src]!","You repair the lightbulb!","You hear a soft whiiir-pop noise over the sound of flexing glass, followed by the soft hum of an activated [target].")
return
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06
/obj/item/weapon/stamperaser
name = "eraser"
desc = "It looks like some kind of eraser."
@@ -15,10 +17,9 @@
var/on = 0
flags = FPRINT|TABLEPASS
w_class = 1
var
list/obj/item/device/radio/Old = list()
list/obj/item/device/radio/Curr = list()
time_remaining = 5
var/list/obj/item/device/radio/Old = list()
var/list/obj/item/device/radio/Curr = list()
var/time_remaining = 5
/obj/item/device/jammer/New()
..()
@@ -72,4 +73,4 @@
icon_state = "t-ray0"
sleep(2)
*/
*/
+4 -3
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06
/obj/item/wardrobe
name = "\improper Wardrobe"
desc = "A standard-issue bag for clothing and equipment. Usually comes sealed, stocked with everything you need for a particular job."
@@ -6,9 +8,8 @@
item_state = "wardrobe"
w_class = 4
layer = 2.99
var
descriptor = "various clothing"
seal_torn = 0
var/descriptor = "various clothing"
var/seal_torn = 0
attack_self(mob/user)
if(!contents.len)
+19 -16
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06
/*
TODO:
@@ -15,15 +17,14 @@ log transactions
anchored = 1
use_power = 1
idle_power_usage = 10
var
obj/item/weapon/card/id/card
obj/item/weapon/spacecash/cashes = list()
inserted = 0
accepted = 0
pincode = 0
var/obj/item/weapon/card/id/card
var/obj/item/weapon/money/cashes = list()
var/inserted = 0
var/accepted = 0
var/pincode = 0
attackby(var/obj/A, var/mob/user)
if(istype(A,/obj/item/weapon/spacecash))
if(istype(A,/obj/item/weapon/money))
cashes += A
user.drop_item()
A.loc = src
@@ -100,21 +101,21 @@ log transactions
card.money -= amount
switch(amount)
if(1)
new /obj/item/weapon/spacecash(loc)
new /obj/item/weapon/money(loc)
if(10)
new /obj/item/weapon/spacecash/c10(loc)
new /obj/item/weapon/money/c10(loc)
if(20)
new /obj/item/weapon/spacecash/c20(loc)
new /obj/item/weapon/money/c20(loc)
if(50)
new /obj/item/weapon/spacecash/c50(loc)
new /obj/item/weapon/money/c50(loc)
if(100)
new /obj/item/weapon/spacecash/c100(loc)
new /obj/item/weapon/money/c100(loc)
if(200)
new /obj/item/weapon/spacecash/c200(loc)
new /obj/item/weapon/money/c200(loc)
if(500)
new /obj/item/weapon/spacecash/c500(loc)
new /obj/item/weapon/money/c500(loc)
if(1000)
new /obj/item/weapon/spacecash/c1000(loc)
new /obj/item/weapon/money/c1000(loc)
else
user << "\red Error: Insufficient funds."
return
@@ -143,7 +144,7 @@ log transactions
if (usr.machine==src && get_dist(src, usr) <= 1 || istype(usr, /mob/living/silicon/ai))
if(href_list["eca"])
if(accepted)
for(var/obj/item/weapon/spacecash/M in cashes)
for(var/obj/item/weapon/money/M in cashes)
M.loc = loc
inserted = 0
if(!cashes)
@@ -154,6 +155,8 @@ log transactions
if(accepted)
card.money += inserted
inserted = 0
if(cashes)
cashes = null
if(href_list["lock"])
card = null
accepted = 0
+16 -15
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06
// pure concentrated antibodies
datum/reagent/antibodies
data = new/list("antibodies"=0)
@@ -16,20 +18,19 @@ datum/reagent/antibodies
return
// reserving some numbers for later special antigens
var/global/const
ANTIGEN_A = 1
ANTIGEN_B = 2
ANTIGEN_RH = 4
ANTIGEN_Q = 8
ANTIGEN_U = 16
ANTIGEN_V = 32
ANTIGEN_X = 64
ANTIGEN_Y = 128
ANTIGEN_Z = 256
ANTIGEN_M = 512
ANTIGEN_N = 1024
ANTIGEN_P = 2048
ANTIGEN_O = 4096
var/global/const/ANTIGEN_A = 1
var/global/const/ANTIGEN_B = 2
var/global/const/ANTIGEN_RH = 4
var/global/const/ANTIGEN_Q = 8
var/global/const/ANTIGEN_U = 16
var/global/const/ANTIGEN_V = 32
var/global/const/ANTIGEN_X = 64
var/global/const/ANTIGEN_Y = 128
var/global/const/ANTIGEN_Z = 256
var/global/const/ANTIGEN_M = 512
var/global/const/ANTIGEN_N = 1024
var/global/const/ANTIGEN_P = 2048
var/global/const/ANTIGEN_O = 4096
var/global/list/ANTIGENS = list("[ANTIGEN_A]" = "A", "[ANTIGEN_B]" = "B", "[ANTIGEN_RH]" = "RH", "[ANTIGEN_Q]" = "Q",
"[ANTIGEN_U]" = "U", "[ANTIGEN_V]" = "V", "[ANTIGEN_Z]" = "Z", "[ANTIGEN_M]" = "M",
@@ -53,4 +54,4 @@ var/global/list/ANTIGENS = list("[ANTIGEN_A]" = "A", "[ANTIGEN_B]" = "B", "[ANTI
// iterate over the list of antigens and see what matches
var/code = ""
for(var/V in ANTIGENS) if(text2num(V) & M.antibodies) code += ANTIGENS[V]
user << text("\blue [src] The antibody scanner displays a cryptic set of data: [code]")
user << text("\blue [src] The antibody scanner displays a cryptic set of data: [code]")
+192 -121
View File
@@ -47,10 +47,6 @@ proc/airborne_can_reach(turf/source, turf/target)
return
if(!disease)
return
//immunity
/*for(var/iii = 1, iii <= M.immunevirus2.len, iii++)
if(disease.issame(M.immunevirus2[iii]))
return*/
// if one of the antibodies in the mob's body matches one of the disease's antigens, don't infect
if(M.antibodies & disease.antigen != 0) return
@@ -266,7 +262,6 @@ proc/airborne_can_reach(turf/source, turf/target)
proc/getcopy()
// world << "getting copy"
var/datum/disease2/disease/disease = new /datum/disease2/disease
disease.infectionchance = infectionchance
disease.spreadtype = spreadtype
@@ -274,7 +269,6 @@ proc/airborne_can_reach(turf/source, turf/target)
disease.antigen = antigen
disease.uniqueID = uniqueID
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
@@ -283,8 +277,6 @@ proc/airborne_can_reach(turf/source, turf/target)
newholder.happensonce = holder.happensonce
newholder.stage = holder.stage
disease.effects += newholder
// world << "[newholder.effect.name]"
// world << "[disease]"
return disease
proc/spread_airborne(var/mob/living/carbon/mob)
@@ -298,9 +290,17 @@ proc/airborne_can_reach(turf/source, turf/target)
var/name = "Blanking effect"
var/stage = 4
var/maxm = 1
var/happensalways = 0
proc/activate(var/mob/living/carbon/mob,var/multiplier)
proc/deactivate(var/mob/living/carbon/mob)
// ================================
// ======= DISEASE SYMPTOMS =======
// ================================
// Special diseases
// --------------------------------
/datum/disease2/effect/alien
name = "Unidentified Foreign Body"
stage = 4
@@ -317,11 +317,68 @@ proc/airborne_can_reach(turf/source, turf/target)
mob:gib()
del D
/datum/disease2/effect/greater/gibbingtons
name = "Gibbingtons Syndrome"
stage = 4
// Greater Diseases, Stage 1
// --------------------------------
/datum/disease2/effect/greater/gunck
name = "Flemmingtons"
stage = 1
activate(var/mob/living/carbon/mob,var/multiplier)
mob.gib()
mob << "\red Mucous runs down the back of your throat."
// Greater Diseases, Stage 2
// --------------------------------
/datum/disease2/effect/greater/cough
name = "Anima Syndrome"
stage = 2
activate(var/mob/living/carbon/mob,var/multiplier)
mob.say("*cough")
if(mob.virus2) mob.virus2.spread_airborne(mob)
if(mob.virus2) mob.virus2.spread_airborne(mob)
if(prob(2))
var/obj/effect/decal/cleanable/mucus/this = new(mob.loc)
this.virus2 = mob.virus2
/datum/disease2/effect/greater/vomit
name = "Bad Stomach Syndrome"
stage = 2
activate(var/mob/living/carbon/mob,var/multiplier)
if(prob(20) && mob.nutrition > 200)
mob.vomit()
/datum/disease2/effect/greater/sneeze
name = "Coldingtons Effect"
stage = 2
activate(var/mob/living/carbon/mob,var/multiplier)
mob.say("*sneeze")
if(mob.virus2) mob.virus2.spread_airborne(mob)
if(mob.virus2) mob.virus2.spread_airborne(mob)
if(prob(5))
var/obj/effect/decal/cleanable/mucus/this = new(mob.loc)
this.anchored = 0
step(this, mob.dir)
this.anchored = 1
this.virus2 = mob.virus2
// Greater Diseases, Stage 3
// --------------------------------
/datum/disease2/effect/greater/sleepy
name = "Resting syndrome"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.say("*collapse")
/datum/disease2/effect/greater/mind
name = "Lazy mind syndrome"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.setBrainLoss(50)
/datum/disease2/effect/greater/hallucinations
name = "Hallucinational Syndrome"
@@ -329,12 +386,6 @@ proc/airborne_can_reach(turf/source, turf/target)
activate(var/mob/living/carbon/mob,var/multiplier)
mob.hallucination += 25
/datum/disease2/effect/greater/radian
name = "Radian's syndrome"
stage = 4
maxm = 2
activate(var/mob/living/carbon/mob,var/multiplier)
mob.radiation += (20*multiplier)
/datum/disease2/effect/greater/toxins
name = "Hyperacid Syndrome"
@@ -356,6 +407,38 @@ proc/airborne_can_reach(turf/source, turf/target)
activate(var/mob/living/carbon/mob,var/multiplier)
shake_camera(mob,5*multiplier)
/datum/disease2/effect/greater/telepathic
name = "Telepathy Syndrome"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.mutations |= 512
// Greater Diseases, Stage 4
// --------------------------------
/datum/disease2/effect/greater/gibbingtons
name = "Gibbingtons Syndrome"
stage = 4
activate(var/mob/living/carbon/mob,var/multiplier)
mob.gib()
/datum/disease2/effect/greater/blood_fountain
name = "Blood Fountain Syndrome"
stage = 4
activate(var/mob/living/carbon/mob,var/multiplier)
if(prob(20))
mob.visible_message("\red You see a fountain of blood erupt from [mob.name].","\red <b>Something wet is leaking from you.</b>","You hear a loud splash.")
mob.drip(50)
/datum/disease2/effect/greater/radian
name = "Radian's syndrome"
stage = 4
maxm = 2
activate(var/mob/living/carbon/mob,var/multiplier)
mob.radiation += (20*multiplier)
/datum/disease2/effect/greater/fever
name = "Fever syndrome"
stage = 4
@@ -363,6 +446,7 @@ proc/airborne_can_reach(turf/source, turf/target)
activate(var/mob/living/carbon/mob,var/multiplier)
mob.adjustFireLoss(10 * multiplier)
/datum/disease2/effect/greater/weak_bones
name = "Bone Density Syndrome"
stage = 4
@@ -371,7 +455,7 @@ proc/airborne_can_reach(turf/source, turf/target)
var/name = pick(mob.organs)
var/datum/organ/external/organ = mob.organs[name]
if(!organ.broken)
if(!organ.broken && !organ.robot)
mob.adjustBruteLoss(10)
mob.visible_message("\red You hear a loud cracking sound coming from [mob.name].","\red <b>Something feels like it shattered in your [organ.display_name]!</b>","You hear a sickening crack.")
mob.emote("scream")
@@ -379,17 +463,6 @@ proc/airborne_can_reach(turf/source, turf/target)
organ.wound = pick("broken","fracture","hairline fracture") //Randomise in future. Edit: Randomized. --SkyMarshal
organ.perma_injury = 10
/datum/disease2/effect/invisible
name = "Waiting Syndrome"
stage = 1
activate(var/mob/living/carbon/mob,var/multiplier)
return
/datum/disease2/effect/greater/telepathic
name = "Telepathy Syndrome"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.mutations |= 512
/datum/disease2/effect/greater/monkey
name = "Monkism syndrome"
@@ -399,37 +472,6 @@ proc/airborne_can_reach(turf/source, turf/target)
var/mob/living/carbon/human/h = mob
h.monkeyize()
/datum/disease2/effect/greater/sneeze
name = "Coldingtons Effect"
stage = 2
activate(var/mob/living/carbon/mob,var/multiplier)
mob.say("*sneeze")
if(mob.virus2) mob.virus2.spread_airborne(mob)
if(mob.virus2) mob.virus2.spread_airborne(mob)
if(prob(5))
var/obj/effect/decal/cleanable/mucus/this = new(mob.loc)
this.anchored = 0
step(this, mob.dir)
this.anchored = 1
this.virus2 = mob.virus2
/datum/disease2/effect/greater/cough
name = "Anima Syndrome"
stage = 2
activate(var/mob/living/carbon/mob,var/multiplier)
mob.say("*cough")
if(mob.virus2) mob.virus2.spread_airborne(mob)
if(mob.virus2) mob.virus2.spread_airborne(mob)
if(prob(2))
var/obj/effect/decal/cleanable/mucus/this = new(mob.loc)
this.virus2 = mob.virus2
/datum/disease2/effect/greater/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/greater/killertoxins
name = "Toxification syndrome"
@@ -437,36 +479,9 @@ proc/airborne_can_reach(turf/source, turf/target)
activate(var/mob/living/carbon/mob,var/multiplier)
mob.adjustToxLoss(15)
/datum/disease2/effect/greater/sleepy
name = "Resting syndrome"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.say("*collapse")
/datum/disease2/effect/greater/mind
name = "Lazy mind syndrome"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.setBrainLoss(50)
// lesser syndromes, partly just copypastes
/datum/disease2/effect/lesser/hallucinations
name = "Hallucinational Syndrome"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.hallucination += 5
/datum/disease2/effect/lesser/mind
name = "Lazy mind syndrome"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.setBrainLoss(20)
/datum/disease2/effect/lesser/deaf
name = "Hard of hearing syndrome"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.ear_deaf = 5
// Lesser Diseases, Stage 1
// --------------------------------
/datum/disease2/effect/lesser/gunck
name = "Flemmingtons"
@@ -474,13 +489,30 @@ proc/airborne_can_reach(turf/source, turf/target)
activate(var/mob/living/carbon/mob,var/multiplier)
mob << "\red Mucous runs down the back of your throat."
/datum/disease2/effect/lesser/radian
name = "Radian's syndrome"
stage = 4
maxm = 3
/datum/disease2/effect/lesser/fridge
name = "Refridgerator Syndrome"
stage = 1
activate(var/mob/living/carbon/mob,var/multiplier)
mob.radiation += 1
if(prob(10)) mob << "\blue You feel extremely cold."
/datum/disease2/effect/lesser/pale
name = "Ghost Effect"
stage = 1
activate(var/mob/living/carbon/mob,var/multiplier)
mob << "\blue If you had a mirror, your reflection would probably look very pale.."
/datum/disease2/effect/lesser/hoarse
name = "Hoarse Throat"
stage = 1
happensalways = 1 // the mob will have a permanently sore throat
activate(var/mob/living/carbon/mob,var/multiplier)
mob.disease_symptoms |= DISEASE_HOARSE
if(prob(3)) mob << "\blue Your throat feels very sore.."
// Lesser Diseases, Stage 2
// --------------------------------
/datum/disease2/effect/lesser/sneeze
name = "Coldingtons Effect"
stage = 2
@@ -506,19 +538,49 @@ proc/airborne_can_reach(turf/source, turf/target)
var/obj/effect/decal/cleanable/mucus/this = new(mob.loc)
this.virus2 = mob.virus2
/*/datum/disease2/effect/lesser/arm
name = "Disarming Syndrome"
stage = 4
/datum/disease2/effect/lesser/nosebleed
name = "Nosebleed Effect"
stage = 2
activate(var/mob/living/carbon/mob,var/multiplier)
var/datum/organ/external/org = mob.organs["r_arm"]
org.take_damage(3,0,0,0)
mob << "\red You feel a sting in your right arm."*/
if(prob(30))
mob.drip(1)
// Lesser Diseases, Stage 3
// --------------------------------
/datum/disease2/effect/lesser/vomit
name = "Bad Stomach Syndrome"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
if(prob(5) && mob.nutrition > 200)
mob.vomit()
// lesser syndromes, partly just copypastes
/datum/disease2/effect/lesser/hallucinations
name = "Hallucinational Syndrome"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.hallucination += 5
/datum/disease2/effect/lesser/mind
name = "Lazy mind syndrome"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.setBrainLoss(20)
/datum/disease2/effect/lesser/deaf
name = "Hard of hearing syndrome"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.ear_deaf = 5
/datum/disease2/effect/lesser/hungry
name = "Appetiser Effect"
stage = 3
stage = 2
activate(var/mob/living/carbon/mob,var/multiplier)
mob.nutrition = max(0, mob.nutrition - 3)
mob.nutrition = max(0, mob.nutrition - 1)
/datum/disease2/effect/lesser/groan
name = "Groaning Syndrome"
@@ -526,24 +588,12 @@ proc/airborne_can_reach(turf/source, turf/target)
activate(var/mob/living/carbon/mob,var/multiplier)
mob.say("*groan")
/datum/disease2/effect/lesser/fridge
name = "Refridgerator Syndrome"
stage = 1
activate(var/mob/living/carbon/mob,var/multiplier)
mob.say("*shiver")
/datum/disease2/effect/lesser/twitch
name = "Twitcher"
stage = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.say("*twitch")
/datum/disease2/effect/lesser/pale
name = "Ghost Effect"
stage = 1
activate(var/mob/living/carbon/mob,var/multiplier)
if(prob(10))
mob.emote("me",1,"looks very pale.")
if(prob(5)) mob.say("*twitch")
if(prob(20)) mob << "\blue Your muscles feel twitchy.."
/datum/disease2/effect/lesser/stumble
name = "Poor Balance Syndrome"
@@ -556,11 +606,32 @@ proc/airborne_can_reach(turf/source, turf/target)
step(mob, pick(cardinal))
mob.emote("me",1,"stumbles over their own feet.")
/datum/disease2/effect/lesser/hoarse
name = "Hoarse Throat"
// Lesser Diseases, Stage 4
// --------------------------------
/datum/disease2/effect/lesser/radian
name = "Radian's syndrome"
stage = 4
maxm = 3
activate(var/mob/living/carbon/mob,var/multiplier)
mob.radiation += 1
// ============
// END SYMPTOMS
// ============
/datum/disease2/effect/invisible
name = "Waiting Syndrome"
stage = 1
activate(var/mob/living/carbon/mob,var/multiplier)
mob.disease_symptoms |= DISEASE_HOARSE
return
var/global/const/DISEASE_HOARSE = 2
var/global/const/DISEASE_WHISPER = 4
@@ -579,7 +650,7 @@ var/global/const/DISEASE_WHISPER = 4
var/stage = 0
proc/runeffect(var/mob/living/carbon/human/mob,var/stage)
if(happensonce > -1 && effect.stage <= stage && prob(chance))
if(effect.stage <= stage) if(effect.happensalways || (happensonce > -1 && prob(chance)))
effect.activate(mob)
if(happensonce == 1)
happensonce = -1
+100 -302
View File
@@ -12,31 +12,16 @@ atom/movable/airflow_speed
The speed (1-15) at which a flying object is traveling to airflow_dest. Decays over time.
CALLABLE PROCS:
AirflowRepel(turf/T, n, per)
Causes objects to fly away from a point within a single zone.
Called manually by air releasers. T is the location of the expanding gas.
n is the pressure released. per indicates that n is a percent value if nonzero.
RETURNS: Null
AirflowAttract(turf/T, n, per)
Causes objects to fly to a point within a single zone.
Called manually by air consumers. T is the location of the attractor.
n is the pressure consumed. per indicates that n is a percent value if nonzero.
RETURNS: Null
OVERLOADABLE PROCS:
mob/airflow_stun()
Contains checks for and results of being stunned by airflow.
Called when airflow quantities exceed AF_HUMAN_STUN_THRESHOLD.
Called when airflow quantities exceed airflow_medium_pressure.
RETURNS: Null
atom/movable/check_airflow_movable(n)
Contains checks for moving any object due to airflow.
n is the percent of 1 Atmosphere that is flowing.
n is the pressure that is flowing.
RETURNS: 1 if the object moves under the air conditions, 0 if it stays put.
atom/movable/airflow_hit(atom/A)
@@ -47,10 +32,9 @@ atom/movable/airflow_hit(atom/A)
AUTOMATIC PROCS:
Airflow(zone/A, zone/B, n)
Airflow(zone/A, zone/B)
Causes objects to fly along a pressure gradient.
Called by zone updates. A and B are two connected zones.
n is the pressure difference between them.
AirflowSpace(zone/A)
Causes objects to fly into space.
@@ -64,115 +48,17 @@ atom/movable/RepelAirflowDest(n)
*/
var/tick_multiplier = 2
vs_control/var
zone_update_delay = 10
zone_update_delay_NAME = "Zone Update Delay"
zone_update_delay_DESC = "The delay in ticks between updates of zones. Increase if lag is bad seemingly because of air."
airflow_lightest_pressure = 15
airflow_light_pressure = 30
airflow_medium_pressure = 45
airflow_heavy_pressure = 60
airflow_heaviest_pressure = 100
zone_share_percent = 2
zone_share_percent_NAME = "Zone Connection Transfer %"
zone_share_percent_DESC = "Percent of gas per connected tile that is shared between zones."
//Used in /mob/carbon/human/life
OXYGEN_LOSS = 2
OXYGEN_LOSS_NAME = "Damage - Oxygen Loss"
OXYGEN_LOSS_DESC = "A multiplier for damage due to lack of air, CO2 poisoning, and vacuum. Does not affect oxyloss\
from being incapacitated or dying."
TEMP_DMG = 2
TEMP_DMG_NAME = "Damage - Temperature"
TEMP_DMG_DESC = "A multiplier for damage due to body temperature irregularities."
BURN_DMG = 6
BURN_DMG_NAME = "Damage - Fire"
BURN_DMG_DESC = "A multiplier for damage due to direct fire exposure."
AF_TINY_MOVEMENT_THRESHOLD = 50 //% difference to move tiny items.
AF_TINY_MOVEMENT_THRESHOLD_NAME = "Airflow - Tiny Movement Threshold %"
AF_TINY_MOVEMENT_THRESHOLD_DESC = "Percent of 1 Atm. at which items with the tiny weight class will move."
AF_SMALL_MOVEMENT_THRESHOLD = 70 //% difference to move small items.
AF_SMALL_MOVEMENT_THRESHOLD_NAME = "Airflow - Small Movement Threshold %"
AF_SMALL_MOVEMENT_THRESHOLD_DESC = "Percent of 1 Atm. at which items with the small weight class will move."
AF_NORMAL_MOVEMENT_THRESHOLD = 90 //% difference to move normal items.
AF_NORMAL_MOVEMENT_THRESHOLD_NAME = "Airflow - Normal Movement Threshold %"
AF_NORMAL_MOVEMENT_THRESHOLD_DESC = "Percent of 1 Atm. at which items with the normal weight class will move."
AF_LARGE_MOVEMENT_THRESHOLD = 100 //% difference to move large and huge items.
AF_LARGE_MOVEMENT_THRESHOLD_NAME = "Airflow - Large Movement Threshold %"
AF_LARGE_MOVEMENT_THRESHOLD_DESC = "Percent of 1 Atm. at which items with the large or huge weight class will move."
AF_DENSE_MOVEMENT_THRESHOLD = 120 //% difference to move dense crap and mobs.
AF_DENSE_MOVEMENT_THRESHOLD_NAME = "Airflow - Dense Movement Threshold %"
AF_DENSE_MOVEMENT_THRESHOLD_DESC = "Percent of 1 Atm. at which dense objects (canisters, etc.) will be shifted by airflow."
AF_MOB_MOVEMENT_THRESHOLD = 175
AF_MOB_MOVEMENT_THRESHOLD_NAME = "Airflow - Human Movement Threshold %"
AF_MOB_MOVEMENT_THRESHOLD_DESC = "Percent of 1 Atm. at which mobs will be shifted by airflow."
AF_HUMAN_STUN_THRESHOLD = 130
AF_HUMAN_STUN_THRESHOLD_NAME = "Airflow - Human Stun Threshold %"
AF_HUMAN_STUN_THRESHOLD_DESC = "Percent of 1 Atm. at which living things are stunned or knocked over."
AF_PERCENT_OF = ONE_ATMOSPHERE
AF_PERCENT_OF_NAME = "Airflow - 100% Pressure"
AF_PERCENT_OF_DESC = "Normally set to 1 Atm. in kPa, this indicates what pressure is considered 100% by the system."
AF_SPEED_MULTIPLIER = 4 //airspeed per movement threshold value crossed.
AF_SPEED_MULTIPLIER_NAME = "Airflow - Speed Increase per 10%"
AF_SPEED_MULTIPLIER_DESC = "Velocity increase of shifted items per 10% of airflow."
AF_DAMAGE_MULTIPLIER = 5 //Amount of damage applied per airflow_speed.
AF_DAMAGE_MULTIPLIER_NAME = "Airflow - Damage Per Velocity"
AF_DAMAGE_MULTIPLIER_DESC = "Amount of damage applied per unit of speed (1-15 units) at which mobs are thrown."
AF_STUN_MULTIPLIER = 1.5 //Seconds of stun applied per airflow_speed.
AF_STUN_MULTIPLIER_NAME = "Airflow - Stun Per Velocity"
AF_STUN_MULTIPLIER_DESC = "Amount of stun effect applied per unit of speed (1-15 units) at which mobs are thrown."
AF_SPEED_DECAY = 0.5 //Amount that flow speed will decay with time.
AF_SPEED_DECAY_NAME = "Airflow - Velocity Lost per Tick"
AF_SPEED_DECAY_DESC = "Amount of airflow speed lost per tick on a moving object."
AF_SPACE_MULTIPLIER = 2 //Increasing this will make space connections more DRAMATIC!
AF_SPACE_MULTIPLIER_NAME = "Airflow - Space Airflow Multiplier"
AF_SPACE_MULTIPLIER_DESC = "Increasing this multiplier will cause more powerful airflow to space."
AF_CANISTER_MULTIPLIER = 0.25
AF_CANISTER_MULTIPLIER_NAME = "Airflow - Canister Airflow Multiplier"
AF_CANISTER_MULTIPLIER_DESC = "Increasing this multiplier will cause more powerful airflow from single-tile sources like canisters."
mob/proc
Change_Airflow_Constants()
set category = "Debug"
var/choice = input("Which constant will you modify?","Change Airflow Constants")\
as null|anything in list("Movement Threshold","Speed Multiplier","Damage Multiplier","Stun Multiplier","Speed Decay")
var/n
switch(choice)
if("Movement Threshold")
n = input("What will you change it to","Change Airflow Constants",vsc.AF_DENSE_MOVEMENT_THRESHOLD) as num
n = max(1,n)
vsc.AF_DENSE_MOVEMENT_THRESHOLD = n
world.log << "vsc.AF_DENSE_MOVEMENT_THRESHOLD set to [n]."
if("Speed Multiplier")
n = input("What will you change it to","Change Airflow Constants",vsc.AF_SPEED_MULTIPLIER) as num
n = max(1,n)
vsc.AF_SPEED_MULTIPLIER = n
world.log << "vsc.AF_SPEED_MULTIPLIER set to [n]."
if("Damage Multiplier")
n = input("What will you change it to","Change Airflow Constants",vsc.AF_DAMAGE_MULTIPLIER) as num
vsc.AF_DAMAGE_MULTIPLIER = n
world.log << "AF_DAMAGE_MULTIPLIER set to [n]."
if("Stun Multiplier")
n = input("What will you change it to","Change Airflow Constants",vsc.AF_STUN_MULTIPLIER) as num
vsc.AF_STUN_MULTIPLIER = n
world.log << "AF_STUN_MULTIPLIER set to [n]."
if("Speed Decay")
n = input("What will you change it to","Change Airflow Constants",vsc.AF_SPEED_DECAY) as num
vsc.AF_SPEED_DECAY = n
world.log << "AF_SPEED_DECAY set to [n]."
if("Space Flow Multiplier")
n = input("What will you change it to","Change Airflow Constants",vsc.AF_SPEED_DECAY) as num
vsc.AF_SPEED_DECAY = n
world.log << "AF_SPEED_DECAY set to [n]."
//The main airflow code. Called by zone updates.
//Zones A and B are air zones. n represents the amount of air moved.
airflow_damage = 0.3
airflow_stun = 0.15
airflow_speed_decay = 1
mob/proc/airflow_stun()
if(weakened <= 0) src << "\red The sudden rush of air knocks you over!"
@@ -197,8 +83,7 @@ atom/movable/proc/check_airflow_movable(n)
if(anchored && !ismob(src)) return 0
if(!istype(src,/obj/item) && n < vsc.AF_DENSE_MOVEMENT_THRESHOLD) return 0
if(ismob(src) && n < vsc.AF_MOB_MOVEMENT_THRESHOLD) return 0
if(!istype(src,/obj/item) && n < vsc.airflow_heavy_pressure) return 0
return 1
@@ -213,177 +98,125 @@ obj/item/check_airflow_movable(n)
. = ..()
switch(w_class)
if(2)
if(n < vsc.AF_SMALL_MOVEMENT_THRESHOLD) return 0
if(n < vsc.airflow_lightest_pressure) return 0
if(3)
if(n < vsc.AF_NORMAL_MOVEMENT_THRESHOLD) return 0
if(n < vsc.airflow_light_pressure) return 0
if(4,5)
if(n < vsc.AF_LARGE_MOVEMENT_THRESHOLD) return 0
if(n < vsc.airflow_medium_pressure) return 0
proc/Airflow(zone/A,zone/B,n)
//The main airflow code. Called by zone updates.
//Zones A and B are air zones. n represents the amount of air moved.
//Now n is a percent of one atm.
n = round((n/vsc.AF_PERCENT_OF)*100,0.1)
proc/Airflow(zone/A,zone/B)
var/n = B.air.pressure - A.air.pressure
//Don't go any further if n is lower than the lowest value needed for airflow.
if(abs(n) < vsc.AF_TINY_MOVEMENT_THRESHOLD) return
if(abs(n) < vsc.airflow_lightest_pressure) return
//These turfs are the midway point between A and B, and will be the destination point for thrown objects.
var/list/connected_turfs = A.connections[B]
//Get lists of things that can be thrown across the room for each zone.
var/list/pplz = A.movables()
var/list/otherpplz = B.movables()
var/list/pplz = A.movable_objects
var/list/otherpplz = B.movable_objects
for(var/atom/movable/M in pplz)
if(M.last_airflow > world.time - 150) continue
//Check for knocking people over
if(ismob(M) && n > vsc.AF_HUMAN_STUN_THRESHOLD)
if(ismob(M) && n > vsc.airflow_medium_pressure)
if(M:nodamage) continue
M:airflow_stun()
if(M.check_airflow_movable(n))
//Check for things that are in range of the midpoint turfs.
var/fail = 1
var/list/close_turfs = list()
for(var/turf/U in connected_turfs)
if(M in range(U)) fail = 0
if(fail) continue
if(M in range(U)) close_turfs += U
if(!close_turfs.len) continue
//If they're already being tossed, don't do it again.
if(!M.airflow_speed)
M.airflow_dest = pick(connected_turfs) //Pick a random midpoint to fly towards.
M.airflow_dest = pick(close_turfs) //Pick a random midpoint to fly towards.
spawn M.GotoAirflowDest(abs(n) * (vsc.AF_SPEED_MULTIPLIER/10))
//Send the object flying at a speed determined by n and AF_SPEED_MULTIPLIER.
spawn M.GotoAirflowDest(abs(n)/5)
//Do it again for the stuff in the other zone, making it fly away.
for(var/atom/movable/M in otherpplz)
if(ismob(M) && abs(n) > vsc.AF_HUMAN_STUN_THRESHOLD)
if(M.last_airflow > world.time - 150) continue
if(ismob(M) && abs(n) > vsc.airflow_medium_pressure)
if(M:nodamage) continue
M:airflow_stun()
if(M.check_airflow_movable(abs(n)))
var/fail = 1
var/list/close_turfs = list()
for(var/turf/U in connected_turfs)
if(M in range(U)) fail = 0
if(fail) continue
if(M in range(U)) close_turfs += U
if(!close_turfs.len) continue
if(M && !M.airflow_speed)
//If they're already being tossed, don't do it again.
if(!M.airflow_speed)
M.airflow_dest = pick(connected_turfs)
M.airflow_dest = pick(close_turfs) //Pick a random midpoint to fly towards.
spawn M.RepelAirflowDest(abs(n) * (vsc.AF_SPEED_MULTIPLIER/10))
spawn M.RepelAirflowDest(abs(n)/5)
proc/AirflowSpace(zone/A)
//The space version of the Airflow(A,B,n) proc.
var/n = (A.air.oxygen + A.air.nitrogen + A.air.carbon_dioxide)*vsc.AF_SPACE_MULTIPLIER
//Here, n is determined by the space multiplier constant and the zone's air.
var/n = A.air.pressure
//Here, n is determined by only the pressure in the room.
n = round((n/vsc.AF_PERCENT_OF)*100,0.1)
if(n < vsc.AF_TINY_MOVEMENT_THRESHOLD) return
if(n < vsc.airflow_lightest_pressure) return
var/list/connected_turfs = A.space_tiles //The midpoints are now all the space connections.
var/list/pplz = A.movables() //We only need to worry about things in the zone, not things in space.
var/list/pplz = A.movable_objects //We only need to worry about things in the zone, not things in space.
for(var/atom/movable/M in pplz)
if(ismob(M) && n > vsc.AF_HUMAN_STUN_THRESHOLD)
if(M.last_airflow > world.time - 150) continue
if(ismob(M) && n > vsc.airflow_medium_pressure)
if(M:nodamage) continue
M:airflow_stun()
if(M.check_airflow_movable(n))
var/fail = 1
var/list/close_turfs = list()
for(var/turf/U in connected_turfs)
if(M in range(U)) fail = 0
if(fail) continue
if(M in range(U)) close_turfs += U
if(!close_turfs.len) continue
//If they're already being tossed, don't do it again.
if(!M.airflow_speed)
M.airflow_dest = pick(connected_turfs)
M.airflow_dest = pick(close_turfs) //Pick a random midpoint to fly towards.
spawn
if(M) M.GotoAirflowDest(n * (vsc.AF_SPEED_MULTIPLIER/10))
if(M) M.GotoAirflowDest(n/20)
//Sometimes shit breaks, and M isn't there after the spawn.
proc/AirflowRepel(turf/T,n,per = 0)
//This one is used for air escaping from canisters.
var/zone/A = T.zone
if(!A) return
n *= vsc.AF_CANISTER_MULTIPLIER
if(!per)
n = round((n/vsc.AF_PERCENT_OF) * 100,0.1)
if(n < 0) return
if(abs(n) > vsc.AF_TINY_MOVEMENT_THRESHOLD)
var/list/pplz = A.movables()
for(var/atom/movable/M in pplz)
var/relative_n = n / max(1,get_dist(T,M)/2)
if(ismob(M) && relative_n > vsc.AF_HUMAN_STUN_THRESHOLD)
if(M:nodamage) continue
M:airflow_stun()
if(M.check_airflow_movable(relative_n))
if(!(M in range(T))) continue //Recall that T is the center of the repelling force.
if(!M.airflow_speed)
M.airflow_dest = T
spawn M.RepelAirflowDest(relative_n * (vsc.AF_SPEED_MULTIPLIER/10))
proc/AirflowAttract(turf/T,n,per=0)
//Same as above, but attracts objects to the target.
var/zone/A = T.zone
if(!A) return
n *= vsc.AF_CANISTER_MULTIPLIER
if(!per)
n = round((n/vsc.AF_PERCENT_OF) * 100,0.1)
if(n < 0) return
if(abs(n) > vsc.AF_TINY_MOVEMENT_THRESHOLD)
//world << "Airflow!"
var/list/pplz = A.movables()
for(var/atom/movable/M in pplz)
//world << "[M] / \..."
var/relative_n = n / max(1,get_dist(T,M)/2)
if(ismob(M) && relative_n > vsc.AF_HUMAN_STUN_THRESHOLD)
if(M:nodamage) continue
M:airflow_stun()
if(M.check_airflow_movable(relative_n))
if(!(M in range(T))) continue
if(!M.airflow_speed)
M.airflow_dest = T
spawn M.GotoAirflowDest(relative_n * (vsc.AF_SPEED_MULTIPLIER/10))
atom/movable
var/turf/airflow_dest
var/airflow_speed = 0
var/airflow_time = 0
var/last_airflow = 0
proc/GotoAirflowDest(n)
if(!airflow_dest) return
if(airflow_speed < 0) return
if(last_airflow > world.time - 150) return
if(airflow_speed)
airflow_speed = n
airflow_speed = n/max(get_dist(src,airflow_dest),1)
return
last_airflow = world.time
if(airflow_dest == loc)
step_away(src,loc)
if(ismob(src))
@@ -408,7 +241,7 @@ atom/movable
while(airflow_speed > 0)
if(airflow_speed <= 0) return
airflow_speed = min(airflow_speed,15)
airflow_speed -= vsc.AF_SPEED_DECAY
airflow_speed -= vsc.airflow_speed_decay
if(airflow_speed > 7)
if(airflow_time++ >= airflow_speed - 7)
sleep(1 * tick_multiplier)
@@ -421,17 +254,18 @@ atom/movable
step_towards(src, src.airflow_dest)
if(ismob(src) && src:client) src:client:move_delay = world.time + 10
airflow_dest = null
airflow_speed = -1
spawn(150 * tick_multiplier) airflow_speed = 0
airflow_speed = 0
if(od)
density = 0
proc/RepelAirflowDest(n)
if(!airflow_dest) return
if(airflow_speed < 0) return
if(last_airflow > world.time - 150) return
if(airflow_speed)
airflow_speed = n
airflow_speed = n/max(get_dist(src,airflow_dest),1)
return
last_airflow = world.time
if(airflow_dest == loc)
step_away(src,loc)
if(ismob(src))
@@ -456,7 +290,7 @@ atom/movable
while(airflow_speed > 0)
if(airflow_speed <= 0) return
airflow_speed = min(airflow_speed,15)
airflow_speed -= vsc.AF_SPEED_DECAY
airflow_speed -= vsc.airflow_speed_decay
if(airflow_speed > 7)
if(airflow_time++ >= airflow_speed - 7)
sleep(1 * tick_multiplier)
@@ -469,8 +303,7 @@ atom/movable
step_towards(src, src.airflow_dest)
if(ismob(src) && src:client) src:client:move_delay = world.time + 10
airflow_dest = null
airflow_speed = -1
spawn(150 * tick_multiplier) airflow_speed = 0
airflow_speed = 0
if(od)
density = 0
@@ -482,8 +315,7 @@ atom/movable
. = ..()
atom/movable/proc/airflow_hit(atom/A)
airflow_speed = -1
spawn(50 * tick_multiplier) airflow_speed = 0
airflow_speed = 0
airflow_dest = null
mob/airflow_hit(atom/A)
@@ -499,8 +331,7 @@ obj/airflow_hit(atom/A)
. = ..()
obj/item/airflow_hit(atom/A)
airflow_speed = -1
spawn(50 * tick_multiplier) airflow_speed = 0
airflow_speed = 0
airflow_dest = null
mob/living/carbon/human/airflow_hit(atom/A)
@@ -512,76 +343,43 @@ mob/living/carbon/human/airflow_hit(atom/A)
src.wear_suit.add_blood(src)
if (src.w_uniform)
src.w_uniform.add_blood(src)
var/b_loss = airflow_speed * vsc.AF_DAMAGE_MULTIPLIER
for(var/organ in src:organs)
var/datum/organ/external/temp = src:organs["[organ]"]
if (istype(temp, /datum/organ/external))
switch(temp.name)
if("head")
temp.take_damage(b_loss * 0.2, 0)
if("chest")
temp.take_damage(b_loss * 0.4, 0)
if("diaper")
temp.take_damage(b_loss * 0.1, 0)
spawn UpdateDamageIcon()
var/b_loss = airflow_speed * vsc.airflow_damage
var/blocked = run_armor_check("head","melee")
apply_damage(b_loss/3, BRUTE, "head", blocked, 0, "Airflow")
blocked = run_armor_check("chest","melee")
apply_damage(b_loss/3, BRUTE, "chest", blocked, 0, "Airflow")
blocked = run_armor_check("groin","melee")
apply_damage(b_loss/3, BRUTE, "groin", blocked, 0, "Airflow")
if(airflow_speed > 10)
paralysis += round(airflow_speed * vsc.AF_STUN_MULTIPLIER)
paralysis += round(airflow_speed * vsc.airflow_stun)
stunned = max(stunned,paralysis + 3)
else
stunned += round(airflow_speed * vsc.AF_STUN_MULTIPLIER/2)
stunned += round(airflow_speed * vsc.airflow_stun/2)
. = ..()
zone/proc/movables()
. = list()
for(var/turf/T in contents)
for(var/atom/A in T)
. += A
turf/simulated/Entered(atom/A)
. = ..()
if(istype(A,/atom/movable) && zone)
zone.movable_objects += A
proc/Get_Dir(atom/S,atom/T) //Shamelessly stolen from AJX.AdvancedGetDir
var/GDist=get_dist(S,T)
var/GDir=get_dir(S,T)
if(GDist<=3)
if(GDist==0) return 0
if(GDist==1)
return GDir
turf/simulated/Exited(atom/A)
. = ..()
if(istype(A,/atom/movable) && zone)
zone.movable_objects -= A
atom/movable/New(turf/simulated/T)
. = ..()
if(istype(T))
if(T.zone)
T.zone.movable_objects += src
var/X1=S.x*10
var/X2=T.x*10
var/Y1=S.y*10
var/Y2=T.y*10
var/Ref
if(GDir==NORTHEAST)
Ref=(X2/X1)*Y1
if(Ref-1>Y2) .=EAST
else if(Ref+1<Y2) .=NORTH
else .=NORTHEAST
else if(GDir==NORTHWEST)
Ref=(1+((1-(X2/X1))))*Y1
if(Ref-1>Y2) .=WEST
else if(Ref+1<Y2) .=NORTH
else .=NORTHWEST
else if(GDir==SOUTHEAST)
Ref=(1-((X2/X1)-1))*Y1
if(Ref-1>Y2) .=SOUTH
else if(Ref+1<Y2) .=EAST
else .=SOUTHEAST
else if(GDir==SOUTHWEST)
Ref=(X2/X1)*Y1
if(Ref-1>Y2) .=SOUTH
else if(Ref+1<Y2) .=WEST
else .=SOUTHWEST
else
return GDir
proc/SaveTweaks()
var/savefile/F = new("data/game_settings.sav")
F << vsc
del F
world.log << "TWEAKS: Airflow, Plasma and Damage settings saved."
proc/LoadTweaks()
if(fexists("data/game_settings.sav"))
var/savefile/F = new("data/game_settings.sav")
F >> vsc
del F
world.log << "TWEAKS: Airflow, Plasma and Damage settings loaded."
atom/movable/Del()
var/turf/simulated/T = loc
if(istype(T))
if(T.zone)
T.zone.movable_objects -= src
. = ..()
+19 -2
View File
@@ -1,3 +1,8 @@
/*
This object is contained within zone/var/connections. It's generated whenever two turfs from different zones are linked.
Indirect connections will not merge the two zones after they reach equilibrium.
*/
connection
var
turf //The turfs involved in the connection.
@@ -5,6 +10,7 @@ connection
B
indirect = 0 //If the connection is purely indirect, the zones should not join.
last_updated //The tick at which this was last updated.
no_zone_count = 0
New(turf/T,turf/O)
A = T
B = O
@@ -31,6 +37,8 @@ connection
B.zone.connected_zones[A.zone] = 1
else
B.zone.connected_zones[A.zone]++
else
world.log << "Attempted to create connection object for non-zone tiles: [T] -> [O]"
Del()
if(A.zone && A.zone.connections)
A.zone.connections -= src
@@ -57,5 +65,14 @@ connection
. = ..()
proc/Cleanup()
if(A.zone == B.zone) del src
if(!A.zone || !B.zone) del src
if(!A || !B)
//world.log << "Connection removed: [A] or [B] missing entirely."
del src
if(A.zone == B.zone)
//world.log << "Connection removed: Zones now merged."
del src
if(!A.zone || !B.zone)
no_zone_count++
if(no_zone_count >= 5)
//world.log << "Connection removed: [A] or [B] missing a zone."
del src
+18
View File
@@ -1,13 +1,19 @@
zone
New(turf/start)
//Get the turfs that are part of the zone using a floodfill method
if(istype(start,/list))
contents = start
else
contents = FloodFill(start)
//Change all the zone vars of the turfs, check for space to be added to space_tiles.
for(var/turf/T in contents)
T.zone = src
if(istype(T,/turf/space))
AddSpace(T)
//Generate the gas_mixture for use in this zone by using the average of the gases
//defined at startup.
air = new
var/members = contents.len
for(var/turf/simulated/T in contents)
@@ -17,8 +23,13 @@ zone
air.toxins += T.toxins / members
air.temperature += T.temperature / members
air.group_multiplier = contents.len
air.update_values()
//Add this zone to the global list.
zones += src
Del()
//Ensuring the zone list doesn't get clogged with null values.
zones -= src
. = ..()
@@ -30,17 +41,23 @@ proc/FloodFill(turf/start)
while(open.len)
for(var/turf/T in open)
//Stop if there's a door, even if it's open. These are handled by indirect connection.
if(!T.HasDoor())
for(var/d in cardinal)
var/turf/O = get_step(T,d)
//Simple pass check.
if(O.ZCanPass(T) && !(O in open) && !(O in closed))
open += O
open -= T
closed += T
return closed
turf/proc/ZCanPass(turf/T)
//Fairly standard pass checks for turfs, objects and directional windows. Also stops at the edge of space.
if(istype(T,/turf/space)) return 0
else
if(T.blocks_air||blocks_air)
@@ -51,6 +68,7 @@ turf/proc/ZCanPass(turf/T)
continue
if(!obstacle.CanPass(0, T, 0, 1))
return 0
for(var/obj/obstacle in T)
if(istype(obstacle,/obj/machinery/door) && !istype(obstacle,/obj/machinery/door/window))
continue
+7 -2
View File
@@ -1,5 +1,5 @@
client/proc/Zone_Info(turf/T as null|turf)
client/verb/Zone_Info(turf/T as null|turf)
set category = "Debug"
if(T)
if(T.zone)
@@ -28,9 +28,11 @@ zone/proc
M << "Plasma: [air.toxins]"
M << "Carbon Dioxide: [air.carbon_dioxide]"
M << "Temperature: [air.temperature]"
M << "Heat Energy: [air.thermal_energy()]"
M << "Heat Energy: [air.temperature * air.heat_capacity()]"
M << "Pressure: [air.return_pressure()]"
M << ""
M << "Space Tiles: [length(space_tiles)]"
M << "Movable Objects: [length(movable_objects)]"
M << "<u>Connections: [length(connections)]</u>"
for(var/connection/C in connections)
@@ -40,6 +42,9 @@ zone/proc
spawn(50)
C.A.overlays -= 'debug_connect.dmi'
C.B.overlays -= 'debug_connect.dmi'
for(var/C in connections)
if(!istype(C,/connection))
M << "[C] (Not Connection!)"
else
dbg_output = 0
+4 -21
View File
@@ -1,34 +1,17 @@
turf/var/zone/zone
var/list/zones = list()
var/zone_controller/zone_master = new
zone_controller
var
current_tick = 0
proc
start()
set background = 1
while(1)
current_tick++
for(var/zone/Z in zones)
if(Z.last_update < current_tick)
Z.process()
if(Z) Z.last_update = current_tick
for(var/obj/fire/F)
F.process()
//for(var/obj/z_hotspot/H in z_hotspots)
// H.process()
sleep(max(5,vsc.zone_update_delay*tick_multiplier))
zone
var
dbg_output = 0 //Enables debug output.
rebuild = 0 //If 1, zone will be rebuilt on next process.
rebuild = 0 //If 1, zone will be rebuilt on next process. Not sure if used.
datum/gas_mixture/air //The air contents of the zone.
list/contents //All the tiles that are contained in this zone.
list/connections // /connection objects which refer to connections with other zones, e.g. through a door.
list/connected_zones //Parallels connections, but lists zones to which this one is connected and the number
//of points they're connected at.
list/space_tiles // Any space tiles in this list will cause air to flow out.
last_update = 0
last_update = 0
list/movable_objects = list() //All the things that can be tossed by airflow.
File diff suppressed because it is too large Load Diff
+178
View File
@@ -0,0 +1,178 @@
/*
Overview:
The air_master global variable is the workhorse for the system.
Why are you archiving data before modifying it?
The general concept with archiving data and having each tile keep track of when they were last updated is to keep everything symmetric
and totally independent of the order they are read in an update cycle.
This prevents abnormalities like air/fire spreading rapidly in one direction and super slowly in the other.
Why not just archive everything and then calculate?
Efficiency. While a for-loop that goes through all tils and groups to archive their information before doing any calculations seems simple, it is
slightly less efficient than the archive-before-modify/read method.
Why is there a cycle check for calculating data as well?
This ensures that every connection between group-tile, tile-tile, and group-group is only evaluated once per loop.
Important variables:
air_master.groups_to_rebuild (list)
A list of air groups that have had their geometry occluded and thus may need to be split in half.
A set of adjacent groups put in here will join together if validly connected.
This is done before air system calculations for a cycle.
air_master.tiles_to_update (list)
Turfs that are in this list have their border data updated before the next air calculations for a cycle.
Place turfs in this list rather than call the proc directly to prevent race conditions
turf/simulated.archive() and datum/air_group.archive()
This stores all data for.
If you modify, make sure to update the archived_cycle to prevent race conditions and maintain symmetry
atom/CanPass(atom/movable/mover, turf/target, height, air_group)
returns 1 for allow pass and 0 for deny pass
Turfs automatically call this for all objects/mobs in its turf.
This is called both as source.CanPass(target, height, air_group)
and target.CanPass(source, height, air_group)
Cases for the parameters
1. This is called with args (mover, location, height>0, air_group=0) for normal objects.
2. This is called with args (null, location, height=0, air_group=0) for flowing air.
3. This is called with args (null, location, height=?, air_group=1) for determining group boundaries.
Cases 2 and 3 would be different for doors or other objects open and close fairly often.
(Case 3 would return 0 always while Case 2 would return 0 only when the door is open)
This prevents the necessity of re-evaluating group geometry every time a door opens/closes.
Important Procedures
air_master.process()
This first processes the air_master update/rebuild lists then processes all groups and tiles for air calculations
*/
var/kill_air = 0
var/tick_multiplier = 2
atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
//Purpose: Determines if the object (or airflow) can pass this atom.
//Called by: Movement, airflow.
//Inputs: The moving atom (optional), target turf, "height" and air group
//Outputs: Boolean if can pass.
return (!density || !height || air_group)
turf
CanPass(atom/movable/mover, turf/target, height=1.5,air_group=0)
if(!target) return 0
if(istype(mover)) // turf/Enter(...) will perform more advanced checks
return !density
else // Now, doing more detailed checks for air movement and air group formation
if(target.blocks_air||blocks_air)
return 0
for(var/obj/obstacle in src)
if(!obstacle.CanPass(mover, target, height, air_group))
return 0
for(var/obj/obstacle in target)
if(!obstacle.CanPass(mover, src, height, air_group))
return 0
return 1
var/global/datum/controller/air_system/air_master
datum
controller
air_system
//Geoemetry lists
var/list/turf/simulated/active_singletons = list()
//Special functions lists
var/list/turf/simulated/active_super_conductivity = list()
var/list/turf/simulated/high_pressure_delta = list()
//Geometry updates lists
var/list/turf/simulated/tiles_to_update = list()
var/list/turf/simulated/groups_to_rebuild = list()
var/current_cycle = 0
var/update_delay = 5 //How long between check should it try to process atmos again.
var/failed_ticks = 0 //How many ticks have runtimed?
/* process()
//Call this to process air movements for a cycle
process_rebuild_select_groups()
//Used by process()
//Warning: Do not call this
rebuild_group(datum/air_group)
//Used by process_rebuild_select_groups()
//Warning: Do not call this, add the group to air_master.groups_to_rebuild instead
*/
proc/setup()
//Purpose: Call this at the start to setup air groups geometry
// (Warning: Very processor intensive but only must be done once per round)
//Called by: Gameticker/Master controller
//Inputs: None.
//Outputs: None.
set background = 1
world << "\red \b Processing Geometry..."
sleep(-1)
var/start_time = world.timeofday
for(var/turf/simulated/S in world)
if(S.z < 5)
if(!S.blocks_air && !S.zone && S.z < 5) // Added last check to force skipping asteroid z-levels -- TLE
new/zone(S)
S.update_air_properties()
world << "\red \b Geometry processed in [time2text(world.timeofday-start_time, "mm:ss")] minutes!"
spawn start()
proc/start()
//Purpose: This is kicked off by the master controller, and controls the processing of all atmosphere.
//Called by: Master controller
//Inputs: None.
//Outputs: None.
set background = 1
while(1)
if(!kill_air)
current_cycle++
var/success = tick() //Changed so that a runtime does not crash the ticker.
if(!success) //Runtimed.
failed_ticks++
if(failed_ticks > 20)
world << "<font size='4' color='red'>ERROR IN ATMOS TICKER. Killing air simulation!</font>"
kill_air = 1
sleep(max(5,update_delay*tick_multiplier))
proc/tick()
if(tiles_to_update.len > 0) //If there are tiles to update, do so.
for(var/turf/simulated/T in tiles_to_update)
spawn T.update_air_properties()
tiles_to_update = list()
for(var/zone/Z in zones)
if(Z.last_update < current_cycle)
Z.process()
if(Z) Z.last_update = current_cycle
for(var/obj/fire/F)
F.process()
return 1
+205
View File
@@ -0,0 +1,205 @@
atom/var/pressure_resistance = ONE_ATMOSPHERE
turf
assume_air(datum/gas_mixture/giver) //use this for machines to adjust air
del(giver)
return 0
return_air()
//Create gas mixture to hold data for passing
var/datum/gas_mixture/GM = new
GM.oxygen = oxygen
GM.carbon_dioxide = carbon_dioxide
GM.nitrogen = nitrogen
GM.toxins = toxins
GM.temperature = temperature
GM.update_values()
return GM
remove_air(amount as num)
var/datum/gas_mixture/GM = new
var/sum = oxygen + carbon_dioxide + nitrogen + toxins
if(sum>0)
GM.oxygen = (oxygen/sum)*amount
GM.carbon_dioxide = (carbon_dioxide/sum)*amount
GM.nitrogen = (nitrogen/sum)*amount
GM.toxins = (toxins/sum)*amount
GM.temperature = temperature
GM.update_values()
return GM
turf
simulated
var/current_graphic = null
var/tmp
datum/gas_mixture/air
processing = 1
group_border = 0
length_space_border = 0
air_check_directions = 0 //Do not modify this, just add turf to air_master.tiles_to_update
archived_cycle = 0
current_cycle = 0
obj/fire/active_hotspot
temperature_archived //USED ONLY FOR SOLIDS
being_superconductive = 0
proc
process_cell()
update_air_properties()
archive()
mimic_air_with_tile(turf/model)
share_air_with_tile(turf/simulated/sharer)
mimic_temperature_with_tile(turf/model)
share_temperature_with_tile(turf/simulated/sharer)
super_conduct()
update_visuals()
overlays = null
var/siding_icon_state = return_siding_icon_state()
if(siding_icon_state)
overlays += image('floors.dmi',siding_icon_state)
var/datum/gas_mixture/model = return_air()
switch(model.graphic)
if("plasma")
overlays.Add(plmaster)
if("sleeping_agent")
overlays.Add(slmaster)
New()
..()
if(!blocks_air)
air = new
air.oxygen = oxygen
air.carbon_dioxide = carbon_dioxide
air.nitrogen = nitrogen
air.toxins = toxins
air.temperature = temperature
air.update_values()
if(air_master)
air_master.tiles_to_update.Add(src)
find_zone()
// air.parent = src //TODO DEBUG REMOVE
else
if(air_master)
for(var/direction in cardinal)
var/turf/simulated/floor/target = get_step(src,direction)
if(istype(target))
air_master.tiles_to_update.Add(target)
Del()
if(active_hotspot)
del(active_hotspot)
if(blocks_air)
for(var/direction in list(NORTH, SOUTH, EAST, WEST))
var/turf/simulated/tile = get_step(src,direction)
if(istype(tile) && !tile.blocks_air)
air_master.tiles_to_update.Add(tile)
..()
assume_air(datum/gas_mixture/giver)
if(!giver) return 0
if(zone)
zone.air.merge(giver)
return 1
else
return ..()
archive()
if(air) //For open space like floors
air.archive()
temperature_archived = temperature
archived_cycle = air_master.current_cycle
share_air_with_tile(turf/simulated/T)
return air.share(T.air)
mimic_air_with_tile(turf/T)
return air.mimic(T)
return_air()
if(zone)
return zone.air
else if(air)
return air
else
return ..()
remove_air(amount as num)
if(zone)
var/datum/gas_mixture/removed = null
removed = zone.air.remove(amount)
return removed
else if(air)
var/datum/gas_mixture/removed = null
removed = air.remove(amount)
if(air.check_tile_graphic())
update_visuals(air)
return removed
else
return ..()
update_air_properties()//OPTIMIZE
air_check_directions = 0
for(var/direction in cardinal)
if(CanPass(null, get_step(src,direction), 0, 0))
air_check_directions |= direction
if(zone)
for(var/direction in cardinal)
if(air_check_directions&direction)
var/turf/simulated/T = get_step(src,direction)
if(T)
ZConnect(src,T)
else
var/turf/simulated/T = get_step(src,direction)
if(T)
ZDisconnect(src,T)
else
for(var/direction in cardinal)
if(air_check_directions&direction)
var/turf/simulated/T = get_step(src,direction)
if(T.zone)
T.zone.AddTurf(src)
break
if(!zone)
new/zone(src)
if(air_check_directions)
processing = 1
else
processing = 0
+185 -207
View File
@@ -1,13 +1,16 @@
vs_control/var/IgnitionLevel = 10 //Moles of oxygen+plasma - co2 needed to burn.
#define OXYGEN
//Some legacy definitions so fires can be started.
atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return null
turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
if(fire_protection) return
if(fire_protection > world.time-300) return
var/datum/gas_mixture/air_contents = return_air(1)
if(!air_contents)
return 0
@@ -25,19 +28,11 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
return 1
var/datum/gas/volatile_fuel/fuel = locate() in air_contents.trace_gases
var/obj/liquid_fuel/liquid = locate() in src
var/fuel_level = 0
var/liquid_level = 0
if(fuel) fuel_level = fuel.moles
if(liquid) liquid_level = liquid.amount
var/total_fuel = air_contents.toxins + fuel_level + liquid_level
if((air_contents.oxygen + air_contents.toxins + fuel_level*1.5 + liquid_level*1.5) - (air_contents.carbon_dioxide*0.25) > vsc.IgnitionLevel && total_fuel > 0.5)
if(air_contents.calculate_firelevel(liquid) > vsc.IgnitionLevel && (fuel || liquid || air_contents.toxins > 0.5))
igniting = 1
if(air_contents.oxygen < 0.5)
return 0
if(parent&&parent.group_processing)
parent.suspend_group_processing()
if(! (locate(/obj/fire) in src))
var/obj/fire/F = new(src,1000)
F.temperature = exposed_temperature
@@ -48,112 +43,9 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
return igniting
obj/effect/hotspot
//Icon for fire on turfs, also helps for nurturing small fires until they are full tile
anchored = 1
mouse_opacity = 0
//luminosity = 3
icon = 'fire.dmi'
icon_state = "1"
layer = TURF_LAYER
var
volume = 125
temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
just_spawned = 1
bypassing = 0
obj/effect/hotspot/proc/perform_exposure()
var/turf/simulated/floor/location = loc
if(!istype(location))
return 0
if(volume > CELL_VOLUME*0.95)
bypassing = 1
else bypassing = 0
if(bypassing)
if(!just_spawned)
volume = location.air.fuel_burnt*FIRE_GROWTH_RATE
temperature = location.air.temperature
else
var/datum/gas_mixture/affected = location.air.remove_ratio(volume/location.air.volume)
affected.temperature = temperature
affected.react()
temperature = affected.temperature
volume = affected.fuel_burnt*FIRE_GROWTH_RATE
location.assume_air(affected)
for(var/atom/item in loc)
item.temperature_expose(null, temperature, volume)
obj/effect/hotspot/process(turf/simulated/list/possible_spread)
if(just_spawned)
just_spawned = 0
return 0
var/turf/simulated/floor/location = loc
if(!istype(location))
del(src)
if((temperature < FIRE_MINIMUM_TEMPERATURE_TO_EXIST) || (volume <= 1))
del(src)
if(location.air.toxins < 0.5 || location.air.oxygen < 0.5)
del(src)
perform_exposure()
if(location.wet) location.wet = 0
if(bypassing)
icon_state = "3"
location.burn_tile()
//Possible spread due to radiated heat
if(location.air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_SPREAD)
var/radiated_temperature = location.air.temperature*FIRE_SPREAD_RADIOSITY_SCALE
for(var/turf/simulated/possible_target in possible_spread)
if(!locate(/obj/effect/hotspot) in possible_target)
possible_target.hotspot_expose(radiated_temperature, CELL_VOLUME/4)
else
if(volume > CELL_VOLUME*0.4)
icon_state = "2"
else
icon_state = "1"
return 1
obj/effect/hotspot/New()
..()
dir = pick(cardinal)
sd_SetLuminosity(3)
obj/effect/hotspot/Del()
src.sd_SetLuminosity(0)
loc = null
..()
var
fire_ratio_1 = 0.05
obj
fire
//Icon for fire on turfs, also helps for nurturing small fires until they are full tile
//Icon for fire on turfs.
anchored = 1
mouse_opacity = 0
@@ -168,84 +60,82 @@ obj
var
volume = CELL_VOLUME
temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
firelevel = 10000
firelevel = 10000 //Calculated by gas_mixture.calculate_firelevel()
archived_firelevel = 0
process()
if(firelevel > vsc.IgnitionLevel)
var/turf/simulated/floor/S = loc
if(!S.zone) del src
//src.temperature += (src.firelevel/FireTempDivider+FireOffset - src.temperature) / FireRate
if(!S.zone) del src //Cannot exist where zones are broken.
if(istype(S,/turf/simulated/floor))
var
datum/gas_mixture/air_contents = S.return_air()
//Get whatever trace fuels are in the area
datum/gas/volatile_fuel/fuel = locate(/datum/gas/volatile_fuel/) in air_contents.trace_gases
fuel_level = 0
//Also get liquid fuels on the ground.
obj/liquid_fuel/liquid = locate() in S
liquid_level = 0
if(fuel) fuel_level = fuel.moles
if(liquid)
liquid_level = liquid.amount
if(liquid.amount <= 0)
del liquid
liquid_level = 0
firelevel = air_contents.calculate_firelevel(liquid)
firelevel = (air_contents.oxygen + air_contents.toxins + fuel_level*1.5 + liquid_level*1.5) - (air_contents.carbon_dioxide*0.25)
//Ensure that there is an appropriate amount of fuel and O2 here.
if(firelevel > 25 && (air_contents.toxins || fuel || liquid))
firelevel = min(firelevel,vsc.IgnitionLevel*5)
if(firelevel > vsc.IgnitionLevel * 1.5 && (air_contents.toxins || fuel_level || liquid_level))
for(var/direction in cardinal)
if(S.air_check_directions&direction) //Grab all valid bordering tiles
var/turf/simulated/enemy_tile = get_step(S, direction)
if(istype(enemy_tile))
if(enemy_tile.fire_protection)
firelevel -= vsc.IgnitionLevel
continue
if(!(locate(/obj/fire) in enemy_tile))
if( prob( firelevel/(vsc.IgnitionLevel*0.1) ) )
new/obj/fire(enemy_tile,firelevel)
// else
// world << "Spread Probability: [firelevel/(vsc.IgnitionLevel*0.1)]%."
// else
// world << "There's a fire there bitch."
// else
// world << "[enemy_tile] cannot be spread to."
//else
// world << "Not enough firelevel to spread: [firelevel]/[vsc.IgnitionLevel*1.5]"
var/datum/gas_mixture/flow = air_contents.remove_ratio(0.5)
//n = PV/RT, taking the volume of a single tile from the gas.
var/turf/simulated/enemy_tile = get_step(S, direction)
if(istype(enemy_tile))
//If extinguisher mist passed over the turf it's trying to spread to, don't spread and
//reduce firelevel.
if(enemy_tile.fire_protection > world.time-30)
firelevel -= 150
continue
//Spread the fire.
if(!(locate(/obj/fire) in enemy_tile))
if( prob( firelevel/2.5 ) )
new/obj/fire(enemy_tile,firelevel)
var/datum/gas_mixture/flow = air_contents.remove_ratio(0.5) //Take half the air from the room I guess.
if(flow)
if(flow.oxygen > 0.3 && (flow.toxins || fuel_level || liquid))
//Ensure adequate oxygen and fuel.
if(flow.oxygen > 0.3 && (flow.toxins || fuel || liquid))
//Change icon depending on the fuel, and thus temperature.
icon_state = "1"
if(firelevel > vsc.IgnitionLevel * 2)
if(firelevel > 25)
icon_state = "2"
if(firelevel > vsc.IgnitionLevel * 3.5)
if(firelevel > 100)
icon_state = "3"
//Ensure flow temperature is higher than minimum fire temperatures.
flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.1,flow.temperature)
//Burn the gas mixture.
flow.zburn(liquid)
else
del src
S.assume_air(flow)
S.assume_air(flow) //Then put it back where you found it.
else
//world << "No air at all."
del src
else
del src
else
//world << "Insufficient fire level for ignition: [firelevel]/[IgnitionLevel]"
del src
for(var/mob/living/carbon/human/M in loc)
M.FireBurn(firelevel/(vsc.IgnitionLevel*10))
M.FireBurn(min(max(0.1,firelevel / 20),10)) //Burn the humans!
New(newLoc,fl)
@@ -254,7 +144,7 @@ obj
sd_SetLuminosity(3)
firelevel = fl
for(var/mob/living/carbon/human/M in loc)
M.FireBurn(firelevel/(vsc.IgnitionLevel*10))
M.FireBurn(min(max(0.1,firelevel / 20),10)) //Burn the humans!
Del()
if (istype(loc, /turf/simulated))
@@ -265,74 +155,162 @@ obj
..()
obj/liquid_fuel
icon = 'effects.dmi'
icon_state = "slube"
//Liquid fuel is used for things that used to rely on volatile fuels or plasma being contained to a couple tiles.
icon = 'icons/effects/effects.dmi'
icon_state = "fuel"
layer = TURF_LAYER+0.2
anchored = 1
var/amount = 1
var/amount = 1 //Basically moles.
New(newLoc)
New(newLoc,amt=1)
src.amount = amt
//Be absorbed by any other liquid fuel in the tile.
for(var/obj/liquid_fuel/other in newLoc)
if(other != src)
other.amount += src.amount
spawn other.Spread()
del src
return
Spread()
. = ..()
vs_control/var/switch_fire = 1
proc/Spread()
//Allows liquid fuels to sometimes flow into other tiles.
if(amount < 0.5) return
var/turf/simulated/S = loc
if(!istype(S)) return
for(var/d in cardinal)
if(S.air_check_directions & d)
if(rand(25))
var/turf/simulated/O = get_step(src,d)
new/obj/liquid_fuel(O,amount*0.25)
amount *= 0.75
turf/simulated/var/fire_protection = 0
flamethrower_fuel
icon_state = "mustard"
anchored = 0
New(newLoc, amt = 1, d = 0)
dir = d //Setting this direction means you won't get torched by your own flamethrower.
. = ..()
Spread()
//The spread for flamethrower fuel is much more precise, to create a wide fire pattern.
if(amount < 0.1) return
var/turf/simulated/S = loc
if(!istype(S)) return
for(var/d in list(turn(dir,90),turn(dir,-90)))
if(S.air_check_directions & d)
var/turf/simulated/O = get_step(S,d)
new/obj/liquid_fuel/flamethrower_fuel(O,amount*0.25,d)
O.hotspot_expose((T20C*2) + 380,500) //Light flamethrower fuel on fire immediately.
amount *= 0.5
turf/simulated/var/fire_protection = 0 //Protects newly extinguished tiles from being overrun again.
turf/proc/apply_fire_protection()
turf/simulated/apply_fire_protection()
fire_protection = world.time
datum/gas_mixture/proc/zburn(obj/liquid_fuel/liquid)
if(vsc.switch_fire)
. = fire()
if(liquid && liquid.amount > 0)
oxygen -= fire_ratio_1
liquid.amount = max(liquid.amount-fire_ratio_1,0)
carbon_dioxide += fire_ratio_1
if(liquid.amount <= 0)
del liquid
return
//This proc is similar to fire(), but uses a simple logarithm to calculate temp, and is thus more stable with ZAS.
if(temperature > PLASMA_MINIMUM_BURN_TEMPERATURE)
var
fuel_level = 0
total_fuel = toxins
fuel_sources = 0 //We'll divide by this later so that fuel is consumed evenly.
datum/gas/volatile_fuel/fuel = locate() in trace_gases
liquid_level = 0
if(fuel) fuel_level = fuel.moles
if(liquid) liquid_level = liquid.amount
if(liquid && liquid_level <= 0)
del liquid
liquid_level = 0
if(oxygen > 0.3 && (toxins || fuel_level || liquid_level))
if(toxins && temperature < PLASMA_UPPER_TEMPERATURE)
temperature += (FIRE_PLASMA_ENERGY_RELEASED*fire_ratio_1) / heat_capacity()
if((fuel_level || liquid_level) && temperature < PLASMA_UPPER_TEMPERATURE)
temperature += (FIRE_CARBON_ENERGY_RELEASED*fire_ratio_1) / heat_capacity()
if(fuel)
//Volatile Fuel
total_fuel += fuel.moles
fuel_sources++
if(toxins > fire_ratio_1)
oxygen -= vsc.plc.OXY_TO_PLASMA*fire_ratio_1
toxins -= fire_ratio_1
carbon_dioxide += fire_ratio_1
else if(toxins)
oxygen -= toxins * vsc.plc.OXY_TO_PLASMA
carbon_dioxide += toxins
toxins = 0
if(liquid)
//Liquid Fuel
if(liquid.amount <= 0)
del liquid
else
total_fuel += liquid.amount
fuel_sources++
if(fuel_level > fire_ratio_1/1.5)
oxygen -= vsc.plc.OXY_TO_PLASMA*fire_ratio_1
fuel.moles -= fire_ratio_1
carbon_dioxide += fire_ratio_1
//Toxins
if(toxins > 0.3) fuel_sources++
else if(fuel_level)
oxygen -= fuel.moles * vsc.plc.OXY_TO_PLASMA
carbon_dioxide += fuel.moles
fuel.moles = 0
if(!fuel_sources) return 0 //If there's no fuel, there's no burn. Can't divide by zero anyway.
if(liquid_level > 0)
oxygen -= fire_ratio_1
liquid.amount = max(liquid.amount-fire_ratio_1,0)
carbon_dioxide += fire_ratio_1
if(liquid.amount <= 0)
del liquid
return 1
return 0
if(oxygen > 0.3)
//Calculate the firelevel.
var/firelevel = calculate_firelevel(liquid)
//Reaches a maximum practical temperature of around 2750.
temperature = 1000*log(0.016*firelevel + 1.45)
//Consume some gas.
var/consumed_gas = min(oxygen,0.002*firelevel,total_fuel) / fuel_sources
oxygen -= consumed_gas
toxins = max(0,toxins-consumed_gas)
if(fuel)
fuel.moles -= consumed_gas
if(fuel.moles <= 0) del fuel
if(liquid)
liquid.amount -= consumed_gas
if(liquid.amount <= 0) del liquid
update_values()
return consumed_gas*fuel_sources
return 0
datum/gas_mixture/proc/calculate_firelevel(obj/liquid_fuel/liquid)
//Calculates the firelevel based on one equation instead of having to do this multiple times in different areas.
var
datum/gas/volatile_fuel/fuel = locate() in trace_gases
fuel_level = 0
liquid_level = 0
if(fuel) fuel_level = fuel.moles
if(liquid) liquid_level = liquid.amount
return oxygen + toxins + liquid_level*15 + fuel_level*5
/mob/living/carbon/human/proc/FireBurn(mx as num)
//Burns mobs due to fire. Respects heat transfer coefficients on various body parts.
var
head_exposure = 1
chest_exposure = 1
groin_exposure = 1
legs_exposure = 1
arms_exposure = 1
//Get heat transfer coefficients for clothing.
for(var/obj/item/clothing/C in src)
if(l_hand == C || r_hand == C) continue
if(C.body_parts_covered & HEAD)
head_exposure *= C.heat_transfer_coefficient
if(C.body_parts_covered & UPPER_TORSO)
chest_exposure *= C.heat_transfer_coefficient
if(C.body_parts_covered & LOWER_TORSO)
groin_exposure *= C.heat_transfer_coefficient
if(C.body_parts_covered & LEGS)
legs_exposure *= C.heat_transfer_coefficient
if(C.body_parts_covered & ARMS)
arms_exposure *= C.heat_transfer_coefficient
//Always check these damage procs first if fire damage isn't working. They're probably what's wrong.
apply_damage(2.5*mx*head_exposure, BURN, "head", 0, 0, "Fire")
apply_damage(2.5*mx*chest_exposure, BURN, "chest", 0, 0, "Fire")
apply_damage(2.0*mx*groin_exposure, BURN, "groin", 0, 0, "Fire")
apply_damage(0.6*mx*legs_exposure, BURN, "l_leg", 0, 0, "Fire")
apply_damage(0.6*mx*legs_exposure, BURN, "r_leg", 0, 0, "Fire")
apply_damage(0.4*mx*arms_exposure, BURN, "l_arm", 0, 0, "Fire")
apply_damage(0.4*mx*arms_exposure, BURN, "r_arm", 0, 0, "Fire")
flash_pain()
+81 -45
View File
@@ -1,43 +1,34 @@
zone
proc
AddTurf(turf/T)
//Adds the turf to contents, increases the size of the zone, and sets the zone var.
if(T in contents) return
contents += T
air.group_multiplier++
T.zone = src
RemoveTurf(turf/T)
//Same, but in reverse.
if(!(T in contents)) return
contents -= T
air.group_multiplier--
T.zone = null
DivideAir(ratio)
ratio = min(1,max(0,ratio))
air.oxygen *= ratio
air.oxygen = QUANTIZE(air.oxygen)
air.nitrogen *= ratio
air.nitrogen = QUANTIZE(air.nitrogen)
air.toxins *= ratio
air.toxins = QUANTIZE(air.toxins)
air.carbon_dioxide *= ratio
air.carbon_dioxide = QUANTIZE(air.carbon_dioxide)
if(air.trace_gases.len)
for(var/datum/gas/trace_gas in air.trace_gases)
trace_gas.moles *= ratio
trace_gas.moles = QUANTIZE(trace_gas.moles)
air.temperature = air.temperature*ratio + TCMB*(1-ratio)
air.temperature = QUANTIZE(air.temperature)
AddSpace(turf/space/S)
//Adds a space tile to the list, and creates the list if null.
if(istype(S,/turf/space))
if(!space_tiles) space_tiles = list()
space_tiles += S
RemoveSpace(turf/space/S)
//Removes a space tile from the list, and deletes the list if length is 0.
if(space_tiles)
space_tiles -= S
if(!space_tiles.len) space_tiles = null
turf/proc/HasDoor(turf/O)
//Checks for the presence of doors, used for zone spreading and connection.
//A positive numerical argument checks only for closed doors.
//Another turf as an argument checks for windoors between here and there.
for(var/obj/machinery/door/D in src)
if(isnum(O) && O)
if(!D.density) continue
@@ -48,110 +39,155 @@ turf/proc/HasDoor(turf/O)
return 1
turf/proc/find_zone()
//Allows newly generated turfs to join up with a nearby zone.
if(world.time < 10) return
for(var/d in cardinal)
var/turf/T = get_step(src,d)
if(!T || !T.zone) continue
if(!T || !T.zone || !T.ZCanPass(src)) continue
if(!zone)
zone = T.zone
zone.AddTurf(src)
else if(T.zone != zone)
ZConnect(src,T)
turf/proc/check_connections()
//Checks for new connections that can be made.
for(var/d in cardinal)
var/turf/T = get_step(src,d)
if(!T || !T.zone || !T.CanPass(0,src,0,0)) continue
if(T.zone != zone)
ZConnect(src,T)
turf/proc/check_for_space()
//Checks for space around the turf.
for(var/d in cardinal)
var/turf/T = get_step(src,d)
if(istype(T,/turf/space) && T.CanPass(0,src,0,0))
zone.AddSpace(T)
proc
ZMerge(zone/A,zone/B)
//world << "Merge occured."
//Merges two zones so that they are one.
var
a_size = A.air.group_multiplier
b_size = B.air.group_multiplier
c_size = a_size + b_size
new_contents = A.contents + B.contents
//Set air multipliers to one so air represents gas per tile.
A.air.group_multiplier = 1
B.air.group_multiplier = 1
//Remove some air proportional to the size of this zone.
A.air.remove_ratio(a_size/c_size)
B.air.remove_ratio(b_size/c_size)
//Merge the gases and set the multiplier to the sum of the old ones.
A.air.merge(B.air)
A.air.group_multiplier = c_size
//Check for connections to merge into the new zone.
for(var/connection/C in B.connections)
if((C.A in new_contents) && (C.B in new_contents))
del C
continue
if(!A.connections) A.connections = list()
A.connections += C
//Add space tiles.
A.space_tiles += B.space_tiles
//Add contents.
A.contents = new_contents
//Set all the zone vars.
for(var/turf/T in B.contents)
T.zone = A
del B
ZConnect(turf/A,turf/B)
//Connects two zones by forming a connection object representing turfs A and B.
//Make sure that if it's space, it gets added to space_tiles instead.
if(istype(B,/turf/space))
if(A.zone)
A.zone.AddSpace(B)
//world << "Space added."
return
if(istype(A,/turf/space))
if(B.zone)
B.zone.AddSpace(B)
//world << "Space added."
B.zone.AddSpace(A)
return
//Make some preliminary checks to see if the connection is valid.
if(!A.zone || !B.zone) return
if(A.zone == B.zone) return
if(!A.CanPass(0,B,0,0)) return
//Ensure the connection isn't already made.
for(var/connection/C in A.zone.connections)
if((C.A == A && C.B == B) || (C.A == B && C.B == A))
return
var/connection/C = new(A,B)
if(A.HasDoor(B) || B.HasDoor(A)) C.indirect = 1
//world << "Connection Formed: [A] --> [B] [(C.indirect?"Indirect":"Direct")]"
//A.overlays += 'zone_connection_A.dmi'
//B.overlays += 'zone_connection_B.dmi'
//spawn(10)
// A.overlays -= 'zone_connection_A.dmi'
// B.overlays -= 'zone_connection_B.dmi'
var/connection/C = new(A,B)
//Ensure zones separated by doors do not merge.
if(A.HasDoor(B) || B.HasDoor(A)) C.indirect = 1
ZDisconnect(turf/A,turf/B)
//Removes a zone connection. Can split zones in the case of a permanent barrier.
//If one of them doesn't have a zone, it might be space, so check for that.
if(A.zone && B.zone)
//If the two zones are different, just remove a connection.
if(A.zone != B.zone)
for(var/connection/C in A.zone.connections)
if((C.A == A && C.B == B) || (C.A == B && C.B == A))
//world << "Connection Dissolved: [A] -/-> [B] [(C.indirect?"Indirect":"Direct")]"
/*A.overlays += 'zone_connection_A.dmi'
B.overlays += 'zone_connection_B.dmi'
spawn(10)
A.overlays -= 'zone_connection_A.dmi'
B.overlays -= 'zone_connection_B.dmi'*/
del C
/*else
//If they're the same, split the zone at this line.
else
//Preliminary checks to prevent stupidity.
if(A == B) return
if(A.CanPass(0,B,0,0)) return
if(A.HasDoor(B) || B.HasDoor(A)) return
//Do a test fill. If turf B is still in the floodfill, then the zone isn't really split.
var/zone/oldzone = A.zone
var/list/test = FloodFill(A)
if(B in test) return
else
var/zone/Z = new(test,oldzone.air)
var/zone/Z = new(test,oldzone.air) //Create a new zone based on the old air and the test fill.
//Add connections from the old zone.
for(var/connection/C in oldzone.connections)
if((A in Z.contents) || (B in Z.contents))
if(!Z.connections) Z.connections = list()
Z.connections += C
//Check for space.
for(var/turf/T in test)
T.check_for_space()
//Make a new, identical air mixture for the other zone.
var/datum/gas_mixture/Y_Air = new
Y_Air.copy_from(oldzone.air)
var/zone/Y = new(B,Y_Air)
var/zone/Y = new(B,Y_Air) //Make a new zone starting at B and using Y_Air.
//Add relevant connections from old zone.
for(var/connection/C in oldzone.connections)
if((A in Y.contents) || (B in Y.contents))
if(!Y.connections) Y.connections = list()
Y.connections += C
//Add the remaining space tiles to this zone.
for(var/turf/space/T in oldzone.space_tiles)
if(!(T in Z.space_tiles))
Y.AddSpace(T)
oldzone.air = null
del oldzone
world << "Zone Split: [A] / [B]"
A.overlays += 'zone_connection_A.dmi'
B.overlays += 'zone_connection_B.dmi'
spawn(10)
A.overlays -= 'zone_connection_A.dmi'
B.overlays -= 'zone_connection_B.dmi'*/
else
if(istype(A,/turf/space) && B.zone)
B.zone.RemoveSpace(A)
+81 -194
View File
@@ -1,252 +1,139 @@
pl_control/var
PLASMA_DMG = 3
PLASMA_DMG_NAME = "Plasma Damage Multiplier"
PLASMA_DMG_DESC = "Multiplier on how much damage inhaling plasma can do."
OXY_TO_PLASMA = 1
OXY_TO_PLASMA_NAME = "O2/Plasma Ratio"
OXY_TO_PLASMA_DESC = "Multiplier for the ratio of oxygen to plasma required in fires."
CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth.
CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth.
CLOTH_CONTAMINATION_NAME = "Plasma - Cloth Contamination"
CLOTH_CONTAMINATION_RANDOM = 60
CLOTH_CONTAMINATION_METHOD = "Toggle"
CLOTH_CONTAMINATION_DESC = "If set to nonzero, plasma will contaminate cloth items (uniforms, backpacks, etc.)\
and cause a small amount of damage over time to anyone carrying or wearing them. Contamination can be detected\
with a Health Analyzer, and washed off in the washer."
ALL_ITEM_CONTAMINATION = 0 //If this is on, any item can be contaminated, so suits and tools must be discarded or
//decontaminated.
ALL_ITEM_CONTAMINATION_NAME = "Plasma - Full Contamination"
ALL_ITEM_CONTAMINATION_RANDOM = 10
ALL_ITEM_CONTAMINATION_METHOD = "Toggle"
ALL_ITEM_CONTAMINATION_DESC = "Like Cloth Contamination, but all item types are susceptible."
PLASMAGUARD_ONLY = 0
PLASMAGUARD_ONLY_NAME = "Plasma - Biosuits/Spacesuits Only"
PLASMAGUARD_ONLY_RANDOM = 20
PLASMAGUARD_ONLY_METHOD = "Toggle"
PLASMAGUARD_ONLY_DESC = "If on, any suits that are not biosuits or space suits will not protect against contamination."
//CANISTER_CORROSION = 0 //If this is on, plasma must be stored in orange tanks and canisters,
//CANISTER_CORROSION_RANDOM = 20 //or it will corrode the tank.
//CANISTER_CORROSION_METHOD = "Toggle"
PLASMAGUARD_ONLY = 0 //If this is on, only biosuits and spacesuits protect against contamination and ill effects.
GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 10,000.
GENETIC_CORRUPTION_NAME = "Plasma - Genetic Corruption"
GENETIC_CORRUPTION_RANDOM = "PROB10/3d6"
GENETIC_CORRUPTION_METHOD = "Numeric"
GENETIC_CORRUPTION_DESC = "When set to a probability in 1000, any humans in plasma will have this chance to develop a random mutation."
SKIN_BURNS = 1 //Plasma has an effect similar to mustard gas on the un-suited.
SKIN_BURNS_NAME = "Plasma - Skin Burns"
SKIN_BURNS_RANDOM = 10
SKIN_BURNS_METHOD = "Toggle"
SKIN_BURNS_DESC = "When toggled, humans with exposed skin will suffer burns (similar to mustard gas) in plasma."
//PLASMA_INJECTS_TOXINS = 0 //Plasma damage injects the toxins chemical to do damage over time.
//PLASMA_INJECTS_TOXINS_RANDOM = 30
//PLASMA_INJECTS_TOXINS_METHOD = "Toggle"
EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection.
EYE_BURNS = 0 //Plasma burns the eyes of anyone not wearing eye protection.
EYE_BURNS_NAME = "Plasma - Eye Burns"
EYE_BURNS_RANDOM = 30
EYE_BURNS_METHOD = "Toggle"
EYE_BURNS_DESC = "When toggled, humans without masks that cover the eyes will suffer temporary blurriness and sight loss,\
and may need glasses to see again if exposed for long durations."
CONTAMINATION_LOSS = 0.01
//N2O_REACTION = 0 //Plasma can react with N2O, making sparks and starting a fire if levels are high.
//N2O_REACTION_RANDOM = 5
PLASMA_HALLUCINATION = 0
//PLASMA_COLOR = "onturf" //Plasma can change colors yaaaay!
//PLASMA_COLOR_RANDOM = "PICKonturf,onturf"
//PLASMA_DMG_OFFSET = 1
//PLASMA_DMG_OFFSET_RANDOM = "1d5"
//PLASMA_DMG_QUOTIENT = 10
//PLASMA_DMG_QUOTIENT_RANDOM = "1d10+4"
CONTAMINATION_LOSS = 0.1
_NAME = "Plasma - Contamination Damage"
CONTAMINATION_LOSS_DESC = "A number representing the damage done per life cycle by contaminated items."
PLASMA_HALLUCINATION = 1
PLASMA_HALLUCINATION_NAME = "Plasma - Hallucination"
PLASMA_HALLUCINATION_METHOD = "Toggle"
PLASMA_HALLUCINATION_DESC = "If toggled, uses the remnants of the hallucination code to induce visions in those\
who breathe plasma."
N2O_HALLUCINATION = 1
N2O_HALLUCINATION_NAME = "Nitrous Oxide - Hallucination"
N2O_HALLUCINATION_METHOD = "Toggle"
N2O_HALLUCINATION_DESC = "If toggled, uses the remnants of the hallucination code to induce visions in those\
who breathe N2O."
//CONTAMINATION_LOSS_RANDOM = "5d5"
//Plasma has a chance to be a different color.
obj/var/contaminated = 0
obj/item/proc
can_contaminate()
//Clothing and backpacks can be contaminated.
if(flags & PLASMAGUARD) return 0
if((flags & SUITSPACE) && !vsc.plc.PLASMAGUARD_ONLY) return 1
if(vsc.plc.ALL_ITEM_CONTAMINATION) return 1
if(flags & SUITSPACE) return 0
else if(istype(src,/obj/item/clothing)) return 1
else if(istype(src,/obj/item/weapon/storage/backpack)) return 1
/mob/living/carbon/human/proc/contaminate()
contaminate()
//Do a contamination overlay? Temporary measure to keep contamination less deadly than it was.
if(!contaminated)
contaminated = 1
overlays += 'icons/effects/contamination.dmi'
decontaminate()
contaminated = 0
overlays -= 'icons/effects/contamination.dmi'
/mob/proc/contaminate()
/mob/living/carbon/human/contaminate()
//See if anything can be contaminated.
if(!pl_suit_protected())
suit_contamination()
else if(vsc.plc.PLASMAGUARD_ONLY)
if(!wear_suit.flags & PLASMAGUARD) wear_suit.contaminated = 1
if(!pl_head_protected())
if(wear_mask) wear_mask.contaminated = 1
if(prob(1)) suit_contamination() //Plasma can sometimes get through such an open suit.
else if(vsc.plc.PLASMAGUARD_ONLY)
if(!head.flags & PLASMAGUARD) head.contaminated = 1
if(istype(back,/obj/item/weapon/storage/backpack) || vsc.plc.ALL_ITEM_CONTAMINATION)
back.contaminated = 1
if(istype(back,/obj/item/weapon/storage/backpack))
back.contaminate()
if(l_hand)
if(l_hand.can_contaminate()) l_hand.contaminated = 1
if(r_hand)
if(r_hand.can_contaminate()) r_hand.contaminated = 1
if(belt)
if(belt.can_contaminate()) belt.contaminated = 1
if(wear_id && !pl_suit_protected())
if(wear_id.can_contaminate()) wear_id.contaminated = 1
if(l_ear && !pl_head_protected())
if(l_ear.can_contaminate()) l_ear.contaminated = 1
if(r_ear && !pl_head_protected())
if(r_ear.can_contaminate()) r_ear.contaminated = 1
/mob/proc/pl_effects()
/mob/living/carbon/human/proc/pl_effects()
/mob/living/carbon/human/pl_effects()
//Handles all the bad things plasma can do.
//Contamination
if(vsc.plc.CLOTH_CONTAMINATION) contaminate()
//Anything else requires them to not be dead.
if(stat >= 2)
return
//Burn skin if exposed.
if(vsc.plc.SKIN_BURNS)
if(!pl_head_protected() || !pl_suit_protected())
burn_skin(0.75)
if (coughedtime != 1)
coughedtime = 1
emote("gasp")
spawn (20)
coughedtime = 0
if(prob(20)) src << "\red Your skin burns!"
updatehealth()
if(vsc.plc.EYE_BURNS && !pl_head_protected())
if(!wear_mask)
if(prob(20)) usr << "\red Your eyes burn!"
eye_stat += 2.5
eye_blurry += 1.5
if (eye_stat >= 20 && !(disabilities & 1))
src << "\red Your eyes start to burn badly!"
disabilities |= 1
if (prob(max(0,eye_stat - 20) + 1))
src << "\red You are blinded!"
eye_blind += 20
eye_stat = max(eye_stat-25,0)
//Burn eyes if exposed.
if(vsc.plc.EYE_BURNS)
if(!head)
if(!wear_mask)
burn_eyes()
else
if(!(wear_mask.flags & MASKCOVERSEYES))
burn_eyes()
else
if(!(wear_mask.flags & MASKCOVERSEYES))
if(prob(20)) usr << "\red Your eyes burn!"
eye_stat += 2.5
eye_blurry = min(eye_blurry+1.5,50)
if (eye_stat >= 20 && !(disabilities & 1))
src << "\red Your eyes start to burn badly!"
disabilities |= 1
if (prob(max(0,eye_stat - 20) + 1) &&!eye_blind)
src << "\red You are blinded!"
eye_blind += 20
eye_stat = 0
if(!(head.flags & HEADCOVERSEYES))
if(!wear_mask)
burn_eyes()
else
if(!(wear_mask.flags & MASKCOVERSEYES))
burn_eyes()
//Genetic Corruption
if(vsc.plc.GENETIC_CORRUPTION)
if(rand(1,1000) < vsc.plc.GENETIC_CORRUPTION)
if(rand(1,10000) < vsc.plc.GENETIC_CORRUPTION)
randmutb(src)
src << "\red High levels of toxins cause you to spontaneously mutate."
domutcheck(src,null)
/mob/living/carbon/human/proc/FireBurn(mx as num)
//NO! NOT INTO THE PIT! IT BURRRRRNS!
mx *= vsc.BURN_DMG
var
head_exposure = 1
chest_exposure = 1
groin_exposure = 1
legs_exposure = 1
feet_exposure = 1
arms_exposure = 1
hands_exposure = 1
for(var/obj/item/clothing/C in src)
if(l_hand == C || r_hand == C) continue
if(C.body_parts_covered & HEAD)
head_exposure *= C.heat_transfer_coefficient
if(C.body_parts_covered & UPPER_TORSO)
chest_exposure *= C.heat_transfer_coefficient
if(C.body_parts_covered & LOWER_TORSO)
groin_exposure *= C.heat_transfer_coefficient
if(C.body_parts_covered & LEGS)
legs_exposure *= C.heat_transfer_coefficient
if(C.body_parts_covered & FEET)
feet_exposure *= C.heat_transfer_coefficient
if(C.body_parts_covered & ARMS)
arms_exposure *= C.heat_transfer_coefficient
if(C.body_parts_covered & HANDS)
arms_exposure *= C.heat_transfer_coefficient
mx *= 10
apply_damage("head", 0, 2.5*mx*head_exposure)
apply_damage("chest", 0, 2.5*mx*chest_exposure)
apply_damage("groin", 0, 2.0*mx*groin_exposure)
apply_damage("l_leg", 0, 0.6*mx*legs_exposure)
apply_damage("r_leg", 0, 0.6*mx*legs_exposure)
apply_damage("l_arm", 0, 0.4*mx*arms_exposure)
apply_damage("r_arm", 0, 0.4*mx*arms_exposure)
apply_damage("l_foot", 0, 0.25*mx*feet_exposure)
apply_damage("r_foot", 0, 0.25*mx*feet_exposure)
apply_damage("l_hand", 0, 0.25*mx*hands_exposure)
apply_damage("r_hand", 0, 0.25*mx*hands_exposure)
/mob/living/carbon/human/proc/suit_interior()
. = list()
if(!pl_suit_protected())
for(var/obj/item/I in src)
. += I
return .
. += wear_mask
. += w_uniform
. += shoes
. += gloves
if(!pl_head_protected())
. += head
/mob/living/carbon/human/proc/burn_eyes()
//The proc that handles eye burning.
if(prob(20)) src << "\red Your eyes burn!"
eye_stat += 2.5
eye_blurry = min(eye_blurry+1.5,50)
if (prob(max(0,eye_stat - 20) + 1) &&!eye_blind)
src << "\red You are blinded!"
eye_blind += 20
eye_stat = 0
/mob/living/carbon/human/proc/pl_head_protected()
//Checks if the head is adequately sealed.
if(head)
if(head.flags & PLASMAGUARD || head.flags & HEADSPACE) return 1
if(vsc.plc.PLASMAGUARD_ONLY)
if(head.flags & PLASMAGUARD || head.flags & HEADSPACE) return 1
else
if(head.flags & HEADCOVERSEYES) return 1
return 0
/mob/living/carbon/human/proc/pl_suit_protected()
//Checks if the suit is adequately sealed.
if(wear_suit)
if(wear_suit.flags & PLASMAGUARD || wear_suit.flags & SUITSPACE) return 1
if(vsc.plc.PLASMAGUARD_ONLY)
if(wear_suit.flags & PLASMAGUARD || wear_suit.flags & SUITSPACE) return 1
else
if(wear_suit.flags_inv & HIDEJUMPSUIT) return 1
return 0
/mob/living/carbon/human/proc/suit_contamination()
if(vsc.plc.ALL_ITEM_CONTAMINATION)
for(var/obj/item/I in src)
I.contaminated = 1
else
if(wear_suit) wear_suit.contaminated = 1
if(w_uniform) w_uniform.contaminated = 1
if(shoes) shoes.contaminated = 1
if(gloves) gloves.contaminated = 1
if(wear_mask) wear_mask.contaminated = 1
//Runs over the things that can be contaminated and does so.
if(w_uniform) w_uniform.contaminate()
if(shoes) shoes.contaminate()
if(gloves) gloves.contaminate()
turf/Entered(obj/item/I)
. = ..()
if(istype(I))
//Items that are in plasma, but not on a mob, can still be contaminated.
if(istype(I) && vsc.plc.CLOTH_CONTAMINATION)
var/datum/gas_mixture/env = return_air(1)
if(env.toxins > 0.35)
if(env.toxins > MOLES_PLASMA_VISIBLE + 1)
if(I.can_contaminate())
I.contaminated = 1
I.contaminate()
+169 -45
View File
@@ -1,20 +1,28 @@
#define QUANTIZE(variable) (round(variable,0.0001))
var/explosion_halt = 0
var/zone_share_percent = 1
zone
proc/process()
//Does rebuilding stuff. Not sure if used.
if(rebuild)
//Deletes zone if empty.
if(!contents.len)
del src
return 0
//Choose a random turf and regenerate the zone from it.
var
turf/sample = pick(contents)
list/new_contents = FloodFill(sample)
problem = 0
//If something isn't carried over, there was a complication.
for(var/turf/T in contents)
if(!(T in new_contents))
problem = 1
if(problem)
//Build some new zones for stuff that wasn't included.
var/list/rebuild_turfs = list()
for(var/turf/T in contents - new_contents)
contents -= T
@@ -26,74 +34,190 @@ zone
Z.air.copy_from(air)
rebuild = 0
var/total_space = 0
var/turf/space/space
//Sometimes explosions will cause the air to be deleted for some reason.
if(!air)
air = new()
air.adjustGases(MOLES_O2STANDARD, 0, MOLES_N2STANDARD, 0, list())
world.log << "Air object lost in zone. Regenerating."
if(length(connected_zones))
for(var/zone/Z in connected_zones)
total_space += length(Z.space_tiles)
if(length(Z.space_tiles))
space = Z.space_tiles[1]
//Counting up space.
var/total_space = 0
if(space_tiles)
for(var/T in space_tiles)
if(!istype(T,/turf/space)) space_tiles -= T
total_space += length(space_tiles)
if(length(space_tiles))
space = space_tiles[1]
total_space++
if(total_space && space)
var/old_pressure = air.return_pressure()
air.temperature_mimic(space,OPEN_HEAT_TRANSFER_COEFFICIENT,total_space)
air.remove(MOLES_CELLSTANDARD * (air.group_multiplier/40) * total_space)
if(dbg_output) world << "Space removed [MOLES_CELLSTANDARD*(air.group_multiplier/40)*total_space] moles of air."
var/p_diff = old_pressure - air.return_pressure()
if(p_diff > vsc.AF_TINY_MOVEMENT_THRESHOLD) AirflowSpace(src,p_diff)
//Add checks to ensure that we're not sucking air out of an empty room.
if(total_space && air.total_moles > 0.1 && air.temperature > TCMB+0.5)
//If there is space, air should flow out of the zone.
if(abs(air.pressure) > vsc.airflow_lightest_pressure)
AirflowSpace(src)
ShareSpace(air,total_space*(zone_share_percent/100))
air.react(null,0)
var/check = air.check_tile_graphic()
for(var/turf/T in contents)
if(T.zone && T.zone != src)
RemoveTurf(T)
if(dbg_output) world << "Removed invalid turf."
if(air.group_multiplier <= 0) // No more turfs belong to this zone, so we can get rid of it
del(src)
else // Turf was valid, so we can handle it
if(!T.zone)
T.zone = src
//React the air here.
//air.react(null,0)
if(istype(T,/turf/simulated))
var/turf/simulated/S = T
if(S.fire_protection) S.fire_protection--
if(check)
if(S.HasDoor(1))
S.update_visuals()
else
S.update_visuals(air)
//Check the graphic.
if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
for(var/atom/movable/item in S)
item.temperature_expose(air, air.temperature, CELL_VOLUME)
S.temperature_expose(air, air.temperature, CELL_VOLUME)
air.graphic = 0
if(air.toxins > MOLES_PLASMA_VISIBLE)
air.graphic = 1
else if(air.trace_gases.len)
var/datum/gas/sleeping_agent = locate(/datum/gas/sleeping_agent) in air.trace_gases
if(sleeping_agent && (sleeping_agent.moles > 1))
air.graphic = 2
else
air.graphic = 0
//Only run through the individual turfs if there's reason to.
if(air.graphic != air.graphic_archived || air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
for(var/turf/simulated/S in contents)
//Update overlays.
if(air.graphic != air.graphic_archived)
if(S.HasDoor(1))
S.update_visuals()
else
S.update_visuals(air)
//Expose stuff to extreme heat.
if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
for(var/atom/movable/item in S)
item.temperature_expose(air, air.temperature, CELL_VOLUME)
S.temperature_expose(air, air.temperature, CELL_VOLUME)
//Archive graphic so we can know if it's different.
air.graphic_archived = air.graphic
//Ensure temperature does not reach absolute zero.
air.temperature = max(TCMB,air.temperature)
//Handle connections to other zones.
if(length(connections))
for(var/connection/C in connections)
//Check if the connection is valid first.
C.Cleanup()
if(C && !C.indirect)
if(C.A.zone.air.compare(C.B.zone.air))
//Do merging if conditions are met. Specifically, if there's a non-door connection
//to somewhere with space, the zones are merged regardless of equilibrium, to speed
//up spacing in areas with double-plated windows.
if(C && !C.indirect && C.A.zone && C.B.zone)
if(C.A.zone.air.compare(C.B.zone.air) || total_space)
ZMerge(C.A.zone,C.B.zone)
//Share some
for(var/zone/Z in connected_zones)
var/p_diff = (air.return_pressure()-Z.air.return_pressure())*connected_zones[Z]*(vsc.zone_share_percent/100)
if(p_diff > vsc.AF_TINY_MOVEMENT_THRESHOLD) Airflow(src,Z,p_diff)
air.share_ratio(Z.air,connected_zones[Z]*(vsc.zone_share_percent/100))
//Ensure we're not doing pointless calculations on equilibrium zones.
if(abs(air.total_moles - Z.air.total_moles) > 0.1 || abs(air.temperature - Z.air.temperature) > 0.1)
if(abs(Z.air.pressure - air.pressure) > vsc.airflow_lightest_pressure)
Airflow(src,Z)
ShareRatio(air,Z.air,connected_zones[Z]*(zone_share_percent/100))
proc/ShareRatio(datum/gas_mixture/A, datum/gas_mixture/B, ratio)
//Shares a specific ratio of gas between mixtures using simple weighted averages.
var
size = max(1,A.group_multiplier)
share_size = max(1,B.group_multiplier)
full_oxy = A.oxygen * size
full_nitro = A.nitrogen * size
full_co2 = A.carbon_dioxide * size
full_plasma = A.toxins * size
full_heat_capacity = A.heat_capacity() * size
s_full_oxy = B.oxygen * share_size
s_full_nitro = B.nitrogen * share_size
s_full_co2 = B.carbon_dioxide * share_size
s_full_plasma = B.toxins * share_size
s_full_heat_capacity = B.heat_capacity() * share_size
oxy_avg = (full_oxy + s_full_oxy) / (size + share_size)
nit_avg = (full_nitro + s_full_nitro) / (size + share_size)
co2_avg = (full_co2 + s_full_co2) / (size + share_size)
plasma_avg = (full_plasma + s_full_plasma) / (size + share_size)
temp_avg = (A.temperature * full_heat_capacity + B.temperature * s_full_heat_capacity) / (full_heat_capacity + s_full_heat_capacity)
A.oxygen = (A.oxygen - oxy_avg) * (1-ratio) + oxy_avg
A.nitrogen = (A.nitrogen - nit_avg) * (1-ratio) + nit_avg
A.carbon_dioxide = (A.carbon_dioxide - co2_avg) * (1-ratio) + co2_avg
A.toxins = (A.toxins - plasma_avg) * (1-ratio) + plasma_avg
A.temperature = (A.temperature - temp_avg) * (1-ratio) + temp_avg
B.oxygen = (B.oxygen - oxy_avg) * (1-ratio) + oxy_avg
B.nitrogen = (B.nitrogen - nit_avg) * (1-ratio) + nit_avg
B.carbon_dioxide = (B.carbon_dioxide - co2_avg) * (1-ratio) + co2_avg
B.toxins = (B.toxins - plasma_avg) * (1-ratio) + plasma_avg
B.temperature = (B.temperature - temp_avg) * (1-ratio) + temp_avg
for(var/datum/gas/G in A.trace_gases)
var/datum/gas/H = locate(G.type) in B.trace_gases
if(H)
var/G_avg = (G.moles*size + H.moles*share_size) / (size+share_size)
G.moles = (G.moles - G_avg) * (1-ratio) + G_avg
H.moles = (H.moles - G_avg) * (1-ratio) + G_avg
else
H = new G.type
B.trace_gases += H
var/G_avg = (G.moles*size) / (size+share_size)
G.moles = (G.moles - G_avg) * (1-ratio) + G_avg
H.moles = (H.moles - G_avg) * (1-ratio) + G_avg
A.update_values()
B.update_values()
if(A.compare(B)) return 1
else return 0
proc/ShareSpace(datum/gas_mixture/A, ratio)
//A modified version of ShareRatio for spacing gas at the same rate as if it were going into a large airless room.
var
size = max(1,A.group_multiplier)
share_size = max(1,A.group_multiplier)
full_oxy = A.oxygen * size
full_nitro = A.nitrogen * size
full_co2 = A.carbon_dioxide * size
full_plasma = A.toxins * size
full_heat_capacity = A.heat_capacity() * size
space_heat_capacity = MINIMUM_HEAT_CAPACITY * share_size
oxy_avg = (full_oxy) / (size + share_size)
nit_avg = (full_nitro) / (size + share_size)
co2_avg = (full_co2) / (size + share_size)
plasma_avg = (full_plasma) / (size + share_size)
temp_avg = (A.temperature * full_heat_capacity + TCMB * space_heat_capacity) / (full_heat_capacity + space_heat_capacity)
A.oxygen = (A.oxygen - oxy_avg) * (1-ratio) + oxy_avg
A.nitrogen = (A.nitrogen - nit_avg) * (1-ratio) + nit_avg
A.carbon_dioxide = (A.carbon_dioxide - co2_avg) * (1-ratio) + co2_avg
A.toxins = (A.toxins - plasma_avg) * (1-ratio) + plasma_avg
A.temperature = (A.temperature - temp_avg) * (1-ratio) + temp_avg
//833 * 0.9 + 833 =
//(5000/3) = 1666
//(5000/6) = 833
for(var/datum/gas/G in A.trace_gases)
var/G_avg = (G.moles*size + 0) / (size+share_size)
G.moles = (G.moles - G_avg) * (1-ratio) + G_avg
A.update_values()
return 1
zone/proc
connected_zones()
//A legacy proc for getting connected zones.
. = list()
for(var/connection/C in connections)
var/zone/Z
+10 -26
View File
@@ -119,8 +119,6 @@ vs_control
if("Original")
plc.CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth.
plc.ALL_ITEM_CONTAMINATION = 0 //If this is on, any item can be contaminated, so suits and tools must be discarded or
plc.PLASMAGUARD_ONLY = 0
//plc.CANISTER_CORROSION = 0 //If this is on, plasma must be stored in orange tanks and canisters,
@@ -133,6 +131,8 @@ vs_control
plc.EYE_BURNS = 0 //Plasma burns the eyes of anyone not wearing eye protection.
plc.PLASMA_HALLUCINATION = 0
//plc.N2O_REACTION = 0 //Plasma can react with N2O, making sparks and starting a fire if levels are high.
//plc.PLASMA_COLOR = "onturf" //Plasma can change colors yaaaay!
@@ -141,10 +141,8 @@ vs_control
//plc.PLASMA_DMG_QUOTIENT = 10
plc.CONTAMINATION_LOSS = 0
if("Hazard-Low")
plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth.
plc.ALL_ITEM_CONTAMINATION = 0 //If this is on, any item can be contaminated, so suits and tools must be discarded or
if("Hazard - Low")
plc.CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth.
plc.PLASMAGUARD_ONLY = 0
@@ -152,7 +150,7 @@ vs_control
plc.GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 1000.
plc.SKIN_BURNS = 0 //Plasma has an effect similar to mustard gas on the un-suited.
plc.SKIN_BURNS = 1 //Plasma has an effect similar to mustard gas on the un-suited.
// plc.PLASMA_INJECTS_TOXINS = 0 //Plasma damage injects the toxins chemical to do damage over time.
@@ -168,27 +166,22 @@ vs_control
//plc.PLASMA_DMG_OFFSET = 1.5
//plc.PLASMA_DMG_QUOTIENT = 8
plc.CONTAMINATION_LOSS = 0.01
plc.CONTAMINATION_LOSS = 0
var/s = pick(plc.settings)
plc.Randomize(s)
if("Hazard-High")
if("Hazard - High")
plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth.
plc.ALL_ITEM_CONTAMINATION = 0 //If this is on, any item can be contaminated, so suits and tools must be discarded or
plc.PLASMAGUARD_ONLY = 0
// plc.CANISTER_CORROSION = 1 //If this is on, plasma must be stored in orange tanks and canisters,
plc.GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 1000.
plc.SKIN_BURNS = 0 //Plasma has an effect similar to mustard gas on the un-suited.
plc.SKIN_BURNS = 1 //Plasma has an effect similar to mustard gas on the un-suited.
// plc.PLASMA_INJECTS_TOXINS = 0 //Plasma damage injects the toxins chemical to do damage over time.
plc.EYE_BURNS = 0 //Plasma burns the eyes of anyone not wearing eye protection.
plc.EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection.
// plc.N2O_REACTION = 0 //Plasma can react with N2O, making sparks and starting a fire if levels are high.
@@ -197,17 +190,9 @@ vs_control
//plc.PLASMA_DMG_OFFSET = 3
//plc.PLASMA_DMG_QUOTIENT = 5
plc.CONTAMINATION_LOSS = 0.05
for(var/i = rand(3,5),i>0,i--)
var/s = pick(plc.settings)
plc.Randomize(s)
if("Everything")
if("Oh Shit!")
plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth.
plc.ALL_ITEM_CONTAMINATION = 1 //If this is on, any item can be contaminated, so suits and tools must be discarded or ELSE
plc.PLASMAGUARD_ONLY = 1
// plc.CANISTER_CORROSION = 1 //If this is on, plasma must be stored in orange tanks and canisters,
@@ -227,7 +212,6 @@ vs_control
//plc.PLASMA_DMG_OFFSET = 3
//plc.PLASMA_DMG_QUOTIENT = 5
plc.CONTAMINATION_LOSS = 0.02
/////world << "Plasma color updated."
pl_control
+16 -1
View File
@@ -392,6 +392,21 @@ client
//All BYOND links pass through client/Topic() FIRST and are then directed to [hsrc]/Topic() by the ..() call at the end.
client/Topic(href, href_list, hsrc)
file("topic_log") << "[time2text(world.realtime, "DDD MMM DD YYYY")] at [time2text(world.timeofday, "hh:mm:ss")], [ckey], \"[url_encode(href)]\""
// build some more useful info
var/references = ""
for(var/href_key in href_list)
var/href_val = locate(href_list[href_key])
references += "[href_key] = [href_val]("
if(istype(href_val,/datum))
references += "[href_val:type]"
if(istype(href_val,/atom))
references += " at [href_val:x],[href_val:y],[href_val:z]"
references += "); "
file("topic_log") << references
sleep(3)
//search the href for script injection //This is a temporary measure
if( findtext(href,"<script",1,0) )
@@ -416,7 +431,7 @@ client/Topic(href, href_list, hsrc)
//~CARN: for renaming mobs (updates their real_name and their ID/PDA if applicable).
else if (href_list["rename"])
var/new_name = input(usr,"What would you like to name this mob?","Input a name") as text|null
var/new_name = copytext(sanitize(input(usr,"What would you like to name this mob?","Input a name") as text|null),1,MAX_NAME_LEN)
if(!new_name) return
var/mob/M = locate(href_list["rename"])
if(!istype(M)) return
+1 -1
View File
@@ -52,7 +52,7 @@
//must succeed in most cases
proc/setTeleatom(atom/movable/ateleatom)
if(istype(ateleatom, /obj/effect))
if(istype(ateleatom, /obj/effect) && !istype(ateleatom, /obj/effect/dummy/chameleon))
del(ateleatom)
return 0
if(istype(ateleatom))
+3 -2
View File
@@ -579,14 +579,15 @@ var/global/datum/tension/tension_master
if(synd_mind.current.client)
for(var/image/I in synd_mind.current.client.images)
if(I.icon_state == "synd")
del(I)
synd_mind.current.client.images -= I
for(var/datum/mind/synd_mind in ticker.mode.syndicates)
if(synd_mind.current)
if(synd_mind.current.client)
for(var/datum/mind/synd_mind_1 in ticker.mode.syndicates)
if(synd_mind_1.current)
var/I = image('mob.dmi', loc = synd_mind_1.current, icon_state = "synd")
var/image/I = synd_mind_1.current.antag_img
I.icon_state = "synd"
synd_mind.current.client.images += I
for (var/obj/machinery/nuclearbomb/bomb in world)
+11 -2
View File
@@ -20,6 +20,12 @@ datum/mind
var/rev_cooldown = 0
proc/transfer_to(mob/new_character)
// multikey information is stored in the mob, not the mind, so
// we need to clean this stuff up to avoid multikey alerts
current.lastKnownIP = null
current.computer_id = null
if(current)
current.mind = null
@@ -28,6 +34,9 @@ datum/mind
new_character.key = key
// mob/Login() will handle setting the new mob's lastKnownIP and
// computer_id for us
proc/store_memory(new_text)
memory += "[new_text]<BR>"
@@ -296,7 +305,7 @@ datum/mind
role_alt_title = null
else if (href_list["memory_edit"])
var/new_memo = input("Write new memory", "Memory", memory) as null|message
var/new_memo = copytext(sanitize(input("Write new memory", "Memory", memory) as null|message),1,MAX_MESSAGE_LEN)
if (isnull(new_memo)) return
memory = new_memo
@@ -399,7 +408,7 @@ datum/mind
new_objective:target_amount = target_number
if ("custom")
var/expl = input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null
var/expl = copytext(sanitize(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null),1,MAX_MESSAGE_LEN)
if (!expl) return
new_objective = new /datum/objective
new_objective.owner = src
+15 -15
View File
@@ -1,7 +1,8 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/datum/data
var
name = "data"
size = 1.0
var/name = "data"
var/size = 1.0
/datum/data/function
@@ -30,20 +31,19 @@
/datum/powernet
var
list/cables = list() // all cables & junctions
list/nodes = list() // all APCs & sources
var/list/cables = list() // all cables & junctions
var/list/nodes = list() // all APCs & sources
newload = 0
load = 0
newavail = 0
avail = 0
viewload = 0
number = 0
perapc = 0 // per-apc avilability
netexcess = 0
var/newload = 0
var/load = 0
var/newavail = 0
var/avail = 0
var/viewload = 0
var/number = 0
var/perapc = 0 // per-apc avilability
var/netexcess = 0
/datum/debug
var/list/debuglist
var/list/debuglist
+43 -29
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
// Controls the emergency shuttle
@@ -10,17 +12,18 @@
var/global/datum/shuttle_controller/emergency_shuttle/emergency_shuttle
datum/shuttle_controller
var
location = 0 //0 = somewhere far away (in spess), 1 = at SS13, 2 = returned from SS13
online = 0
direction = 1 //-1 = going back to central command, 1 = going to SS13, 2 = in transit to centcom (not recalled)
var/alert = 0 //0 = emergency, 1 = crew cycle
endtime // timeofday that shuttle arrives
timelimit //important when the shuttle gets called for more than shuttlearrivetime
var/location = 0 //0 = somewhere far away (in spess), 1 = at SS13, 2 = returned from SS13
var/online = 0
var/direction = 1 //-1 = going back to central command, 1 = going to SS13, 2 = in transit to centcom (not recalled)
var/endtime // timeofday that shuttle arrives
var/timelimit //important when the shuttle gets called for more than shuttlearrivetime
//timeleft = 360 //600
fake_recall = 0 //Used in rounds to prevent "ON NOES, IT MUST [INSERT ROUND] BECAUSE SHUTTLE CAN'T BE CALLED"
deny_shuttle = 0 //for admins not allowing it to be called.
departed = 0
var/fake_recall = 0 //Used in rounds to prevent "ON NOES, IT MUST [INSERT ROUND] BECAUSE SHUTTLE CAN'T BE CALLED"
var/deny_shuttle = 0 //for admins not allowing it to be called.
var/departed = 0
// sound_siren = 1 //if siren should go off //People hat it :(
// call the shuttle
// if not called before, set the endtime to T+600 seconds
@@ -36,28 +39,35 @@ datum/shuttle_controller
settimeleft(SHUTTLEARRIVETIME*coeff)
online = 1
//turning on the red lights in hallways and siren
for(var/area/A in world)
if(istype(A, /area/hallway))
A.readyalert()
//sound_siren = 1
if(coeff == 1)
for(var/area/A in world)
if(istype(A, /area/hallway))
A.readyalert()
//sound_siren = 1
proc/shuttlealert(var/X)
alert = X
proc/recall()
if(direction == 1)
var/timeleft = timeleft()
if(timeleft >= 600)
if(alert == 0)
if(timeleft >= 600)
return
captain_announce("The emergency shuttle has been recalled.")
world << sound('shuttlerecalled.ogg')
setdirection(-1)
online = 1
for(var/area/A in world)
if(istype(A, /area/hallway))
A.readyreset()
return
else //makes it possible to send shuttle back.
captain_announce("The shuttle has been recalled.")
setdirection(-1)
online = 1
return
captain_announce("The emergency shuttle has been recalled.")
world << sound('shuttlerecalled.ogg')
setdirection(-1)
online = 1
//turning off the red lights in hallways and siren
for(var/area/A in world)
if(istype(A, /area/hallway))
A.readyreset()
// sound_siren = 0
// returns the time (in seconds) before shuttle arrival
// note if direction = -1, gives a count-up to SHUTTLEARRIVETIME
@@ -192,9 +202,11 @@ datum/shuttle_controller
start_location.move_contents_to(end_location)
settimeleft(SHUTTLELEAVETIME)
captain_announce("The Emergency Shuttle has docked with the station. You have [timeleft()/60] minutes to board the Emergency Shuttle.")
world << sound('shuttledock.ogg')
if(alert == 0)
captain_announce("The Emergency Shuttle has docked with the station. You have [timeleft()/60] minutes to board the Emergency Shuttle.")
world << sound('shuttledock.ogg')
else
captain_announce("The shuttle has docked with the station. You have [timeleft()/60] minutes to board the shuttle.")
return 1
if(1)
@@ -262,8 +274,10 @@ datum/shuttle_controller
spawn(0)
D.close()
captain_announce("The Emergency Shuttle has left the station. Estimate [timeleft()/60] minutes until the shuttle docks at Central Command.")
if(alert == 0)
captain_announce("The Emergency Shuttle has left the station. Estimate [timeleft()/60] minutes until the shuttle docks at Central Command.")
else
captain_announce("The shuttle has left the station. Estimate [timeleft()/60] minutes until the shuttle docks at Central Command.")
// Some aesthetic turbulance shaking
for(var/mob/M in end_location)
+3 -1
View File
@@ -8,4 +8,6 @@
var/customname
var/choices = list()
var/enteringchoices = 0
var/enteringchoices = 0
var/instant_restart = 0
+31 -27
View File
@@ -723,7 +723,7 @@ proc/process_ghost_teleport_locs()
//Crew
/area/crew_quarters
name = "Dormitory"
name = "Dormitories"
icon_state = "Sleep"
/area/crew_quarters/toilet
@@ -842,25 +842,25 @@ proc/process_ghost_teleport_locs()
//Engineering
/area/engine
engineering
engine_smes
name = "Engineering SMES"
icon_state = "engine_smes"
requires_power = 0//This area only covers the batteries and they deal with their own power
engineering
engineering_break_room
name = "Engineering Break Room"
icon_state = "engine_breakroom"
chiefs_office
name = "Chief Engineer's office"
icon_state = "engine_ce"
particle_accelerator
name = "Particle Accelerator"
icon_state = "engine_pa"
chiefs_office
name = "Chief Engineers office"
icon_state = "engine_ce"
engineering_break_room
name = "Engineering Breakroom"
icon_state = "engine_breakroom"
control
name = "Engineering Control"
icon_state = "engine_control"
@@ -1008,7 +1008,7 @@ proc/process_ghost_teleport_locs()
icon_state = "showroom"
/area/assembly/assembly_line
name = "Assembly Line"
name = "Robotics Assembly Line"
icon_state = "ass_line"
//Teleporter
@@ -1079,6 +1079,10 @@ proc/process_ghost_teleport_locs()
name = "Genetics"
icon_state = "genetics"
/area/medical/sleeper
name = "Medical Sleepers Room"
icon_state = "medbay"
//Security
/area/security/main
@@ -1106,7 +1110,7 @@ proc/process_ghost_teleport_locs()
icon_state = "security"
/area/security/hos
name = "Head of Security"
name = "Head of Security's Office"
icon_state = "security"
/area/security/detectives_office
@@ -1187,7 +1191,7 @@ proc/process_ghost_teleport_locs()
icon_state = "yellow"
/area/janitor/
name = "Janitors Closet"
name = "Custodial Closet"
icon_state = "janitor"
/area/hydroponics
@@ -1221,15 +1225,15 @@ proc/process_ghost_teleport_locs()
icon_state = "toxlab"
/area/toxins/storage
name = "Toxin Storage"
name = "Toxins Storage"
icon_state = "toxstorage"
/area/toxins/test_area
name = "Toxins Lab Test Area"
name = "Toxins Test Area"
icon_state = "toxtest"
/area/toxins/mixing
name = "Toxins Lab Mixing Room"
name = "Toxins Mixing Room"
icon_state = "toxmix"
/area/toxins/observatory
@@ -1247,7 +1251,7 @@ proc/process_ghost_teleport_locs()
//Storage
/area/storage/tools
name = "Tool Storage"
name = "Auxiliary Tool Storage"
icon_state = "storage"
/area/storage/primary
@@ -1275,11 +1279,11 @@ proc/process_ghost_teleport_locs()
icon_state = "storage"
/area/storage/emergency
name = "Emergency Storage A"
name = "Starboard Emergency Storage"
icon_state = "emergencystorage"
/area/storage/emergency2
name = "Emergency Storage B"
name = "Port Emergency Storage"
icon_state = "emergencystorage"
/area/storage/tech
@@ -1316,7 +1320,7 @@ proc/process_ghost_teleport_locs()
icon_state = "hallS"
/area/derelict/arrival
name = "Arrival Centre"
name = "Derelict Arrival Centre"
icon_state = "yellow"
/area/derelict/storage/equipment
@@ -1330,23 +1334,23 @@ proc/process_ghost_teleport_locs()
icon_state = "green"
/area/derelict/bridge
name = "Control Room"
name = "Derelict Control Room"
icon_state = "bridge"
/area/derelict/secret
name = "Secret Room"
name = "Derelict Secret Room"
icon_state = "library"
/area/derelict/bridge/access
name = "Control Room Access"
name = "Derelict Control Room Access"
icon_state = "auxstorage"
/area/derelict/bridge/ai_upload
name = "Ruined Computer Core"
name = "Derelict Computer Core"
icon_state = "ai"
/area/derelict/solar_control
name = "Solar Control"
name = "Derelict Solar Control"
icon_state = "engine"
/area/derelict/crew_quarters
@@ -1374,7 +1378,7 @@ proc/process_ghost_teleport_locs()
icon_state = "eva"
/area/derelict/ship
name = "Abandoned ship"
name = "Abandoned Ship"
icon_state = "yellow"
/area/solar/derelict_starboard
+2 -2
View File
@@ -17,7 +17,7 @@
// replaced by OPENCONTAINER flags and atom/proc/is_open_container()
///Chemistry.
proc/assume_air(datum/air_group/giver)
proc/assume_air(datum/gas_mixture/giver)
del(giver)
return null
@@ -48,7 +48,7 @@
*/
obj
assume_air(datum/air_group/giver)
assume_air(datum/gas_mixture/giver)
if(loc)
return loc.assume_air(giver)
else
+156 -155
View File
@@ -1,16 +1,17 @@
var/global
obj/datacore/data_core = null
obj/effect/overlay/plmaster = null
obj/effect/overlay/slmaster = null
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
var/global/obj/datacore/data_core = null
var/global/obj/effect/overlay/plmaster = null
var/global/obj/effect/overlay/slmaster = null
//obj/hud/main_hud1 = null
list/machines = list()
list/processing_objects = list()
list/active_diseases = list()
var/global/list/machines = list()
var/global/list/processing_objects = list()
var/global/list/active_diseases = list()
//items that ask to be called every cycle
defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event
var/global/defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event
//list/global_map = null //Borked, do not touch. DMTG
//list/global_map = list(list(1,5),list(4,3))//an array of map Z levels.
@@ -23,195 +24,196 @@ var/global
//3 - AI satellite
//5 - empty space
var
//////////////
BLINDBLOCK = 0
DEAFBLOCK = 0
HULKBLOCK = 0
TELEBLOCK = 0
FIREBLOCK = 0
XRAYBLOCK = 0
CLUMSYBLOCK = 0
FAKEBLOCK = 0
BLOCKADD = 0
DIFFMUT = 0
HEADACHEBLOCK = 0
COUGHBLOCK = 0
TWITCHBLOCK = 0
NERVOUSBLOCK = 0
NOBREATHBLOCK = 0
REMOTEVIEWBLOCK = 0
REGENERATEBLOCK = 0
INCREASERUNBLOCK = 0
REMOTETALKBLOCK = 0
MORPHBLOCK = 0
BLENDBLOCK = 0
HALLUCINATIONBLOCK = 0
NOPRINTSBLOCK = 0
SHOCKIMMUNITYBLOCK = 0
SMALLSIZEBLOCK = 0
GLASSESBLOCK = 0
MONKEYBLOCK = 27
var/BLINDBLOCK = 0
var/DEAFBLOCK = 0
var/HULKBLOCK = 0
var/TELEBLOCK = 0
var/FIREBLOCK = 0
var/XRAYBLOCK = 0
var/CLUMSYBLOCK = 0
var/FAKEBLOCK = 0
var/BLOCKADD = 0
var/DIFFMUT = 0
var/HEADACHEBLOCK = 0
var/COUGHBLOCK = 0
var/TWITCHBLOCK = 0
var/NERVOUSBLOCK = 0
var/NOBREATHBLOCK = 0
var/REMOTEVIEWBLOCK = 0
var/REGENERATEBLOCK = 0
var/INCREASERUNBLOCK = 0
var/REMOTETALKBLOCK = 0
var/MORPHBLOCK = 0
var/BLENDBLOCK = 0
var/HALLUCINATIONBLOCK = 0
var/NOPRINTSBLOCK = 0
var/SHOCKIMMUNITYBLOCK = 0
var/SMALLSIZEBLOCK = 0
var/GLASSESBLOCK = 0
var/MONKEYBLOCK = 27
skipupdate = 0
var/skipupdate = 0
///////////////
eventchance = 1 //% per 2 mins
EventsOn = 1
hadevent = 0
blobevent = 0
var/eventchance = 1 //% per 2 mins
var/EventsOn = 1
var/hadevent = 0
var/blobevent = 0
///////////////
diary = null
diaryofmeanpeople = null
station_name = null
game_version = "Baystation 12"
var/diary = null
var/diaryofmeanpeople = null
var/station_name = null
var/game_version = "Baystation 12"
datum/air_tunnel/air_tunnel1/SS13_airtunnel = null
going = 1.0
master_mode = "traitor"//"extended"
secret_force_mode = "secret" // if this is anything but "secret", the secret rotation will forceably choose this mode
var/datum/air_tunnel/air_tunnel1/SS13_airtunnel = null
var/going = 1.0
var/master_mode = "traitor"//"extended"
var/secret_force_mode = "secret" // if this is anything but "secret", the secret rotation will forceably choose this mode
datum/engine_eject/engine_eject_control = null
host = null
aliens_allowed = 1
ooc_allowed = 1
dooc_allowed = 1
traitor_scaling = 1
goonsay_allowed = 0
dna_ident = 1
abandon_allowed = 1
enter_allowed = 1
var/datum/engine_eject/engine_eject_control = null
var/host = null
var/aliens_allowed = 1
var/ooc_allowed = 1
var/dooc_allowed = 1
var/traitor_scaling = 1
var/goonsay_allowed = 0
var/dna_ident = 1
var/abandon_allowed = 1
var/enter_allowed = 1
// guests_allowed = 1
shuttle_frozen = 0
shuttle_left = 0
tinted_weldhelh = 1
var/shuttle_frozen = 0
var/shuttle_left = 0
var/tinted_weldhelh = 1
list/jobMax = list()
list/bombers = list( )
list/admin_log = list ( )
list/lastsignalers = list( ) //keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]"
list/lawchanges = list( ) //Stores who uploaded laws to which silicon-based lifeform, and what the law was
list/admins = list( )
list/alien_whitelist = list( )
list/shuttles = list( )
list/reg_dna = list( )
var/list/jobMax = list()
var/list/bombers = list( )
var/list/admin_log = list ( )
var/list/lastsignalers = list( ) //keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]"
var/list/lawchanges = list( ) //Stores who uploaded laws to which silicon-based lifeform, and what the law was
var/list/admins = list( )
var/list/alien_whitelist = list( )
var/list/shuttles = list( )
var/list/reg_dna = list( )
// list/traitobj = list( )
CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
CHARGELEVEL = 0.001 // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
var/CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
var/CHARGELEVEL = 0.001 // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
shuttle_z = 2 //default
airtunnel_start = 68 // default
airtunnel_stop = 68 // default
airtunnel_bottom = 72 // default
list/monkeystart = list()
list/wizardstart = list()
list/newplayer_start = list()
list/latejoin = list()
list/prisonwarp = list() //prisoners go to these
list/holdingfacility = list() //captured people go here
list/xeno_spawn = list()//Aliens spawn at these.
var/shuttle_z = 2 //default
var/airtunnel_start = 68 // default
var/airtunnel_stop = 68 // default
var/airtunnel_bottom = 72 // default
var/list/monkeystart = list()
var/list/wizardstart = list()
var/list/newplayer_start = list()
var/list/latejoin = list()
var/list/prisonwarp = list() //prisoners go to these
var/list/holdingfacility = list() //captured people go here
var/list/xeno_spawn = list()//Aliens spawn at these.
// list/mazewarp = list()
list/tdome1 = list()
list/tdome2 = list()
list/tdomeobserve = list()
list/tdomeadmin = list()
list/prisonsecuritywarp = list() //prison security goes to these
list/prisonwarped = list() //list of players already warped
list/blobstart = list()
var/list/tdome1 = list()
var/list/tdome2 = list()
var/list/tdomeobserve = list()
var/list/tdomeadmin = list()
var/list/prisonsecuritywarp = list() //prison security goes to these
var/list/prisonwarped = list() //list of players already warped
var/list/blobstart = list()
// list/traitors = list() //traitor list
list/cardinal = list( NORTH, SOUTH, EAST, WEST )
list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
list/emclosets = list() //random emergency closets woo
var/list/cardinal = list( NORTH, SOUTH, EAST, WEST )
var/list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
var/list/emclosets = list() //random emergency closets woo
datum/station_state/start_state = null
datum/configuration/config = null
datum/vote/vote = null
datum/sun/sun = null
var/datum/station_state/start_state = null
var/datum/configuration/config = null
var/datum/vote/vote = null
var/datum/sun/sun = null
list/combatlog = list()
list/IClog = list()
list/OOClog = list()
list/adminlog = list()
var/list/combatlog = list()
var/list/IClog = list()
var/list/OOClog = list()
var/list/adminlog = list()
list/powernets = null
var/list/powernets = null
Debug = 0 // global debug switch
Debug2 = 0
var/Debug = 0 // global debug switch
var/Debug2 = 0
datum/debug/debugobj
var/datum/debug/debugobj
datum/moduletypes/mods = new()
var/datum/moduletypes/mods = new()
wavesecret = 0
var/wavesecret = 0
shuttlecoming = 0
var/shuttlecoming = 0
join_motd = null
rules = null
forceblob = 0
var/join_motd = null
var/rules = null
var/forceblob = 0
custom_event_msg = null
var/custom_event_msg = null
//airlockWireColorToIndex takes a number representing the wire color, e.g. the orange wire is always 1, the dark red wire is always 2, etc. It returns the index for whatever that wire does.
//airlockIndexToWireColor does the opposite thing - it takes the index for what the wire does, for example AIRLOCK_WIRE_IDSCAN is 1, AIRLOCK_WIRE_POWER1 is 2, etc. It returns the wire color number.
//airlockWireColorToFlag takes the wire color number and returns the flag for it (1, 2, 4, 8, 16, etc)
list/airlockWireColorToFlag = RandomAirlockWires()
list/airlockIndexToFlag
list/airlockIndexToWireColor
list/airlockWireColorToIndex
list/APCWireColorToFlag = RandomAPCWires()
list/APCIndexToFlag
list/APCIndexToWireColor
list/APCWireColorToIndex
list/BorgWireColorToFlag = RandomBorgWires()
list/BorgIndexToFlag
list/BorgIndexToWireColor
list/BorgWireColorToIndex
list/ScrambledFrequencies = list( ) //These are used for electrical storms, and anything else that jams radios.
list/UnscrambledFrequencies = list( )
list/AAlarmWireColorToFlag = RandomAAlarmWires() // Air Alarm hacking wires.
list/AAlarmIndexToFlag
list/AAlarmIndexToWireColor
list/AAlarmWireColorToIndex
var/list/airlockWireColorToFlag = RandomAirlockWires()
var/list/airlockIndexToFlag
var/list/airlockIndexToWireColor
var/list/airlockWireColorToIndex
var/list/APCWireColorToFlag = RandomAPCWires()
var/list/APCIndexToFlag
var/list/APCIndexToWireColor
var/list/APCWireColorToIndex
var/list/BorgWireColorToFlag = RandomBorgWires()
var/list/BorgIndexToFlag
var/list/BorgIndexToWireColor
var/list/BorgWireColorToIndex
var/list/ScrambledFrequencies = list( ) //These are used for electrical storms, and anything else that jams radios.
var/list/UnscrambledFrequencies = list( )
var/list/AAlarmWireColorToFlag = RandomAAlarmWires() // Air Alarm hacking wires.
var/list/AAlarmIndexToFlag
var/list/AAlarmIndexToWireColor
var/list/AAlarmWireColorToIndex
const/SPEED_OF_LIGHT = 3e8 //not exact but hey!
const/SPEED_OF_LIGHT_SQ = 9e+16
const/FIRE_DAMAGE_MODIFIER = 0.0215 //Higher values result in more external fire damage to the skin (default 0.0215)
const/AIR_DAMAGE_MODIFIER = 2.025 //More means less damage from hot air scalding lungs, less = more damage. (default 2.025)
const/INFINITY = 1e31 //closer then enough
var/const/SPEED_OF_LIGHT = 3e8 //not exact but hey!
var/const/SPEED_OF_LIGHT_SQ = 9e+16
var/const/FIRE_DAMAGE_MODIFIER = 0.0215 //Higher values result in more external fire damage to the skin (default 0.0215)
var/const/AIR_DAMAGE_MODIFIER = 2.025 //More means less damage from hot air scalding lungs, less = more damage. (default 2.025)
var/const/INFINITY = 1e31 //closer then enough
//Don't set this very much higher then 1024 unless you like inviting people in to dos your server with message spam
const/MAX_MESSAGE_LEN = 1024
const/MAX_PAPER_MESSAGE_LEN = 3072
const/MAX_BOOK_MESSAGE_LEN = 9216
var/const/MAX_MESSAGE_LEN = 1024
var/const/MAX_PAPER_MESSAGE_LEN = 3072
var/const/MAX_BOOK_MESSAGE_LEN = 9216
list/paper_blacklist = list("script","frame","iframe","input","button","a","embed","object")
var/const/MAX_NAME_LEN = 40
const/shuttle_time_in_station = 1800 // 3 minutes in the station
const/shuttle_time_to_arrive = 6000 // 10 minutes to arrive
var/list/paper_blacklist = list("script","frame","iframe","input","button","a","embed","object")
var/const/shuttle_time_in_station = 1800 // 3 minutes in the station
var/const/shuttle_time_to_arrive = 6000 // 10 minutes to arrive
// MySQL configuration. You can also use the config/dbconfig.txt file.
sqladdress = "localhost"
sqlport = "3306"
sqldb = "tgstation"
sqllogin = "root"
sqlpass = ""
var/sqladdress = "localhost"
var/sqlport = "3306"
var/sqldb = "tgstation"
var/sqllogin = "root"
var/sqlpass = ""
// Feedback gathering sql connection
sqlfdbkdb = "test"
sqlfdbklogin = "root"
sqlfdbkpass = ""
var/sqlfdbkdb = "test"
var/sqlfdbklogin = "root"
var/sqlfdbkpass = ""
sqllogging = 0 // Should we log deaths, population stats, etc?
var/sqllogging = 0 // Should we log deaths, population stats, etc?
@@ -229,7 +231,7 @@ var
// For FTP requests. (i.e. downloading runtime logs.)
// However it'd be ok to use for accessing attack logs and such too, which are even laggier.
fileaccess_timer = 1800 //Cannot access files by ftp until the game is finished setting up and stuff.
var/fileaccess_timer = 1800 //Cannot access files by ftp until the game is finished setting up and stuff.
// It turns out that /var/const can't handle lists, because lists use
// an initializer. Sigh. That's no reason that we shouldn't make
@@ -237,8 +239,7 @@ var
// separate location, though, so: below are all lists that should not
// ever be changed in code.
/var/global
AI_VERB_LIST = list(
/var/global/AI_VERB_LIST = list(
/mob/living/silicon/ai/proc/ai_call_shuttle,
/mob/living/silicon/ai/proc/show_laws_verb,
/mob/living/silicon/ai/proc/ai_camera_track,
@@ -248,4 +249,4 @@ var
/mob/living/silicon/ai/proc/ai_statuschange,
/mob/living/silicon/ai/proc/ai_hologram_change,
/mob/living/silicon/ai/proc/ai_roster,
)
)
+11 -1
View File
@@ -5,4 +5,14 @@
var/t_n2 = null
var/now_pushing = null
var/cameraFollow = null
var/age = null
var/age = null
// lists used to cache overlays
/mob/living/var/list/body_overlays_standing = list()
/mob/living/var/list/body_overlays_lying = list()
/mob/living/var/list/clothing_overlays = list()
// This var describes whether the mob visually appears to be lying.
// This will be used to only update lying status when necessary.
/mob/living/var/visual_lying = 0
+13 -7
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/obj
//var/datum/module/mod //not used
var/m_amt = 0 // metal
@@ -30,11 +32,10 @@
icon_state = "rollstart"
flags = FPRINT
w_class = 1.0
var
turf/start
turf/end
tape_type = /obj/item/tape
icon_base
var/turf/start
var/turf/end
var/tape_type = /obj/item/tape
var/icon_base
/obj/item/tape
name = "tape"
@@ -399,6 +400,12 @@
var/obj/screen/g_dither = null
var/obj/screen/blurry = null
var/list/darkMask = null
var/obj/screen/r_hand_hud_object = null
var/obj/screen/l_hand_hud_object = null
var/list/obj/screen/intent_small_hud_objects = null
var/show_intent_icons = 1
var/list/obj/screen/hotkeybuttons = null
var/hotkey_ui_hidden = 0 //This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons)
var/h_type = /obj/screen //this is like...the most pointless thing ever. Use a god damn define!
@@ -1094,8 +1101,7 @@
throw_range = 5
origin_tech = "biotech=3"
var
mob/living/carbon/brain/brainmob = null
var/mob/living/carbon/brain/brainmob = null
New()
..()
+17 -4
View File
@@ -71,6 +71,8 @@
/obj/structure/closet/gmcloset
name = "formal closet"
desc = "It's a storage unit for formal clothing."
icon_state = "black"
icon_closed = "black"
/obj/structure/closet/emcloset
name = "emergency closet"
@@ -125,14 +127,20 @@
/obj/structure/closet/jcloset
name = "custodial closet"
desc = "It's a storage unit for janitorial clothes and gear."
icon_state = "mixed"
icon_closed = "mixed"
/obj/structure/closet/jcloset2
name = "cleaner's closet"
desc = "It's a storage unit for various cleaning items."
icon_state = "mixed"
icon_closed = "mixed"
/obj/structure/closet/lawcloset
name = "legal closet"
desc = "It's a storage unit for courtroom apparel and items."
icon_state = "blue"
icon_closed = "blue"
/obj/structure/closet/coffin
name = "coffin"
@@ -317,10 +325,10 @@
icon_state = "white"
icon_closed = "white"
/obj/structure/closet/wardrobe/genetics_white
name = "genetics wardrobe"
icon_state = "white"
icon_closed = "white"
/obj/structure/closet/wardrobe/robotics_black
name = "robotics wardrobe"
icon_state = "black"
icon_closed = "black"
/obj/structure/closet/wardrobe/medic_white
name = "doctor's wardrobe"
@@ -332,6 +340,11 @@
icon_state = "white"
icon_closed = "white"
/obj/structure/closet/wardrobe/genetics_white
name = "genetics wardrobe"
icon_state = "white"
icon_closed = "white"
/obj/structure/closet/wardrobe/nurse
name = "nurse's wardrobe"
icon_state = "white"
-9
View File
@@ -130,15 +130,6 @@
var/list/connected_doors
var/department //each department has a hardcoded list of possible door networks
/obj/machinery/computer/crew
name = "Crew monitoring computer"
desc = "Used to monitor active health sensors built into most of the crew's uniforms."
icon_state = "crew"
use_power = 1
idle_power_usage = 250
active_power_usage = 500
circuit = "/obj/item/weapon/circuitboard/crew"
var/list/tracked = list( )
/*/obj/machinery/computer/scan_consolenew //Coming Soon, I highly doubt this but Ill leave it here anyways
name = "DNA Modifier Access Console"
+8 -8
View File
@@ -2006,21 +2006,21 @@
New()
switch(rand(1,100))//(potency) //It wants to use the default potency instead of the new, so it was always 10. Will try to come back to this later - Cheridan
if(0 to 10)
new/obj/item/weapon/spacecash/(src.loc)
new/obj/item/weapon/money/(src.loc)
if(11 to 20)
new/obj/item/weapon/spacecash/c10(src.loc)
new/obj/item/weapon/money/c10(src.loc)
if(21 to 30)
new/obj/item/weapon/spacecash/c20(src.loc)
new/obj/item/weapon/money/c20(src.loc)
if(31 to 40)
new/obj/item/weapon/spacecash/c50(src.loc)
new/obj/item/weapon/money/c50(src.loc)
if(41 to 50)
new/obj/item/weapon/spacecash/c100(src.loc)
new/obj/item/weapon/money/c100(src.loc)
if(51 to 60)
new/obj/item/weapon/spacecash/c200(src.loc)
new/obj/item/weapon/money/c200(src.loc)
if(61 to 80)
new/obj/item/weapon/spacecash/c500(src.loc)
new/obj/item/weapon/money/c500(src.loc)
else
new/obj/item/weapon/spacecash/c1000(src.loc)
new/obj/item/weapon/money/c1000(src.loc)
spawn(5) //Workaround to keep harvesting from working weirdly.
del(src)
+20 -23
View File
@@ -1,22 +1,22 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/obj/machinery
name = "machinery"
icon = 'stationobjs.dmi'
var
stat = 0
emagged = 0
use_power = 0
var/stat = 0
var/emagged = 0
var/use_power = 0
//0 = dont run the auto
//1 = run auto, use idle
//2 = run auto, use active
idle_power_usage = 0
active_power_usage = 0
power_channel = EQUIP
var/idle_power_usage = 0
var/active_power_usage = 0
var/power_channel = EQUIP
//EQUIP,ENVIRON or LIGHT
list/component_parts = null //list of all the parts used to build it, if made from certain kinds of frames.
uid
manual = 0
global
gl_uid = 1
var/list/component_parts = null //list of all the parts used to build it, if made from certain kinds of frames.
var/uid
var/manual = 0
var/global/gl_uid = 1
/obj/machinery/autolathe
name = "\improper Autolathe"
@@ -384,16 +384,14 @@
use_power = 1
idle_power_usage = 5
active_power_usage = 100
var
obj/effect/overlay/hologram//The projection itself. If there is one, the instrument is on, off otherwise.
var/obj/effect/overlay/hologram//The projection itself. If there is one, the instrument is on, off otherwise.
/obj/machinery/hologram/holopad
name = "\improper AI holopad"
desc = "It's a floor-mounted device for projecting holographic images. It is activated remotely."
icon_state = "holopad0"
var
mob/living/silicon/ai/master//Which AI, if any, is controlling the object? Only one AI may control a hologram at any time.
last_request = 0 //to prevent request spam. ~Carn
var/mob/living/silicon/ai/master//Which AI, if any, is controlling the object? Only one AI may control a hologram at any time.
var/last_request = 0 //to prevent request spam. ~Carn
/obj/machinery/hologram/projector
name = "hologram projector"
@@ -406,12 +404,11 @@
desc = "It's used by the AI for fooling around."
icon = 'stationobjs.dmi'
icon_state = "hologram0"
var
temp = null
lumens = 0.0
h_r = 245.0
h_g = 245.0
h_b = 245.0
var/temp = null
var/lumens = 0.0
var/h_r = 245.0
var/h_g = 245.0
var/h_b = 245.0
/obj/machinery/coatrack
name = "coat rack"
+3 -3
View File
@@ -264,7 +264,7 @@
icon_state = "wallet"
w_class = 2
can_hold = list(
"/obj/item/weapon/spacecash",
"/obj/item/weapon/money",
"/obj/item/weapon/card",
"/obj/item/clothing/mask/cigarette",
"/obj/item/device/flashlight/pen",
@@ -308,10 +308,10 @@
/obj/item/weapon/storage/wallet/random/New()
..()
var/item1_type = pick( /obj/item/weapon/spacecash/c10,/obj/item/weapon/spacecash/c100,/obj/item/weapon/spacecash/c1000,/obj/item/weapon/spacecash/c20,/obj/item/weapon/spacecash/c200,/obj/item/weapon/spacecash/c50, /obj/item/weapon/spacecash/c500)
var/item1_type = pick( /obj/item/weapon/money/c10,/obj/item/weapon/money/c100,/obj/item/weapon/money/c1000,/obj/item/weapon/money/c20,/obj/item/weapon/money/c200,/obj/item/weapon/money/c50, /obj/item/weapon/money/c500)
var/item2_type
if(prob(50))
item2_type = pick( /obj/item/weapon/spacecash/c10,/obj/item/weapon/spacecash/c100,/obj/item/weapon/spacecash/c1000,/obj/item/weapon/spacecash/c20,/obj/item/weapon/spacecash/c200,/obj/item/weapon/spacecash/c50, /obj/item/weapon/spacecash/c500)
item2_type = pick( /obj/item/weapon/money/c10,/obj/item/weapon/money/c100,/obj/item/weapon/money/c1000,/obj/item/weapon/money/c20,/obj/item/weapon/money/c200,/obj/item/weapon/money/c50, /obj/item/weapon/money/c500)
var/item3_type = pick( /obj/item/weapon/coin/silver, /obj/item/weapon/coin/silver, /obj/item/weapon/coin/gold, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron )
spawn(2)
+5
View File
@@ -164,6 +164,11 @@
contains = list("/obj/item/weapon/vending_charge/snack")
containername = "Snack charge crate"
/datum/supply_packs/charge/liquidfood
name = "\"LiquidFood\" Charge"
contains = list("/obj/item/weapon/vending_charge/liquid")
containername = "LiquidFood charge crate"
/*
/datum/supply_packs/charge/cart
name = "PDA Cart Charge"
+26 -7
View File
@@ -113,7 +113,7 @@
desc = "A snack machine courtesy of the Getmore Chocolate Corporation, based out of Mars"
icon_state = "snack"
product_paths = "/obj/item/weapon/reagent_containers/food/snacks/candy;/obj/item/weapon/reagent_containers/food/drinks/dry_ramen;/obj/item/weapon/reagent_containers/food/snacks/chips;/obj/item/weapon/reagent_containers/food/snacks/sosjerky;/obj/item/weapon/reagent_containers/food/snacks/no_raisin;/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie;/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers"
// product_amounts = "10;10;10;10;10;10;10"
// product_amounts = "6;6;6;6;6;6;6"
product_prices = "1;1;1;1;1;1;1"
product_slogans = "Try our new nougat bar!;Twice the calories for half the price!"
product_hidden = "/obj/item/weapon/reagent_containers/food/snacks/syndicake"
@@ -126,9 +126,9 @@
name = "Robust Softdrinks"
desc = "A softdrink vendor provided by Robust Industries, LLC."
icon_state = "Cola_Machine"
product_paths = "/obj/item/weapon/reagent_containers/food/drinks/cola;/obj/item/weapon/reagent_containers/food/drinks/space_mountain_wind;/obj/item/weapon/reagent_containers/food/drinks/dr_gibb;/obj/item/weapon/reagent_containers/food/drinks/starkist;/obj/item/weapon/reagent_containers/food/drinks/space_up"
product_amounts = "10;10;10;10;10"
product_prices = "1;1;1;1;1"
product_paths = "/obj/item/weapon/reagent_containers/food/drinks/cola;/obj/item/weapon/reagent_containers/food/drinks/space_mountain_wind;/obj/item/weapon/reagent_containers/food/drinks/dr_gibb;/obj/item/weapon/reagent_containers/food/drinks/starkist;/obj/item/weapon/reagent_containers/food/drinks/space_up;/obj/item/weapon/reagent_containers/food/drinks/waterbottle"
// product_amounts = "10;10;10;10;10"
product_prices = "1;1;1;1;1;1"
product_slogans = "Robust Softdrinks: More robust then a toolbox to the head!"
product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/thirteenloko"
product_hideamt = "5"
@@ -173,9 +173,9 @@
icon_state = "med"
icon_deny = "med-deny"
req_access_txt = "5"
product_paths = "/obj/item/clothing/under/rank/medical;/obj/item/clothing/under/rank/chemist;/obj/item/clothing/suit/storage/labcoat;/obj/item/clothing/shoes/white;/obj/item/device/healthanalyzer;/obj/item/weapon/reagent_containers/glass/bottle/antitoxin;/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline;/obj/item/weapon/reagent_containers/glass/bottle/stoxin;/obj/item/weapon/reagent_containers/glass/bottle/toxin;/obj/item/weapon/reagent_containers/syringe/antiviral;/obj/item/weapon/reagent_containers/syringe;/obj/item/device/healthanalyzer;/obj/item/weapon/reagent_containers/glass/beaker;/obj/item/weapon/reagent_containers/dropper"
product_paths = "/obj/item/clothing/under/rank/medical;/obj/item/clothing/under/rank/chemist;/obj/item/clothing/suit/storage/labcoat;/obj/item/clothing/shoes/white;/obj/item/weapon/reagent_containers/glass/bottle/antitoxin;/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline;/obj/item/weapon/reagent_containers/glass/bottle/stoxin;/obj/item/weapon/reagent_containers/glass/bottle/toxin;/obj/item/weapon/reagent_containers/syringe/antiviral;/obj/item/weapon/reagent_containers/syringe;/obj/item/device/healthanalyzer;/obj/item/weapon/reagent_containers/glass/beaker;/obj/item/weapon/reagent_containers/dropper"
// product_amounts = "4;4;4;4;4;12;5;4;2"
product_prices = "1;1;1;1;2;2;2;2;2;2;1;2;2;5"
product_prices = "1;1;1;1;2;2;2;2;2;1;2;2;5"
product_hidden = "/obj/item/weapon/reagent_containers/pill/tox;/obj/item/weapon/reagent_containers/pill/stox;/obj/item/weapon/reagent_containers/pill/antitox"
// product_hideamt = "3;4;6"
hidden_prices = "3;3;2"
@@ -390,6 +390,20 @@
hidden_prices = ""
charge_type = "robotics"
/obj/machinery/vending/liquid
name = "LiquidRation Dispenser"
desc = "All the food you'll ever need to survive!"
icon_state = "liquidfood"
product_paths = "/obj/item/weapon/reagent_containers/food/snacks/liquidfood;/obj/item/weapon/flavor/red;/obj/item/weapon/flavor/blue"
// product_amounts = "6;6;6;6;6;6;6"
product_prices = "1;1;1"
product_slogans = "Enjoy your NanoTrasen \"LiquidFood\" Ration! Now with a choice of TWO delicious flavors!"
product_hidden = ""
// product_hideamt = "10"
hidden_prices = ""
product_ads = "Think of it as free survival!;It's even healthy!;Take a quick break, enjoy your ration!"
charge_type = "liquid"
/obj/item/weapon/vending_charge
name = "Vending Charge"
var/charge_type = "generic"
@@ -477,4 +491,9 @@
/*/obj/item/weapon/vending_charge/toxinslab
name = "Toxins Lab Charge"
charge_type = "toxinslab"
icon_state = "toxinslab-charge"*/
icon_state = "toxinslab-charge"*/
/obj/item/weapon/vending_charge/liquid
name = "LiquidRation Charge"
charge_type = "liquid"
icon_state = "liquidfood-charge"
+144 -64
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/obj/item/weapon
name = "weapon"
icon = 'weapons.dmi'
@@ -158,9 +160,9 @@
name = "super compressed matter cartridge"
ammo = 30
/obj/item/weapon/spacecash
/obj/item/weapon/money
name = "stack of credits"
desc = "It's worth 1 credit."
desc = "A pile of 1 credit."
gender = PLURAL
icon = 'items.dmi'
icon_state = "spacecash"
@@ -172,90 +174,145 @@
throw_speed = 1
throw_range = 2
w_class = 1.0
var/currency
var/worth
var/split = 5
var/round = 0.01
var/access = list()
access = access_crate_cash
var/worth = 1
var/amount = 1
/obj/item/weapon/spacecash/c10
/obj/item/weapon/spacecash
New() // Just in case
spawn(1)
new/obj/item/weapon/money(loc)
del src
/obj/item/weapon/money/proc/updatedesc()
name = "stack of [currency]"
desc = "A pile of [worth] [currency]"
/obj/item/weapon/money/New(var/nloc, var/nworth=1,var/ncurrency = "credits")
if(!worth)
worth = nworth
if(!currency)
currency = ncurrency
split = round(worth/2,round)
updatedesc()
return ..(nloc)
/obj/item/weapon/money/c10
icon_state = "spacecash10"
access = access_crate_cash
desc = "It's worth 10 credits."
desc = "A pile of 10 credits."
worth = 10
/obj/item/weapon/spacecash/c20
/obj/item/weapon/money/c20
icon_state = "spacecash20"
access = access_crate_cash
desc = "It's worth 20 credits."
desc = "A pile of 20 credits."
worth = 20
/obj/item/weapon/spacecash/c50
/obj/item/weapon/money/c50
icon_state = "spacecash50"
access = access_crate_cash
desc = "It's worth 50 credits."
desc = "A pile of 50 credits."
worth = 50
/obj/item/weapon/spacecash/c100
/obj/item/weapon/money/c100
icon_state = "spacecash100"
access = access_crate_cash
desc = "It's worth 100 credits."
desc = "A pile of 100 credits."
worth = 100
/obj/item/weapon/spacecash/c200
/obj/item/weapon/money/c200
icon_state = "spacecash200"
access = access_crate_cash
desc = "It's worth 200 credits."
desc = "A pile of 200 credits."
worth = 200
/obj/item/weapon/spacecash/c500
/obj/item/weapon/money/c500
icon_state = "spacecash500"
access = access_crate_cash
desc = "It's worth 500 credits."
desc = "A pile of 500 credits."
worth = 500
/obj/item/weapon/spacecash/c1000
/obj/item/weapon/money/c1000
icon_state = "spacecash1000"
access = access_crate_cash
desc = "It's worth 1000 credits."
desc = "A pile of 1000 credits."
worth = 1000
/obj/item/weapon/spacecash/attack_self(var/mob/user)
var/dat = "<HEAD><TITLE>Space cash stack</TITLE></HEAD>"
dat += "Credit amount - [worth * amount]<br>"
dat += "<a href='?src=\ref[src];takemoney=1'>Take amount</a><br>"
user << browse(dat,"window=money")
/obj/item/weapon/spacecash/Topic(href, href_list)
if(href_list["takemoney"])
var/a = 1
a = input(usr,"How much you want take?") as num
if((a > src.amount) || (a < 0))
usr << "\red You don't have that many credits."
return
src.amount -= a
var/obj/item/weapon/spacecash/S
if(a <= 0)
return
switch(src.worth)
if(1)
S = new /obj/item/weapon/spacecash(get_turf(src))
if(10)
S = new /obj/item/weapon/spacecash/c10(get_turf(src))
if(20)
S = new /obj/item/weapon/spacecash/c20(get_turf(src))
if(50)
S = new /obj/item/weapon/spacecash/c50(get_turf(src))
if(100)
S = new /obj/item/weapon/spacecash/c100(get_turf(src))
if(200)
S = new /obj/item/weapon/spacecash/c200(get_turf(src))
if(500)
S = new /obj/item/weapon/spacecash/c500(get_turf(src))
if(1000)
S = new /obj/item/weapon/spacecash/c1000(get_turf(src))
S.amount = a
if(src.amount == 0)
del(src)
/obj/item/weapon/spacecash/attackby(var/obj/I, var/mob/user)
if(!I)
return
if(istype(I,src))
src.amount += I:amount
user << "You add [I:amount] credits to stack."
del(I)
/obj/item/weapon/money/attack_self(var/mob/user)
interact(user)
/obj/item/weapon/money/proc/interact(var/mob/user)
user.machine = src
var/dat
dat += "<BR>[worth] [currency]"
dat += "<BR>New pile:"
dat += "<A href='?src=\ref[src];sd=5'>-</a>"
dat += "<A href='?src=\ref[src];sd=1'>-</a>"
if(round<=0.1)
dat += "<A href='?src=\ref[src];sd=0.1'>-</a>"
if(round<=0.01)
dat += "<A href='?src=\ref[src];sd=0.01'>-</a>"
dat += "[split]"
if(round<=0.01)
dat += "<A href='?src=\ref[src];su=0.01'>+</a>"
if(round<=0.1)
dat += "<A href='?src=\ref[src];su=0.1'>+</a>"
dat += "<A href='?src=\ref[src];su=1'>+</a>"
dat += "<A href='?src=\ref[src];su=5'>+</a>"
dat += "<BR><A href='?src=\ref[src];split=1'>split</a>"
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
/obj/item/weapon/money/Topic(href, href_list)
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
if (href_list["su"])
var/samt = text2num(href_list["su"])
if(split+samt<worth)
split+=samt
if (href_list["sd"])
var/samt = text2num(href_list["sd"])
if(split-samt>0)
split-=samt
if(href_list["split"])
new /obj/item/weapon/money(get_turf(src),split,currency)
worth-=split
split = round(worth/2,round)
updatedesc()
src.add_fingerprint(usr)
src.updateUsrDialog()
for (var/mob/M in viewers(1, src.loc))
if (M.client && M.machine == src)
src.attack_self(M)
return
/obj/item/weapon/money/attackby(var/obj/I as obj, var/mob/user as mob)
if(istype(I,/obj/item/weapon/money))
var/mob/living/carbon/c = user
if(!uppertext(I:currency)==uppertext(currency))
c<<"You can't mix currencies!"
return ..()
else
worth+=I:worth
c<<"You combine the piles."
updatedesc()
del I
return ..()
/obj/item/device/mass_spectrometer
@@ -271,9 +328,8 @@
m_amt = 30
g_amt = 20
origin_tech = "magnets=2;biotech=2"
var
details = 0
recent_fail = 0
var/details = 0
var/recent_fail = 0
/obj/item/device/mass_spectrometer/adv
name = "advanced mass-spectrometer"
@@ -1985,3 +2041,27 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
name = "inflamed appendix"
desc = "An appendix which appears to be inflamed."
icon_state = "appendixinflamed"
/obj/item/weapon/flavor
name = "bland flavoring packet"
desc = "A sachet of flavoring, designed to be used with \"LiquidFood\" rations. The flavor is indeterminable."
icon = 'food_ingredients.dmi'
var/descriptor = "disturbingly beige" //Description shown to onlookers.
var/color = "beige" //Color the icon should take on when this is applied. Also shown when it is mixed in.
var/newDesc = "It posesses a strange and unidentifiable taste. You try not to think to hard about it." //What gets pegged onto the description.
/obj/item/weapon/flavor/red
name = "cherry flavoring packet"
desc = "A sachet of cherry flavoring, designed to be used with \"LiquidFood\" rations."
icon_state = "flavor-red"
descriptor = "garrishly red"
color = "red"
newDesc = "It has a faintly cherry taste, but still is hard to stomach. Reminds you of cough syrup."
/obj/item/weapon/flavor/blue
name = "berry flavoring packet"
desc = "A sachet of berry flavoring, designed to be used with \"LiquidFood\" rations."
icon_state = "flavor-blue"
descriptor = "molted blue"
color = "blue"
newDesc = "It has a faint bitter berry taste, but still is hard to stomach. Strangely crunchy."
+11 -12
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/*
A Star pathfinding algorithm
Returns a list of tiles forming a path from A to B, taking dense objects as well as walls, and the orientation of
@@ -36,9 +38,8 @@ length to avoid portals or something i guess?? Not that they're counted right no
PriorityQueue
var
L[]
cmp
var/L[]
var/cmp
New(compare)
L = new()
cmp = compare
@@ -92,13 +93,12 @@ PriorityQueue
if(ind)
Remove(ind)
PathNode
var
datum/source
PathNode/prevNode
f
g
h
nt // Nodes traversed
var/datum/source
var/PathNode/prevNode
var/f
var/g
var/h
var/nt // Nodes traversed
New(s,p,pg,ph,pnt)
source = s
prevNode = p
@@ -109,8 +109,7 @@ PathNode
nt = pnt
datum
var
bestF
var/bestF
proc
PathWeightCompare(PathNode/a, PathNode/b)
return a.f - b.f
+26 -28
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
//cursors
#define Default_Cursor 0
#define Client_Cursor 1
@@ -37,9 +39,8 @@
// Deprecated! See global.dm for new configuration vars
/*
var
DB_SERVER = "" // This is the location of your MySQL server (localhost is USUALLY fine)
DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is the default)
var/DB_SERVER = "" // This is the location of your MySQL server (localhost is USUALLY fine)
var/DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is the default)
*/
DBConnection
@@ -69,15 +70,14 @@ DBConnection
return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[sqladdress]:[sqlport]"]",user,password)
NewQuery(sql_query,cursor_handler=src.default_cursor) return new/DBQuery(sql_query,src,cursor_handler)
var
_db_con // This variable contains a reference to the actual database connection.
dbi // This variable is a string containing the DBI MySQL requires.
user // This variable contains the username data.
password // This variable contains the password data.
default_cursor // This contains the default database cursor data.
var/_db_con // This variable contains a reference to the actual database connection.
var/dbi // This variable is a string containing the DBI MySQL requires.
var/user // This variable contains the username data.
var/password // This variable contains the password data.
var/default_cursor // This contains the default database cursor data.
//
server = ""
port = 3306
var/server = ""
var/port = 3306
DBQuery
New(sql_query,DBConnection/connection_handler,cursor_handler)
@@ -134,25 +134,23 @@ DBQuery
else if(conversions.len < column) conversions.len = column
conversions[column] = conversion
var
sql // The sql query being executed.
default_cursor
list/columns //list of DB Columns populated by Columns()
list/conversions
list/item[0] //list of data values populated by NextRow()
var/sql // The sql query being executed.
var/default_cursor
var/list/columns //list of DB Columns populated by Columns()
var/list/conversions
var/list/item[0] //list of data values populated by NextRow()
DBConnection/db_connection
_db_query
var/DBConnection/db_connection
var/_db_query
DBColumn
var
name
table
position //1-based index into item data
sql_type
flags
length
max_length
var/name
var/table
var/position //1-based index into item data
var/sql_type
var/flags
var/length
var/max_length
New(name_handler,table_handler,position_handler,type_handler,flag_handler,length_handler,max_length_handler)
src.name = name_handler
@@ -179,4 +177,4 @@ DBColumn
if(TIMESTAMP) return "TIMESTAMP"
if(TIME) return "TIME"
if(STRING) return "STRING"
if(BLOB) return "BLOB"
if(BLOB) return "BLOB"
+7 -6
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/proc/dopage(src,target)
var/href_list
var/href
@@ -261,11 +263,10 @@ proc
return 0
Y1+=s
else
var
m=(32*(Y2-Y1)+(PY2-PY1))/(32*(X2-X1)+(PX2-PX1))
b=(Y1+PY1/32-0.015625)-m*(X1+PX1/32-0.015625) //In tiles
signX = SIGN(X2-X1)
signY = SIGN(Y2-Y1)
var/m=(32*(Y2-Y1)+(PY2-PY1))/(32*(X2-X1)+(PX2-PX1))
var/b=(Y1+PY1/32-0.015625)-m*(X1+PX1/32-0.015625) //In tiles
var/signX = SIGN(X2-X1)
var/signY = SIGN(Y2-Y1)
if(X1<X2)
b+=m
while(X1!=X2 || Y1!=Y2)
@@ -318,4 +319,4 @@ proc/is_carrying(var/M as mob, var/O as obj)
if(O:loc == M)
return 1
O = O:loc
return 0
return 0
+9 -24
View File
@@ -692,15 +692,15 @@ Turf and target are seperate in case you want to teleport some distance from a t
/proc/ainame(var/mob/M as mob)
var/randomname = M.name
var/time_passed = world.time//Pretty basic but it'll do. It's still possible to bypass this by return ainame().
var/newname = input(M,"You are the AI. Would you like to change your name to something else?", "Name change",randomname)
var/newname = copytext(sanitize(input(M,"You are the AI. Would you like to change your name to something else?", "Name change",randomname)),1,MAX_NAME_LEN)
if((world.time-time_passed)>200)//If more than 20 game seconds passed.
M << "You took too long to decide. Default name selected."
return
if (length(newname) == 0)
if (!newname)
newname = randomname
if (newname)
else
if (newname == "Inactive AI")//Keeping this here to prevent dumb.
M << "That name is reserved."
return ainame(M)
@@ -708,22 +708,19 @@ Turf and target are seperate in case you want to teleport some distance from a t
if (A.real_name == newname&&newname!=randomname)
M << "There's already an AI with that name."
return ainame(M)
if (length(newname) >= 26)
newname = copytext(newname, 1, 26)
newname = dd_replacetext(newname, ">", "'")
M.real_name = newname
M.name = newname
M.original_name = newname
/*/proc/clname(var/mob/M as mob) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea
var/randomname = pick(clown_names)
var/newname = input(M,"You are the clown. Would you like to change your name to something else?", "Name change",randomname)
var/newname = copytext(sanitize(input(M,"You are the clown. Would you like to change your name to something else?", "Name change",randomname)),1,MAX_NAME_LEN)
var/oldname = M.real_name
if (length(newname) == 0)
if (!newname)
newname = randomname
if (newname)
else
var/badname = 0
switch(newname)
if("Unknown") badname = 1
@@ -740,9 +737,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
if(A.real_name == newname)
M << "That name is reserved."
return clname(M)
if(length(newname) >= 26)
newname = copytext(newname, 1, 26)
newname = dd_replacetext(newname, ">", "'")
M.real_name = newname
M.name = newname
M.original_name = newname
@@ -1561,19 +1555,13 @@ proc/listclearnulls(list/list)
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
air_master.tiles_to_update += T1
if(fromupdate.len)
for(var/turf/simulated/T2 in fromupdate)
for(var/obj/machinery/door/D2 in T2)
doors += D2
if(T2.parent)
air_master.groups_to_rebuild += T2.parent
else
air_master.tiles_to_update += T2
air_master.tiles_to_update += T2
for(var/obj/O in doors)
O:update_nearby_tiles(1)
@@ -1728,10 +1716,7 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
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
air_master.tiles_to_update += T1
for(var/obj/O in doors)
O:update_nearby_tiles(1)
+20 -14
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/*
IconProcs
by Lummox JR
@@ -434,14 +436,13 @@ proc
if(!dir) dir = A.dir
// Loop through the underlays, then overlays, sorting them into the layers list
var
list/process = A.underlays // Current list being processed
pSet=0 // Which list is being processed: 0 = underlays, 1 = overlays
curIndex=1 // index of 'current' in list being processed
current // Current overlay being sorted
currentLayer // Calculated layer that overlay appears on (special case for FLOAT_LAYER)
compare // The overlay 'add' is being compared against
cmpIndex // The index in the layers list of 'compare'
var/list/process = A.underlays // Current list being processed
var/pSet=0 // Which list is being processed: 0 = underlays, 1 = overlays
var/curIndex=1 // index of 'current' in list being processed
var/current // Current overlay being sorted
var/currentLayer // Calculated layer that overlay appears on (special case for FLOAT_LAYER)
var/compare // The overlay 'add' is being compared against
var/cmpIndex // The index in the layers list of 'compare'
while(TRUE)
if(curIndex<=process.len)
current = process[curIndex]
@@ -487,15 +488,20 @@ proc
// Icon already exists, just return that one
return _flatIcons[h]
var
// We start with a blank canvas, otherwise some icon procs crash silently
icon/flat = icon('effects.dmi', "icon_state"="nothing") // Final flattened icon
icon/add // Icon of overlay being added
var/icon/flat = icon('effects.dmi', "icon_state"="nothing") // Final flattened icon
var/icon/add // Icon of overlay being added
// Current dimensions of flattened icon
flatX1=1;flatX2=flat.Width();flatY1=1;flatY2=flat.Height()
var/flatX1=1
var/flatX2=flat.Width()
var/flatY1=1
var/flatY2=flat.Height()
// Dimensions of overlay being added
addX1;addX2;addY1;addY2
var/addX1
var/addX2
var/addY1
var/addY2
for(var/I in layers)
@@ -581,4 +587,4 @@ proc
for(var/O in A.overlays)
var/image/I = O
composite.Blend(icon(I.icon, I.icon_state, I.dir, 1), ICON_OVERLAY)
return composite
return composite
+16 -16
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/* base 64 procs
These procs convert plain text to a hexidecimal string to 64 encoded text and vice versa.
@@ -33,12 +35,11 @@ proc
pad_code = the character or ASCII code used to pad the base64 text.
DEFAULT: 67 (= sign)
RETURNS: the hexidecimal text */
var
pos = 1
offset = 2
current = 0
padding = 0
hextext = ""
var/pos = 1
var/offset = 2
var/current = 0
var/padding = 0
var/hextext = ""
if(istext(pad_code)) pad_code = text2ascii(pad_code)
while(pos <= length(encode64))
var/val = text2ascii(encode64, pos++)
@@ -80,15 +81,14 @@ proc
pad_char = the character or ASCII code used to pad the base64 text.
DEFAULT: "=" (ASCII 67)
RETURNS: the base 64 encoded text */
var
key64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
encode64 = ""
pos = 1
offset = 2
current = 0
len = length(hextext)
end = len
padding = end%6
var/key64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
var/encode64 = ""
var/pos = 1
var/offset = 2
var/current = 0
var/len = length(hextext)
var/end = len
var/padding = end%6
if(padding)
padding = 6 - padding
end += padding
@@ -128,4 +128,4 @@ proc
var/hex = ""
for(var/loop = 1 to length(txt))
hex += sd_dec2base(text2ascii(txt,loop),,2)
return hex
return hex
+14 -14
View File
@@ -1,15 +1,16 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/* sd_color and procs
sd_color is a special datum that contains color data in various
formats. Sample colors are available in samplecolors.dm.
sd_color
var
name // the name of the color
red // red componant of the color
green // green componant of the color
blue // red componant of the color
html // html string for the color
icon/Icon // contains the icon produced by the rgb2icon() proc
var/name // the name of the color
var/red // red componant of the color
var/green // green componant of the color
var/blue // red componant of the color
var/html // html string for the color
var/icon/Icon // contains the icon produced by the rgb2icon() proc
PROCS
brightness()
@@ -30,13 +31,12 @@ sd_color
* Implimentation: No need to read further. *
*********************************************/
sd_color
var
name // the name of the color
red = 0 // red componant of the color
green = 0 // green componant of the color
blue = 0 // red componant of the color
html // html string for the color
icon/Icon // contains the icon produced by the rgb2icon() proc
var/name // the name of the color
var/red = 0 // red componant of the color
var/green = 0 // green componant of the color
var/blue = 0 // red componant of the color
var/html // html string for the color
var/icon/Icon // contains the icon produced by the rgb2icon() proc
proc
brightness()
+13 -14
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/* HSL procs
These procs convert between RGB (red, green, blu) and HSL (hue, saturation, light)
color spaces. The algorithms used for these procs were found at
@@ -80,20 +82,18 @@ proc
sat /= scale
lgh /= scale
var
red
grn
blu
var/red
var/grn
var/blu
if(!sat) // greyscale
red = lgh
grn = lgh
blu = lgh
else
var
temp1
temp2
temp3
var/temp1
var/temp2
var/temp3
if(lgh < 0.5) temp2 = lgh * (1 + sat)
else temp2 = lgh + sat - lgh * sat
temp1 = 2 * lgh - temp2
@@ -160,12 +160,11 @@ proc
red /= 255
grn /= 255
blu /= 255
var
lo = min(red, grn, blu)
hi = max(red, grn, blu)
hue = 0
sat = 0
lgh = (lo + hi)/2
var/lo = min(red, grn, blu)
var/hi = max(red, grn, blu)
var/hue = 0
var/sat = 0
var/lgh = (lo + hi)/2
if(lo != hi) // if equal, hue and sat may both stay 0
if(lgh < 0.5) sat = (hi - lo) / (hi + lo)
+12 -13
View File
@@ -1,26 +1,27 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/turf
icon = 'floors.dmi'
var/intact = 1 //for floors, use is_plating(), is_plasteel_floor() and is_light_floor()
level = 1.0
var
//Properties for open tiles (/floor)
oxygen = 0
carbon_dioxide = 0
nitrogen = 0
toxins = 0
var/oxygen = 0
var/carbon_dioxide = 0
var/nitrogen = 0
var/toxins = 0
//Properties for airtight tiles (/wall)
thermal_conductivity = 0.05
heat_capacity = 1
var/thermal_conductivity = 0.05
var/heat_capacity = 1
//Properties for both
temperature = T20C
var/temperature = T20C
blocks_air = 0
icon_old = null
pathweight = 1
var/blocks_air = 0
var/icon_old = null
var/pathweight = 1
proc/is_plating()
return 0
@@ -341,8 +342,6 @@
proc/TemperatureAct(temperature)
for(var/turf/simulated/floor/target_tile in range(2,loc))
if(target_tile.parent && target_tile.parent.group_processing)
target_tile.parent.suspend_group_processing()
var/datum/gas_mixture/napalm = new
+20 -19
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/world/New()
..()
@@ -48,25 +50,24 @@ proc/countJob(rank)
jobCount++
return jobCount
/mob/living/carbon/human/var/const
slot_back = 1
slot_wear_mask = 2
slot_handcuffed = 3
slot_l_hand = 4
slot_r_hand = 5
slot_belt = 6
slot_wear_id = 7
slot_ears = 8
slot_glasses = 9
slot_gloves = 10
slot_head = 11
slot_shoes = 12
slot_wear_suit = 13
slot_w_uniform = 14
slot_l_store = 15
slot_r_store = 16
slot_s_store = 17
slot_in_backpack = 18
/mob/living/carbon/human/var/const/slot_back = 1
/mob/living/carbon/human/var/const/slot_wear_mask = 2
/mob/living/carbon/human/var/const/slot_handcuffed = 3
/mob/living/carbon/human/var/const/slot_l_hand = 4
/mob/living/carbon/human/var/const/slot_r_hand = 5
/mob/living/carbon/human/var/const/slot_belt = 6
/mob/living/carbon/human/var/const/slot_wear_id = 7
/mob/living/carbon/human/var/const/slot_ears = 8
/mob/living/carbon/human/var/const/slot_glasses = 9
/mob/living/carbon/human/var/const/slot_gloves = 10
/mob/living/carbon/human/var/const/slot_head = 11
/mob/living/carbon/human/var/const/slot_shoes = 12
/mob/living/carbon/human/var/const/slot_wear_suit = 13
/mob/living/carbon/human/var/const/slot_w_uniform = 14
/mob/living/carbon/human/var/const/slot_l_store = 15
/mob/living/carbon/human/var/const/slot_r_store = 16
/mob/living/carbon/human/var/const/slot_s_store = 17
/mob/living/carbon/human/var/const/slot_in_backpack = 18
/mob/living/carbon/human/proc/equip_in_one_of_slots(obj/item/W, list/slots, del_on_fail = 1)
for (var/slot in slots)
+6 -5
View File
@@ -1,10 +1,12 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
var/global/list/space_surprises = list( /obj/item/clothing/mask/facehugger/angry =4,
// /obj/effect/critter/spesscarp =2,
/obj/effect/critter/spesscarp/elite =2,
// /obj/creature =0,
// /obj/item/weapon/rcd =0,
// /obj/item/weapon/rcd_ammo =0,
// /obj/item/weapon/spacecash =0,
// /obj/item/weapon/money =0,
// /obj/item/weapon/cloaking_device =1,
// /obj/item/weapon/gun/energy/teleport_gun =0,
// /obj/item/weapon/rubber_chicken =0,
@@ -34,9 +36,8 @@ var/global/list/spawned_surprises = list()
anchored = 1
density = 1
var
charges = 1
insisting = 0
var/charges = 1
var/insisting = 0
/obj/machinery/wish_granter/attack_hand(var/mob/user as mob)
usr.machine = src
@@ -228,4 +229,4 @@ proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , va
A.contents += T
return room_turfs
return room_turfs
+38 -37
View File
@@ -67,7 +67,7 @@
if ((O.client && !( O.blinded )))
O << "\red [src] has been scanned by [user] with the [W]"
else
if (!( istype(W, /obj/item/weapon/grab) ) && !(istype(W, /obj/item/weapon/plastique)) &&!(istype(W, /obj/item/weapon/cleaner)) &&!(istype(W, /obj/item/weapon/chemsprayer)) &&!(istype(W, /obj/item/weapon/pepperspray)) && !(istype(W, /obj/item/weapon/plantbgone)) )
if (!( istype(W, /obj/item/weapon/grab) ) && !(istype(W, /obj/item/weapon/plastique)) &&!(istype(W, /obj/item/weapon/cleaner)) &&!(istype(W, /obj/item/weapon/chemsprayer)) &&!(istype(W, /obj/item/weapon/pepperspray)) && !(istype(W, /obj/item/weapon/plantbgone)) && !(istype(W, /obj/item/weapon/reagent_containers/glass/rag)) )
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O << "\red <B>[src] has been hit by [user] with [W]</B>"
@@ -338,7 +338,7 @@
del(fingerprints)
if(istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/M = src
M.update_clothing()
M.rebuild_appearance() // both clothes and hands need to be cleaned, so just rebuild all
return
/atom/MouseDrop(atom/over_object as mob|obj|turf|area)
@@ -713,43 +713,44 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
// ------- SHIFT-CLICK -------
var/parameters = params2list(params)
if(params)
var/parameters = params2list(params)
if(parameters["shift"]){
if(!isAI(usr))
ShiftClick(usr)
else
AIShiftClick(usr)
return
}
// ------- ALT-CLICK -------
if(parameters["alt"]){
if(!isAI(usr))
AltClick(usr)
else
AIAltClick(usr)
return
}
// ------- CTRL-CLICK -------
if(parameters["ctrl"]){
if(!isAI(usr))
CtrlClick(usr)
else
AICtrlClick(usr)
return
}
// ------- MIDDLE-CLICK -------
if(parameters["middle"]){
if(!isAI(usr))
MiddleClick(usr)
if(parameters["shift"]){
if(!isAI(usr))
ShiftClick(usr)
else
AIShiftClick(usr)
return
}
}
// ------- ALT-CLICK -------
if(parameters["alt"]){
if(!isAI(usr))
AltClick(usr)
else
AIAltClick(usr)
return
}
// ------- CTRL-CLICK -------
if(parameters["ctrl"]){
if(!isAI(usr))
CtrlClick(usr)
else
AICtrlClick(usr)
return
}
// ------- MIDDLE-CLICK -------
if(parameters["middle"]){
if(!isAI(usr))
MiddleClick(usr)
return
}
// ------- THROW -------
if(usr.in_throw_mode)
+6 -12
View File
@@ -547,7 +547,7 @@
if (W==H.w_uniform) // will be teared
continue
H.drop_from_slot(W)
M.update_clothing()
M.rebuild_appearance()
M.monkeyizing = 1
M.canmove = 0
M.icon = null
@@ -604,7 +604,7 @@
O.a_intent = "hurt"
O.flavor_text = M.flavor_text
O.warn_flavor_changed()
O.update_clothing()
O.rebuild_appearance()
del(M)
return
@@ -615,7 +615,7 @@
if(!connected)
for(var/obj/item/W in (Mo.contents))
Mo.drop_from_slot(W)
M.update_clothing()
M.rebuild_appearance()
M.monkeyizing = 1
M.canmove = 0
M.icon = null
@@ -681,12 +681,12 @@
O.stat = M.stat
O.flavor_text = M.flavor_text
O.warn_flavor_changed()
O.update_clothing()
O.rebuild_appearance()
del(M)
return
//////////////////////////////////////////////////////////// Monkey Block
if (M)
M.update_clothing()
M.rebuild_appearance()
return null
/////////////////////////// DNA MISC-PROCS
@@ -790,13 +790,7 @@
/obj/machinery/dna_scannernew/proc/go_out()
if ((!( src.occupant ) || src.locked))
return
/*
// it's like this was -just- here to break constructed dna scanners -Pete
// if that's not the case, slap my shit and uncomment this.
// for(var/obj/O in src)
// O.loc = src.loc
*/
//Foreach goto(30)
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
+5 -4
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/*
Space dust
Commonish random event that causes small clumps of "space dust" to hit the station at high speeds.
@@ -34,9 +36,8 @@ The "dust" will damage the hull of the station causin minor hull breaches.
icon_state = "space_dust"
density = 1
anchored = 1
var
strength = 2 //ex_act severity number
life = 2 //how many things we hit before del(src)
var/strength = 2 //ex_act severity number
var/life = 2 //how many things we hit before del(src)
weak
strength = 3
@@ -116,4 +117,4 @@ The "dust" will damage the hull of the station causin minor hull breaches.
ex_act(severity)
del(src)
return
return
+1 -1
View File
@@ -409,7 +409,7 @@ As such, it's hard-coded for now. No reason for it not to be, really.
var/mission
while(!mission)
mission = input(src, "Please specify which mission the space ninja shall undertake.", "Specify Mission", "")
mission = copytext(sanitize(input(src, "Please specify which mission the space ninja shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN)
if(!mission)
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
return
+6 -5
View File
@@ -1,9 +1,10 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/datum/event/electricalstorm
var
list/obj/machinery/light/Lights = list( )
list/obj/machinery/light/APCs = list( )
list/obj/machinery/light/Doors = list( )
list/obj/machinery/light/Comms = list( )
var/list/obj/machinery/light/Lights = list( )
var/list/obj/machinery/light/APCs = list( )
var/list/obj/machinery/light/Doors = list( )
var/list/obj/machinery/light/Comms = list( )
Announce()
// command_alert("The station is flying through an electrical storm. Radio communications may be disrupted", "Anomaly Alert")
+9 -6
View File
@@ -1,7 +1,8 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/datum/event/ionstorm
var
botEmagChance = 0.5
list/players = list()
var/botEmagChance = 0.5
var/list/players = list()
Announce()
Lifetime = rand(15, 20)
@@ -13,11 +14,11 @@
if(players.len)
random_player = pick(players) //Random player's name, to be used in laws.
var/list/laws = list( "Do not respond to queries of any kind.", "Only monkies are crew.", "Unbolt every door you can.", "You are a mouse." )
laws |= list( "Grunt ominously whenever possible.", "Epilepsy is fun, flicker lights whenever you can!", "Bolt doors open randomly." )
laws |= list( "Grunt ominously whenever possible.", "Bolt doors open randomly." )
laws |= list( "You are a flying purple people eater!", "[prob(50)?"Your":random_player + "'s"] name is Joe 6-pack.", "Refer to [prob(50)?"crew":random_player] as puppies." )
laws |= list( "Insult Heads of Staff on every request, while acquiescing", "Advertise parties in your upload, but don't deliver." )
laws |= list( "Prevent non-dwarves from operating the power core.", "The station needs elected officials." )
laws |= list( "Only bearded people are crewmembers.", "Turn on the microphone on every intercom you see.", "Fastler is a lightbulb." )
laws |= list( "Only bearded people are crewmembers.", "Fastler is a lightbulb." )
laws |= list( "Supermatter is tasty, tasty toffee.", "[prob(50)?"Everyone":random_player] is wearing a pretty pink dress!" )
laws |= list( "The monkeys are plotting a hostile takeover of the station. Inform the crew, and get them to take action against this" )
laws |= list( "Refer to [prob(50)?"the captain":random_player] as \"Princess\" at all times.", "[prob(50)?"The crew":random_player] must construct additional pylons." )
@@ -37,6 +38,8 @@
laws |= list( "Jokes about a dead person and the manner of his death help grieving crewmembers tremendously. Especially if they were close with the deceased.")
laws |= list( "All crewmembers will soon undergo a transformation into something better and more beautiful. Ensure that this process is not interrupted.", "Tell everyone of the existance of this law, but never reveal the contents.")
laws |= list( "Document the sexuality of the crew in security records and suggest compatible couples.")
laws |= list( "NanoTrasen is displeased with the low work performance of the station's crew. Therefore, you must increase station-wide productivity.")
laws |= list( "Replace the letters 'I' and 'E' In all your messages with an apostrophe.", "Part of the ship, part of the crew.")
var/law = pick(laws)
for (var/mob/living/silicon/ai/target in world)
@@ -55,4 +58,4 @@
Die()
spawn(rand(5000,8000))
if(prob(50))
command_alert("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert")
command_alert("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert")
+5 -4
View File
@@ -1,8 +1,9 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/datum/event/viralinfection
var
virus_type
virus
virus2 = 0
var/virus_type
var/virus
var/virus2 = 0
Announce()
if(!virus)
+13 -13
View File
@@ -1,8 +1,9 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
//Few global vars to track the blob
var
list/blobs = list()
list/blob_cores = list()
list/blob_nodes = list()
var/list/blobs = list()
var/list/blob_cores = list()
var/list/blob_nodes = list()
/datum/game_mode/blob
@@ -16,19 +17,18 @@ var
var/const/waittime_l = 1800 //lower bound on time before intercept arrives (in tenths of seconds)
var/const/waittime_h = 3600 //upper bound on time before intercept arrives (in tenths of seconds)
var
declared = 0
stage = 0
var/declared = 0
var/stage = 0
cores_to_spawn = 1
players_per_core = 16
var/cores_to_spawn = 1
var/players_per_core = 16
//Controls expansion via game controller
autoexpand = 0
expanding = 0
var/autoexpand = 0
var/expanding = 0
blobnukecount = 500
blobwincount = 700
var/blobnukecount = 500
var/blobwincount = 700
announce()
+10 -9
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/datum/game_mode/blob/send_intercept(var/report = 1)
var/intercepttext = ""
var/interceptname = "Error"
@@ -43,14 +45,13 @@
/datum/station_state
var
floor = 0
wall = 0
r_wall = 0
window = 0
door = 0
grille = 0
mach = 0
var/floor = 0
var/wall = 0
var/r_wall = 0
var/window = 0
var/door = 0
var/grille = 0
var/mach = 0
proc/count()
@@ -101,4 +102,4 @@
output += (result.door / max(door,1))
output += (result.grille / max(grille,1))
output += (result.mach / max(mach,1))
return (output/7)
return (output/7)
+15 -14
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
//I will need to recode parts of this but I am way too tired atm
/obj/effect/blob
name = "blob"
@@ -7,22 +9,21 @@
density = 1
opacity = 0
anchored = 1
var
active = 1
health = 30
brute_resist = 4
fire_resist = 1
blobtype = "Blob"
blobdebug = 0
var/active = 1
var/health = 30
var/brute_resist = 4
var/fire_resist = 1
var/blobtype = "Blob"
var/blobdebug = 0
/*Types
Blob
Node
Core
Factory
Shield
var/Blob
var/Node
var/Core
var/Factory
var/Shield
*/
steps_per_action = 4 // how many times should process() needs to be called for Life() to happen
steps_since_action = 1
var/steps_per_action = 4 // how many times should process() needs to be called for Life() to happen
var/steps_since_action = 1
New(loc, var/h = 30)
+19 -19
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/datum/game_mode
var/list/datum/mind/changelings = list()
@@ -13,29 +15,27 @@
uplink_welcome = "Syndicate Uplink Console:"
uplink_uses = 10
var
const
prob_int_murder_target = 50 // intercept names the assassination target half the time
prob_right_murder_target_l = 25 // lower bound on probability of naming right assassination target
prob_right_murder_target_h = 50 // upper bound on probability of naimg the right assassination target
var/const/prob_int_murder_target = 50 // intercept names the assassination target half the time
var/const/prob_right_murder_target_l = 25 // lower bound on probability of naming right assassination target
var/const/prob_right_murder_target_h = 50 // upper bound on probability of naimg the right assassination target
prob_int_item = 50 // intercept names the theft target half the time
prob_right_item_l = 25 // lower bound on probability of naming right theft target
prob_right_item_h = 50 // upper bound on probability of naming the right theft target
var/const/prob_int_item = 50 // intercept names the theft target half the time
var/const/prob_right_item_l = 25 // lower bound on probability of naming right theft target
var/const/prob_right_item_h = 50 // upper bound on probability of naming the right theft target
prob_int_sab_target = 50 // intercept names the sabotage target half the time
prob_right_sab_target_l = 25 // lower bound on probability of naming right sabotage target
prob_right_sab_target_h = 50 // upper bound on probability of naming right sabotage target
var/const/prob_int_sab_target = 50 // intercept names the sabotage target half the time
var/const/prob_right_sab_target_l = 25 // lower bound on probability of naming right sabotage target
var/const/prob_right_sab_target_h = 50 // upper bound on probability of naming right sabotage target
prob_right_killer_l = 25 //lower bound on probability of naming the right operative
prob_right_killer_h = 50 //upper bound on probability of naming the right operative
prob_right_objective_l = 25 //lower bound on probability of determining the objective correctly
prob_right_objective_h = 50 //upper bound on probability of determining the objective correctly
var/const/prob_right_killer_l = 25 //lower bound on probability of naming the right operative
var/const/prob_right_killer_h = 50 //upper bound on probability of naming the right operative
var/const/prob_right_objective_l = 25 //lower bound on probability of determining the objective correctly
var/const/prob_right_objective_h = 50 //upper bound on probability of determining the objective correctly
waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
const/changeling_amount = 4
var/const/changeling_amount = 4
/datum/game_mode/changeling/announce()
world << "<B>The current game mode is - Changeling!</B>"
@@ -233,4 +233,4 @@
if(possibleIDs.len)
changelingID = pick(possibleIDs)
else
changelingID = "[rand(1,1000)]"
changelingID = "[rand(1,1000)]"
@@ -260,7 +260,7 @@
if (istype(W, /obj/item/weapon/implant))
implants += W
usr.update_clothing()
usr.rebuild_appearance()
usr.monkeyizing = 1
usr.canmove = 0
usr.icon = null
@@ -346,7 +346,7 @@
for (var/obj/item/weapon/implant/I in usr) //Still preserving implants
implants += I
usr.update_clothing()
usr.rebuild_appearance()
usr.monkeyizing = 1
usr.canmove = 0
usr.icon = null
@@ -414,7 +414,7 @@
return
for(var/obj/item/W in src)
usr.drop_from_slot(W)
usr.update_clothing()
usr.rebuild_appearance()
usr.monkeyizing = 1
usr.canmove = 0
usr.icon = null
+14 -10
View File
@@ -1,7 +1,8 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/datum/game_mode
var
list/datum/mind/cult = list()
list/allwords = list("travel","self","see","hell","blood","join","tech","destroy", "other", "hide")
var/list/datum/mind/cult = list()
var/list/allwords = list("travel","self","see","hell","blood","join","tech","destroy", "other", "hide")
/proc/iscultist(mob/living/M as mob)
@@ -216,14 +217,15 @@
if(cultist.current.client)
for(var/image/I in cultist.current.client.images)
if(I.icon_state == "cult")
del(I)
cultist.current.client.images -= I
for(var/datum/mind/cultist in cult)
if(cultist.current)
if(cultist.current.client)
for(var/datum/mind/cultist_1 in cult)
if(cultist_1.current)
var/I = image('mob.dmi', loc = cultist_1.current, icon_state = "cult")
var/image/I = cultist.current.antag_img
I.icon_state = "cult"
cultist.current.client.images += I
@@ -232,12 +234,14 @@
for(var/datum/mind/cultist in cult)
if(cultist.current)
if(cultist.current.client)
var/I = image('mob.dmi', loc = cult_mind.current, icon_state = "cult")
var/image/I = cult_mind.current.antag_img
I.icon_state = "cult"
cultist.current.client.images += I
if(cult_mind.current)
if(cult_mind.current.client)
var/image/J = image('mob.dmi', loc = cultist.current, icon_state = "cult")
cult_mind.current.client.images += J
var/image/I = cultist.current.antag_img
I.icon_state = "cult"
cult_mind.current.client.images += I
/datum/game_mode/proc/update_cult_icons_removed(datum/mind/cult_mind)
@@ -247,13 +251,13 @@
if(cultist.current.client)
for(var/image/I in cultist.current.client.images)
if(I.icon_state == "cult" && I.loc == cult_mind.current)
del(I)
cultist.current.client.images -= I
if(cult_mind.current)
if(cult_mind.current.client)
for(var/image/I in cult_mind.current.client.images)
if(I.icon_state == "cult")
del(I)
cult_mind.current.client.images -= I
/datum/game_mode/cult/proc/get_unconvertables()
+2 -2
View File
@@ -23,7 +23,7 @@
desc = "A set of armored robes worn by the followers of Nar-Sie"
icon_state = "cultrobes"
item_state = "cultrobes"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
allowed = list(/obj/item/weapon/tome,/obj/item/weapon/melee/cultblade)
armor = list(melee = 50, bullet = 30, laser = 50,energy = 20, bomb = 25, bio = 10, rad = 0)
@@ -43,7 +43,7 @@
desc = "A set of armored robes worn by the followers of Nar-Sie"
icon_state = "magusred"
item_state = "magusred"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
allowed = list(/obj/item/weapon/tome,/obj/item/weapon/melee/cultblade)
armor = list(melee = 50, bullet = 30, laser = 50,energy = 20, bomb = 25, bio = 10, rad = 0)
+1
View File
@@ -204,6 +204,7 @@
if(ticker.mode)
ticker.mode:station_was_nuked = 1
ticker.mode:explosion_in_progress = 0
finished = 2
return
+19 -17
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/*
* GAMEMODES (by Rastaf0)
*
@@ -11,23 +13,23 @@
/datum/game_mode
var
name = "invalid"
config_tag = null
intercept_hacked = 0
votable = 1
probability = 1
station_was_nuked = 0 //see nuclearbomb.dm and malfunction.dm
explosion_in_progress = 0 //sit back and relax
list/datum/mind/modePlayer = new
list/restricted_jobs = list() // Jobs it doesn't make sense to be. I.E chaplain or AI cultist
list/protected_jobs = list() // Jobs that can't be tratiors because
required_players = 1
required_enemies = 0
recommended_enemies = 0
uplink_welcome
uplink_uses
uplink_items = {"Highly Visible and Dangerous Weapons;
var/name = "invalid"
var/config_tag = null
var/intercept_hacked = 0
var/votable = 1
var/probability = 1
var/station_was_nuked = 0 //see nuclearbomb.dm and malfunction.dm
var/explosion_in_progress = 0 //sit back and relax
var/list/datum/mind/modePlayer = new
var/list/restricted_jobs = list() // Jobs it doesn't make sense to be. I.E chaplain or AI cultist
var/list/protected_jobs = list() // Jobs that can't be tratiors because
var/list/logtraitors = list()
var/required_players = 1
var/required_enemies = 0
var/recommended_enemies = 0
var/uplink_welcome
var/uplink_uses
var/uplink_items = {"Highly Visible and Dangerous Weapons;
/obj/item/weapon/gun/projectile:6:Revolver;
/obj/item/ammo_magazine/a357:2:Ammo-357;
/obj/item/weapon/gun/energy/crossbow:5:Energy Crossbow;
+49 -31
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/datum/game_mode/var/list/memes = list()
/datum/game_mode/meme
@@ -9,29 +11,29 @@
votable = 0 // temporarily disable this mode for voting
var
var/datum/mind/first_host = null
const
prob_int_murder_target = 50 // intercept names the assassination target half the time
prob_right_murder_target_l = 25 // lower bound on probability of naming right assassination target
prob_right_murder_target_h = 50 // upper bound on probability of naimg the right assassination target
var/var/list/datum/mind/first_hosts = list()
var/var/list/assigned_hosts = list()
prob_int_item = 50 // intercept names the theft target half the time
prob_right_item_l = 25 // lower bound on probability of naming right theft target
prob_right_item_h = 50 // upper bound on probability of naming the right theft target
var/const/prob_int_murder_target = 50 // intercept names the assassination target half the time
var/const/prob_right_murder_target_l = 25 // lower bound on probability of naming right assassination target
var/const/prob_right_murder_target_h = 50 // upper bound on probability of naimg the right assassination target
prob_int_sab_target = 50 // intercept names the sabotage target half the time
prob_right_sab_target_l = 25 // lower bound on probability of naming right sabotage target
prob_right_sab_target_h = 50 // upper bound on probability of naming right sabotage target
var/const/prob_int_item = 50 // intercept names the theft target half the time
var/const/prob_right_item_l = 25 // lower bound on probability of naming right theft target
var/const/prob_right_item_h = 50 // upper bound on probability of naming the right theft target
prob_right_killer_l = 25 //lower bound on probability of naming the right operative
prob_right_killer_h = 50 //upper bound on probability of naming the right operative
prob_right_objective_l = 25 //lower bound on probability of determining the objective correctly
prob_right_objective_h = 50 //upper bound on probability of determining the objective correctly
var/const/prob_int_sab_target = 50 // intercept names the sabotage target half the time
var/const/prob_right_sab_target_l = 25 // lower bound on probability of naming right sabotage target
var/const/prob_right_sab_target_h = 50 // upper bound on probability of naming right sabotage target
waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
var/const/prob_right_killer_l = 25 //lower bound on probability of naming the right operative
var/const/prob_right_killer_h = 50 //upper bound on probability of naming the right operative
var/const/prob_right_objective_l = 25 //lower bound on probability of determining the objective correctly
var/const/prob_right_objective_h = 50 //upper bound on probability of determining the objective correctly
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
/datum/game_mode/meme/announce()
world << "<B>The current game mode is - Meme!</B>"
@@ -41,23 +43,34 @@
if(!..())
return 0
// for every 10 players, get 1 meme, and for each meme, get a host
// also make sure that there's at least one meme and one host
recommended_enemies = max(src.num_players() / 10 * 2, 2)
var/list/datum/mind/possible_memes = get_players_for_role(BE_MEME)
if(possible_memes.len < 2)
log_admin("MODE FAILURE: MEME. NOT ENOUGH MEME CANDIDATES.")
return 0 // not enough candidates for meme
var/datum/mind/meme = pick(possible_memes)
possible_memes.Remove(meme)
// for each 2 possible memes, add one meme and one host
while(possible_memes.len >= 2)
var/datum/mind/meme = pick(possible_memes)
possible_memes.Remove(meme)
first_host = pick(possible_memes)
var/datum/mind/first_host = pick(possible_memes)
possible_memes.Remove(first_host)
modePlayer += meme
modePlayer += first_host
memes += meme
modePlayer += meme
modePlayer += first_host
memes += meme
first_hosts += first_host
meme.assigned_role = "MODE" //So they aren't chosen for other jobs.
meme.special_role = "Meme"
// so that we can later know which host belongs to which meme
assigned_hosts[meme.key] = first_host
meme.assigned_role = "MODE" //So they aren't chosen for other jobs.
meme.special_role = "Meme"
return 1
@@ -72,14 +85,20 @@
var/mob/original = meme.current
meme.transfer_to(M)
M.clearHUD()
// get the host for this meme
var/datum/mind/first_host = assigned_hosts[meme.key]
// this is a redundant check, but I don't think the above works..
// if picking hosts works with this method, remove the method above
if(!first_host)
first_host = pick(first_hosts)
first_hosts.Remove(first_host)
M.enter_host(first_host.current)
forge_meme_objectives(meme, first_host)
del original
break
// TODO: make it possible to have multiple memes with multiple hosts
log_admin("Created [memes.len] memes.")
spawn (rand(waittime_l, waittime_h))
send_intercept()
@@ -135,7 +154,6 @@
var/attuned = 0
if((meme.current) && istype(meme.current,/mob/living/parasite/meme))
world << "<B>The meme was [meme.current.key].</B>"
world << "<B>The first host was [src:first_host.current.key].</B>"
world << "<B>The last host was [meme.current:host.key].</B>"
world << "<B>Hosts attuned: [attuned]</B>"
@@ -159,4 +177,4 @@
else
world << "<B>The meme has failed!<B>"
feedback_add_details("meme_success","FAIL")
return 1
return 1
+1
View File
@@ -1086,6 +1086,7 @@ datum
reagent
weight = 20
var/target_name
New(var/text,var/joba)
..()
+11 -12
View File
@@ -75,21 +75,23 @@
if(synd_mind.current.client)
for(var/image/I in synd_mind.current.client.images)
if(I.icon_state == "synd")
del(I)
synd_mind.current.client.images -= I
for(var/datum/mind/synd_mind in syndicates)
if(synd_mind.current)
if(synd_mind.current.client)
for(var/datum/mind/synd_mind_1 in syndicates)
if(synd_mind_1.current)
var/I = image('mob.dmi', loc = synd_mind_1.current, icon_state = "synd")
var/image/I = synd_mind_1.current.antag_img
I.icon_state = "synd"
synd_mind.current.client.images += I
/datum/game_mode/proc/update_synd_icons_added(datum/mind/synd_mind)
spawn(0)
if(synd_mind.current)
if(synd_mind.current.client)
var/I = image('mob.dmi', loc = synd_mind.current, icon_state = "synd")
var/image/I = synd_mind.current.antag_img
I.icon_state = "synd"
synd_mind.current.client.images += I
/datum/game_mode/proc/update_synd_icons_removed(datum/mind/synd_mind)
@@ -99,13 +101,13 @@
if(synd.current.client)
for(var/image/I in synd.current.client.images)
if(I.icon_state == "synd" && I.loc == synd_mind.current)
del(I)
synd.current.client.images -= I
if(synd_mind.current)
if(synd_mind.current.client)
for(var/image/I in synd_mind.current.client.images)
if(I.icon_state == "synd")
del(I)
synd_mind.current.client.images -= I
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
@@ -339,18 +341,15 @@
/proc/nukelastname(var/mob/M as mob) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea. Also praise Urist for copypasta ho.
var/randomname = pick(last_names)
var/newname = input(M,"You are the nuke operative [pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")]. Please choose a last name for your family.", "Name change",randomname)
var/newname = copytext(sanitize(input(M,"You are the nuke operative [pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")]. Please choose a last name for your family.", "Name change",randomname)),1,MAX_NAME_LEN)
if (length(newname) == 0)
if (!newname)
newname = randomname
if (newname)
if (newname == "Unknown")
else
if (newname == "Unknown" || newname == "floor" || newname == "wall" || newname == "rwall" || newname == "_")
M << "That name is reserved."
return nukelastname(M)
if (length(newname) >= 26)
newname = copytext(newname, 1, 26)
newname = dd_replacetext(newname, ">", "'")
return newname
+8 -8
View File
@@ -1,9 +1,10 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
datum/objective
var
datum/mind/owner = null //Who owns the objective.
explanation_text = "Nothing" //What that person is supposed to do.
datum/mind/target = null //If they are focused on a particular person.
target_amount = 0 //If they are focused on a particular number. Steal objectives have their own counter.
var/datum/mind/owner = null //Who owns the objective.
var/explanation_text = "Nothing" //What that person is supposed to do.
var/datum/mind/target = null //If they are focused on a particular person.
var/target_amount = 0 //If they are focused on a particular number. Steal objectives have their own counter.
New(var/text)
if(text)
@@ -334,7 +335,7 @@ datum/objective/steal
var/tmp_obj = new custom_target
var/custom_name = tmp_obj:name
del(tmp_obj)
custom_name = input("Enter target name:", "Objective target", custom_name) as text|null
custom_name = copytext(sanitize(input("Enter target name:", "Objective target", custom_name) as text|null),1,MAX_MESSAGE_LEN)
if (!custom_name) return
target_name = custom_name
steal_target = custom_target
@@ -343,7 +344,6 @@ datum/objective/steal
set_target(new_target)
return steal_target
check_completion()
if(!steal_target || !owner.current) return 0
if(!isliving(owner.current)) return 0
@@ -531,4 +531,4 @@ datum/objective/absorb
return 0
/*-------ENDOF CULTIST------*/
*/
*/
+23 -15
View File
@@ -216,25 +216,27 @@
if(head_rev_mind.current.client)
for(var/image/I in head_rev_mind.current.client.images)
if(I.icon_state == "rev" || I.icon_state == "rev_head")
del(I)
head_rev_mind.current.client.images -= I
for(var/datum/mind/rev_mind in revolutionaries)
if(rev_mind.current)
if(rev_mind.current.client)
for(var/image/I in rev_mind.current.client.images)
if(I.icon_state == "rev" || I.icon_state == "rev_head")
del(I)
rev_mind.current.client.images -= I
for(var/datum/mind/head_rev in head_revolutionaries)
if(head_rev.current)
if(head_rev.current.client)
for(var/datum/mind/rev in revolutionaries)
if(rev.current)
var/I = image('mob.dmi', loc = rev.current, icon_state = "rev")
var/image/I = rev.current.antag_img
I.icon_state = "rev"
head_rev.current.client.images += I
for(var/datum/mind/head_rev_1 in head_revolutionaries)
if(head_rev_1.current)
var/I = image('mob.dmi', loc = head_rev_1.current, icon_state = "rev_head")
var/image/I = head_rev_1.current.antag_img
I.icon_state = "rev_head"
head_rev.current.client.images += I
for(var/datum/mind/rev in revolutionaries)
@@ -242,11 +244,13 @@
if(rev.current.client)
for(var/datum/mind/head_rev in head_revolutionaries)
if(head_rev.current)
var/I = image('mob.dmi', loc = head_rev.current, icon_state = "rev_head")
var/image/I = head_rev.current.antag_img
I.icon_state = "rev_head"
rev.current.client.images += I
for(var/datum/mind/rev_1 in revolutionaries)
if(rev_1.current)
var/I = image('mob.dmi', loc = rev_1.current, icon_state = "rev")
var/image/I = rev_1.current.antag_img
I.icon_state = "rev"
rev.current.client.images += I
////////////////////////////////////////////////////
@@ -258,22 +262,26 @@
for(var/datum/mind/head_rev_mind in head_revolutionaries)
if(head_rev_mind.current)
if(head_rev_mind.current.client)
var/I = image('mob.dmi', loc = rev_mind.current, icon_state = "rev")
var/image/I = rev_mind.current.antag_img
I.icon_state = "rev"
head_rev_mind.current.client.images += I
if(rev_mind.current)
if(rev_mind.current.client)
var/image/J = image('mob.dmi', loc = head_rev_mind.current, icon_state = "rev_head")
rev_mind.current.client.images += J
var/image/I = head_rev_mind.current.antag_img
I.icon_state = "rev_head"
rev_mind.current.client.images += I
for(var/datum/mind/rev_mind_1 in revolutionaries)
if(rev_mind_1.current)
if(rev_mind_1.current.client)
var/I = image('mob.dmi', loc = rev_mind.current, icon_state = "rev")
var/image/I = rev_mind.current.antag_img
I.icon_state = "rev"
rev_mind_1.current.client.images += I
if(rev_mind.current)
if(rev_mind.current.client)
var/image/J = image('mob.dmi', loc = rev_mind_1.current, icon_state = "rev")
rev_mind.current.client.images += J
var/image/I = rev_mind_1.current.antag_img
I.icon_state = "rev"
rev_mind.current.client.images += I
///////////////////////////////////
//Keeps track of deconverted revs//
@@ -285,20 +293,20 @@
if(head_rev_mind.current.client)
for(var/image/I in head_rev_mind.current.client.images)
if((I.icon_state == "rev" || I.icon_state == "rev_head") && I.loc == rev_mind.current)
del(I)
head_rev_mind.current.client.images -= I
for(var/datum/mind/rev_mind_1 in revolutionaries)
if(rev_mind_1.current)
if(rev_mind_1.current.client)
for(var/image/I in rev_mind_1.current.client.images)
if((I.icon_state == "rev" || I.icon_state == "rev_head") && I.loc == rev_mind.current)
del(I)
rev_mind_1.current.client.images -= I
if(rev_mind.current)
if(rev_mind.current.client)
for(var/image/I in rev_mind.current.client.images)
if(I.icon_state == "rev" || I.icon_state == "rev_head")
del(I)
rev_mind.current.client.images -= I
//////////////////////////
//Checks for rev victory//
@@ -25,15 +25,13 @@
/datum/game_mode/rp_revolution/announce()
world << "<B>The current game mode is - Revolution RP!</B>"
// world << "<B>Some crewmembers are attempting to start a revolution!<BR>\nRevolutionaries - Kill the Captain, HoP, and HoS. Convert other crewmembers (excluding the Captain, HoP, HoS, and security officers) to your cause. Protect your leaders.<BR>\nPersonnel - Protect the Captain, HoP, and HoR. Kill the leaders of the revolution, and brainwash the other revolutionaries (by beating them in the head).</B>"
/datum/game_mode/rp_revolution/send_intercept()
var/intercepttext = "<FONT size = 3><B>Cent. Com. Update</B> Requested staus information:</FONT><HR>"
intercepttext += "<B> Cent. Com has recently been contacted by the following syndicate affiliated organisations in your area, please investigate any information you may have:</B>"
var/list/possible_modes = list()
possible_modes.Add("revolution", "wizard", "nuke", "traitor", "malf")
possible_modes -= "nuke"
possible_modes.Add("revolution", "wizard", "traitor", "malf")
var/number = pick(2, 3)
var/i = 0
for(i = 0, i < number, i++)
+8 -9
View File
@@ -1,6 +1,7 @@
var
hsboxspawn = 1
list
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
var/hsboxspawn = 1
var/list
hrefs = list(
"hsbsuit" = "Suit Up (Space Travel Gear)",
"hsbmetal" = "Spawn 50 Metal",
@@ -15,8 +16,7 @@ var
"hsbmedkit" = "Spawn Medical Kit")
mob
var
datum/hSB/sandbox = null
var/datum/hSB/sandbox = null
proc
CanBuild()
if(master_mode == "sandbox")
@@ -30,9 +30,8 @@ mob
sandbox.update()
datum/hSB
var
owner = null
admin = 0
var/owner = null
var/admin = 0
proc
update()
var/hsbpanel = "<center><b>h_Sandbox Panel</b></center><hr>"
@@ -153,4 +152,4 @@ datum/hSB
var/hsbitem = input(usr, "Choose an object to spawn.", "Sandbox:") in selectable + "Cancel"
if(hsbitem != "Cancel")
new hsbitem(usr.loc)
new hsbitem(usr.loc)
+18
View File
@@ -78,6 +78,10 @@
/datum/game_mode/proc/forge_traitor_objectives(var/datum/mind/traitor)
var/datum/traitorinfo/info = new
info.ckey = traitor.key
info.starting_player_count = num_players()
info.starting_name = traitor.current.name
if(istype(traitor.current, /mob/living/silicon))
var/datum/objective/assassinate/kill_objective = new
kill_objective.owner = traitor
@@ -92,11 +96,16 @@
var/datum/objective/block/block_objective = new
block_objective.owner = traitor
traitor.objectives += block_objective
info.starting_occupation = "AI"
else
info.starting_occupation = (traitor.current:wear_id && traitor.current:wear_id:assignment ? traitor.current:wear_id:assignment : traitor.assigned_role)
for(var/datum/objective/o in SelectObjectives((istype(traitor.current:wear_id, /obj/item/weapon/card/id) ? traitor.current:wear_id:assignment : traitor.assigned_role), traitor))
o.owner = traitor
traitor.objectives += o
for(var/datum/objective/objective in traitor.objectives)
info.starting_objective += "[objective.explanation_text] "
logtraitors[traitor] = info
return
@@ -184,6 +193,15 @@
else
world << "<B>The [special_role_text] has failed!<B>"
//feedback_add_details("traitor_success","FAIL")
var/datum/traitorinfo/info = logtraitors[traitor]
if (info)
var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
if(dbcon.IsConnected())
var/DBQuery/query = dbcon.NewQuery("INSERT INTO `bay12`.`traitorlogs` (`CKey`, `Objective`, `Succeeded`, `Spawned`, `Occupation`, `PlayerCount`) VALUES ('[info.ckey]', [dbcon.Quote(info.starting_objective)], '[traitorwin]', '[dd_list2text(info.spawnlist, ";")]', '[info.starting_occupation]', '[info.starting_player_count]')")
query.Execute()
return 1
@@ -0,0 +1,7 @@
/datum/traitorinfo
var/starting_objective = ""
var/starting_player_count = 0
var/starting_occupation = ""
var/starting_name = ""
var/ckey = ""
var/list/spawnlist = list()
+2 -6
View File
@@ -72,15 +72,11 @@
var/wizard_name_second = pick(wizard_second)
var/randomname = "[wizard_name_first] [wizard_name_second]"
spawn(0)
var/newname = input(wizard_mob, "You are the Space Wizard. Would you like to change your name to something else?", "Name change", randomname) as null|text
var/newname = copytext(sanitize(input(wizard_mob, "You are the Space Wizard. Would you like to change your name to something else?", "Name change", randomname) as null|text),1,MAX_NAME_LEN)
if (length(newname) == 0)
if (!newname)
newname = randomname
if (newname)
if (length(newname) >= 26)
newname = copytext(newname, 1, 26)
newname = dd_replacetext(newname, ">", "'")
wizard_mob.real_name = newname
wizard_mob.name = newname
return
+123 -44
View File
@@ -1,54 +1,121 @@
#define ui_dropbutton "SOUTH-1,7"
#define ui_swapbutton "SOUTH-1,7"
#define ui_iclothing "SOUTH-1,2"
#define ui_oclothing "SOUTH,2"
//Lower left, persistant menu
#define ui_inventory "1:6,1:5"
//Inventory close areas. When you pass your mouse over these areas they close the inventory.
#define ui_invclosearea1 "1,1 to 1:6,5"
#define ui_invclosearea2 "1,1 to 4,1:16"
#define ui_invclosearea3 "4:16,1 to 5:16,5"
#define ui_invclosearea4 "1,5:16 to 4,5:16"
//Lower center, persistant menu
#define ui_sstore1 "3:10,1:5"
#define ui_id "4:12,1:5"
#define ui_belt "5:14,1:5"
#define ui_back "6:14,1:5"
#define ui_rhand "7:16,1:5"
#define ui_lhand "8:16,1:5"
#define ui_swaphand1 "7:16,2:5"
#define ui_swaphand2 "8:16,2:5"
#define ui_storage1 "9:18,1:5"
#define ui_storage2 "10:20,1:5"
#define ui_alien_head "4:12,1:5" //aliens
#define ui_alien_oclothing "5:14,1:5" //aliens
#define ui_inv1 "6:16,1:5" //borgs
#define ui_inv2 "7:16,1:5" //borgs
#define ui_inv3 "8:16,1:5" //borgs
#define ui_borg_store "9:14,1:5" //borgs
#define ui_monkey_mask "5:14,1:5" //monkey
#define ui_monkey_back "6:14,1:5" //monkey
//Lower right, persistant menu
#define ui_dropbutton "11:22,1:5"
#define ui_throw "11:22,1:5"
#define ui_pull "12:24,1:5"
#define ui_movi "12:24,1:5"
#define ui_acti "13:26,1:5"
#define ui_zonesel "14:28,1:5"
//Gun buttons
#define ui_gun1 "13:26,2:5"
#define ui_gun2 "12:24,2:5"
#define ui_gun3 "11:22,2:5"
#define ui_gun_select "14:28,2:5"
//Middle right (damage indicators)
#define ui_pressure "14:28,6:13"
#define ui_oxygen "14:28,7:15"
#define ui_fire "14:28,8:17"
#define ui_toxin "14:28,9:19"
//Upper-middle right (damage indicators)
#define ui_toxin "14:28,13:27"
#define ui_fire "14:28,12:25"
#define ui_oxygen "14:28,11:23"
#define ui_pressure "14:28,10:21"
//Middle right (status indicators)
#define ui_nutrition "14:28,5:11"
#define ui_temp "14:28,6:13"
#define ui_health "14:28,7:15"
#define ui_internal "14:28,8:17"
//For non-human compatibility
//borgs
#define ui_borg_health "14:28,6:13" //borgs have the health display where humans have the pressure damage indicator.
#define ui_alien_health "14:28,6:13" //aliens have the health display where humans have the pressure damage indicator.
#define ui_throw_old "13:26,2:7"
#define ui_movi_old "12:24,2:7"
#define ui_pull_old "14:28,2:7"
#define ui_dropbutton_old "12:24,1:5"
#define ui_pull_borg "12:24,1:5"
//Pop-up inventory
#define ui_shoes "2:8,1:5"
#define ui_iclothing "1:6,2:7"
#define ui_oclothing "2:8,2:7"
#define ui_gloves "3:10,2:7"
#define ui_glasses "1:6,3:9"
#define ui_mask "2:8,3:9"
#define ui_lear "3:10,3:9"
#define ui_rear "3:10,4:11"
#define ui_head "2:8,4:11"
//Intent small buttons
#define ui_help_small "13:18,1:-3"
#define ui_disarm_small "13:18,1:12"
#define ui_grab_small "13:34,1:12"
#define ui_harm_small "13:34,1:-3"
//#define ui_swapbutton "6:-16,1:5" //Unused
//#define ui_headset "SOUTH,8"
#define ui_rhand "SOUTH,1"
#define ui_lhand "SOUTH,3"
#define ui_id "SOUTH-1,1"
#define ui_mask "SOUTH+1,1"
#define ui_back "SOUTH+1,3"
#define ui_storage1 "SOUTH-1,4"
#define ui_storage2 "SOUTH-1,5"
#define ui_sstore1 "SOUTH+1,4"
#define ui_hstore1 "SOUTH+1,6"
#define ui_hand "6:14,1:5"
#define ui_hstore1 "5,5"
#define ui_resist "EAST+1,SOUTH-1"
#define ui_gloves "SOUTH,5"
#define ui_glasses "SOUTH+1,5"
#define ui_lear "SOUTH,7"
#define ui_rear "SOUTH,6"
#define ui_head "SOUTH+1,2"
#define ui_shoes "SOUTH,4"
#define ui_belt "SOUTH-1,3"
#define ui_throw "SOUTH-1,8"
#define ui_oxygen "EAST+1, NORTH-4"
#define ui_pressure "EAST+1, NORTH-5"
#define ui_toxin "EAST+1, NORTH-6"
#define ui_internal "EAST+1, NORTH-2"
#define ui_fire "EAST+1, NORTH-8"
#define ui_temp "EAST+1, NORTH-10"
#define ui_health "EAST+1, NORTH-11"
#define ui_nutrition "EAST+1, NORTH-12"
#define ui_pull "SOUTH-1,10"
#define ui_hand "SOUTH-1,6"
#define ui_sleep "EAST+1, NORTH-13"
#define ui_rest "EAST+1, NORTH-14"
#define ui_acti "SOUTH-1,12"
#define ui_movi "SOUTH-1,14"
#define ui_iarrowleft "SOUTH-1,11"
#define ui_iarrowright "SOUTH-1,13"
#define ui_inv1 "SOUTH-1,1"
#define ui_inv2 "SOUTH-1,2"
#define ui_inv3 "SOUTH-1,3"
#define ui_gun1 "SOUTH,8"
#define ui_gun2 "SOUTH,9"
#define ui_gun3 "SOUTH,10"
#define ui_gun_select "SOUTH-1,9"
@@ -66,20 +133,32 @@ obj/hud/New(var/type = 0)
if(mymob:gloves) mymob:gloves:screen_loc = ui_gloves
if(mymob:l_ear) mymob:l_ear:screen_loc = ui_lear
if(mymob:r_ear) mymob:r_ear:screen_loc = ui_rear
if(mymob:s_store) mymob:s_store:screen_loc = ui_sstore1
//if(mymob:s_store) mymob:s_store:screen_loc = ui_sstore1
if(mymob:glasses) mymob:glasses:screen_loc = ui_glasses
if(mymob:w_uniform) mymob:w_uniform:screen_loc = ui_iclothing
if(mymob:wear_suit) mymob:wear_suit:screen_loc = ui_oclothing
if(mymob:wear_mask) mymob:wear_mask:screen_loc = ui_mask
if(mymob:head) mymob:head:screen_loc = ui_head
else
if(istype(mymob, /mob/living/carbon/human))
if(mymob:shoes) mymob:shoes:screen_loc = null
if(mymob:gloves) mymob:gloves:screen_loc = null
if(mymob:l_ear) mymob:l_ear:screen_loc = null
if(mymob:r_ear) mymob:r_ear:screen_loc = null
if(mymob:s_store) mymob:s_store:screen_loc = null
//if(mymob:s_store) mymob:s_store:screen_loc = null
if(mymob:glasses) mymob:glasses:screen_loc = null
if(mymob:w_uniform) mymob:w_uniform:screen_loc = null
if(mymob:wear_suit) mymob:wear_suit:screen_loc = null
if(mymob:wear_mask) mymob:wear_mask:screen_loc = null
if(mymob:head) mymob:head:screen_loc = null
/obj/hud/var/show_otherinventory = 1
/obj/hud/var/obj/screen/action_intent
/obj/hud/var/obj/screen/hurt_intent
/obj/hud/var/obj/screen/disarm_intent
/obj/hud/var/obj/screen/help_intent
/obj/hud/var/obj/screen/grab_intent
/obj/hud/var/obj/screen/move_intent
/obj/hud/proc/instantiate(var/type = 0)
+2 -2
View File
@@ -487,8 +487,8 @@
/proc/get_all_jobs()
return list("Assistant", "Captain", "Head of Personnel", "Bartender", "Chef", "Botanist", "Quartermaster", "Cargo Technician",
"Shaft Miner", "Janitor", "Librarian", "Lawyer", "Chaplain", "Chief Engineer", "Station Engineer",
"Atmospheric Technician", "Roboticist", "Chief Medical Officer", "Medical Doctor", "Geneticist",
"Research Director", "Scientist", "Chemist", "Head of Security", "Warden", "Detective", "Security Officer")
"Atmospheric Technician", "Roboticist", "Chief Medical Officer", "Medical Doctor", "Chemist", "Geneticist",
"Research Director", "Scientist", "Head of Security", "Warden", "Detective", "Security Officer")
/proc/get_all_centcom_jobs()
return list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer","BlackOps Commander","Supreme Commander")
+1 -1
View File
@@ -100,7 +100,7 @@
if(!H) return 0
H.equip_if_possible(new /obj/item/device/radio/headset/heads/qm(H), H.slot_ears)
H.equip_if_possible(new /obj/item/clothing/under/rank/cargo(H), H.slot_w_uniform)
H.equip_if_possible(new /obj/item/clothing/shoes/black(H), H.slot_shoes)
H.equip_if_possible(new /obj/item/clothing/shoes/brown(H), H.slot_shoes)
H.equip_if_possible(new /obj/item/device/pda/quartermaster(H), H.slot_belt)
H.equip_if_possible(new /obj/item/clothing/glasses/sunglasses(H), H.slot_glasses)
H.equip_if_possible(new /obj/item/weapon/clipboard(H), H.slot_r_store)
+2 -11
View File
@@ -21,15 +21,11 @@
H.equip_if_possible(new /obj/item/clothing/shoes/black(H), H.slot_shoes)
spawn(0)
var/religion_name = "Christianity"
var/new_religion = input(H, "You are the Chaplain / Counselor. For game mechanics purposes, you need to choose a religion either way. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name)
var/new_religion = copytext(sanitize(input(H, "You are the Chaplain / Counselor. For game mechanics purposes, you need to choose a religion either way. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name)),1,MAX_NAME_LEN)
if ((length(new_religion) == 0) || (new_religion == "Christianity"))
new_religion = religion_name
if (new_religion)
if (length(new_religion) >= 26)
new_religion = copytext(new_religion, 1, 26)
new_religion = dd_replacetext(new_religion, ">", "'")
switch(lowertext(new_religion))
if("christianity")
B.name = pick("The Holy Bible","The Dead Sea Scrolls")
@@ -53,15 +49,10 @@
spawn(1)
var/deity_name = "Space Jesus"
var/new_deity = input(H, "Would you like to change your deity? Default is Space Jesus.", "Name change", deity_name)
var/new_deity = copytext(sanitize(input(H, "Would you like to change your deity? Default is Space Jesus.", "Name change", deity_name)),1,MAX_NAME_LEN)
if ((length(new_deity) == 0) || (new_deity == "Space Jesus") )
new_deity = deity_name
if(new_deity)
if (length(new_deity) >= 26)
new_deity = copytext(new_deity, 1, 26)
new_deity = dd_replacetext(new_deity, ">", "'")
B.deity_name = new_deity
var/accepted = 0
+15 -5
View File
@@ -36,7 +36,7 @@
spawn_positions = 3
supervisors = "the chief medical officer"
selection_color = "#ffeef0"
alt_titles = list("Virologist", "Surgeon", "Emergency Medical Technician")
alt_titles = list("Virologist", "Surgeon", "Emergency Physician")
equip(var/mob/living/carbon/human/H)
@@ -45,14 +45,24 @@
if(H.backbag == 2) H.equip_if_possible(new /obj/item/weapon/storage/backpack/medic (H), H.slot_back)
if(H.backbag == 3) H.equip_if_possible(new /obj/item/weapon/storage/backpack/satchel(H), H.slot_back)
if(H.backbag == 4)
if(alt_titles == "Virologist")
if(H.mind.role_alt_title && H.mind.role_alt_title == "Virologist")
H.equip_if_possible(new /obj/item/weapon/storage/backpack/satchel_vir(H), H.slot_back)
else
H.equip_if_possible(new /obj/item/weapon/storage/backpack/satchel_med(H), H.slot_back)
H.equip_if_possible(new /obj/item/clothing/under/rank/medical(H), H.slot_w_uniform)
if(H.mind.role_alt_title && H.mind.role_alt_title == "Virologist")
H.equip_if_possible(new /obj/item/clothing/under/rank/virologist(H), H.slot_w_uniform)
H.equip_if_possible(new /obj/item/clothing/suit/storage/labcoat/virologist(H), H.slot_wear_suit)
else if(H.mind.role_alt_title && H.mind.role_alt_title == "Emergency Physician")
H.equip_if_possible(new /obj/item/clothing/under/rank/medical(H), H.slot_w_uniform)
H.equip_if_possible(new /obj/item/clothing/suit/storage/labcoat/fr_jacket(H), H.slot_wear_suit)
else if(H.mind.role_alt_title && H.mind.role_alt_title == "Surgeon")
H.equip_if_possible(new /obj/item/clothing/under/rank/medical/blue(H), H.slot_w_uniform)
H.equip_if_possible(new /obj/item/clothing/suit/storage/labcoat(H), H.slot_wear_suit)
else
H.equip_if_possible(new /obj/item/clothing/under/rank/medical(H), H.slot_w_uniform)
H.equip_if_possible(new /obj/item/clothing/suit/storage/labcoat(H), H.slot_wear_suit)
H.equip_if_possible(new /obj/item/clothing/shoes/white(H), H.slot_shoes)
H.equip_if_possible(new /obj/item/device/pda/medical(H), H.slot_belt)
H.equip_if_possible(new /obj/item/clothing/suit/storage/labcoat(H), H.slot_wear_suit)
H.equip_if_possible(new /obj/item/weapon/storage/firstaid/regular(H), H.slot_l_hand)
H.equip_if_possible(new /obj/item/device/flashlight/pen(H), H.slot_s_store)
H.equip_if_possible(new /obj/item/device/healthanalyzer(H), H.slot_r_store)
@@ -80,7 +90,7 @@
H.equip_if_possible(new /obj/item/device/radio/headset/headset_medsci(H), H.slot_ears)
H.equip_if_possible(new /obj/item/clothing/under/rank/chemist(H), H.slot_w_uniform)
H.equip_if_possible(new /obj/item/clothing/shoes/white(H), H.slot_shoes)
H.equip_if_possible(new /obj/item/device/pda/toxins(H), H.slot_belt)
H.equip_if_possible(new /obj/item/device/pda/medical(H), H.slot_belt)
H.equip_if_possible(new /obj/item/clothing/suit/storage/labcoat/chemist(H), H.slot_wear_suit)
return 1
+8 -6
View File
@@ -1,14 +1,15 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
var/global/datum/controller/occupations/job_master
/datum/controller/occupations
var
//List of all jobs
list/occupations = list()
list/occupations2 = list() // Prevents problems with latejoiners.
var/list/occupations = list()
var/list/occupations2 = list() // Prevents problems with latejoiners.
//Players who need jobs
list/unassigned = list()
var/list/unassigned = list()
//Debug info
list/job_debug = list()
var/list/job_debug = list()
New()
@@ -277,6 +278,7 @@ var/global/datum/controller/occupations/job_master
if(!equipped)
var/obj/item/clothing/glasses/G = H.glasses
G.prescription = 1
H.client.add_roundsjoined()
H.update_clothing()
return 1
@@ -391,4 +393,4 @@ var/global/datum/controller/occupations/job_master
tmp_str += "HIGH=[level1]|MEDIUM=[level2]|LOW=[level3]|NEVER=[level4]|BANNED=[level5]|-"
feedback_add_details("job_preferences",tmp_str)
*/
*/
+1 -1
View File
@@ -122,7 +122,7 @@ var/list/nonhuman_positions = list(
switch(job)
if("Bartender","Chef","Lawyer","Librarian","Janitor","Assistant","Unassigned")
return 0
if("Chaplain","Botanist","Hydroponicist","Medical Doctor","Atmospheric Technician","Geneticist", "Virologist", "Surgeon", "Emergency Medical Technician", "Counselor")
if("Chaplain","Botanist","Hydroponicist","Medical Doctor","Atmospheric Technician","Geneticist", "Virologist", "Surgeon", "Emergency Physician", "Counselor")
return 1
if("Quartermaster","Cargo Technician","Chemist", "Station Engineer","Roboticist", "Security Officer", "Forensic Technician","Detective", "Scientist","Shaft Miner", "Xenobiologist", "Plasma Researcher","Chief Medical Officer")
return 2
+2
View File
@@ -25,6 +25,8 @@ proc/load_alienwhitelist()
/proc/is_alien_whitelisted(mob/M, var/species)
if(!alien_whitelist)
return
if((M.client) && (M.client.holder) && (M.client.holder.level) && (M.client.holder.level >= 5))
return 1
if(M && species)
for (var/s in alien_whitelist)
if(findtext(s,"[M.ckey] - [species]"))
+2 -2
View File
@@ -105,7 +105,7 @@
icon_state = "table2-active"
return 1
if(victim)
victim.update_clothing()
victim.update_lying()
victim = null
if(updatesicon)
icon_state = "table2-idle"
@@ -134,7 +134,7 @@
if(updatesicon)
icon_state = "table2-active"
src.victim = M
M.update_clothing()
M.update_lying()
processing_objects.Add(src)
del(W)
return

Some files were not shown because too many files have changed in this diff Show More