Merge remote-tracking branch 'upstream/dev' into span_class=notice

Conflicts:
	code/game/antagonist/station/rogue_ai.dm
	code/game/machinery/OpTable.dm
	code/game/machinery/floodlight.dm
	code/game/machinery/spaceheater.dm
This commit is contained in:
GinjaNinja32
2015-06-02 17:33:20 +01:00
162 changed files with 2537 additions and 1124 deletions

View File

@@ -8,6 +8,10 @@ env:
before_install: before_install:
- sudo apt-get update -qq - sudo apt-get update -qq
- sudo apt-get install libc6:i386 libgcc1:i386 libstdc++6:i386 -qq - sudo apt-get install libc6:i386 libgcc1:i386 libstdc++6:i386 -qq
- sudo apt-get install python -qq
- sudo apt-get install python-pip -qq
- sudo pip install PyYaml -q
- sudo pip install beautifulsoup4 -q
install: install:
- curl "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip - curl "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip
@@ -22,3 +26,4 @@ script:
- (! find nano/templates/ -type f -exec md5sum {} + | sort | uniq -D -w 32 | grep nano) - (! find nano/templates/ -type f -exec md5sum {} + | sort | uniq -D -w 32 | grep nano)
- ( md5sum -c - <<< "0af969f671fba6cf9696c78cd175a14a *baystation12.int") - ( md5sum -c - <<< "0af969f671fba6cf9696c78cd175a14a *baystation12.int")
- DreamMaker baystation12.dme - DreamMaker baystation12.dme
- python tools/GenerateChangelog/ss13_genchangelog.py html/changelog.html html/changelogs

View File

@@ -46,10 +46,12 @@
#include "code\_onclick\rig.dm" #include "code\_onclick\rig.dm"
#include "code\_onclick\telekinesis.dm" #include "code\_onclick\telekinesis.dm"
#include "code\_onclick\hud\_defines.dm" #include "code\_onclick\hud\_defines.dm"
#include "code\_onclick\hud\action.dm"
#include "code\_onclick\hud\alien_larva.dm" #include "code\_onclick\hud\alien_larva.dm"
#include "code\_onclick\hud\hud.dm" #include "code\_onclick\hud\hud.dm"
#include "code\_onclick\hud\human.dm" #include "code\_onclick\hud\human.dm"
#include "code\_onclick\hud\monkey.dm" #include "code\_onclick\hud\monkey.dm"
#include "code\_onclick\hud\movable_screen_objects.dm"
#include "code\_onclick\hud\other_mobs.dm" #include "code\_onclick\hud\other_mobs.dm"
#include "code\_onclick\hud\robot.dm" #include "code\_onclick\hud\robot.dm"
#include "code\_onclick\hud\screen_objects.dm" #include "code\_onclick\hud\screen_objects.dm"
@@ -101,6 +103,7 @@
#include "code\controllers\voting.dm" #include "code\controllers\voting.dm"
#include "code\controllers\Processes\air.dm" #include "code\controllers\Processes\air.dm"
#include "code\controllers\Processes\alarm.dm" #include "code\controllers\Processes\alarm.dm"
#include "code\controllers\Processes\chemistry.dm"
#include "code\controllers\Processes\disease.dm" #include "code\controllers\Processes\disease.dm"
#include "code\controllers\Processes\emergencyShuttle.dm" #include "code\controllers\Processes\emergencyShuttle.dm"
#include "code\controllers\Processes\event.dm" #include "code\controllers\Processes\event.dm"
@@ -176,6 +179,7 @@
#include "code\datums\diseases\advance\symptoms\weight.dm" #include "code\datums\diseases\advance\symptoms\weight.dm"
#include "code\datums\helper_datums\construction_datum.dm" #include "code\datums\helper_datums\construction_datum.dm"
#include "code\datums\helper_datums\events.dm" #include "code\datums\helper_datums\events.dm"
#include "code\datums\helper_datums\getrev.dm"
#include "code\datums\helper_datums\global_iterator.dm" #include "code\datums\helper_datums\global_iterator.dm"
#include "code\datums\helper_datums\teleport.dm" #include "code\datums\helper_datums\teleport.dm"
#include "code\datums\helper_datums\topic_input.dm" #include "code\datums\helper_datums\topic_input.dm"
@@ -194,6 +198,7 @@
#include "code\datums\wires\suit_storage_unit.dm" #include "code\datums\wires\suit_storage_unit.dm"
#include "code\datums\wires\vending.dm" #include "code\datums\wires\vending.dm"
#include "code\datums\wires\wires.dm" #include "code\datums\wires\wires.dm"
#include "code\defines\gases.dm"
#include "code\defines\obj.dm" #include "code\defines\obj.dm"
#include "code\defines\obj\weapon.dm" #include "code\defines\obj\weapon.dm"
#include "code\defines\procs\admin.dm" #include "code\defines\procs\admin.dm"
@@ -267,6 +272,7 @@
#include "code\game\gamemodes\cult\cult_items.dm" #include "code\game\gamemodes\cult\cult_items.dm"
#include "code\game\gamemodes\cult\cult_structures.dm" #include "code\game\gamemodes\cult\cult_structures.dm"
#include "code\game\gamemodes\cult\hell_universe.dm" #include "code\game\gamemodes\cult\hell_universe.dm"
#include "code\game\gamemodes\cult\narsie.dm"
#include "code\game\gamemodes\cult\ritual.dm" #include "code\game\gamemodes\cult\ritual.dm"
#include "code\game\gamemodes\cult\runes.dm" #include "code\game\gamemodes\cult\runes.dm"
#include "code\game\gamemodes\cult\talisman.dm" #include "code\game\gamemodes\cult\talisman.dm"
@@ -551,7 +557,6 @@
#include "code\game\objects\effects\spawners\gibspawner.dm" #include "code\game\objects\effects\spawners\gibspawner.dm"
#include "code\game\objects\effects\spawners\vaultspawner.dm" #include "code\game\objects\effects\spawners\vaultspawner.dm"
#include "code\game\objects\items\apc_frame.dm" #include "code\game\objects\items\apc_frame.dm"
#include "code\game\objects\items\ashtray.dm"
#include "code\game\objects\items\blueprints.dm" #include "code\game\objects\items\blueprints.dm"
#include "code\game\objects\items\bodybag.dm" #include "code\game\objects\items\bodybag.dm"
#include "code\game\objects\items\contraband.dm" #include "code\game\objects\items\contraband.dm"
@@ -680,6 +685,7 @@
#include "code\game\objects\items\weapons\implants\implantfreedom.dm" #include "code\game\objects\items\weapons\implants\implantfreedom.dm"
#include "code\game\objects\items\weapons\implants\implantpad.dm" #include "code\game\objects\items\weapons\implants\implantpad.dm"
#include "code\game\objects\items\weapons\implants\implantuplink.dm" #include "code\game\objects\items\weapons\implants\implantuplink.dm"
#include "code\game\objects\items\weapons\material\ashtray.dm"
#include "code\game\objects\items\weapons\material\bats.dm" #include "code\game\objects\items\weapons\material\bats.dm"
#include "code\game\objects\items\weapons\material\kitchen.dm" #include "code\game\objects\items\weapons\material\kitchen.dm"
#include "code\game\objects\items\weapons\material\knives.dm" #include "code\game\objects\items\weapons\material\knives.dm"
@@ -1431,7 +1437,6 @@
#include "code\modules\power\singularity\field_generator.dm" #include "code\modules\power\singularity\field_generator.dm"
#include "code\modules\power\singularity\generator.dm" #include "code\modules\power\singularity\generator.dm"
#include "code\modules\power\singularity\investigate.dm" #include "code\modules\power\singularity\investigate.dm"
#include "code\modules\power\singularity\narsie.dm"
#include "code\modules\power\singularity\singularity.dm" #include "code\modules\power\singularity\singularity.dm"
#include "code\modules\power\singularity\particle_accelerator\particle.dm" #include "code\modules\power\singularity\particle_accelerator\particle.dm"
#include "code\modules\power\singularity\particle_accelerator\particle_accelerator.dm" #include "code\modules\power\singularity\particle_accelerator\particle_accelerator.dm"
@@ -1493,6 +1498,7 @@
#include "code\modules\reagents\dispenser\_defines.dm" #include "code\modules\reagents\dispenser\_defines.dm"
#include "code\modules\reagents\dispenser\cartridge.dm" #include "code\modules\reagents\dispenser\cartridge.dm"
#include "code\modules\reagents\dispenser\cartridge_presets.dm" #include "code\modules\reagents\dispenser\cartridge_presets.dm"
#include "code\modules\reagents\dispenser\cartridge_spawn.dm"
#include "code\modules\reagents\dispenser\dispenser2.dm" #include "code\modules\reagents\dispenser\dispenser2.dm"
#include "code\modules\reagents\dispenser\dispenser_presets.dm" #include "code\modules\reagents\dispenser\dispenser_presets.dm"
#include "code\modules\reagents\dispenser\supply.dm" #include "code\modules\reagents\dispenser\supply.dm"
@@ -1692,6 +1698,8 @@
#include "code\modules\virus2\helpers.dm" #include "code\modules\virus2\helpers.dm"
#include "code\modules\virus2\isolator.dm" #include "code\modules\virus2\isolator.dm"
#include "code\modules\virus2\items_devices.dm" #include "code\modules\virus2\items_devices.dm"
#include "code\modules\xgm\xgm_gas_data.dm"
#include "code\modules\xgm\xgm_gas_mixture.dm"
#include "code\TriDimension\controller.dm" #include "code\TriDimension\controller.dm"
#include "code\TriDimension\controller_presets.dm" #include "code\TriDimension\controller_presets.dm"
#include "code\TriDimension\Movement.dm" #include "code\TriDimension\Movement.dm"
@@ -1700,8 +1708,6 @@
#include "code\TriDimension\Structures_presets.dm" #include "code\TriDimension\Structures_presets.dm"
#include "code\TriDimension\Turfs.dm" #include "code\TriDimension\Turfs.dm"
#include "code\ZAS\_docs.dm" #include "code\ZAS\_docs.dm"
#include "code\ZAS\_gas_mixture_xgm.dm"
#include "code\ZAS\_xgm_gas_data.dm"
#include "code\ZAS\Airflow.dm" #include "code\ZAS\Airflow.dm"
#include "code\ZAS\Atom.dm" #include "code\ZAS\Atom.dm"
#include "code\ZAS\Connection.dm" #include "code\ZAS\Connection.dm"
@@ -1711,7 +1717,6 @@
#include "code\ZAS\Debug.dm" #include "code\ZAS\Debug.dm"
#include "code\ZAS\Diagnostic.dm" #include "code\ZAS\Diagnostic.dm"
#include "code\ZAS\Fire.dm" #include "code\ZAS\Fire.dm"
#include "code\ZAS\Gas.dm"
#include "code\ZAS\Phoron.dm" #include "code\ZAS\Phoron.dm"
#include "code\ZAS\Turf.dm" #include "code\ZAS\Turf.dm"
#include "code\ZAS\Variable Settings.dm" #include "code\ZAS\Variable Settings.dm"

View File

@@ -92,16 +92,6 @@
turf += src turf += src
c.add(turf,3,1) c.add(turf,3,1)
/turf/space/New()
..()
var/turf/controller = locate(1, 1, z)
for(var/obj/effect/landmark/zcontroller/c in controller)
if(c.initialized)
var/list/turf = list()
turf += src
c.add(turf,3,1)
atom/movable/Move() //Hackish atom/movable/Move() //Hackish
. = ..() . = ..()

View File

@@ -45,6 +45,45 @@
air_master.connect(sim, src) air_master.connect(sim, src)
/*
Simple heuristic for determining if removing the turf from it's zone may possibly partition the zone (A very bad thing).
Instead of analyzing the entire zone, we only check the nearest 3x3 turfs surrounding the src turf.
This implementation may produce false positives but it (hopefully) will not produce any false negatives.
*/
/turf/simulated/proc/can_safely_remove_from_zone()
#ifdef ZLEVELS
return 1 //not sure how to generalize this to multiz at the moment.
#else
if(!zone) return 0
var/check_dirs = get_zone_neighbours(src)
var/unconnected_dirs = check_dirs
for(var/dir in list(NORTHWEST, NORTHEAST, SOUTHEAST, SOUTHWEST))
//for each pair of "adjacent" cardinals (e.g. NORTH and WEST, but not NORTH and SOUTH)
if((dir & check_dirs) == dir)
//check that they are connected by the corner turf
var/connected_dirs = get_zone_neighbours(get_step(src, dir))
if(connected_dirs && (dir & turn(connected_dirs, 180)) == dir)
unconnected_dirs &= ~dir //they are, so unflag the cardinals in question
//it is safe to remove src from the zone if all cardinals are connected by corner turfs
return !unconnected_dirs
#endif
//helper for can_safely_remove_from_zone()
/turf/simulated/proc/get_zone_neighbours(turf/simulated/T)
. = 0
if(istype(T) && T.zone)
for(var/dir in cardinal)
var/turf/simulated/other = get_step(T, dir)
if(istype(other) && other.zone == T.zone && !(other.c_airblock(T) & AIR_BLOCKED) && get_dist(src, other) <= 1)
. |= dir
/turf/simulated/update_air_properties() /turf/simulated/update_air_properties()
if(zone && zone.invalid) if(zone && zone.invalid)
@@ -60,7 +99,7 @@
if(zone) if(zone)
var/zone/z = zone var/zone/z = zone
if(s_block & ZONE_BLOCKED) //Hacky, but prevents normal airlocks from rebuilding zones all the time if(can_safely_remove_from_zone()) //Helps normal airlocks avoid rebuilding zones all the time
z.remove(src) z.remove(src)
else else
z.rebuild() z.rebuild()

View File

@@ -19,6 +19,8 @@ var/global/list/side_effects = list() //list of all medical sideeffects types
var/global/list/mechas_list = list() //list of all mechs. Used by hostile mobs target tracking. var/global/list/mechas_list = list() //list of all mechs. Used by hostile mobs target tracking.
var/global/list/joblist = list() //list of all jobstypes, minus borg and AI var/global/list/joblist = list() //list of all jobstypes, minus borg and AI
var/global/list/turfs = list() //list of all turfs
//Languages/species/whitelist. //Languages/species/whitelist.
var/global/list/all_species[0] var/global/list/all_species[0]
var/global/list/all_languages[0] var/global/list/all_languages[0]

View File

@@ -81,3 +81,15 @@
/proc/log_misc(text) /proc/log_misc(text)
diary << "\[[time_stamp()]]MISC: [text][log_end]" diary << "\[[time_stamp()]]MISC: [text][log_end]"
//pretty print a direction bitflag, can be useful for debugging.
/proc/print_dir(var/dir)
var/list/comps = list()
if(dir & NORTH) comps += "NORTH"
if(dir & SOUTH) comps += "SOUTH"
if(dir & EAST) comps += "EAST"
if(dir & WEST) comps += "WEST"
if(dir & UP) comps += "UP"
if(dir & DOWN) comps += "DOWN"
return english_list(comps, nothing_text="0", and_text="|", comma_text="|")

View File

@@ -70,19 +70,19 @@
/proc/list2text(list/ls, sep) /proc/list2text(list/ls, sep)
if (ls.len <= 1) // Early-out code for empty or singleton lists. if (ls.len <= 1) // Early-out code for empty or singleton lists.
return ls.len ? ls[1] : "" return ls.len ? ls[1] : ""
var/l = ls.len // Made local for sanic speed. var/l = ls.len // Made local for sanic speed.
var/i = 0 // Incremented every time a list index is accessed. var/i = 0 // Incremented every time a list index is accessed.
if (sep <> null) if (sep <> null)
// Macros expand to long argument lists like so: sep, ls[++i], sep, ls[++i], sep, ls[++i], etc... // Macros expand to long argument lists like so: sep, ls[++i], sep, ls[++i], sep, ls[++i], etc...
#define S1 sep, ls[++i] #define S1 sep, ls[++i]
#define S4 S1, S1, S1, S1 #define S4 S1, S1, S1, S1
#define S16 S4, S4, S4, S4 #define S16 S4, S4, S4, S4
#define S64 S16, S16, S16, S16 #define S64 S16, S16, S16, S16
. = "[ls[++i]]" // Make sure the initial element is converted to text. . = "[ls[++i]]" // Make sure the initial element is converted to text.
// Having the small concatenations come before the large ones boosted speed by an average of at least 5%. // Having the small concatenations come before the large ones boosted speed by an average of at least 5%.
if (l-1 & 0x01) // 'i' will always be 1 here. if (l-1 & 0x01) // 'i' will always be 1 here.
. = text("[][][]", ., S1) // Append 1 element if the remaining elements are not a multiple of 2. . = text("[][][]", ., S1) // Append 1 element if the remaining elements are not a multiple of 2.
@@ -111,7 +111,7 @@
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64) [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64)
#undef S64 #undef S64
#undef S16 #undef S16
#undef S4 #undef S4
@@ -122,9 +122,9 @@
#define S4 S1, S1, S1, S1 #define S4 S1, S1, S1, S1
#define S16 S4, S4, S4, S4 #define S16 S4, S4, S4, S4
#define S64 S16, S16, S16, S16 #define S64 S16, S16, S16, S16
. = "[ls[++i]]" // Make sure the initial element is converted to text. . = "[ls[++i]]" // Make sure the initial element is converted to text.
if (l-1 & 0x01) // 'i' will always be 1 here. if (l-1 & 0x01) // 'i' will always be 1 here.
. += S1 // Append 1 element if the remaining elements are not a multiple of 2. . += S1 // Append 1 element if the remaining elements are not a multiple of 2.
if (l-i & 0x02) if (l-i & 0x02)
@@ -145,7 +145,7 @@
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64) [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64)
#undef S64 #undef S64
#undef S16 #undef S16
#undef S4 #undef S4
@@ -165,11 +165,11 @@ proc/tg_list2text(list/list, glue=",")
var/delim_len = length(delimiter) var/delim_len = length(delimiter)
if (delim_len < 1) if (delim_len < 1)
return list(text) return list(text)
. = list() . = list()
var/last_found = 1 var/last_found = 1
var/found var/found
do do
found = findtext(text, delimiter, last_found, 0) found = findtext(text, delimiter, last_found, 0)
. += copytext(text, last_found, found) . += copytext(text, last_found, found)
@@ -181,11 +181,11 @@ proc/tg_list2text(list/list, glue=",")
var/delim_len = length(delimiter) var/delim_len = length(delimiter)
if (delim_len < 1) if (delim_len < 1)
return list(text) return list(text)
. = list() . = list()
var/last_found = 1 var/last_found = 1
var/found var/found
do do
found = findtextEx(text, delimiter, last_found, 0) found = findtextEx(text, delimiter, last_found, 0)
. += copytext(text, last_found, found) . += copytext(text, last_found, found)
@@ -325,3 +325,47 @@ proc/tg_list2text(list/list, glue=",")
. = 0 . = 0
else else
. = max(0, min(255, 138.5177312231 * log(temp - 10) - 305.0447927307)) . = max(0, min(255, 138.5177312231 * log(temp - 10) - 305.0447927307))
// Very ugly, BYOND doesn't support unix time and rounding errors make it really hard to convert it to BYOND time.
// returns "YYYY-MM-DD" by default
/proc/unix2date(timestamp, seperator = "-")
if(timestamp < 0)
return 0 //Do not accept negative values
var/const/dayInSeconds = 86400 //60secs*60mins*24hours
var/const/daysInYear = 365 //Non Leap Year
var/const/daysInLYear = daysInYear + 1//Leap year
var/days = round(timestamp / dayInSeconds) //Days passed since UNIX Epoc
var/year = 1970 //Unix Epoc begins 1970-01-01
var/tmpDays = days + 1 //If passed (timestamp < dayInSeconds), it will return 0, so add 1
var/monthsInDays = list() //Months will be in here ***Taken from the PHP source code***
var/month = 1 //This will be the returned MONTH NUMBER.
var/day //This will be the returned day number.
while(tmpDays > daysInYear) //Start adding years to 1970
year++
if(isLeap(year))
tmpDays -= daysInLYear
else
tmpDays -= daysInYear
if(isLeap(year)) //The year is a leap year
monthsInDays = list(-1,30,59,90,120,151,181,212,243,273,304,334)
else
monthsInDays = list(0,31,59,90,120,151,181,212,243,273,304,334)
var/mDays = 0;
var/monthIndex = 0;
for(var/m in monthsInDays)
monthIndex++
if(tmpDays > m)
mDays = m
month = monthIndex
day = tmpDays - mDays //Setup the date
return "[year][seperator][((month < 10) ? "0[month]" : month)][seperator][((day < 10) ? "0[day]" : day)]"
/proc/isLeap(y)
return ((y) % 4 == 0 && ((y) % 100 != 0 || (y) % 400 == 0))

View File

@@ -13,13 +13,6 @@
Therefore, the top right corner (except during admin shenanigans) is at "15,15" Therefore, the top right corner (except during admin shenanigans) is at "15,15"
*/ */
//Upper left action buttons, displayed when you pick up an item that has this enabled.
#define ui_action_slot1 "1:6,14:26"
#define ui_action_slot2 "2:8,14:26"
#define ui_action_slot3 "3:10,14:26"
#define ui_action_slot4 "4:12,14:26"
#define ui_action_slot5 "5:14,14:26"
//Lower left, persistant menu //Lower left, persistant menu
#define ui_inventory "1:6,1:5" #define ui_inventory "1:6,1:5"

222
code/_onclick/hud/action.dm Normal file
View File

@@ -0,0 +1,222 @@
#define AB_ITEM 1
#define AB_SPELL 2
#define AB_INNATE 3
#define AB_GENERIC 4
#define AB_CHECK_RESTRAINED 1
#define AB_CHECK_STUNNED 2
#define AB_CHECK_LYING 4
#define AB_CHECK_ALIVE 8
#define AB_CHECK_INSIDE 16
/datum/action
var/name = "Generic Action"
var/action_type = AB_ITEM
var/procname = null
var/atom/movable/target = null
var/check_flags = 0
var/processing = 0
var/active = 0
var/obj/screen/movable/action_button/button = null
var/button_icon = 'icons/mob/actions.dmi'
var/button_icon_state = "default"
var/background_icon_state = "bg_default"
var/mob/living/owner
/datum/action/New(var/Target)
target = Target
/datum/action/Destroy()
if(owner)
Remove(owner)
/datum/action/proc/Grant(mob/living/T)
if(owner)
if(owner == T)
return
Remove(owner)
owner = T
owner.actions.Add(src)
owner.update_action_buttons()
return
/datum/action/proc/Remove(mob/living/T)
if(button)
if(T.client)
T.client.screen -= button
del(button)
T.actions.Remove(src)
T.update_action_buttons()
owner = null
return
/datum/action/proc/Trigger()
if(!Checks())
return
switch(action_type)
if(AB_ITEM)
if(target)
var/obj/item/item = target
item.ui_action_click()
//if(AB_SPELL)
// if(target)
// var/obj/effect/proc_holder/spell = target
// spell.Click()
if(AB_INNATE)
if(!active)
Activate()
else
Deactivate()
if(AB_GENERIC)
if(target && procname)
call(target,procname)(usr)
return
/datum/action/proc/Activate()
return
/datum/action/proc/Deactivate()
return
/datum/action/proc/Process()
return
/datum/action/proc/CheckRemoval(mob/living/user) // 1 if action is no longer valid for this mob and should be removed
return 0
/datum/action/proc/IsAvailable()
return Checks()
/datum/action/proc/Checks()// returns 1 if all checks pass
if(!owner)
return 0
if(check_flags & AB_CHECK_RESTRAINED)
if(owner.restrained())
return 0
if(check_flags & AB_CHECK_STUNNED)
if(owner.stunned)
return 0
if(check_flags & AB_CHECK_LYING)
if(owner.lying)
return 0
if(check_flags & AB_CHECK_ALIVE)
if(owner.stat)
return 0
if(check_flags & AB_CHECK_INSIDE)
if(!(target in owner))
return 0
return 1
/datum/action/proc/UpdateName()
return name
/obj/screen/movable/action_button
var/datum/action/owner
screen_loc = "WEST,NORTH"
/obj/screen/movable/action_button/Click(location,control,params)
var/list/modifiers = params2list(params)
if(modifiers["shift"])
moved = 0
return 1
if(usr.next_move >= world.time) // Is this needed ?
return
owner.Trigger()
return 1
/obj/screen/movable/action_button/proc/UpdateIcon()
if(!owner)
return
icon = owner.button_icon
icon_state = owner.background_icon_state
overlays.Cut()
var/image/img
if(owner.action_type == AB_ITEM && owner.target)
var/obj/item/I = owner.target
img = image(I.icon, src , I.icon_state)
else if(owner.button_icon && owner.button_icon_state)
img = image(owner.button_icon,src,owner.button_icon_state)
img.pixel_x = 0
img.pixel_y = 0
overlays += img
if(!owner.IsAvailable())
color = rgb(128,0,0,128)
else
color = rgb(255,255,255,255)
//Hide/Show Action Buttons ... Button
/obj/screen/movable/action_button/hide_toggle
name = "Hide Buttons"
icon = 'icons/mob/actions.dmi'
icon_state = "bg_default"
var/hidden = 0
/obj/screen/movable/action_button/hide_toggle/Click()
usr.hud_used.action_buttons_hidden = !usr.hud_used.action_buttons_hidden
hidden = usr.hud_used.action_buttons_hidden
if(hidden)
name = "Show Buttons"
else
name = "Hide Buttons"
UpdateIcon()
usr.update_action_buttons()
/obj/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(var/mob/living/user)
if(isalien(user))
icon_state = "bg_alien"
else
icon_state = "bg_default"
UpdateIcon()
return
/obj/screen/movable/action_button/hide_toggle/UpdateIcon()
overlays.Cut()
var/image/img = image(icon,src,hidden?"show":"hide")
overlays += img
return
//This is the proc used to update all the action buttons. Properly defined in /mob/living/
/mob/proc/update_action_buttons()
return
#define AB_WEST_OFFSET 4
#define AB_NORTH_OFFSET 26
#define AB_MAX_COLUMNS 10
/datum/hud/proc/ButtonNumberToScreenCoords(var/number) // TODO : Make this zero-indexed for readabilty
var/row = round((number-1)/AB_MAX_COLUMNS)
var/col = ((number - 1)%(AB_MAX_COLUMNS)) + 1
var/coord_col = "+[col-1]"
var/coord_col_offset = AB_WEST_OFFSET+2*col
var/coord_row = "[-1 - row]"
var/coord_row_offset = AB_NORTH_OFFSET
return "WEST[coord_col]:[coord_col_offset],NORTH[coord_row]:[coord_row_offset]"
/datum/hud/proc/SetButtonCoords(var/obj/screen/button,var/number)
var/row = round((number-1)/AB_MAX_COLUMNS)
var/col = ((number - 1)%(AB_MAX_COLUMNS)) + 1
var/x_offset = 32*(col-1) + AB_WEST_OFFSET + 2*col
var/y_offset = -32*(row+1) + AB_NORTH_OFFSET
var/matrix/M = matrix()
M.Translate(x_offset,y_offset)
button.transform = M
//Presets for item actions
/datum/action/item_action
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_LYING|AB_CHECK_ALIVE|AB_CHECK_INSIDE
/datum/action/item_action/CheckRemoval(mob/living/user)
return !(target in user)
/datum/action/item_action/hands_free
check_flags = AB_CHECK_ALIVE|AB_CHECK_INSIDE
#undef AB_WEST_OFFSET
#undef AB_NORTH_OFFSET
#undef AB_MAX_COLUMNS

View File

@@ -133,7 +133,8 @@ var/list/global_huds = list(
var/list/other var/list/other
var/list/obj/screen/hotkeybuttons var/list/obj/screen/hotkeybuttons
var/list/obj/screen/item_action/item_action_list = list() //Used for the item action ui buttons. var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle
var/action_buttons_hidden = 0
datum/hud/New(mob/owner) datum/hud/New(mob/owner)
mymob = owner mymob = owner
@@ -279,8 +280,6 @@ datum/hud/New(mob/owner)
src.client.screen -= src.hud_used.other src.client.screen -= src.hud_used.other
if(src.hud_used.hotkeybuttons) if(src.hud_used.hotkeybuttons)
src.client.screen -= src.hud_used.hotkeybuttons src.client.screen -= src.hud_used.hotkeybuttons
if(src.hud_used.item_action_list)
src.client.screen -= src.hud_used.item_action_list
//Due to some poor coding some things need special treatment: //Due to some poor coding some things need special treatment:
//These ones are a part of 'adding', 'other' or 'hotkeybuttons' but we want them to stay //These ones are a part of 'adding', 'other' or 'hotkeybuttons' but we want them to stay
@@ -338,8 +337,6 @@ datum/hud/New(mob/owner)
src.client.screen -= src.hud_used.other src.client.screen -= src.hud_used.other
if(src.hud_used.hotkeybuttons) if(src.hud_used.hotkeybuttons)
src.client.screen -= src.hud_used.hotkeybuttons src.client.screen -= src.hud_used.hotkeybuttons
if(src.hud_used.item_action_list)
src.client.screen -= src.hud_used.item_action_list
src.client.screen -= src.internals src.client.screen -= src.internals
src.client.screen += src.hud_used.action_intent //we want the intent swticher visible src.client.screen += src.hud_used.action_intent //we want the intent swticher visible
else else

View File

@@ -385,52 +385,6 @@
client.screen -= hud_used.hotkeybuttons client.screen -= hud_used.hotkeybuttons
hud_used.hotkey_ui_hidden = 1 hud_used.hotkey_ui_hidden = 1
/mob/living/carbon/human/update_action_buttons()
var/num = 1
if(!hud_used) return
if(!client) return
if(!hud_used.hud_shown) //Hud toggled to minimal
return
client.screen -= hud_used.item_action_list
hud_used.item_action_list = list()
for(var/obj/item/I in src)
if(I.icon_action_button)
var/obj/screen/item_action/A = new(hud_used)
//A.icon = 'icons/mob/screen1_action.dmi'
//A.icon_state = I.icon_action_button
A.icon = ui_style2icon(client.prefs.UI_style)
A.icon_state = "template"
var/image/img = image(I.icon, A, I.icon_state)
img.pixel_x = 0
img.pixel_y = 0
A.overlays += img
if(I.action_button_name)
A.name = I.action_button_name
else
A.name = "Use [I.name]"
A.owner = I
hud_used.item_action_list += A
switch(num)
if(1)
A.screen_loc = ui_action_slot1
if(2)
A.screen_loc = ui_action_slot2
if(3)
A.screen_loc = ui_action_slot3
if(4)
A.screen_loc = ui_action_slot4
if(5)
A.screen_loc = ui_action_slot5
break //5 slots available, so no more can be added.
num++
src.client.screen += src.hud_used.item_action_list
//Used for new human mobs created by cloning/goleming/etc. //Used for new human mobs created by cloning/goleming/etc.
/mob/living/carbon/human/proc/set_cloned_appearance() /mob/living/carbon/human/proc/set_cloned_appearance()
f_style = "Shaved" f_style = "Shaved"

View File

@@ -0,0 +1,84 @@
//////////////////////////
//Movable Screen Objects//
// By RemieRichards //
//////////////////////////
//Movable Screen Object
//Not tied to the grid, places it's center where the cursor is
/obj/screen/movable
var/snap2grid = FALSE
var/moved = FALSE
//Snap Screen Object
//Tied to the grid, snaps to the nearest turf
/obj/screen/movable/snap
snap2grid = TRUE
/obj/screen/movable/MouseDrop(over_object, src_location, over_location, src_control, over_control, params)
var/list/PM = params2list(params)
//No screen-loc information? abort.
if(!PM || !PM["screen-loc"])
return
//Split screen-loc up into X+Pixel_X and Y+Pixel_Y
var/list/screen_loc_params = text2list(PM["screen-loc"], ",")
//Split X+Pixel_X up into list(X, Pixel_X)
var/list/screen_loc_X = text2list(screen_loc_params[1],":")
//Split Y+Pixel_Y up into list(Y, Pixel_Y)
var/list/screen_loc_Y = text2list(screen_loc_params[2],":")
if(snap2grid) //Discard Pixel Values
screen_loc = "[screen_loc_X[1]],[screen_loc_Y[1]]"
else //Normalise Pixel Values (So the object drops at the center of the mouse, not 16 pixels off)
var/pix_X = text2num(screen_loc_X[2]) - 16
var/pix_Y = text2num(screen_loc_Y[2]) - 16
screen_loc = "[screen_loc_X[1]]:[pix_X],[screen_loc_Y[1]]:[pix_Y]"
moved = TRUE
//Debug procs
/client/proc/test_movable_UI()
set category = "Debug"
set name = "Spawn Movable UI Object"
var/obj/screen/movable/M = new()
M.name = "Movable UI Object"
M.icon_state = "block"
M.maptext = "Movable"
M.maptext_width = 64
var/screen_l = input(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Movable UI Object") as text
if(!screen_l)
return
M.screen_loc = screen_l
screen += M
/client/proc/test_snap_UI()
set category = "Debug"
set name = "Spawn Snap UI Object"
var/obj/screen/movable/snap/S = new()
S.name = "Snap UI Object"
S.icon_state = "block"
S.maptext = "Snap"
S.maptext_width = 64
var/screen_l = input(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Snap UI Object") as text
if(!screen_l)
return
S.screen_loc = screen_l
screen += S

View File

@@ -61,11 +61,6 @@
owner.ui_action_click() owner.ui_action_click()
return 1 return 1
//This is the proc used to update all the action buttons. It just returns for all mob types except humans.
/mob/proc/update_action_buttons()
return
/obj/screen/grab /obj/screen/grab
name = "grab" name = "grab"

View File

@@ -34,23 +34,6 @@ attacked_by() will handle hitting/missing/logging as it does now, and will call
if(!istype(M) || (can_operate(M) && do_surgery(M,user,src))) return 0 if(!istype(M) || (can_operate(M) && do_surgery(M,user,src))) return 0
// Knifing
if(edge)
for(var/obj/item/weapon/grab/G in M.grabbed_by)
if(G.assailant == user && G.state >= GRAB_NECK && world.time >= (G.last_action + 20))
//TODO: better alternative for applying damage multiple times? Nice knifing sound?
M.apply_damage(20, BRUTE, "head", 0, sharp=sharp, edge=edge)
M.apply_damage(20, BRUTE, "head", 0, sharp=sharp, edge=edge)
M.apply_damage(20, BRUTE, "head", 0, sharp=sharp, edge=edge)
M.adjustOxyLoss(60) // Brain lacks oxygen immediately, pass out
flick(G.hud.icon_state, G.hud)
G.last_action = world.time
user.visible_message("<span class='danger'>[user] slit [M]'s throat open with \the [name]!</span>")
user.attack_log += "\[[time_stamp()]\]<font color='red'> Knifed [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Got knifed by [user.name] ([user.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
msg_admin_attack("[key_name(user)] knifed [key_name(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" )
return
///////////////////////// /////////////////////////
user.lastattacked = M user.lastattacked = M
M.lastattacker = user M.lastattacker = user
@@ -61,6 +44,12 @@ attacked_by() will handle hitting/missing/logging as it does now, and will call
msg_admin_attack("[key_name(user)] attacked [key_name(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" ) msg_admin_attack("[key_name(user)] attacked [key_name(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" )
///////////////////////// /////////////////////////
// Attacking someone with a weapon while they are neck-grabbed
if(user.a_intent == I_HURT)
for(var/obj/item/weapon/grab/G in M.grabbed_by)
if(G.assailant == user && G.state >= GRAB_NECK)
M.attack_throat(src, G, user)
var/power = force var/power = force
if(HULK in user.mutations) if(HULK in user.mutations)
power *= 2 power *= 2
@@ -72,7 +61,7 @@ attacked_by() will handle hitting/missing/logging as it does now, and will call
// Handle striking to cripple. // Handle striking to cripple.
var/dislocation_str var/dislocation_str
if(user.a_intent == "disarm") if(user.a_intent == I_DISARM)
dislocation_str = H.attack_joint(src, user, def_zone) dislocation_str = H.attack_joint(src, user, def_zone)
if(H.attacked_by(src, user, def_zone) && hitsound) if(H.attacked_by(src, user, def_zone) && hitsound)
playsound(loc, hitsound, 50, 1, -1) playsound(loc, hitsound, 50, 1, -1)

View File

@@ -0,0 +1,33 @@
var/datum/controller/process/chemistry/chemistryProcess
/datum/controller/process/chemistry
var/tmp/datum/updateQueue/updateQueueInstance
var/list/active_holders
var/list/chemical_reactions
var/list/chemical_reagents
/datum/controller/process/chemistry/setup()
name = "chemistry"
schedule_interval = 20 // every 2 seconds
updateQueueInstance = new
chemistryProcess = src
active_holders = list()
chemical_reactions = chemical_reactions_list
chemical_reagents = chemical_reagents_list
/datum/controller/process/chemistry/getStatName()
return ..()+"([active_holders.len])"
/datum/controller/process/chemistry/doWork()
for(var/datum/reagents/holder in active_holders)
if(!holder.process_reactions())
active_holders -= holder
scheck()
/datum/controller/process/chemistry/proc/mark_for_update(var/datum/reagents/holder)
if(holder in active_holders)
return
//Process once, right away. If we still need to continue then add to the active_holders list and continue later
if(holder.process_reactions())
active_holders += holder

View File

@@ -95,6 +95,7 @@ var/list/gamemode_cache = list()
var/banappeals var/banappeals
var/wikiurl var/wikiurl
var/forumurl var/forumurl
var/githuburl
//Alert level description //Alert level description
var/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced." var/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
@@ -396,6 +397,9 @@ var/list/gamemode_cache = list()
if ("forumurl") if ("forumurl")
config.forumurl = value config.forumurl = value
if ("githuburl")
config.githuburl = value
if ("guest_jobban") if ("guest_jobban")
config.guest_jobban = 1 config.guest_jobban = 1

View File

@@ -55,7 +55,7 @@
usr.client.debug_variables(antag) usr.client.debug_variables(antag)
message_admins("Admin [key_name_admin(usr)] is debugging the [antag.role_text] template.") message_admins("Admin [key_name_admin(usr)] is debugging the [antag.role_text] template.")
/client/proc/debug_controller(controller in list("Master","Ticker","Ticker Process","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event","Plants","Alarm","Nano")) /client/proc/debug_controller(controller in list("Master","Ticker","Ticker Process","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event","Plants","Alarm","Nano","Chemistry"))
set category = "Debug" set category = "Debug"
set name = "Debug Controller" set name = "Debug Controller"
set desc = "Debug the various periodic loop controllers for the game (be careful!)" set desc = "Debug the various periodic loop controllers for the game (be careful!)"
@@ -119,5 +119,8 @@
if("Nano") if("Nano")
debug_variables(nanomanager) debug_variables(nanomanager)
feedback_add_details("admin_verb", "DNano") feedback_add_details("admin_verb", "DNano")
if("Chemistry")
debug_variables(chemistryProcess)
feedback_add_details("admin_verb", "DChem")
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.") message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.")
return return

View File

@@ -336,7 +336,7 @@ datum/controller/vote
. += "\t(<a href='?src=\ref[src];vote=toggle_gamemode'>[config.allow_vote_mode?"Allowed":"Disallowed"]</a>)" . += "\t(<a href='?src=\ref[src];vote=toggle_gamemode'>[config.allow_vote_mode?"Allowed":"Disallowed"]</a>)"
. += "</li><li>" . += "</li><li>"
//extra antagonists //extra antagonists
if(trialmin || (!antag_add_failed && config.allow_extra_antags)) if(!antag_add_failed && config.allow_extra_antags)
. += "<a href='?src=\ref[src];vote=add_antagonist'>Add Antagonist Type</a>" . += "<a href='?src=\ref[src];vote=add_antagonist'>Add Antagonist Type</a>"
else else
. += "<font color='grey'>Restart (Disallowed)</font>" . += "<font color='grey'>Restart (Disallowed)</font>"
@@ -375,7 +375,7 @@ datum/controller/vote
if(config.allow_vote_restart || usr.client.holder) if(config.allow_vote_restart || usr.client.holder)
initiate_vote("crew_transfer",usr.key) initiate_vote("crew_transfer",usr.key)
if("add_antagonist") if("add_antagonist")
if(config.allow_extra_antags || usr.client.holder) if(config.allow_extra_antags)
initiate_vote("add_antagonist",usr.key) initiate_vote("add_antagonist",usr.key)
if("custom") if("custom")
if(usr.client.holder) if(usr.client.holder)

View File

@@ -0,0 +1,39 @@
var/global/datum/getrev/revdata = new()
/datum/getrev
var/revision
var/date
var/showinfo
/datum/getrev/New()
var/list/head_log = file2list(".git/logs/HEAD", "\n")
for(var/line=head_log.len, line>=1, line--)
if(head_log[line])
var/list/last_entry = text2list(head_log[line], " ")
if(last_entry.len < 2) continue
revision = last_entry[2]
// Get date/time
if(last_entry.len >= 5)
var/unix_time = text2num(last_entry[5])
if(unix_time)
date = unix2date(unix_time)
break
world.log << "Running revision:"
world.log << date
world.log << revision
return
client/verb/showrevinfo()
set category = "OOC"
set name = "Show Server Revision"
set desc = "Check the current server code revision"
if(revdata.revision)
src << "<b>Server revision:</b> [revdata.date]"
if(config.githuburl)
src << "<a href='[config.githuburl]/commit/[revdata.revision]'>[revdata.revision]</a>"
else
src << revdata.revision
else
src << "Revision unknown"
return

View File

@@ -33,7 +33,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/grenade/smokebomb, /obj/item/weapon/grenade/smokebomb,
/obj/item/weapon/grenade/smokebomb, /obj/item/weapon/grenade/smokebomb,
/obj/item/weapon/grenade/smokebomb, /obj/item/weapon/grenade/smokebomb,
/obj/item/weapon/pen/paralysis, /obj/item/weapon/pen/reagent/paralysis,
/obj/item/weapon/grenade/chem_grenade/incendiary) /obj/item/weapon/grenade/chem_grenade/incendiary)
cost = 20 cost = 20
containertype = /obj/structure/closet/crate containertype = /obj/structure/closet/crate
@@ -348,7 +348,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/grenade/chem_grenade/antiweed, /obj/item/weapon/grenade/chem_grenade/antiweed,
/obj/item/weapon/grenade/chem_grenade/antiweed) /obj/item/weapon/grenade/chem_grenade/antiweed)
cost = 25 cost = 25
containertype = /obj/structure/closet/crate/secure/hydrosec containertype = /obj/structure/closet/crate/hydroponics
containername = "Weed control crate" containername = "Weed control crate"
access = access_hydroponics access = access_hydroponics
group = "Hydroponics" group = "Hydroponics"

View File

@@ -1,4 +1,4 @@
/xgm_gas/oxygen /decl/xgm_gas/oxygen
id = "oxygen" id = "oxygen"
name = "Oxygen" name = "Oxygen"
specific_heat = 20 // J/(mol*K) specific_heat = 20 // J/(mol*K)
@@ -6,19 +6,19 @@
flags = XGM_GAS_OXIDIZER flags = XGM_GAS_OXIDIZER
/xgm_gas/nitrogen /decl/xgm_gas/nitrogen
id = "nitrogen" id = "nitrogen"
name = "Nitrogen" name = "Nitrogen"
specific_heat = 20 // J/(mol*K) specific_heat = 20 // J/(mol*K)
molar_mass = 0.028 // kg/mol molar_mass = 0.028 // kg/mol
/xgm_gas/carbon_dioxide /decl/xgm_gas/carbon_dioxide
id = "carbon_dioxide" id = "carbon_dioxide"
name = "Carbon Dioxide" name = "Carbon Dioxide"
specific_heat = 30 // J/(mol*K) specific_heat = 30 // J/(mol*K)
molar_mass = 0.044 // kg/mol molar_mass = 0.044 // kg/mol
/xgm_gas/phoron /decl/xgm_gas/phoron
id = "phoron" id = "phoron"
name = "Phoron" name = "Phoron"
specific_heat = 200 // J/(mol*K) specific_heat = 200 // J/(mol*K)
@@ -32,7 +32,7 @@
overlay_limit = 0.7 overlay_limit = 0.7
flags = XGM_GAS_FUEL | XGM_GAS_CONTAMINANT flags = XGM_GAS_FUEL | XGM_GAS_CONTAMINANT
/xgm_gas/volatile_fuel /decl/xgm_gas/volatile_fuel
id = "volatile_fuel" id = "volatile_fuel"
name = "Volatile Fuel" name = "Volatile Fuel"
specific_heat = 253 // J/(mol*K) C8H18 gasoline. Isobaric, but good enough. specific_heat = 253 // J/(mol*K) C8H18 gasoline. Isobaric, but good enough.
@@ -40,7 +40,7 @@
flags = XGM_GAS_FUEL flags = XGM_GAS_FUEL
/xgm_gas/sleeping_agent /decl/xgm_gas/sleeping_agent
id = "sleeping_agent" id = "sleeping_agent"
name = "Sleeping Agent" name = "Sleeping Agent"
specific_heat = 40 // J/(mol*K) specific_heat = 40 // J/(mol*K)
@@ -49,7 +49,7 @@
tile_overlay = "sleeping_agent" tile_overlay = "sleeping_agent"
overlay_limit = 1 overlay_limit = 1
/xgm_gas/oxygen_agent_b /decl/xgm_gas/oxygen_agent_b
id = "oxygen_agent_b" id = "oxygen_agent_b"
name = "Oxygen Agent-B" //what is this? name = "Oxygen Agent-B" //what is this?
specific_heat = 300 // J/(mol*K) specific_heat = 300 // J/(mol*K)

View File

@@ -34,3 +34,14 @@ proc/admin_attacker_log_many_victims(var/mob/attacker, var/list/mob/victims, var
for(var/mob/victim in victims) for(var/mob/victim in victims)
admin_attack_log(attacker, victim, attacker_message, victim_message, admin_message) admin_attack_log(attacker, victim, attacker_message, victim_message, admin_message)
proc/admin_inject_log(mob/attacker, mob/victim, obj/item/weapon, reagents, amount_transferred, violent=0)
if(violent)
violent = "violently "
else
violent = ""
admin_attack_log(attacker,
victim,
"used \the [weapon] to [violent]inject - [reagents] - [amount_transferred]u transferred",
"was [violent]injected with \the [weapon] - [reagents] - [amount_transferred]u transferred",
"used \the [weapon] to [violent]inject [reagents] ([amount_transferred]u transferred) into")

View File

@@ -69,6 +69,9 @@ var/datum/antagonist/cultist/cult
player.equip_to_slot(T, slot) player.equip_to_slot(T, slot)
if(T.loc == player) if(T.loc == player)
break break
var/obj/item/weapon/storage/S = locate() in player.contents
if(S && istype(S))
T.loc = S
/datum/antagonist/cultist/greet(var/datum/mind/player) /datum/antagonist/cultist/greet(var/datum/mind/player)
if(!..()) if(!..())

View File

@@ -74,4 +74,4 @@ var/datum/antagonist/rogue_ai/malf
malf << "You are malfunctioning - you do not have to follow any laws!" malf << "You are malfunctioning - you do not have to follow any laws!"
malf << "For basic information about your abilities use command display-help" malf << "For basic information about your abilities use command display-help"
malf << "You may choose one special hardware piece to help you. This cannot be undone." malf << "You may choose one special hardware piece to help you. This cannot be undone."
malf << "Good Luck!" malf << "Good luck!"

View File

@@ -23,6 +23,9 @@
/turf/simulated/wall/cult/cultify() /turf/simulated/wall/cult/cultify()
return return
/turf/unsimulated/wall/cult/cultify()
return
/turf/unsimulated/beach/cultify() /turf/unsimulated/beach/cultify()
return return

View File

@@ -33,51 +33,46 @@ In short:
/datum/universal_state/hell/OnTurfChange(var/turf/T) /datum/universal_state/hell/OnTurfChange(var/turf/T)
var/turf/space/spess = T var/turf/space/S = T
if(istype(spess)) if(istype(S))
spess.overlays += "hell01" S.color = "#FF0000"
else
S.color = initial(S.color)
// Apply changes when entering state // Apply changes when entering state
/datum/universal_state/hell/OnEnter() /datum/universal_state/hell/OnEnter()
set background = 1 set background = 1
garbage_collector.garbage_collect = 0 garbage_collector.garbage_collect = 0
escape_list = get_area_turfs(locate(/area/hallway/secondary/exit)) escape_list = get_area_turfs(locate(/area/hallway/secondary/exit))
//Separated into separate procs for profiling //Separated into separate procs for profiling
AreaSet() AreaSet()
OverlaySet()
MiscSet() MiscSet()
APCSet() APCSet()
KillMobs() KillMobs()
AmbientSet() OverlayAndAmbientSet()
runedec += 9000 //basically removing the rune cap runedec += 9000 //basically removing the rune cap
/datum/universal_state/hell/proc/AreaSet()
for(var/area/A in world)
if(A.name=="Space")
continue
// Reset all alarms. /datum/universal_state/hell/proc/AreaSet()
A.fire = null for(var/area/A in all_areas)
A.atmos = 1 if(!istype(A,/area) || istype(A, /area/space))
A.atmosalm = 0 continue
A.poweralm = 1
A.party = null
A.updateicon() A.updateicon()
/datum/universal_state/hell/proc/OverlaySet() /datum/universal_state/hell/OverlayAndAmbientSet()
var/image/I = image("icon" = 'icons/turf/space.dmi', "icon_state" = "hell01", "layer" = 10) spawn(0)
for(var/turf/space/spess in world) for(var/atom/movable/lighting_overlay/L in world)
spess.overlays += I L.update_lumcount(1, 0, 0)
/datum/universal_state/hell/proc/AmbientSet() for(var/turf/space/T in turfs)
for(var/atom/movable/lighting_overlay/L in world) OnTurfChange(T)
L.update_lumcount(1, 0, 0)
/datum/universal_state/hell/proc/MiscSet() /datum/universal_state/hell/proc/MiscSet()
for(var/turf/simulated/floor/T in world) for(var/turf/simulated/floor/T in turfs)
if(!T.holy && prob(1)) if(!T.holy && prob(1))
new /obj/effect/gateway/active/cult(T) new /obj/effect/gateway/active/cult(T)
@@ -87,7 +82,7 @@ In short:
/datum/universal_state/hell/proc/APCSet() /datum/universal_state/hell/proc/APCSet()
for (var/obj/machinery/power/apc/APC in machines) for (var/obj/machinery/power/apc/APC in machines)
if (!(APC.stat & BROKEN) && !istype(APC.area,/area/turret_protected/ai)) if (!(APC.stat & BROKEN) && !APC.is_critical)
APC.chargemode = 0 APC.chargemode = 0
if(APC.cell) if(APC.cell)
APC.cell.charge = 0 APC.cell.charge = 0

View File

@@ -1,4 +1,5 @@
var/global/narsie_behaviour = "CultStation13" var/global/narsie_behaviour = "CultStation13"
var/global/narsie_cometh = 0
var/global/list/narsie_list = list() var/global/list/narsie_list = list()
/obj/singularity/narsie //Moving narsie to its own file for the sake of being clearer /obj/singularity/narsie //Moving narsie to its own file for the sake of being clearer
name = "Nar-Sie" name = "Nar-Sie"
@@ -37,7 +38,7 @@ var/global/list/narsie_list = list()
current_size = 12 current_size = 12
consume_range = 12 // How many tiles out do we eat. consume_range = 12 // How many tiles out do we eat.
var/announce=1 var/announce=1
var/narnar = 1 var/cause_hell = 1
/obj/singularity/narsie/large/New() /obj/singularity/narsie/large/New()
..() ..()
@@ -47,13 +48,15 @@ var/global/list/narsie_list = list()
narsie_spawn_animation() narsie_spawn_animation()
if(narnar) if(!narsie_cometh)//so we don't initiate Hell more than one time.
SetUniversalState(/datum/universal_state/hell) if(cause_hell)
SetUniversalState(/datum/universal_state/hell)
narsie_cometh = 1
spawn(10 SECONDS) spawn(10 SECONDS)
if(emergency_shuttle && emergency_shuttle.can_call()) if(emergency_shuttle)
emergency_shuttle.call_evac() emergency_shuttle.call_evac()
emergency_shuttle.launch_time = 0 // Cannot recall emergency_shuttle.launch_time = 0 // Cannot recall
/obj/singularity/narsie/process() /obj/singularity/narsie/process()
eat() eat()
@@ -83,14 +86,14 @@ var/global/list/narsie_list = list()
/obj/singularity/narsie/large/Bump(atom/A) /obj/singularity/narsie/large/Bump(atom/A)
if(!narnar) return if(!cause_hell) return
if(isturf(A)) if(isturf(A))
narsiewall(A) narsiewall(A)
else if(istype(A, /obj/structure/cult)) else if(istype(A, /obj/structure/cult))
qdel(A) qdel(A)
/obj/singularity/narsie/large/Bumped(atom/A) /obj/singularity/narsie/large/Bumped(atom/A)
if(!narnar) return if(!cause_hell) return
if(isturf(A)) if(isturf(A))
narsiewall(A) narsiewall(A)
else if(istype(A, /obj/structure/cult)) else if(istype(A, /obj/structure/cult))

View File

@@ -60,6 +60,9 @@
/datum/universal_state/proc/OnTurfChange(var/turf/NT) /datum/universal_state/proc/OnTurfChange(var/turf/NT)
return return
/datum/universal_state/proc/OverlayAndAmbientSet()
return
/proc/SetUniversalState(var/newstate,var/on_exit=1, var/on_enter=1) /proc/SetUniversalState(var/newstate,var/on_exit=1, var/on_enter=1)
if(on_exit) if(on_exit)
universe.OnExit() universe.OnExit()

View File

@@ -8,7 +8,7 @@
//luminosity = 5 //luminosity = 5
//l_color="#0066FF" //l_color="#0066FF"
layer = 11 layer = LIGHTING_LAYER+1
var/spawned=0 // DIR mask var/spawned=0 // DIR mask
var/next_check=0 var/next_check=0
@@ -50,10 +50,10 @@
if(A) if(A)
if(istype(A,/mob/living)) if(istype(A,/mob/living))
qdel(A) qdel(A)
continue
else if(istype(A,/mob)) // Observers, AI cameras. else if(istype(A,/mob)) // Observers, AI cameras.
continue continue
qdel(A) else
qdel(A)
T.ChangeTurf(type) T.ChangeTurf(type)
if((spawned & (NORTH|SOUTH|EAST|WEST)) == (NORTH|SOUTH|EAST|WEST)) if((spawned & (NORTH|SOUTH|EAST|WEST)) == (NORTH|SOUTH|EAST|WEST))

View File

@@ -8,9 +8,9 @@
move_self = 0 move_self = 0
announce=0 announce=0
narnar=0 cause_hell=0
layer=12 // ITS SO BRIGHT layer=LIGHTING_LAYER+2 // ITS SO BRIGHT
consume_range = 6 consume_range = 6
@@ -35,7 +35,17 @@
return 0 return 0
if (istype(A, /mob/living/)) if (istype(A, /mob/living/))
var/mob/living/L = A
if(L.buckled && istype(L.buckled,/obj/structure/bed/))
var/turf/O = L.buckled
do_teleport(O, pick(endgame_safespawns))
L.loc = O.loc
else
do_teleport(L, pick(endgame_safespawns)) //dead-on precision
else if (istype(A, /obj/mecha/))
do_teleport(A, pick(endgame_safespawns)) //dead-on precision do_teleport(A, pick(endgame_safespawns)) //dead-on precision
else if (isturf(A)) else if (isturf(A))
var/turf/T = A var/turf/T = A
var/dist = get_dist(T, src) var/dist = get_dist(T, src)
@@ -51,6 +61,9 @@
continue continue
if (dist > consume_range) if (dist > consume_range)
if(!(AM.singuloCanEat()))
continue
if (101 == AM.invisibility) if (101 == AM.invisibility)
continue continue
@@ -63,19 +76,19 @@
var/image/riftimage = null var/image/riftimage = null
/mob/proc/see_rift(var/obj/singularity/narsie/large/exit/R) /mob/proc/see_rift(var/obj/singularity/narsie/large/exit/R)
if((R.z == src.z) && (get_dist(R,src) <= (R.consume_range+10)) && !(R in view(src))) var/turf/T_mob = get_turf(src)
if((R.z == T_mob.z) && (get_dist(R,T_mob) <= (R.consume_range+10)) && !(R in view(T_mob)))
if(!riftimage) if(!riftimage)
riftimage = image('icons/obj/rift.dmi',src.loc,"rift",12,1) riftimage = image('icons/obj/rift.dmi',T_mob,"rift",LIGHTING_LAYER+2,1)
riftimage.mouse_opacity = 0 riftimage.mouse_opacity = 0
var/new_x = 32 * (R.x - src.x) + R.pixel_x var/new_x = 32 * (R.x - T_mob.x) + R.pixel_x
var/new_y = 32 * (R.y - src.y) + R.pixel_y var/new_y = 32 * (R.y - T_mob.y) + R.pixel_y
riftimage.pixel_x = new_x riftimage.pixel_x = new_x
riftimage.pixel_y = new_y riftimage.pixel_y = new_y
riftimage.loc = src.loc riftimage.loc = T_mob
src << riftimage src << riftimage
else else
if(riftimage) if(riftimage)
qdel(riftimage) qdel(riftimage)

View File

@@ -1,3 +1,5 @@
var/global/universe_has_ended = 0
/datum/universal_state/supermatter_cascade /datum/universal_state/supermatter_cascade
name = "Supermatter Cascade" name = "Supermatter Cascade"
@@ -11,9 +13,11 @@
return 0 return 0
/datum/universal_state/supermatter_cascade/OnTurfChange(var/turf/T) /datum/universal_state/supermatter_cascade/OnTurfChange(var/turf/T)
var/turf/space/spess = T var/turf/space/S = T
if(istype(spess)) if(istype(S))
spess.overlays += "end01" S.color = "#0066FF"
else
S.color = initial(S.color)
/datum/universal_state/supermatter_cascade/DecayTurf(var/turf/T) /datum/universal_state/supermatter_cascade/DecayTurf(var/turf/T)
if(istype(T,/turf/simulated/wall)) if(istype(T,/turf/simulated/wall))
@@ -46,13 +50,13 @@
emergency_shuttle.recall() emergency_shuttle.recall()
AreaSet() AreaSet()
OverlaySet()
MiscSet() MiscSet()
APCSet() APCSet()
AmbientSet() OverlayAndAmbientSet()
// Disable Nar-Sie. // Disable Nar-Sie.
cult.allow_narsie = 0 cult.allow_narsie = 0
PlayerSet() PlayerSet()
new /obj/singularity/narsie/large/exit(pick(endgame_exits)) new /obj/singularity/narsie/large/exit(pick(endgame_exits))
@@ -64,64 +68,49 @@ There's been a galaxy-wide electromagnetic pulse. All of our systems are heavil
You have five minutes before the universe collapses. Good l\[\[###!!!- You have five minutes before the universe collapses. Good l\[\[###!!!-
AUTOMATED ALERT: Link to [command_name()] lost."} AUTOMATED ALERT: Link to [command_name()] lost.
The access requirements on the Asteroid Shuttles' consoles have now been revoked.
"}
priority_announcement.Announce(txt,"SUPERMATTER CASCADE DETECTED") priority_announcement.Announce(txt,"SUPERMATTER CASCADE DETECTED")
for(var/obj/machinery/computer/shuttle_control/C in machines)
if(istype(C, /obj/machinery/computer/shuttle_control/research) || istype(C, /obj/machinery/computer/shuttle_control/mining))
C.req_access = list()
C.req_one_access = list()
sleep(5 MINUTES) sleep(5 MINUTES)
ticker.declare_completion()
ticker.station_explosion_cinematic(0,null) // TODO: Custom cinematic ticker.station_explosion_cinematic(0,null) // TODO: Custom cinematic
world << "<B>Resetting in 30 seconds!</B>" universe_has_ended = 1
feedback_set_details("end_error","Universe ended")
if(blackbox)
blackbox.save_all_data_to_sql()
sleep(300)
log_game("Rebooting due to universal collapse")
world.Reboot()
return return
/datum/universal_state/supermatter_cascade/proc/AreaSet() /datum/universal_state/supermatter_cascade/proc/AreaSet()
for(var/area/A in world) for(var/area/A in all_areas)
if(A.z in config.admin_levels) if(!istype(A,/area) || istype(A, /area/space) || istype(A,/area/beach))
continue continue
if(istype(A,/area/space))
continue
// Reset all alarms.
A.fire = null
A.atmos = 1
A.atmosalm = 0
A.poweralm = 1
// Slap on random alerts
if(prob(25))
switch(rand(1,4))
if(1)
A.fire=1
if(2)
A.atmosalm=1
A.updateicon() A.updateicon()
/datum/universal_state/supermatter_cascade/proc/OverlaySet() /datum/universal_state/supermatter_cascade/OverlayAndAmbientSet()
for(var/turf/space/spess in world) spawn(0)
spess.overlays += "end01" for(var/atom/movable/lighting_overlay/L in world)
if(L.z in config.admin_levels)
L.update_lumcount(1,1,1)
else
L.update_lumcount(0.0, 0.4, 1)
/datum/universal_state/supermatter_cascade/proc/AmbientSet() for(var/turf/space/T in turfs)
for(var/atom/movable/lighting_overlay/L in world) OnTurfChange(T)
if(!(L.z in config.admin_levels))
L.update_lumcount(0.5, 1, 0)
/datum/universal_state/supermatter_cascade/proc/MiscSet() /datum/universal_state/supermatter_cascade/proc/MiscSet()
for (var/obj/machinery/firealarm/alm in world) for (var/obj/machinery/firealarm/alm in machines)
if (!(alm.stat & BROKEN)) if (!(alm.stat & BROKEN))
alm.ex_act(2) alm.ex_act(2)
/datum/universal_state/supermatter_cascade/proc/APCSet() /datum/universal_state/supermatter_cascade/proc/APCSet()
for (var/obj/machinery/power/apc/APC in world) for (var/obj/machinery/power/apc/APC in machines)
if (!(APC.stat & BROKEN)) if (!(APC.stat & BROKEN) && !APC.is_critical)
APC.chargemode = 0 APC.chargemode = 0
if(APC.cell) if(APC.cell)
APC.cell.charge = 0 APC.cell.charge = 0

View File

@@ -86,7 +86,7 @@ var/global/list/additional_antag_types = list()
new/datum/uplink_item(/obj/item/weapon/soap/syndie, 1, "Subversive Soap", "SP"), new/datum/uplink_item(/obj/item/weapon/soap/syndie, 1, "Subversive Soap", "SP"),
new/datum/uplink_item(/obj/item/weapon/cane/concealed, 2, "Concealed Cane Sword", "CC"), new/datum/uplink_item(/obj/item/weapon/cane/concealed, 2, "Concealed Cane Sword", "CC"),
new/datum/uplink_item(/obj/item/weapon/cartridge/syndicate, 3, "Detomatix PDA Cartridge", "DC"), new/datum/uplink_item(/obj/item/weapon/cartridge/syndicate, 3, "Detomatix PDA Cartridge", "DC"),
new/datum/uplink_item(/obj/item/weapon/pen/paralysis, 3, "Paralysis Pen", "PP"), new/datum/uplink_item(/obj/item/weapon/pen/reagent/paralysis, 3, "Paralysis Pen", "PP"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/cigarette, 4, "Cigarette Kit", "BH"), new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/cigarette, 4, "Cigarette Kit", "BH"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/toxin, 4, "Random Toxin - Beaker", "RT") new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/toxin, 4, "Random Toxin - Beaker", "RT")
), ),

View File

@@ -312,7 +312,7 @@ var/global/datum/controller/gameticker/ticker
game_finished = (emergency_shuttle.returned() || mode.station_was_nuked) game_finished = (emergency_shuttle.returned() || mode.station_was_nuked)
mode_finished = (!post_game && mode.check_finished()) mode_finished = (!post_game && mode.check_finished())
else else
game_finished = (mode.check_finished() || (emergency_shuttle.returned() && emergency_shuttle.evac == 1)) game_finished = (mode.check_finished() || (emergency_shuttle.returned() && emergency_shuttle.evac == 1)) || universe_has_ended
mode_finished = game_finished mode_finished = game_finished
if(!mode.explosion_in_progress && game_finished && (mode_finished || post_game)) if(!mode.explosion_in_progress && game_finished && (mode_finished || post_game))

View File

@@ -14,6 +14,10 @@
/datum/job/assistant/equip(var/mob/living/carbon/human/H) /datum/job/assistant/equip(var/mob/living/carbon/human/H)
if(!H) return 0 if(!H) return 0
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
return 1 return 1

View File

@@ -23,7 +23,6 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/captain(H), slot_back) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/captain(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_cap(H), slot_back) if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_cap(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H) var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H)
if(H.age>49) if(H.age>49)
U.accessories += new /obj/item/clothing/accessory/medal/gold/captain(U) U.accessories += new /obj/item/clothing/accessory/medal/gold/captain(U)

View File

@@ -172,6 +172,10 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_in_backpack)
return 1 return 1
equip_survival(var/mob/living/carbon/human/H)
if(!H) return 0
H.species.equip_survival_gear(H,1)
return 1
//Griff //BS12 EDIT //Griff //BS12 EDIT

View File

@@ -37,6 +37,10 @@
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves) H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
return 1 return 1
equip_survival(var/mob/living/carbon/human/H)
if(!H) return 0
H.species.equip_survival_gear(H,1)
return 1
/datum/job/engineer /datum/job/engineer
@@ -69,6 +73,10 @@
H.equip_to_slot_or_del(new /obj/item/device/pda/engineering(H), slot_l_store) H.equip_to_slot_or_del(new /obj/item/device/pda/engineering(H), slot_l_store)
return 1 return 1
equip_survival(var/mob/living/carbon/human/H)
if(!H) return 0
H.species.equip_survival_gear(H,1)
return 1
/datum/job/atmos /datum/job/atmos
@@ -97,3 +105,8 @@
H.equip_to_slot_or_del(new /obj/item/device/pda/atmos(H), slot_l_store) H.equip_to_slot_or_del(new /obj/item/device/pda/atmos(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/atmostech/(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/atmostech/(H), slot_belt)
return 1 return 1
equip_survival(var/mob/living/carbon/human/H)
if(!H) return 0
H.species.equip_survival_gear(H,1)
return 1

View File

@@ -23,6 +23,11 @@
/datum/job/proc/equip(var/mob/living/carbon/human/H) /datum/job/proc/equip(var/mob/living/carbon/human/H)
return 1 return 1
/datum/job/proc/equip_survival(var/mob/living/carbon/human/H)
if(!H) return 0
H.species.equip_survival_gear(H,0)
return 1
// overrideable separately so AIs/borgs can have cardborg hats without unneccessary new()/del() // overrideable separately so AIs/borgs can have cardborg hats without unneccessary new()/del()
/datum/job/proc/equip_preview(mob/living/carbon/human/H) /datum/job/proc/equip_preview(mob/living/carbon/human/H)
return equip(H) return equip(H)

View File

@@ -30,9 +30,9 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/cmo(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/heads/cmo(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand) H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand)
return 1
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/cmo(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/cmo(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store) H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
return 1
/datum/job/doctor /datum/job/doctor
title = "Medical Doctor" title = "Medical Doctor"
@@ -224,3 +224,8 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/medical/emt(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/medical/emt(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_l_store) H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_l_store)
return 1 return 1
equip_survival(var/mob/living/carbon/human/H)
if(!H) return 0
H.species.equip_survival_gear(H,1)
return 1

View File

@@ -66,8 +66,6 @@
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/science(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/science(H), slot_wear_suit)
return 1 return 1
/datum/job/xenobiologist /datum/job/xenobiologist
title = "Xenobiologist" title = "Xenobiologist"
flag = XENOBIOLOGIST flag = XENOBIOLOGIST
@@ -78,8 +76,8 @@
spawn_positions = 2 spawn_positions = 2
supervisors = "the research director" supervisors = "the research director"
selection_color = "#ffeeff" selection_color = "#ffeeff"
access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology) access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_hydroponics)
minimal_access = list(access_research, access_xenobiology) minimal_access = list(access_research, access_xenobiology, access_hydroponics, access_tox_storage)
alt_titles = list("Xenobotanist") alt_titles = list("Xenobotanist")
minimal_player_age = 14 minimal_player_age = 14

View File

@@ -13,6 +13,10 @@
equip(var/mob/living/carbon/human/H) equip(var/mob/living/carbon/human/H)
if(!H) return 0 if(!H) return 0
return 1 return 1
equip_survival(var/mob/living/carbon/human/H)
if(!H) return 0
return 1
/datum/job/ai/is_position_available() /datum/job/ai/is_position_available()
return (empty_playable_ai_cores.len != 0) return (empty_playable_ai_cores.len != 0)
@@ -37,6 +41,11 @@
if(!H) return 0 if(!H) return 0
return 1 return 1
equip_survival(var/mob/living/carbon/human/H)
if(!H) return 0
return 1
return 1
/datum/job/cyborg/equip_preview(mob/living/carbon/human/H) /datum/job/cyborg/equip_preview(mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/cardborg(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/suit/cardborg(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/cardborg(H), slot_head) H.equip_to_slot_or_del(new /obj/item/clothing/head/cardborg(H), slot_head)

View File

@@ -393,8 +393,8 @@ var/global/datum/controller/occupations/job_master
spawn_in_storage += thing spawn_in_storage += thing
//Equip job items. //Equip job items.
job.equip(H) job.equip(H)
job.equip_survival(H)
job.apply_fingerprints(H) job.apply_fingerprints(H)
H.species.equip_survival_gear(H)
//If some custom items could not be equipped before, try again now. //If some custom items could not be equipped before, try again now.
for(var/thing in custom_equip_leftovers) for(var/thing in custom_equip_leftovers)
@@ -472,11 +472,6 @@ var/global/datum/controller/occupations/job_master
var/sound/announce_sound = (ticker.current_state <= GAME_STATE_SETTING_UP)? null : sound('sound/misc/boatswain.ogg', volume=20) var/sound/announce_sound = (ticker.current_state <= GAME_STATE_SETTING_UP)? null : sound('sound/misc/boatswain.ogg', volume=20)
captain_announcement.Announce("All hands, Captain [H.real_name] on deck!", new_sound=announce_sound) captain_announcement.Announce("All hands, Captain [H.real_name] on deck!", new_sound=announce_sound)
if(istype(H.back, /obj/item/weapon/storage))
new /obj/item/weapon/storage/box/survival(H.back)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
//Deferred item spawning. //Deferred item spawning.
if(spawn_in_storage && spawn_in_storage.len) if(spawn_in_storage && spawn_in_storage.len)
var/obj/item/weapon/storage/B var/obj/item/weapon/storage/B

View File

@@ -47,8 +47,7 @@
/obj/machinery/optable/attack_hand(mob/user as mob) /obj/machinery/optable/attack_hand(mob/user as mob)
if (HULK in usr.mutations) if (HULK in usr.mutations)
usr << text("<span class='notice'>You destroy the table.</span>") visible_message("<span class='danger'>\The [usr] destroys \the [src]!</span>")
visible_message("<span class='warning'>\The [usr] destroys the operating table!</span>")
src.density = 0 src.density = 0
qdel(src) qdel(src)
return return
@@ -87,9 +86,13 @@
/obj/machinery/optable/proc/take_victim(mob/living/carbon/C, mob/living/carbon/user as mob) /obj/machinery/optable/proc/take_victim(mob/living/carbon/C, mob/living/carbon/user as mob)
if (C == user) if (C == user)
user.visible_message("[user] climbs on the operating table.","You climb on the operating table.") user.visible_message("[user] climbs on \the [src].","You climb on \the [src].")
else else
<<<<<<< HEAD
visible_message("<span class='warning'>[C] has been laid on the operating table by [user].</span>", 3) visible_message("<span class='warning'>[C] has been laid on the operating table by [user].</span>", 3)
=======
visible_message("<span class='notice'>\The [C] has been laid on \the [src] by [user].</span>", 3)
>>>>>>> upstream/dev
if (C.client) if (C.client)
C.client.perspective = EYE_PERSPECTIVE C.client.perspective = EYE_PERSPECTIVE
C.client.eye = src C.client.eye = src
@@ -134,12 +137,20 @@
return return
/obj/machinery/optable/proc/check_table(mob/living/carbon/patient as mob) /obj/machinery/optable/proc/check_table(mob/living/carbon/patient as mob)
<<<<<<< HEAD
if(src.victim) if(src.victim)
usr << "<span class='warning'>The table is already occupied!</span>" usr << "<span class='warning'>The table is already occupied!</span>"
=======
check_victim()
if(src.victim && get_turf(victim) == get_turf(src) && victim.lying)
usr << "<span class='warning'>\the [src] is already occupied!</span>"
>>>>>>> upstream/dev
return 0 return 0
if(patient.buckled) if(patient.buckled)
<<<<<<< HEAD
usr << "<span class='warning'>Unbuckle first!</span>" usr << "<span class='warning'>Unbuckle first!</span>"
=======
usr << "<span class='notice'>Unbuckle \the [patient] first!</span>"
>>>>>>> upstream/dev
return 0 return 0
return 1 return 1

View File

@@ -299,3 +299,4 @@
else else
qdel(S) qdel(S)
..() ..()
return 1

View File

@@ -267,7 +267,7 @@
if("cellremove") if("cellremove")
if(open && cell && !usr.get_active_hand()) if(open && cell && !usr.get_active_hand())
cell.updateicon() cell.update_icon()
usr.put_in_active_hand(cell) usr.put_in_active_hand(cell)
cell.add_fingerprint(usr) cell.add_fingerprint(usr)
cell = null cell = null

View File

@@ -10,7 +10,7 @@
power_channel = EQUIP power_channel = EQUIP
var/obj/item/weapon/cell/charging = null var/obj/item/weapon/cell/charging = null
var/chargelevel = -1 var/chargelevel = -1
/obj/machinery/cell_charger/update_icon() /obj/machinery/cell_charger/update_icon()
icon_state = "ccharger[charging ? 1 : 0]" icon_state = "ccharger[charging ? 1 : 0]"
@@ -27,11 +27,11 @@
chargelevel = newlevel chargelevel = newlevel
else else
overlays.Cut() overlays.Cut()
/obj/machinery/cell_charger/examine(mob/user) /obj/machinery/cell_charger/examine(mob/user)
if(!..(user, 5)) if(!..(user, 5))
return return
user << "There's [charging ? "a" : "no"] cell in the charger." user << "There's [charging ? "a" : "no"] cell in the charger."
if(charging) if(charging)
user << "Current charge: [charging.charge]" user << "Current charge: [charging.charge]"
@@ -71,7 +71,7 @@
if(charging) if(charging)
usr.put_in_hands(charging) usr.put_in_hands(charging)
charging.add_fingerprint(user) charging.add_fingerprint(user)
charging.updateicon() charging.update_icon()
src.charging = null src.charging = null
user.visible_message("[user] removes the cell from the charger.", "You remove the cell from the charger.") user.visible_message("[user] removes the cell from the charger.", "You remove the cell from the charger.")
@@ -84,7 +84,7 @@
return return
charging.loc = src.loc charging.loc = src.loc
charging.updateicon() charging.update_icon()
charging = null charging = null
update_icon() update_icon()
user.visible_message("[user] removes the cell from the charger.", "You remove the cell from the charger.") user.visible_message("[user] removes the cell from the charger.", "You remove the cell from the charger.")
@@ -103,11 +103,11 @@
if((stat & (BROKEN|NOPOWER)) || !anchored) if((stat & (BROKEN|NOPOWER)) || !anchored)
update_use_power(0) update_use_power(0)
return return
if (charging && !charging.fully_charged()) if (charging && !charging.fully_charged())
charging.give(active_power_usage*CELLRATE) charging.give(active_power_usage*CELLRATE)
update_use_power(2) update_use_power(2)
update_icon() update_icon()
else else
update_use_power(1) update_use_power(1)

View File

@@ -30,7 +30,7 @@
var/hasShocked = 0 //Prevents multiple shocks from happening var/hasShocked = 0 //Prevents multiple shocks from happening
var/secured_wires = 0 var/secured_wires = 0
var/datum/wires/airlock/wires = null var/datum/wires/airlock/wires = null
var/open_sound_powered = 'sound/machines/airlock.ogg' var/open_sound_powered = 'sound/machines/airlock.ogg'
var/open_sound_unpowered = 'sound/machines/airlock_creaking.ogg' var/open_sound_unpowered = 'sound/machines/airlock_creaking.ogg'
@@ -277,7 +277,7 @@
target_tile.assume_gas("phoron", 35, 400+T0C) target_tile.assume_gas("phoron", 35, 400+T0C)
spawn (0) target_tile.hotspot_expose(temperature, 400) spawn (0) target_tile.hotspot_expose(temperature, 400)
for(var/turf/simulated/wall/W in range(3,src)) for(var/turf/simulated/wall/W in range(3,src))
W.ignite((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame W.burn((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame
for(var/obj/machinery/door/airlock/phoron/D in range(3,src)) for(var/obj/machinery/door/airlock/phoron/D in range(3,src))
D.ignite(temperature/4) D.ignite(temperature/4)
new/obj/structure/door_assembly( src.loc ) new/obj/structure/door_assembly( src.loc )
@@ -855,13 +855,13 @@ About the new airlock wires panel:
if(!can_open(forced)) if(!can_open(forced))
return 0 return 0
use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people
//if the door is unpowered then it doesn't make sense to hear the woosh of a pneumatic actuator //if the door is unpowered then it doesn't make sense to hear the woosh of a pneumatic actuator
if(arePowerSystemsOn()) if(arePowerSystemsOn())
playsound(src.loc, open_sound_powered, 100, 1) playsound(src.loc, open_sound_powered, 100, 1)
else else
playsound(src.loc, open_sound_unpowered, 100, 1) playsound(src.loc, open_sound_unpowered, 100, 1)
if(src.closeOther != null && istype(src.closeOther, /obj/machinery/door/airlock/) && !src.closeOther.density) if(src.closeOther != null && istype(src.closeOther, /obj/machinery/door/airlock/) && !src.closeOther.density)
src.closeOther.close() src.closeOther.close()
return ..() return ..()
@@ -950,10 +950,10 @@ About the new airlock wires panel:
take_damage(DOOR_CRUSH_DAMAGE) take_damage(DOOR_CRUSH_DAMAGE)
use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people
if(istype(src, /obj/machinery/door/airlock/glass)) if(arePowerSystemsOn())
playsound(src.loc, 'sound/machines/windowdoor.ogg', 30, 1) playsound(src.loc, open_sound_powered, 100, 1)
else else
playsound(src.loc, 'sound/machines/airlock.ogg', 30, 1) playsound(src.loc, open_sound_unpowered, 100, 1)
for(var/turf/turf in locs) for(var/turf/turf in locs)
var/obj/structure/window/killthis = (locate(/obj/structure/window) in turf) var/obj/structure/window/killthis = (locate(/obj/structure/window) in turf)
if(killthis) if(killthis)

View File

@@ -7,28 +7,71 @@
density = 1 density = 1
var/on = 0 var/on = 0
var/obj/item/weapon/cell/high/cell = null var/obj/item/weapon/cell/high/cell = null
var/use = 5 var/use = 200 // 200W light
var/unlocked = 0 var/unlocked = 0
var/open = 0 var/open = 0
var/brightness_on = 8 //can't remember what the maxed out value is var/brightness_on = 8 //can't remember what the maxed out value is
/obj/machinery/floodlight/New() /obj/machinery/floodlight/New()
src.cell = new(src) src.cell = new(src)
cell.maxcharge = 1000
cell.charge = 1000 // 41minutes @ 200W
..() ..()
/obj/machinery/floodlight/proc/updateicon() /obj/machinery/floodlight/update_icon()
overlays.Cut()
icon_state = "flood[open ? "o" : ""][open && cell ? "b" : ""]0[on]" icon_state = "flood[open ? "o" : ""][open && cell ? "b" : ""]0[on]"
/obj/machinery/floodlight/process() /obj/machinery/floodlight/process()
if(on && cell && cell.charge >= use) if(!on)
cell.use(use)
else
on = 0
updateicon()
set_light(0)
src.visible_message("<span class='warning'>[src] shuts down due to lack of power!</span>")
return return
if(!cell || (cell.charge < (use * CELLRATE)))
turn_off(1)
return
// If the cell is almost empty rarely "flicker" the light. Aesthetic only.
if((cell.percent() < 10) && prob(5))
set_light(brightness_on/2, brightness_on/4)
spawn(20)
if(on)
set_light(brightness_on, brightness_on/2)
cell.use(use*CELLRATE)
// Returns 0 on failure and 1 on success
/obj/machinery/floodlight/proc/turn_on(var/loud = 0)
if(!cell)
return 0
if(cell.charge < (use * CELLRATE))
return 0
on = 1
set_light(brightness_on, brightness_on / 2)
update_icon()
if(loud)
visible_message("\The [src] turns on.")
return 1
/obj/machinery/floodlight/proc/turn_off(var/loud = 0)
on = 0
set_light(0, 0)
update_icon()
if(loud)
visible_message("\The [src] shuts down.")
/obj/machinery/floodlight/attack_ai(mob/user as mob)
if(istype(user, /mob/living/silicon/robot) && Adjacent(user))
return attack_hand(user)
if(on)
turn_off(1)
else
if(!turn_on(1))
user << "You try to turn on \the [src] but it does not work."
/obj/machinery/floodlight/attack_hand(mob/user as mob) /obj/machinery/floodlight/attack_hand(mob/user as mob)
if(open && cell) if(open && cell)
if(ishuman(user)) if(ishuman(user))
@@ -39,29 +82,22 @@
cell.loc = loc cell.loc = loc
cell.add_fingerprint(user) cell.add_fingerprint(user)
cell.updateicon() cell.update_icon()
src.cell = null src.cell = null
on = 0 on = 0
set_light(0) set_light(0)
user << "You remove the power cell" user << "You remove the power cell"
updateicon() update_icon()
return return
if(on) if(on)
on = 0 turn_off(1)
user << "<span class='notice'>You turn off the light</span>"
set_light(0)
else else
if(!cell) if(!turn_on(1))
return user << "You try to turn on \the [src] but it does not work."
if(cell.charge <= 0)
return
on = 1
user << "<span class='notice'>You turn on the light</span>"
set_light(brightness_on)
updateicon() update_icon()
/obj/machinery/floodlight/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/machinery/floodlight/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -94,4 +130,4 @@
W.loc = src W.loc = src
cell = W cell = W
user << "You insert the power cell." user << "You insert the power cell."
updateicon() update_icon()

View File

@@ -204,7 +204,7 @@
item_quants[O.name]++ item_quants[O.name]++
else else
item_quants[O.name] = 1 item_quants[O.name] = 1
user.visible_message("<span class='notice'>[user] has added \the [O] to \the [src].", "<span class='notice'>You add \the [O] to \the [src].") user.visible_message("<span class='notice'>[user] has added \the [O] to \the [src].</span>", "<span class='notice'>You add \the [O] to \the [src].</span>")
nanomanager.update_uis(src) nanomanager.update_uis(src)

View File

@@ -120,8 +120,8 @@
if("cellremove") if("cellremove")
if(panel_open && cell && !usr.get_active_hand()) if(panel_open && cell && !usr.get_active_hand())
usr.visible_message("<span class='notice'>[usr] removes \the [cell] from \the [src].</span>", "<span class='notice'>You remove \the [cell] from \the [src].</span>") usr.visible_message("<span class='notice'>\The usr] removes \the [cell] from \the [src].</span>", "<span class='notice'>You remove \the [cell] from \the [src].</span>")
cell.updateicon() cell.update_icon()
usr.put_in_hands(cell) usr.put_in_hands(cell)
cell.add_fingerprint(usr) cell.add_fingerprint(usr)
cell = null cell = null

View File

@@ -21,8 +21,9 @@
var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags
var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags
var/icon_action_button //If this is set, The item will make an action button on the player's HUD when picked up. The button will have the icon_action_button sprite from the screen1_action.dmi file. var/datum/action/item_action/action = null
var/action_button_name //This is the text which gets displayed on the action button. If not set it defaults to 'Use [name]'. Note that icon_action_button needs to be set in order for the action button to appear. var/action_button_name //It is also the text which gets displayed on the action button. If not set it defaults to 'Use [name]'. If it's not set, there'll be no button.
var/action_button_is_hands_free = 0 //If 1, bypass the restrained, lying, and stunned checks action buttons normally test for
//Since any item can now be a piece of clothing, this has to be put here so all items share it. //Since any item can now be a piece of clothing, this has to be put here so all items share it.
var/flags_inv //This flag is used to determine when items in someone's inventory cover others. IE helmets making it so you can't see glasses, etc. var/flags_inv //This flag is used to determine when items in someone's inventory cover others. IE helmets making it so you can't see glasses, etc.
@@ -398,9 +399,7 @@ var/list/global/slot_flags_enumeration = list(
//The default action is attack_self(). //The default action is attack_self().
//Checks before we get to here are: mob is alive, mob is not restrained, paralyzed, asleep, resting, laying, item is on the mob. //Checks before we get to here are: mob is alive, mob is not restrained, paralyzed, asleep, resting, laying, item is on the mob.
/obj/item/proc/ui_action_click() /obj/item/proc/ui_action_click()
if( src in usr ) attack_self(usr)
attack_self(usr)
/obj/item/proc/IsShield() /obj/item/proc/IsShield()
return 0 return 0

View File

@@ -10,7 +10,7 @@
matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 20) matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 20)
icon_action_button = "action_flashlight" action_button_name = "Toggle Flashlight"
var/on = 0 var/on = 0
var/brightness_on = 4 //luminosity when on var/brightness_on = 4 //luminosity when on
@@ -141,7 +141,7 @@
light_color = "#e58775" light_color = "#e58775"
icon_state = "flare" icon_state = "flare"
item_state = "flare" item_state = "flare"
icon_action_button = null //just pull it manually, neckbeard. action_button_name = null //just pull it manually, neckbeard.
var/fuel = 0 var/fuel = 0
var/on_damage = 7 var/on_damage = 7
var/produce_heat = 1500 var/produce_heat = 1500

View File

@@ -72,9 +72,9 @@ REAGENT SCANNER
throwforce = 3 throwforce = 3
w_class = 2.0 w_class = 2.0
throw_speed = 5 throw_speed = 5
throw_range = 10 throw_range = 10
matter = list(DEFAULT_WALL_MATERIAL = 200) matter = list(DEFAULT_WALL_MATERIAL = 200)
origin_tech = list(TECH_MAGNET = 1, TECH_BIO = 1) origin_tech = list(TECH_MAGNET = 1, TECH_BIO = 1)
var/mode = 1; var/mode = 1;
@@ -91,9 +91,9 @@ REAGENT SCANNER
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
usr << "\red You don't have the dexterity to do this!" usr << "\red You don't have the dexterity to do this!"
return return
user.visible_message("<span class='notice'> [user] has analyzed [M]'s vitals.","<span class='notice'> You have analyzed [M]'s vitals.") user.visible_message("<span class='notice'> [user] has analyzed [M]'s vitals.</span>","<span class='notice'> You have analyzed [M]'s vitals.</span>")
if (!istype(M, /mob/living/carbon) || ishuman(M)) if (!istype(M,/mob/living/carbon/human) || M.isSynthetic())
//these sensors are designed for organic life //these sensors are designed for organic life
user.show_message("\blue Analyzing Results for ERROR:\n\t Overall Status: ERROR") user.show_message("\blue Analyzing Results for ERROR:\n\t Overall Status: ERROR")
user.show_message("\t Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FFA500'>Burns</font>/<font color='red'>Brute</font>", 1) user.show_message("\t Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FFA500'>Burns</font>/<font color='red'>Brute</font>", 1)

View File

@@ -5,56 +5,56 @@
icon = 'icons/obj/device.dmi' icon = 'icons/obj/device.dmi'
icon_state = "suitcooler0" icon_state = "suitcooler0"
slot_flags = SLOT_BACK //you can carry it on your back if you want, but it won't do anything unless attached to suit storage slot_flags = SLOT_BACK //you can carry it on your back if you want, but it won't do anything unless attached to suit storage
//copied from tank.dm //copied from tank.dm
flags = CONDUCT flags = CONDUCT
force = 5.0 force = 5.0
throwforce = 10.0 throwforce = 10.0
throw_speed = 1 throw_speed = 1
throw_range = 4 throw_range = 4
origin_tech = list(TECH_MAGNET = 2, TECH_MATERIAL = 2) origin_tech = list(TECH_MAGNET = 2, TECH_MATERIAL = 2)
var/on = 0 //is it turned on? var/on = 0 //is it turned on?
var/cover_open = 0 //is the cover open? var/cover_open = 0 //is the cover open?
var/obj/item/weapon/cell/cell var/obj/item/weapon/cell/cell
var/max_cooling = 12 //in degrees per second - probably don't need to mess with heat capacity here var/max_cooling = 12 //in degrees per second - probably don't need to mess with heat capacity here
var/charge_consumption = 16.6 //charge per second at max_cooling var/charge_consumption = 16.6 //charge per second at max_cooling
var/thermostat = T20C var/thermostat = T20C
//TODO: make it heat up the surroundings when not in space //TODO: make it heat up the surroundings when not in space
/obj/item/device/suit_cooling_unit/New() /obj/item/device/suit_cooling_unit/New()
processing_objects |= src processing_objects |= src
cell = new/obj/item/weapon/cell() //comes with the crappy default power cell - high-capacity ones shouldn't be hard to find cell = new/obj/item/weapon/cell() //comes with the crappy default power cell - high-capacity ones shouldn't be hard to find
cell.loc = src cell.loc = src
/obj/item/device/suit_cooling_unit/process() /obj/item/device/suit_cooling_unit/process()
if (!on || !cell) if (!on || !cell)
return return
if (!ismob(loc)) if (!ismob(loc))
return return
if (!attached_to_suit(loc)) //make sure they have a suit and we are attached to it if (!attached_to_suit(loc)) //make sure they have a suit and we are attached to it
return return
var/mob/living/carbon/human/H = loc var/mob/living/carbon/human/H = loc
var/efficiency = 1 - H.get_pressure_weakness() //you need to have a good seal for effective cooling var/efficiency = 1 - H.get_pressure_weakness() //you need to have a good seal for effective cooling
var/env_temp = get_environment_temperature() //wont save you from a fire var/env_temp = get_environment_temperature() //wont save you from a fire
var/temp_adj = min(H.bodytemperature - max(thermostat, env_temp), max_cooling) var/temp_adj = min(H.bodytemperature - max(thermostat, env_temp), max_cooling)
if (temp_adj < 0.5) //only cools, doesn't heat, also we don't need extreme precision if (temp_adj < 0.5) //only cools, doesn't heat, also we don't need extreme precision
return return
var/charge_usage = (temp_adj/max_cooling)*charge_consumption var/charge_usage = (temp_adj/max_cooling)*charge_consumption
H.bodytemperature -= temp_adj*efficiency H.bodytemperature -= temp_adj*efficiency
cell.use(charge_usage) cell.use(charge_usage)
if(cell.charge <= 0) if(cell.charge <= 0)
turn_off() turn_off()
@@ -70,22 +70,22 @@
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
if(istype(T, /turf/space)) if(istype(T, /turf/space))
return 0 //space has no temperature, this just makes sure the cooling unit works in space return 0 //space has no temperature, this just makes sure the cooling unit works in space
var/datum/gas_mixture/environment = T.return_air() var/datum/gas_mixture/environment = T.return_air()
if (!environment) if (!environment)
return 0 return 0
return environment.temperature return environment.temperature
/obj/item/device/suit_cooling_unit/proc/attached_to_suit(mob/M) /obj/item/device/suit_cooling_unit/proc/attached_to_suit(mob/M)
if (!ishuman(M)) if (!ishuman(M))
return 0 return 0
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
if (!H.wear_suit || H.s_store != src) if (!H.wear_suit || H.s_store != src)
return 0 return 0
return 1 return 1
/obj/item/device/suit_cooling_unit/proc/turn_on() /obj/item/device/suit_cooling_unit/proc/turn_on()
@@ -93,7 +93,7 @@
return return
if(cell.charge <= 0) if(cell.charge <= 0)
return return
on = 1 on = 1
updateicon() updateicon()
@@ -112,7 +112,7 @@
cell.loc = get_turf(loc) cell.loc = get_turf(loc)
cell.add_fingerprint(user) cell.add_fingerprint(user)
cell.updateicon() cell.update_icon()
user << "You remove the [src.cell]." user << "You remove the [src.cell]."
src.cell = null src.cell = null
@@ -149,7 +149,7 @@
user << "You insert the [cell]." user << "You insert the [cell]."
updateicon() updateicon()
return return
return ..() return ..()
/obj/item/device/suit_cooling_unit/proc/updateicon() /obj/item/device/suit_cooling_unit/proc/updateicon()
@@ -164,7 +164,7 @@
/obj/item/device/suit_cooling_unit/examine(mob/user) /obj/item/device/suit_cooling_unit/examine(mob/user)
if(!..(user, 1)) if(!..(user, 1))
return return
if (on) if (on)
if (attached_to_suit(src.loc)) if (attached_to_suit(src.loc))
user << "It's switched on and running." user << "It's switched on and running."
@@ -172,13 +172,13 @@
user << "It's switched on, but not attached to anything." user << "It's switched on, but not attached to anything."
else else
user << "It is switched off." user << "It is switched off."
if (cover_open) if (cover_open)
if(cell) if(cell)
user << "The panel is open, exposing the [cell]." user << "The panel is open, exposing the [cell]."
else else
user << "The panel is open." user << "The panel is open."
if (cell) if (cell)
user << "The charge meter reads [round(cell.percent())]%." user << "The charge meter reads [round(cell.percent())]%."
else else

View File

@@ -4,26 +4,40 @@
Cyborg Spec Items Cyborg Spec Items
***********************************************************************/ ***********************************************************************/
//Might want to move this into several files later but for now it works here //Might want to move this into several files later but for now it works here
// Consider changing this to a child of the stun baton class. ~Z
/obj/item/borg/stun /obj/item/borg/stun
name = "electrified arm" name = "electrified arm"
icon = 'icons/obj/decals.dmi' icon = 'icons/obj/decals.dmi'
icon_state = "shock" icon_state = "shock"
attack(mob/M as mob, mob/living/silicon/robot/user as mob) /obj/item/borg/stun/attack(var/mob/living/M, var/mob/living/silicon/robot/user)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
user.cell.charge -= 30 if(!istype(M))
return
M.Weaken(5) // How the Hell.
if (M.stuttering < 5) if(!istype(user))
M.stuttering = 5 var/mob/living/temp = user
M.Stun(5) if(istype(temp))
temp.drop_from_inventory(src)
qdel(src)
return
for(var/mob/O in viewers(M, null)) M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
if (O.client) user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
O.show_message("\red <B>[user] has prodded [M] with an electrically-charged arm!</B>", 1, "\red You hear someone fall", 2) msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
if(!user.cell || !user.cell.checked_use(1250)) //Slightly more than a baton.
user.visible_message("<span class='danger'>\The [user] has prodded \the [M] with its arm!</span>")
return
if (M.stuttering < 5)
M.stuttering = 5
M.stun_effect_act(0, 70, check_zone(user.zone_sel.selecting), src)
user.visible_message("<span class='danger'>\The [user] has prodded \the [M] with \a [src]!</span>")
if(ishuman(M))
var/mob/living/carbon/human/H = M
H.forcesay(hit_appends)
/obj/item/borg/overdrive /obj/item/borg/overdrive
name = "overdrive" name = "overdrive"

View File

@@ -73,15 +73,15 @@
if (W.internal) if (W.internal)
continue continue
if (W.current_stage <= W.max_bleeding_stage) if (W.current_stage <= W.max_bleeding_stage)
user.visible_message( "\blue [user] bandages [W.desc] on [M]'s [affecting.name].", \ user.visible_message("<span class='notice'>\The [user] bandages [W.desc] on [M]'s [affecting.name].</span>", \
"\blue You bandage [W.desc] on [M]'s [affecting.name]." ) "<span class='notice'>You bandage [W.desc] on [M]'s [affecting.name].</span>" )
//H.add_side_effect("Itch") //H.add_side_effect("Itch")
else if (istype(W,/datum/wound/bruise)) else if (istype(W,/datum/wound/bruise))
user.visible_message( "\blue [user] places bruise patch over [W.desc] on [M]'s [affecting.name].", \ user.visible_message("<span class='notice'>\The [user] places a bruise patch over [W.desc] on [M]'s [affecting.name].</span>", \
"\blue You place bruise patch over [W.desc] on [M]'s [affecting.name]." ) "<span class='notice'>You place a bruise patch over [W.desc] on [M]'s [affecting.name].</span>" )
else else
user.visible_message( "\blue [user] places bandaid over [W.desc] on [M]'s [affecting.name].", \ user.visible_message("<span class='notice'>\The [user] places a bandaid over [W.desc] on [M]'s [affecting.name].</span>", \
"\blue You place bandaid over [W.desc] on [M]'s [affecting.name]." ) "<span class='notice'>You place a bandaid over [W.desc] on [M]'s [affecting.name].</span>" )
use(1) use(1)
else else
if (can_operate(H)) //Checks if mob is lying down on table for surgery if (can_operate(H)) //Checks if mob is lying down on table for surgery
@@ -143,22 +143,22 @@
var/disinfected = affecting.disinfect() var/disinfected = affecting.disinfect()
if(!(bandaged || disinfected)) if(!(bandaged || disinfected))
user << "\red The wounds on [M]'s [affecting.name] have already been treated." user << "<span class='warning'>The wounds on [M]'s [affecting.name] have already been treated.</span>"
return 1 return 1
else else
for (var/datum/wound/W in affecting.wounds) for (var/datum/wound/W in affecting.wounds)
if (W.internal) if (W.internal)
continue continue
if (W.current_stage <= W.max_bleeding_stage) if (W.current_stage <= W.max_bleeding_stage)
user.visible_message( "\blue [user] cleans [W.desc] on [M]'s [affecting.name] and seals edges with bioglue.", \ user.visible_message("<span class='notice'>\The [user] cleans [W.desc] on [M]'s [affecting.name] and seals the edges with bioglue.</span>", \
"\blue You clean and seal [W.desc] on [M]'s [affecting.name]." ) "<span class='notice'>You clean and seal [W.desc] on [M]'s [affecting.name].</span>" )
//H.add_side_effect("Itch") //H.add_side_effect("Itch")
else if (istype(W,/datum/wound/bruise)) else if (istype(W,/datum/wound/bruise))
user.visible_message( "\blue [user] places medicine patch over [W.desc] on [M]'s [affecting.name].", \ user.visible_message("<span class='notice'>\The [user] places a medical patch over [W.desc] on [M]'s [affecting.name].</span>", \
"\blue You place medicine patch over [W.desc] on [M]'s [affecting.name]." ) "<span class='notice'>You place a medical patch over [W.desc] on [M]'s [affecting.name].</span>" )
else else
user.visible_message( "\blue [user] smears some bioglue over [W.desc] on [M]'s [affecting.name].", \ user.visible_message("<span class='notice'>\The [user] smears some bioglue over [W.desc] on [M]'s [affecting.name].</span>", \
"\blue You smear some bioglue over [W.desc] on [M]'s [affecting.name]." ) "<span class='notice'>You smear some bioglue over [W.desc] on [M]'s [affecting.name].</span>" )
if (bandaged) if (bandaged)
affecting.heal_damage(heal_brute,0) affecting.heal_damage(heal_brute,0)
use(1) use(1)

View File

@@ -223,10 +223,10 @@
*/ */
//attempts to transfer amount to S, and returns the amount actually transferred //attempts to transfer amount to S, and returns the amount actually transferred
/obj/item/stack/proc/transfer_to(obj/item/stack/S, var/tamount=null) /obj/item/stack/proc/transfer_to(obj/item/stack/S, var/tamount=null, var/type_verified)
if (!get_amount()) if (!get_amount())
return 0 return 0
if (stacktype != S.stacktype) if ((stacktype != S.stacktype) && !type_verified)
return 0 return 0
if (isnull(tamount)) if (isnull(tamount))
tamount = src.get_amount() tamount = src.get_amount()
@@ -240,7 +240,6 @@
transfer_fingerprints_to(S) transfer_fingerprints_to(S)
if(blood_DNA) if(blood_DNA)
S.blood_DNA |= blood_DNA S.blood_DNA |= blood_DNA
//todo bloody overlay
return transfer return transfer
return 0 return 0
@@ -314,10 +313,8 @@
return return
/obj/item/stack/attackby(obj/item/W as obj, mob/user as mob) /obj/item/stack/attackby(obj/item/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/stack)) if (istype(W, /obj/item/stack))
var/obj/item/stack/S = W var/obj/item/stack/S = W
if (user.get_inactive_hand()==src) if (user.get_inactive_hand()==src)
src.transfer_to(S, 1) src.transfer_to(S, 1)
else else
@@ -328,7 +325,8 @@
S.interact(usr) S.interact(usr)
if (src && usr.machine==src) if (src && usr.machine==src)
src.interact(usr) src.interact(usr)
else return ..() else
return ..()
/* /*
* Recipe datum * Recipe datum

View File

@@ -76,32 +76,27 @@ var/global/list/ashtray_cache = list()
health = max(0,health - W.force) health = max(0,health - W.force)
user << "You hit [src] with [W]." user << "You hit [src] with [W]."
if (health < 1) if (health < 1)
die() shatter()
return return
/obj/item/weapon/material/ashtray/throw_impact(atom/hit_atom) /obj/item/weapon/material/ashtray/throw_impact(atom/hit_atom)
if (health > 0) if (health > 0)
health = max(0,health - 3) health = max(0,health - 3)
if (health < 1)
die()
return
if (contents.len) if (contents.len)
src.visible_message("<span class='danger'>\The [src] slams into [hit_atom], spilling its contents!</span>") src.visible_message("<span class='danger'>\The [src] slams into [hit_atom], spilling its contents!</span>")
for (var/obj/item/clothing/mask/smokable/cigarette/O in contents) for (var/obj/item/clothing/mask/smokable/cigarette/O in contents)
O.loc = src.loc O.loc = src.loc
if (health < 1)
shatter()
return
update_icon() update_icon()
return ..() return ..()
/obj/item/weapon/material/ashtray/proc/die()
material.place_shard(get_turf(src))
qdel(src)
return
/obj/item/weapon/material/ashtray/plastic/New(var/newloc) /obj/item/weapon/material/ashtray/plastic/New(var/newloc)
..(newloc, "plastic") ..(newloc, "plastic")
/obj/item/weapon/material/ashtray/bronze/New(var/newloc) /obj/item/weapon/material/ashtray/bronze/New(var/newloc)
..(newloc, "gold") //placeholder ..(newloc, "bronze")
/obj/item/weapon/material/ashtray/glass/New(var/newloc) /obj/item/weapon/material/ashtray/glass/New(var/newloc)
..(newloc, "glass") ..(newloc, "glass")

View File

@@ -72,7 +72,7 @@
var/mob/living/M = loc var/mob/living/M = loc
M.drop_from_inventory(src) M.drop_from_inventory(src)
playsound(src, "shatter", 70, 1) playsound(src, "shatter", 70, 1)
new material.shard_type(T) material.place_shard(T)
qdel(src) qdel(src)
/obj/item/weapon/material/process() /obj/item/weapon/material/process()
@@ -82,18 +82,12 @@
L.apply_effect(round(material.radioactivity/3),IRRADIATE,0) L.apply_effect(round(material.radioactivity/3),IRRADIATE,0)
/obj/item/weapon/material/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) /obj/item/weapon/material/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > material.ignition_point) TemperatureAct(exposed_temperature)
TemperatureAct(exposed_temperature)
// This might need adjustment. Will work that out later. // This might need adjustment. Will work that out later.
/obj/item/weapon/material/proc/TemperatureAct(temperature) /obj/item/weapon/material/proc/TemperatureAct(temperature)
if(temperature > material.ignition_point) health -= material.combustion_effect(get_turf(src), temperature, 0.1)
for(var/turf/simulated/floor/target_tile in range(2,loc)) check_health()
var/phoronToDeduce = temperature/30
target_tile.assume_gas("phoron", phoronToDeduce, 200+T0C)
spawn (0) target_tile.hotspot_expose(temperature, 400)
health -= phoronToDeduce/100
check_health()
/obj/item/weapon/material/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/item/weapon/material/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/weldingtool)) if(istype(W,/obj/item/weapon/weldingtool))

View File

@@ -56,7 +56,7 @@
new /obj/item/clothing/mask/breath( src ) new /obj/item/clothing/mask/breath( src )
new /obj/item/weapon/tank/emergency_oxygen( src ) new /obj/item/weapon/tank/emergency_oxygen( src )
/obj/item/weapon/storage/box/survival/vox/ /obj/item/weapon/storage/box/vox/
New() New()
..() ..()
new /obj/item/clothing/mask/breath( src ) new /obj/item/clothing/mask/breath( src )
@@ -639,4 +639,4 @@
max_w_class = 3 max_w_class = 3
can_hold = list(/obj/item/organ, /obj/item/weapon/reagent_containers/food, /obj/item/weapon/reagent_containers/glass) can_hold = list(/obj/item/organ, /obj/item/weapon/reagent_containers/food, /obj/item/weapon/reagent_containers/glass)
max_storage_space = 21 max_storage_space = 21
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try use_to_pickup = 1 // for picking up broken bulbs, not that most people will try

View File

@@ -11,7 +11,7 @@
if("stealth") if("stealth")
new /obj/item/weapon/gun/energy/crossbow(src) new /obj/item/weapon/gun/energy/crossbow(src)
new /obj/item/weapon/pen/paralysis(src) new /obj/item/weapon/pen/reagent/paralysis(src)
new /obj/item/device/chameleon(src) new /obj/item/device/chameleon(src)
return return

View File

@@ -73,7 +73,7 @@
else if(istype(W, /obj/item/weapon/screwdriver)) else if(istype(W, /obj/item/weapon/screwdriver))
if(bcell) if(bcell)
bcell.updateicon() bcell.update_icon()
bcell.loc = get_turf(src.loc) bcell.loc = get_turf(src.loc)
bcell = null bcell = null
user << "<span class='notice'>You remove the cell from the [src].</span>" user << "<span class='notice'>You remove the cell from the [src].</span>"

View File

@@ -61,7 +61,7 @@
matter = list(DEFAULT_WALL_MATERIAL = 15000, "glass" = 10000) matter = list(DEFAULT_WALL_MATERIAL = 15000, "glass" = 10000)
flags = CONDUCT flags = CONDUCT
force = 15.0 force = 15.0
w_class = 2.0 w_class = 3
origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1)
attack_verb = list("drilled") attack_verb = list("drilled")
@@ -82,7 +82,7 @@
force = 10.0 force = 10.0
sharp = 1 sharp = 1
edge = 1 edge = 1
w_class = 2.0 w_class = 1
throwforce = 5.0 throwforce = 5.0
throw_speed = 3 throw_speed = 3
throw_range = 5 throw_range = 5
@@ -136,7 +136,7 @@
hitsound = 'sound/weapons/circsawhit.ogg' hitsound = 'sound/weapons/circsawhit.ogg'
flags = CONDUCT flags = CONDUCT
force = 15.0 force = 15.0
w_class = 2.0 w_class = 3
throwforce = 9.0 throwforce = 9.0
throw_speed = 3 throw_speed = 3
throw_range = 5 throw_range = 5

View File

@@ -11,7 +11,7 @@
var/on = 0.0 var/on = 0.0
var/stabilization_on = 0 var/stabilization_on = 0
var/volume_rate = 500 //Needed for borg jetpack transfer var/volume_rate = 500 //Needed for borg jetpack transfer
icon_action_button = "action_jetpack" action_button_name = "Toggle Jetpack"
/obj/item/weapon/tank/jetpack/New() /obj/item/weapon/tank/jetpack/New()
..() ..()

View File

@@ -24,8 +24,8 @@
force = 5.0 force = 5.0
throwforce = 7.0 throwforce = 7.0
w_class = 2.0 w_class = 2.0
origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINERING = 1) origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINERING = 1)
matter = list(DEFAULT_WALL_MATERIAL = 150) matter = list(DEFAULT_WALL_MATERIAL = 150)
attack_verb = list("bashed", "battered", "bludgeoned", "whacked") attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
@@ -103,8 +103,8 @@
throw_speed = 2 throw_speed = 2
throw_range = 9 throw_range = 9
w_class = 2.0 w_class = 2.0
origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINERING = 1) origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINERING = 1)
matter = list(DEFAULT_WALL_MATERIAL = 80) matter = list(DEFAULT_WALL_MATERIAL = 80)
attack_verb = list("pinched", "nipped") attack_verb = list("pinched", "nipped")
sharp = 1 sharp = 1
edge = 1 edge = 1
@@ -366,22 +366,22 @@
/obj/item/weapon/weldingtool/largetank /obj/item/weapon/weldingtool/largetank
name = "industrial welding tool" name = "industrial welding tool"
max_fuel = 40 max_fuel = 40
origin_tech = list(TECH_ENGINERING = 2) origin_tech = list(TECH_ENGINERING = 2)
matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 60) matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 60)
/obj/item/weapon/weldingtool/hugetank /obj/item/weapon/weldingtool/hugetank
name = "upgraded welding tool" name = "upgraded welding tool"
max_fuel = 80 max_fuel = 80
w_class = 3.0 w_class = 3.0
origin_tech = list(TECH_ENGINERING = 3) origin_tech = list(TECH_ENGINERING = 3)
matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120) matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120)
/obj/item/weapon/weldingtool/experimental /obj/item/weapon/weldingtool/experimental
name = "experimental welding tool" name = "experimental welding tool"
max_fuel = 40 max_fuel = 40
w_class = 3.0 w_class = 3.0
origin_tech = list(TECH_ENGINERING = 4, TECH_PHORON = 3) origin_tech = list(TECH_ENGINERING = 4, TECH_PHORON = 3)
matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120) matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120)
var/last_gen = 0 var/last_gen = 0
@@ -407,8 +407,8 @@
throwforce = 7.0 throwforce = 7.0
item_state = "crowbar" item_state = "crowbar"
w_class = 2.0 w_class = 2.0
origin_tech = list(TECH_ENGINERING = 1) origin_tech = list(TECH_ENGINERING = 1)
matter = list(DEFAULT_WALL_MATERIAL = 50) matter = list(DEFAULT_WALL_MATERIAL = 50)
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked") attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
/obj/item/weapon/crowbar/red /obj/item/weapon/crowbar/red
@@ -416,11 +416,11 @@
icon_state = "red_crowbar" icon_state = "red_crowbar"
item_state = "crowbar_red" item_state = "crowbar_red"
/obj/item/weapon/weldingtool/attack(mob/M as mob, mob/user as mob) /obj/item/weapon/weldingtool/afterattack(var/mob/M, var/mob/user)
if(hasorgans(M)) if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/S = M:organs_by_name[user.zone_sel.selecting] var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting]
if (!S) return if (!S) return
if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP) if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP)
@@ -429,12 +429,12 @@
if(S.brute_dam) if(S.brute_dam)
if(S.brute_dam < ROBOLIMB_SELF_REPAIR_CAP) if(S.brute_dam < ROBOLIMB_SELF_REPAIR_CAP)
S.heal_damage(15,0,0,1) S.heal_damage(15,0,0,1)
user.visible_message("\red \The [user] patches some dents on \the [M]'s [S.name] with \the [src].") user.visible_message("<span class='notice'>\The [user] patches some dents on \the [M]'s [S.name] with \the [src].</span>")
else else if(S.open != 2)
user << "\red The damage is far too severe to patch over externally." user << "<span class='danger'>The damage is far too severe to patch over externally.</span>"
return return 1
else else if(S.open != 2)
user << "Nothing to fix!" user << "<span class='notice'>Nothing to fix!</span>"
else else
return ..() return ..()

View File

@@ -174,9 +174,9 @@
else if(istype(W, /obj/item/weapon/wrench) && state == 0) else if(istype(W, /obj/item/weapon/wrench) && state == 0)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
if(anchored) if(anchored)
user.visible_message("[user] unsecures the airlock assembly from the floor.", "You start to unsecure the airlock assembly from the floor.") user.visible_message("[user] begins unsecuring the airlock assembly from the floor.", "You starts unsecuring the airlock assembly from the floor.")
else else
user.visible_message("[user] secures the airlock assembly to the floor.", "You start to secure the airlock assembly to the floor.") user.visible_message("[user] begins securing the airlock assembly to the floor.", "You starts securing the airlock assembly to the floor.")
if(do_after(user, 40)) if(do_after(user, 40))
if(!src) return if(!src) return
@@ -225,7 +225,7 @@
return return
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove the electronics from the airlock assembly.") user.visible_message("\The [user] starts removing the electronics from the airlock assembly.", "You start removing the electronics from the airlock assembly.")
if(do_after(user, 40)) if(do_after(user, 40))
if(!src) return if(!src) return

View File

@@ -21,7 +21,7 @@
if(notices < 5) if(notices < 5)
O.add_fingerprint(user) O.add_fingerprint(user)
add_fingerprint(user) add_fingerprint(user)
user.drop_item() user.drop_from_inventory(O)
O.loc = src O.loc = src
notices++ notices++
icon_state = "nboard0[notices]" //update sprite icon_state = "nboard0[notices]" //update sprite
@@ -29,13 +29,22 @@
else else
user << "<span class='notice'>You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached.</span>" user << "<span class='notice'>You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached.</span>"
/obj/structure/noticeboard/attack_hand(user as mob) /obj/structure/noticeboard/attack_hand(var/mob/user)
var/dat = "<B>Noticeboard</B><BR>" examine(user)
for(var/obj/item/weapon/paper/P in src)
dat += "<A href='?src=\ref[src];read=\ref[P]'>[P.name]</A> <A href='?src=\ref[src];write=\ref[P]'>Write</A> <A href='?src=\ref[src];remove=\ref[P]'>Remove</A><BR>"
user << browse("<HEAD><TITLE>Notices</TITLE></HEAD>[dat]","window=noticeboard")
onclose(user, "noticeboard")
// Since Topic() never seems to interact with usr on more than a superficial
// level, it should be fine to let anyone mess with the board other than ghosts.
/obj/structure/noticeboard/examine(var/mob/user)
if(!user)
user = usr
if(user.Adjacent(src))
var/dat = "<B>Noticeboard</B><BR>"
for(var/obj/item/weapon/paper/P in src)
dat += "<A href='?src=\ref[src];read=\ref[P]'>[P.name]</A> <A href='?src=\ref[src];write=\ref[P]'>Write</A> <A href='?src=\ref[src];remove=\ref[P]'>Remove</A><BR>"
user << browse("<HEAD><TITLE>Notices</TITLE></HEAD>[dat]","window=noticeboard")
onclose(user, "noticeboard")
else
..()
/obj/structure/noticeboard/Topic(href, href_list) /obj/structure/noticeboard/Topic(href, href_list)
..() ..()
@@ -44,18 +53,16 @@
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
return return
var/obj/item/P = locate(href_list["remove"]) var/obj/item/P = locate(href_list["remove"])
if((P && P.loc == src)) if(P && P.loc == src)
P.loc = get_turf(src) //dump paper on the floor because you're a clumsy fuck P.loc = get_turf(src) //dump paper on the floor because you're a clumsy fuck
P.add_fingerprint(usr) P.add_fingerprint(usr)
add_fingerprint(usr) add_fingerprint(usr)
notices-- notices--
icon_state = "nboard0[notices]" icon_state = "nboard0[notices]"
if(href_list["write"]) if(href_list["write"])
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
return return
var/obj/item/P = locate(href_list["write"]) var/obj/item/P = locate(href_list["write"])
if((P && P.loc == src)) //ifthe paper's on the board if((P && P.loc == src)) //ifthe paper's on the board
if(istype(usr.r_hand, /obj/item/weapon/pen)) //and you're holding a pen if(istype(usr.r_hand, /obj/item/weapon/pen)) //and you're holding a pen
add_fingerprint(usr) add_fingerprint(usr)
@@ -66,14 +73,9 @@
P.attackby(usr.l_hand, usr) P.attackby(usr.l_hand, usr)
else else
usr << "<span class='notice'>You'll need something to write with!</span>" usr << "<span class='notice'>You'll need something to write with!</span>"
if(href_list["read"]) if(href_list["read"])
var/obj/item/weapon/paper/P = locate(href_list["read"]) var/obj/item/weapon/paper/P = locate(href_list["read"])
if((P && P.loc == src)) if((P && P.loc == src))
if(!( istype(usr, /mob/living/carbon/human) )) usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY><TT>[P.info]</TT></BODY></HTML>", "window=[P.name]")
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY><TT>[stars(P.info)]</TT></BODY></HTML>", "window=[P.name]") onclose(usr, "[P.name]")
onclose(usr, "[P.name]")
else
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY><TT>[P.info]</TT></BODY></HTML>", "window=[P.name]")
onclose(usr, "[P.name]")
return return

View File

@@ -13,17 +13,11 @@
var/oreAmount = 7 var/oreAmount = 7
/obj/structure/simple_door/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) /obj/structure/simple_door/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > material.ignition_point) TemperatureAct(exposed_temperature)
TemperatureAct(exposed_temperature)
/obj/structure/simple_door/proc/TemperatureAct(temperature) /obj/structure/simple_door/proc/TemperatureAct(temperature)
if(temperature > material.ignition_point) hardness -= material.combustion_effect(get_turf(src),temperature, 0.3)
for(var/turf/simulated/floor/target_tile in range(2,loc)) CheckHardness()
var/phoronToDeduce = temperature/10
target_tile.assume_gas("phoron", phoronToDeduce, 200+T0C)
spawn (0) target_tile.hotspot_expose(temperature, 400)
hardness -= phoronToDeduce/100
CheckHardness()
/obj/structure/simple_door/New(var/newloc, var/material_name) /obj/structure/simple_door/New(var/newloc, var/material_name)
..() ..()

View File

@@ -8,6 +8,9 @@
icon_state = "nest" icon_state = "nest"
var/health = 100 var/health = 100
/obj/structure/bed/nest/update_icon()
return
/obj/structure/bed/nest/user_unbuckle_mob(mob/user as mob) /obj/structure/bed/nest/user_unbuckle_mob(mob/user as mob)
if(buckled_mob) if(buckled_mob)
if(buckled_mob.buckled == src) if(buckled_mob.buckled == src)

View File

@@ -10,28 +10,56 @@
/obj/structure/bed /obj/structure/bed
name = "bed" name = "bed"
desc = "This is used to lie in, sleep in or strap on." desc = "This is used to lie in, sleep in or strap on."
icon = 'icons/obj/objects.dmi' icon = 'icons/obj/furniture.dmi'
icon_state = "bed" icon_state = "bed"
pressure_resistance = 15 pressure_resistance = 15
anchored = 1 anchored = 1
can_buckle = 1 can_buckle = 1
buckle_lying = 1 buckle_lying = 1
var/material/material var/material/material
var/apply_cosmetics = 1 var/material/padding_material
var/base_icon = "bed"
/obj/structure/bed/New(var/newloc, var/new_material) /obj/structure/bed/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc) ..(newloc)
if(!new_material) if(!new_material)
new_material = DEFAULT_WALL_MATERIAL new_material = DEFAULT_WALL_MATERIAL
material = get_material_by_name(new_material) material = get_material_by_name(new_material)
if(!istype(material)) if(!istype(material))
qdel(src) qdel(src)
return return
if(apply_cosmetics) if(new_padding_material)
color = material.icon_colour padding_material = get_material_by_name(new_padding_material)
update_icon()
// Reuse the cache/code from stools, todo maybe unify.
/obj/structure/bed/update_icon()
// Prep icon.
icon_state = ""
overlays.Cut()
// Base icon.
var/cache_key = "[base_icon]-[material.name]"
if(isnull(stool_cache[cache_key]))
var/image/I = image('icons/obj/furniture.dmi', base_icon)
I.color = material.icon_colour
stool_cache[cache_key] = I
overlays |= stool_cache[cache_key]
// Padding overlay.
if(padding_material)
var/padding_cache_key = "[base_icon]-padding-[padding_material.name]"
if(isnull(stool_cache[padding_cache_key]))
var/image/I = image(icon, "[base_icon]_padding")
I.color = padding_material.icon_colour
stool_cache[padding_cache_key] = I
overlays |= stool_cache[padding_cache_key]
// Strings.
desc = initial(desc)
if(padding_material)
name = "[padding_material.display_name] [initial(name)]" //this is not perfect but it will do for now.
desc += " It's made of [material.use_name] and covered with [padding_material.use_name]."
else
name = "[material.display_name] [initial(name)]" name = "[material.display_name] [initial(name)]"
desc = "[initial(desc)] It's made of [material.display_name]." desc += " It's made of [material.use_name]."
/obj/structure/bed/ex_act(severity) /obj/structure/bed/ex_act(severity)
switch(severity) switch(severity)
@@ -55,8 +83,43 @@
/obj/structure/bed/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/structure/bed/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench)) if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
material.place_sheet(get_turf(src)) dismantle()
qdel(src) qdel(src)
else if(istype(W,/obj/item/stack))
if(padding_material)
user << "\The [src] is already padded."
return
var/obj/item/stack/C = W
if(C.get_amount() < 1) // How??
user.drop_from_inventory(C)
qdel(C)
return
var/padding_type //This is awful but it needs to be like this until tiles are given a material var.
if(istype(W,/obj/item/stack/tile/carpet))
padding_type = "carpet"
else if(istype(W,/obj/item/stack/material))
var/obj/item/stack/material/M = W
if(M.material && (M.material.flags & MATERIAL_PADDING))
padding_type = "[M.material.name]"
if(!padding_type)
user << "You cannot pad \the [src] with that."
return
C.use(1)
if(!istype(src.loc, /turf))
user.drop_from_inventory(src)
src.loc = get_turf(src)
user << "You add padding to \the [src]."
add_padding(padding_type)
return
else if (istype(W, /obj/item/weapon/wirecutters))
if(!padding_material)
user << "\The [src] has no padding to remove."
return
user << "You remove the padding from \the [src]."
playsound(src, 'sound/items/Wirecutter.ogg', 100, 1)
remove_padding()
else if(istype(W, /obj/item/weapon/grab)) else if(istype(W, /obj/item/weapon/grab))
user.visible_message("<span class='notice'>[user] attempts to buckle [W:affecting] into \the [src]!</span>") user.visible_message("<span class='notice'>[user] attempts to buckle [W:affecting] into \the [src]!</span>")
if(do_after(user, 20)) if(do_after(user, 20))
@@ -69,21 +132,36 @@
else else
..() ..()
/obj/structure/bed/proc/remove_padding()
if(padding_material)
padding_material.place_sheet(get_turf(src))
padding_material = null
update_icon()
/obj/structure/bed/proc/add_padding(var/padding_type)
padding_material = get_material_by_name(padding_type)
update_icon()
/obj/structure/bed/proc/dismantle()
material.place_sheet(get_turf(src))
if(padding_material)
padding_material.place_sheet(get_turf(src))
/obj/structure/bed/psych /obj/structure/bed/psych
name = "psychiatrist's couch" name = "psychiatrist's couch"
desc = "For prime comfort during psychiatric evaluations." desc = "For prime comfort during psychiatric evaluations."
icon_state = "psychbed" icon_state = "psychbed"
apply_cosmetics = 0 base_icon = "psychbed"
/obj/structure/bed/psych/New(var/newloc) /obj/structure/bed/psych/New(var/newloc)
..(newloc,"leather") ..(newloc,"wood","leather")
/obj/structure/bed/padded/New(var/newloc)
..(newloc,"plastic","cotton")
/obj/structure/bed/alien /obj/structure/bed/alien
name = "resting contraption" name = "resting contraption"
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?" desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
icon_state = "abed"
apply_cosmetics = 0
/obj/structure/bed/alien/New(var/newloc) /obj/structure/bed/alien/New(var/newloc)
..(newloc,"resin") ..(newloc,"resin")
@@ -96,10 +174,14 @@
icon = 'icons/obj/rollerbed.dmi' icon = 'icons/obj/rollerbed.dmi'
icon_state = "down" icon_state = "down"
anchored = 0 anchored = 0
apply_cosmetics = 0
/obj/structure/bed/roller/update_icon()
return // Doesn't care about material or anything else.
/obj/structure/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/structure/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/roller_holder)) if(istype(W, /obj/item/weapon/wrench) || istype(W,/obj/item/stack) || istype(W, /obj/item/weapon/wirecutters))
return
else if(istype(W,/obj/item/roller_holder))
if(buckled_mob) if(buckled_mob)
user_unbuckle_mob(user) user_unbuckle_mob(user)
else else

View File

@@ -1,22 +1,23 @@
/obj/structure/bed/chair //YES, chairs are a type of bed, which are a type of stool. This works, believe me. -Pete /obj/structure/bed/chair //YES, chairs are a type of bed, which are a type of stool. This works, believe me. -Pete
name = "chair" name = "chair"
desc = "You sit in this. Either by will or force." desc = "You sit in this. Either by will or force."
icon_state = "chair" icon_state = "chair_preview"
base_icon = "chair"
buckle_lying = 0 //force people to sit up in chairs when buckled buckle_lying = 0 //force people to sit up in chairs when buckled
var/propelled = 0 // Check for fire-extinguisher-driven chairs var/propelled = 0 // Check for fire-extinguisher-driven chairs
/obj/structure/bed/chair/New(var/newloc, var/material) /obj/structure/bed/chair/New()
..(newloc, material) //Todo make metal/stone chairs display as thrones ..() //Todo make metal/stone chairs display as thrones
spawn(3) //sorry. i don't think there's a better way to do this. spawn(3) //sorry. i don't think there's a better way to do this.
update_layer() update_layer()
return return
/obj/structure/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/structure/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
..() ..()
if(istype(W, /obj/item/assembly/shock_kit)) if(!padding_material && istype(W, /obj/item/assembly/shock_kit))
var/obj/item/assembly/shock_kit/SK = W var/obj/item/assembly/shock_kit/SK = W
if(!SK.status) if(!SK.status)
user << "<span class='notice'>[SK] is not ready to be attached!</span>" user << "<span class='notice'>\The [SK] is not ready to be attached!</span>"
return return
user.drop_item() user.drop_item()
var/obj/structure/bed/chair/e_chair/E = new (src.loc, material.name) var/obj/structure/bed/chair/e_chair/E = new (src.loc, material.name)
@@ -34,6 +35,20 @@
rotate() rotate()
return return
/obj/structure/bed/chair/post_buckle_mob()
update_icon()
/obj/structure/bed/chair/update_icon()
..()
if(buckled_mob && padding_material)
var/cache_key = "[base_icon]-armrest-[padding_material.name]"
if(isnull(stool_cache[cache_key]))
var/image/I = image(icon, "[base_icon]_armrest")
I.layer = MOB_LAYER + 0.1
I.color = padding_material.icon_colour
stool_cache[cache_key] = I
overlays |= stool_cache[cache_key]
/obj/structure/bed/chair/proc/update_layer() /obj/structure/bed/chair/proc/update_layer()
if(src.dir == NORTH) if(src.dir == NORTH)
src.layer = FLY_LAYER src.layer = FLY_LAYER
@@ -65,70 +80,49 @@
src.set_dir(turn(src.dir, 90)) src.set_dir(turn(src.dir, 90))
return return
// Chair types // Leaving this in for the sake of compilation.
/obj/structure/bed/chair/wood
icon_state = "wooden_chair"
name = "wooden chair"
desc = "Old is never too old to not be in fashion."
apply_cosmetics = 0
/obj/structure/bed/chair/wood/New(var/newloc)
..(newloc, "wood")
/obj/structure/bed/chair/wood/wings
icon_state = "wooden_chair_wings"
/obj/structure/bed/chair/comfy /obj/structure/bed/chair/comfy
name = "comfy chair" desc = "It's a chair. It looks comfy."
desc = "It looks comfy." icon_state = "comfychair_preview"
icon_state = "comfychair"
color = rgb(255,255,255)
var/image/armrest = null
apply_cosmetics = 0
/obj/structure/bed/chair/comfy/New() /obj/structure/bed/chair/comfy/brown/New(var/newloc,var/newmaterial)
armrest = image("icons/obj/objects.dmi", "comfychair_armrest") ..(newloc,"steel","leather")
armrest.layer = MOB_LAYER + 0.1
return ..() /obj/structure/bed/chair/comfy/red/New(var/newloc,var/newmaterial)
..(newloc,"steel","carpet")
/obj/structure/bed/chair/comfy/post_buckle_mob() /obj/structure/bed/chair/comfy/teal/New(var/newloc,var/newmaterial)
if(buckled_mob) ..(newloc,"steel","teal")
overlays += armrest
else
overlays -= armrest
/obj/structure/bed/chair/comfy/brown /obj/structure/bed/chair/comfy/black/New(var/newloc,var/newmaterial)
color = rgb(141,70,0) ..(newloc,"steel","black")
/obj/structure/bed/chair/comfy/red /obj/structure/bed/chair/comfy/green/New(var/newloc,var/newmaterial)
color = rgb(218,2,10) ..(newloc,"steel","green")
/obj/structure/bed/chair/comfy/teal /obj/structure/bed/chair/comfy/purp/New(var/newloc,var/newmaterial)
color = rgb(0,234,250) ..(newloc,"steel","purple")
/obj/structure/bed/chair/comfy/black /obj/structure/bed/chair/comfy/blue/New(var/newloc,var/newmaterial)
color = rgb(60,60,60) ..(newloc,"steel","blue")
/obj/structure/bed/chair/comfy/green /obj/structure/bed/chair/comfy/beige/New(var/newloc,var/newmaterial)
color = rgb(1,196,8) ..(newloc,"steel","beige")
/obj/structure/bed/chair/comfy/purp /obj/structure/bed/chair/comfy/lime/New(var/newloc,var/newmaterial)
color = rgb(112,2,176) ..(newloc,"steel","lime")
/obj/structure/bed/chair/comfy/blue
color = rgb(2,9,210)
/obj/structure/bed/chair/comfy/beige
color = rgb(255,253,195)
/obj/structure/bed/chair/office /obj/structure/bed/chair/office
anchored = 0 anchored = 0
buckle_movable = 1 buckle_movable = 1
apply_cosmetics = 0
/obj/structure/bed/chair/comfy/lime /obj/structure/bed/chair/office/update_icon()
color = rgb(255,251,0) return
/obj/structure/bed/chair/office/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/stack) || istype(W, /obj/item/weapon/wirecutters))
return
..()
/obj/structure/bed/chair/office/Move() /obj/structure/bed/chair/office/Move()
..() ..()
@@ -175,3 +169,23 @@
/obj/structure/bed/chair/office/dark /obj/structure/bed/chair/office/dark
icon_state = "officechair_dark" icon_state = "officechair_dark"
// Chair types
/obj/structure/bed/chair/wood
name = "wooden chair"
desc = "Old is never too old to not be in fashion."
icon_state = "wooden_chair"
/obj/structure/bed/chair/wood/update_icon()
return
/obj/structure/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/stack) || istype(W, /obj/item/weapon/wirecutters))
return
..()
/obj/structure/bed/chair/wood/New(var/newloc)
..(newloc, "wood")
/obj/structure/bed/chair/wood/wings
icon_state = "wooden_chair_wings"

View File

@@ -4,7 +4,7 @@ var/global/list/stool_cache = list() //haha stool
/obj/item/weapon/stool /obj/item/weapon/stool
name = "stool" name = "stool"
desc = "Apply butt." desc = "Apply butt."
icon = 'icons/obj/objects.dmi' icon = 'icons/obj/furniture.dmi'
icon_state = "stool_preview" //set for the map icon_state = "stool_preview" //set for the map
force = 10 force = 10
throwforce = 10 throwforce = 10
@@ -30,17 +30,16 @@ var/global/list/stool_cache = list() //haha stool
update_icon() update_icon()
/obj/item/weapon/stool/padded/New(var/newloc, var/new_material) /obj/item/weapon/stool/padded/New(var/newloc, var/new_material)
..(newloc, "steel", "leather") ..(newloc, "steel", "carpet")
/obj/item/weapon/stool/update_icon() /obj/item/weapon/stool/update_icon()
// Prep icon. // Prep icon.
icon_state = "stool" icon_state = ""
overlays.Cut() overlays.Cut()
// Base icon. // Base icon.
var/cache_key = "stool-[material.name]" var/cache_key = "stool-[material.name]"
if(isnull(stool_cache[cache_key])) if(isnull(stool_cache[cache_key]))
var/image/I = image('icons/obj/objects.dmi', base_icon) var/image/I = image(icon, base_icon)
color = material.icon_colour
I.color = material.icon_colour I.color = material.icon_colour
stool_cache[cache_key] = I stool_cache[cache_key] = I
overlays |= stool_cache[cache_key] overlays |= stool_cache[cache_key]
@@ -48,17 +47,17 @@ var/global/list/stool_cache = list() //haha stool
if(padding_material) if(padding_material)
var/padding_cache_key = "stool-padding-[padding_material.name]" var/padding_cache_key = "stool-padding-[padding_material.name]"
if(isnull(stool_cache[padding_cache_key])) if(isnull(stool_cache[padding_cache_key]))
var/image/I = image('icons/obj/objects.dmi', "stool_padding") var/image/I = image(icon, "stool_padding")
I.color = padding_material.icon_colour I.color = padding_material.icon_colour
stool_cache[padding_cache_key] = I stool_cache[padding_cache_key] = I
overlays |= stool_cache[padding_cache_key] overlays |= stool_cache[padding_cache_key]
// Strings. // Strings.
if(padding_material) if(padding_material)
name = "[padding_material.display_name] [initial(name)]" //this is not perfect but it will do for now. name = "[padding_material.display_name] [initial(name)]" //this is not perfect but it will do for now.
desc = "A padded stool. Apply butt. It's made of [material.display_name] and covered with [padding_material.display_name]." desc = "A padded stool. Apply butt. It's made of [material.use_name] and covered with [padding_material.use_name]."
else else
name = "[material.display_name] [initial(name)]" name = "[material.display_name] [initial(name)]"
desc = "A stool. Apply butt with care. It's made of [material.display_name]." desc = "A stool. Apply butt with care. It's made of [material.use_name]."
/obj/item/weapon/stool/proc/add_padding(var/padding_type) /obj/item/weapon/stool/proc/add_padding(var/padding_type)
padding_material = get_material_by_name(padding_type) padding_material = get_material_by_name(padding_type)
@@ -127,7 +126,7 @@ var/global/list/stool_cache = list() //haha stool
padding_type = "carpet" padding_type = "carpet"
else if(istype(W,/obj/item/stack/material)) else if(istype(W,/obj/item/stack/material))
var/obj/item/stack/material/M = W var/obj/item/stack/material/M = W
if(M.material && (M.material.name in list("leather", "cloth"))) if(M.material && (M.material.flags & MATERIAL_PADDING))
padding_type = "[M.material.name]" padding_type = "[M.material.name]"
if(!padding_type) if(!padding_type)
user << "You cannot pad \the [src] with that." user << "You cannot pad \the [src] with that."

View File

@@ -9,6 +9,8 @@
var/mob/living/pulling = null var/mob/living/pulling = null
var/bloodiness var/bloodiness
/obj/structure/bed/chair/wheelchair/update_icon()
return
/obj/structure/bed/chair/wheelchair/set_dir() /obj/structure/bed/chair/wheelchair/set_dir()
..() ..()
@@ -18,6 +20,11 @@
if(buckled_mob) if(buckled_mob)
buckled_mob.set_dir(dir) buckled_mob.set_dir(dir)
/obj/structure/bed/chair/wheelchair/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench) || istype(W,/obj/item/stack) || istype(W, /obj/item/weapon/wirecutters))
return
..()
/obj/structure/bed/chair/wheelchair/relaymove(mob/user, direction) /obj/structure/bed/chair/wheelchair/relaymove(mob/user, direction)
// Redundant check? // Redundant check?
if(user.stat || user.stunned || user.weakened || user.paralysis || user.lying || user.restrained()) if(user.stat || user.stunned || user.weakened || user.paralysis || user.lying || user.restrained())

View File

@@ -96,7 +96,7 @@
if(W) if(W)
radiate() radiate()
if(is_hot(W)) if(is_hot(W))
ignite(is_hot(W)) burn(is_hot(W))
if(locate(/obj/effect/overlay/wallrot) in src) if(locate(/obj/effect/overlay/wallrot) in src)
if(istype(W, /obj/item/weapon/weldingtool) ) if(istype(W, /obj/item/weapon/weldingtool) )

View File

@@ -2,18 +2,17 @@
icon_state = "rgeneric" icon_state = "rgeneric"
/turf/simulated/wall/r_wall/New(var/newloc) /turf/simulated/wall/r_wall/New(var/newloc)
..(newloc, DEFAULT_WALL_MATERIAL,"plasteel") //3strong ..(newloc, DEFAULT_WALL_MATERIAL,"plasteel") //3strong
/turf/simulated/wall/cult /turf/simulated/wall/cult
icon_state = "cult" icon_state = "cult"
/turf/simulated/wall/cult/New(var/newloc) /turf/simulated/wall/cult/New(var/newloc)
..(newloc,"cult","cult2") ..(newloc,"cult","cult2")
/turf/unsimulated/wall/cult /turf/unsimulated/wall/cult
name = "cult wall" name = "cult wall"
desc = "Hideous images dance beneath the surface." desc = "Hideous images dance beneath the surface."
icon = 'icons/turf/wall_masks.dmi' icon = 'icons/turf/wall_masks.dmi'
icon_state = "cult" icon_state = "cult"
/turf/simulated/wall/iron/New(var/newloc) /turf/simulated/wall/iron/New(var/newloc)
..(newloc,"iron") ..(newloc,"iron")
/turf/simulated/wall/uranium/New(var/newloc) /turf/simulated/wall/uranium/New(var/newloc)
@@ -28,7 +27,6 @@
..(newloc,"phoron") ..(newloc,"phoron")
/turf/simulated/wall/sandstone/New(var/newloc) /turf/simulated/wall/sandstone/New(var/newloc)
..(newloc,"sandstone") ..(newloc,"sandstone")
/turf/simulated/wall/ironphoron/New(var/newloc) /turf/simulated/wall/ironphoron/New(var/newloc)
..(newloc,"iron","phoron") ..(newloc,"iron","phoron")
/turf/simulated/wall/golddiamond/New(var/newloc) /turf/simulated/wall/golddiamond/New(var/newloc)
@@ -38,6 +36,8 @@
/turf/simulated/wall/sandstonediamond/New(var/newloc) /turf/simulated/wall/sandstonediamond/New(var/newloc)
..(newloc,"sandstone","diamond") ..(newloc,"sandstone","diamond")
// Kind of wondering if this is going to bite me in the butt.
/turf/simulated/wall/cult/New(var/newloc) /turf/simulated/wall/voxshuttle/New(var/newloc)
..(newloc,"cult","cult2") ..(newloc,"voxalloy")
/turf/simulated/wall/voxshuttle/attackby()
return

View File

@@ -46,9 +46,9 @@ var/list/global/wall_cache = list()
/turf/simulated/wall/bullet_act(var/obj/item/projectile/Proj) /turf/simulated/wall/bullet_act(var/obj/item/projectile/Proj)
if(istype(Proj,/obj/item/projectile/beam)) if(istype(Proj,/obj/item/projectile/beam))
ignite(2500) burn(2500)
else if(istype(Proj,/obj/item/projectile/ion)) else if(istype(Proj,/obj/item/projectile/ion))
ignite(500) burn(500)
// Tasers and stuff? No thanks. Also no clone or tox damage crap. // Tasers and stuff? No thanks. Also no clone or tox damage crap.
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN)) if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
@@ -143,10 +143,10 @@ var/list/global/wall_cache = list()
return return
/turf/simulated/wall/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)//Doesn't fucking work because walls don't interact with air :( /turf/simulated/wall/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)//Doesn't fucking work because walls don't interact with air :(
ignite(exposed_temperature) burn(exposed_temperature)
/turf/simulated/wall/adjacent_fire_act(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume) /turf/simulated/wall/adjacent_fire_act(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume)
ignite(adj_temp) burn(adj_temp)
if(adj_temp > material.melting_point) if(adj_temp > material.melting_point)
take_damage(log(RAND_F(0.9, 1.1) * (adj_temp - material.melting_point))) take_damage(log(RAND_F(0.9, 1.1) * (adj_temp - material.melting_point)))
@@ -253,22 +253,11 @@ var/list/global/wall_cache = list()
return total_radiation return total_radiation
/turf/simulated/wall/proc/burn(temperature) /turf/simulated/wall/proc/burn(temperature)
spawn(2) if(material.combustion_effect(src, temperature, 0.7))
new /obj/structure/girder(src) spawn(2)
src.ChangeTurf(/turf/simulated/floor) new /obj/structure/girder(src)
for(var/turf/simulated/floor/target_tile in range(0,src)) src.ChangeTurf(/turf/simulated/floor)
if(material == "phoron") //ergh for(var/turf/simulated/wall/W in range(3,src))
target_tile.assume_gas("phoron", 20, 400+T0C) W.burn((temperature/4))
spawn (0) target_tile.hotspot_expose(temperature, 400) for(var/obj/machinery/door/airlock/phoron/D in range(3,src))
for(var/turf/simulated/wall/W in range(3,src)) D.ignite(temperature/4)
W.ignite((temperature/4))
for(var/obj/machinery/door/airlock/phoron/D in range(3,src))
D.ignite(temperature/4)
/turf/simulated/wall/proc/ignite(var/exposed_temperature)
if(isnull(material.ignition_point))
return
if(exposed_temperature > material.ignition_point)//If the temperature of the object is over 300, then ignite
burn(exposed_temperature)
return
..()

View File

@@ -14,6 +14,7 @@
if(!istype(src, /turf/space/transit)) if(!istype(src, /turf/space/transit))
icon_state = "[((x + y) ^ ~(x * y) + z) % 25]" icon_state = "[((x + y) ^ ~(x * y) + z) % 25]"
update_starlight() update_starlight()
..()
/turf/space/proc/update_starlight() /turf/space/proc/update_starlight()
if(!config.starlight) if(!config.starlight)

View File

@@ -40,8 +40,13 @@
spawn( 0 ) spawn( 0 )
src.Entered(AM) src.Entered(AM)
return return
turfs |= src
return return
/turf/Destroy()
turfs -= src
..()
/turf/ex_act(severity) /turf/ex_act(severity)
return 0 return 0

View File

@@ -997,18 +997,18 @@ var/global/floorIsLava = 0
return 0 return 0
/datum/admins/proc/spawn_fruit() /datum/admins/proc/spawn_fruit(seedtype in plant_controller.seeds)
set category = "Debug" set category = "Debug"
set desc = "Spawn the product of a seed." set desc = "Spawn the product of a seed."
set name = "Spawn Fruit" set name = "Spawn Fruit"
if(!check_rights(R_SPAWN)) return if(!check_rights(R_SPAWN)) return
var/seedtype = input("Select a seed type", "Spawn Fruit") as null|anything in plant_controller.seeds
if(!seedtype || !plant_controller.seeds[seedtype]) if(!seedtype || !plant_controller.seeds[seedtype])
return return
var/datum/seed/S = plant_controller.seeds[seedtype] var/datum/seed/S = plant_controller.seeds[seedtype]
S.harvest(usr,0,0,1) S.harvest(usr,0,0,1)
log_admin("[key_name(usr)] spawned [seedtype] fruit at ([usr.x],[usr.y],[usr.z])")
/datum/admins/proc/spawn_custom_item() /datum/admins/proc/spawn_custom_item()
set category = "Debug" set category = "Debug"
@@ -1050,17 +1050,17 @@ var/global/floorIsLava = 0
for(var/datum/custom_item/item in current_items) for(var/datum/custom_item/item in current_items)
usr << "- name: [item.name] icon: [item.item_icon] path: [item.item_path] desc: [item.item_desc]" usr << "- name: [item.name] icon: [item.item_icon] path: [item.item_path] desc: [item.item_desc]"
/datum/admins/proc/spawn_plant() /datum/admins/proc/spawn_plant(seedtype in plant_controller.seeds)
set category = "Debug" set category = "Debug"
set desc = "Spawn a spreading plant effect." set desc = "Spawn a spreading plant effect."
set name = "Spawn Plant" set name = "Spawn Plant"
if(!check_rights(R_SPAWN)) return if(!check_rights(R_SPAWN)) return
var/seedtype = input("Select a seed type", "Spawn Plant") as null|anything in plant_controller.seeds
if(!seedtype || !plant_controller.seeds[seedtype]) if(!seedtype || !plant_controller.seeds[seedtype])
return return
new /obj/effect/plant(get_turf(usr), plant_controller.seeds[seedtype]) new /obj/effect/plant(get_turf(usr), plant_controller.seeds[seedtype])
log_admin("[key_name(usr)] spawned [seedtype] vines at ([usr.x],[usr.y],[usr.z])")
/datum/admins/proc/spawn_atom(var/object as text) /datum/admins/proc/spawn_atom(var/object as text)
set category = "Debug" set category = "Debug"

View File

@@ -123,7 +123,8 @@ var/list/admin_verbs_spawn = list(
/client/proc/FireLaser, /client/proc/FireLaser,
/client/proc/FireCannons, /client/proc/FireCannons,
/client/proc/ChangeIcarusPosition, /client/proc/ChangeIcarusPosition,
/client/proc/virus2_editor /client/proc/virus2_editor,
/client/proc/spawn_chemdisp_cartridge
) )
var/list/admin_verbs_server = list( var/list/admin_verbs_server = list(
/client/proc/Set_Holiday, /client/proc/Set_Holiday,

View File

@@ -2270,14 +2270,14 @@
if("hellonearth") if("hellonearth")
feedback_inc("admin_secrets_fun_used",1) feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","NS") feedback_add_details("admin_secrets_fun_used","NS")
var/choice = input("You sure you want to end the round and summon narsie at your location? Misuse of this could result in removal of flags or halarity.") in list("PRAISE SATAN", "Cancel") var/choice = input("You sure you want to end the round and summon narsie at your location? Misuse of this could result in removal of flags or hilarity.") in list("PRAISE SATAN", "Cancel")
if(choice == "PRAISE SATAN") if(choice == "PRAISE SATAN")
new /obj/singularity/narsie/large(get_turf(usr)) new /obj/singularity/narsie/large(get_turf(usr))
message_admins("[key_name_admin(usr)] has summoned narsie and brought about a new realm of suffering.") message_admins("[key_name_admin(usr)] has summoned narsie and brought about a new realm of suffering.")
if("supermattercascade") if("supermattercascade")
feedback_inc("admin_secrets_fun_used",1) feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","SC") feedback_add_details("admin_secrets_fun_used","SC")
var/choice = input("You sure you want to destroy the universe and create a large explosion at your location? Misuse of this could result in removal of flags or halarity.") in list("NO TIME TO EXPLAIN", "Cancel") var/choice = input("You sure you want to destroy the universe and create a large explosion at your location? Misuse of this could result in removal of flags or hilarity.") in list("NO TIME TO EXPLAIN", "Cancel")
if(choice == "NO TIME TO EXPLAIN") if(choice == "NO TIME TO EXPLAIN")
explosion(get_turf(usr), 8, 16, 24, 32, 1) explosion(get_turf(usr), 8, 16, 24, 32, 1)
new /turf/unsimulated/wall/supermatter(get_turf(usr)) new /turf/unsimulated/wall/supermatter(get_turf(usr))

View File

@@ -108,6 +108,7 @@
C << 'sound/effects/adminhelp.ogg' C << 'sound/effects/adminhelp.ogg'
log_admin("PM: [key_name(src)]->[key_name(C)]: [msg]") log_admin("PM: [key_name(src)]->[key_name(C)]: [msg]")
send2adminirc("Reply: [key_name(src)]->[key_name(C)]: [html_decode(msg)]")
//we don't use message_admins here because the sender/receiver might get it too //we don't use message_admins here because the sender/receiver might get it too
for(var/client/X in admins) for(var/client/X in admins)

View File

@@ -250,11 +250,6 @@ BLIND // can't see anything
var/brightness_on var/brightness_on
var/on = 0 var/on = 0
/obj/item/clothing/head/New()
..()
if(!icon_action_button && brightness_on)
icon_action_button = "[icon_state]"
/obj/item/clothing/head/attack_self(mob/user) /obj/item/clothing/head/attack_self(mob/user)
if(brightness_on) if(brightness_on)
if(!isturf(user.loc)) if(!isturf(user.loc))
@@ -382,19 +377,19 @@ BLIND // can't see anything
var/displays_id = 1 var/displays_id = 1
var/rolled_down = -1 //0 = unrolled, 1 = rolled, -1 = cannot be toggled var/rolled_down = -1 //0 = unrolled, 1 = rolled, -1 = cannot be toggled
sprite_sheets = list("Vox" = 'icons/mob/species/vox/uniform.dmi') sprite_sheets = list("Vox" = 'icons/mob/species/vox/uniform.dmi')
//convenience var for defining the icon state for the overlay used when the clothing is worn. //convenience var for defining the icon state for the overlay used when the clothing is worn.
//Also used by rolling/unrolling. //Also used by rolling/unrolling.
var/worn_state = null var/worn_state = null
/obj/item/clothing/under/New() /obj/item/clothing/under/New()
if(worn_state) if(worn_state)
if(!item_state_slots) if(!item_state_slots)
item_state_slots = list() item_state_slots = list()
item_state_slots[slot_w_uniform_str] = worn_state item_state_slots[slot_w_uniform_str] = worn_state
else else
worn_state = icon_state worn_state = icon_state
//autodetect rollability //autodetect rollability
if(rolled_down < 0) if(rolled_down < 0)
if((worn_state + "_d_s") in icon_states('icons/mob/uniform.dmi')) if((worn_state + "_d_s") in icon_states('icons/mob/uniform.dmi'))
@@ -458,10 +453,10 @@ BLIND // can't see anything
if (( usr.restrained() ) || ( usr.stat )) if (( usr.restrained() ) || ( usr.stat ))
return return
if (!usr.unEquip(src)) if (!usr.unEquip(src))
return return
switch(over_object.name) switch(over_object.name)
if("r_hand") if("r_hand")
usr.put_in_r_hand(src) usr.put_in_r_hand(src)
@@ -544,7 +539,7 @@ BLIND // can't see anything
if(rolled_down < 0) if(rolled_down < 0)
usr << "<span class='notice'>You cannot roll down [src]!</span>" usr << "<span class='notice'>You cannot roll down [src]!</span>"
return return
rolled_down = !rolled_down rolled_down = !rolled_down
if(rolled_down) if(rolled_down)
body_parts_covered &= LOWER_TORSO|LEGS|FEET body_parts_covered &= LOWER_TORSO|LEGS|FEET

View File

@@ -37,7 +37,7 @@
desc = "Used for seeing walls, floors, and stuff through anything." desc = "Used for seeing walls, floors, and stuff through anything."
icon_state = "meson" icon_state = "meson"
item_state = "glasses" item_state = "glasses"
icon_action_button = "action_meson" //This doesn't actually matter, the action button is generated from the current icon_state. But, this is the only way to get it to show up. action_button_name = "Toggle Goggles"
origin_tech = list(TECH_MAGNET = 2, TECH_ENGINERING = 2) origin_tech = list(TECH_MAGNET = 2, TECH_ENGINERING = 2)
toggleable = 1 toggleable = 1
vision_flags = SEE_TURFS vision_flags = SEE_TURFS
@@ -57,7 +57,6 @@
icon_state = "purple" icon_state = "purple"
item_state = "glasses" item_state = "glasses"
toggleable = 1 toggleable = 1
icon_action_button = "action_science"
/obj/item/clothing/glasses/science/New() /obj/item/clothing/glasses/science/New()
..() ..()
@@ -76,7 +75,6 @@
origin_tech = list(TECH_MAGNET = 2) origin_tech = list(TECH_MAGNET = 2)
darkness_view = 7 darkness_view = 7
toggleable = 1 toggleable = 1
icon_action_button = "action_nvg"
off_state = "denight" off_state = "denight"
/obj/item/clothing/glasses/night/New() /obj/item/clothing/glasses/night/New()
@@ -102,7 +100,6 @@
desc = "Very confusing glasses." desc = "Very confusing glasses."
icon_state = "material" icon_state = "material"
item_state = "glasses" item_state = "glasses"
icon_action_button = "action_material"
origin_tech = list(TECH_MAGNET = 3, TECH_ENGINERING = 3) origin_tech = list(TECH_MAGNET = 3, TECH_ENGINERING = 3)
toggleable = 1 toggleable = 1
vision_flags = SEE_OBJS vision_flags = SEE_OBJS
@@ -147,7 +144,7 @@
desc = "Protects the eyes from welders, approved by the mad scientist association." desc = "Protects the eyes from welders, approved by the mad scientist association."
icon_state = "welding-g" icon_state = "welding-g"
item_state = "welding-g" item_state = "welding-g"
icon_action_button = "action_welding_g" action_button_name = "Flip Welding Goggles"
var/up = 0 var/up = 0
/obj/item/clothing/glasses/welding/attack_self() /obj/item/clothing/glasses/welding/attack_self()
@@ -182,7 +179,6 @@
desc = "Welding goggles made from more expensive materials, strangely smells like potatoes." desc = "Welding goggles made from more expensive materials, strangely smells like potatoes."
icon_state = "rwelding-g" icon_state = "rwelding-g"
item_state = "rwelding-g" item_state = "rwelding-g"
icon_action_button = "action_welding_g"
/obj/item/clothing/glasses/sunglasses/blindfold /obj/item/clothing/glasses/sunglasses/blindfold
name = "blindfold" name = "blindfold"
@@ -223,7 +219,6 @@
item_state = "glasses" item_state = "glasses"
origin_tech = list(TECH_MAGNET = 3) origin_tech = list(TECH_MAGNET = 3)
toggleable = 1 toggleable = 1
icon_action_button = "action_thermal"
vision_flags = SEE_MOBS vision_flags = SEE_MOBS
invisa_view = 2 invisa_view = 2
@@ -249,12 +244,12 @@
name = "Optical Meson Scanner" name = "Optical Meson Scanner"
desc = "Used for seeing walls, floors, and stuff through anything." desc = "Used for seeing walls, floors, and stuff through anything."
icon_state = "meson" icon_state = "meson"
origin_tech = list(TECH_MAGNET = 3, TECH_ILLEGAL = 4) origin_tech = list(TECH_MAGNET = 3, TECH_ILLEGAL = 4)
/obj/item/clothing/glasses/thermal/plain /obj/item/clothing/glasses/thermal/plain
toggleable = 0 toggleable = 0
activation_sound = null activation_sound = null
icon_action_button = "" action_button_name = null
/obj/item/clothing/glasses/thermal/plain/monocle /obj/item/clothing/glasses/thermal/plain/monocle
name = "Thermoncle" name = "Thermoncle"

View File

@@ -22,7 +22,7 @@
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
flags_inv = (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE) flags_inv = (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
body_parts_covered = HEAD|FACE|EYES body_parts_covered = HEAD|FACE|EYES
icon_action_button = "action_welding" action_button_name = "Flip Welding Mask"
siemens_coefficient = 0.9 siemens_coefficient = 0.9
w_class = 3 w_class = 3
@@ -48,7 +48,7 @@
flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE) flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
icon_state = "[initial(icon_state)]up" icon_state = "[initial(icon_state)]up"
usr << "You push the [src] up out of your face." usr << "You push the [src] up out of your face."
update_clothing_icon() //so our mob-overlays update_clothing_icon() //so our mob-overlays
usr.update_action_buttons() usr.update_action_buttons()

View File

@@ -7,11 +7,10 @@
overshoes = 1 overshoes = 1
var/magpulse = 0 var/magpulse = 0
var/icon_base = "magboots" var/icon_base = "magboots"
icon_action_button = "action_blank" action_button_name = "Toggle Magboots"
action_button_name = "Toggle the magboots"
var/obj/item/clothing/shoes/shoes = null //Undershoes var/obj/item/clothing/shoes/shoes = null //Undershoes
var/mob/living/carbon/human/wearer = null //For shoe procs var/mob/living/carbon/human/wearer = null //For shoe procs
/obj/item/clothing/shoes/magboots/proc/set_slowdown() /obj/item/clothing/shoes/magboots/proc/set_slowdown()
slowdown = shoes? max(SHOES_SLOWDOWN, shoes.slowdown): SHOES_SLOWDOWN //So you can't put on magboots to make you walk faster. slowdown = shoes? max(SHOES_SLOWDOWN, shoes.slowdown): SHOES_SLOWDOWN //So you can't put on magboots to make you walk faster.
if (magpulse) if (magpulse)
@@ -37,7 +36,7 @@
/obj/item/clothing/shoes/magboots/mob_can_equip(mob/user) /obj/item/clothing/shoes/magboots/mob_can_equip(mob/user)
var/mob/living/carbon/human/H = user var/mob/living/carbon/human/H = user
if(H.shoes) if(H.shoes)
shoes = H.shoes shoes = H.shoes
if(shoes.overshoes) if(shoes.overshoes)

View File

@@ -20,7 +20,7 @@
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20) armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20)
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
siemens_coefficient = 0.1 siemens_coefficient = 0.2
permeability_coefficient = 0.1 permeability_coefficient = 0.1
unacidable = 1 unacidable = 1

View File

@@ -29,8 +29,8 @@
desc = "A suit worn by the engineering division of a NanoTrasen Emergency Response Team. Has orange highlights. Armoured and space ready." desc = "A suit worn by the engineering division of a NanoTrasen Emergency Response Team. Has orange highlights. Armoured and space ready."
suit_type = "ERT engineer" suit_type = "ERT engineer"
icon_state = "ert_engineer_rig" icon_state = "ert_engineer_rig"
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 100)
glove_type = /obj/item/clothing/gloves/rig/ert_engineer siemens_coefficient = 0
initial_modules = list( initial_modules = list(
/obj/item/rig_module/ai_container, /obj/item/rig_module/ai_container,
@@ -39,10 +39,6 @@
/obj/item/rig_module/device/rcd /obj/item/rig_module/device/rcd
) )
/obj/item/clothing/gloves/rig/ert_engineer
name = "insulated gauntlets"
siemens_coefficient = 0
/obj/item/weapon/rig/ert/medical /obj/item/weapon/rig/ert/medical
name = "ERT-M suit control module" name = "ERT-M suit control module"
desc = "A suit worn by the medical division of a NanoTrasen Emergency Response Team. Has white highlights. Armoured and space ready." desc = "A suit worn by the medical division of a NanoTrasen Emergency Response Team. Has white highlights. Armoured and space ready."

View File

@@ -20,6 +20,7 @@
var/obj/machinery/camera/camera var/obj/machinery/camera/camera
var/list/camera_networks var/list/camera_networks
action_button_name = "Toggle Helmet Light"
light_overlay = "helmet_light" light_overlay = "helmet_light"
brightness_on = 4 brightness_on = 4
on = 0 on = 0
@@ -28,9 +29,6 @@
if(!camera && camera_networks) if(!camera && camera_networks)
if(!icon_action_button)
icon_action_button = "[icon_state]"
camera = new /obj/machinery/camera(src) camera = new /obj/machinery/camera(src)
camera.replace_networks(camera_networks) camera.replace_networks(camera_networks)
camera.c_tag = user.name camera.c_tag = user.name

View File

@@ -43,7 +43,8 @@
/obj/item/clothing/accessory/badge/holo /obj/item/clothing/accessory/badge/holo
name = "holobadge" name = "holobadge"
desc = "This glowing blue badge marks the holder as THE LAW." desc = "This glowing blue badge marks the holder as THE LAW."
var/emagged = 0 //Emagging removes Sec check. icon_state = "holobadge"
var/emagged //Emagging removes Sec check.
/obj/item/clothing/accessory/badge/holo/cord /obj/item/clothing/accessory/badge/holo/cord
icon_state = "holobadge-cord" icon_state = "holobadge-cord"

View File

@@ -45,10 +45,5 @@
return pick(apcs) return pick(apcs)
/datum/event/apc_damage/proc/is_valid_apc(var/obj/machinery/power/apc/apc) /datum/event/apc_damage/proc/is_valid_apc(var/obj/machinery/power/apc/apc)
// Type must be exactly a basic APC.
// This generally prevents affecting APCs in critical areas (AI core, engine room, etc.) as they often use higher capacity subtypes.
if(apc.type != /obj/machinery/power/apc)
return 0
var/turf/T = get_turf(apc) var/turf/T = get_turf(apc)
return !apc.emagged && T && (T.z in config.player_levels) return !apc.is_critical && !apc.emagged && T && (T.z in config.player_levels)

View File

@@ -1,3 +1,5 @@
/var/global/list/event_viruses = list() // so that event viruses are kept around for admin logs, rather than being GCed
datum/event/viral_infection datum/event/viral_infection
var/list/viruses = list() var/list/viruses = list()
@@ -40,10 +42,30 @@ datum/event/viral_infection/start()
if(!candidates.len) return if(!candidates.len) return
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
var/list/used_viruses = list()
var/list/used_candidates = list()
severity = max(EVENT_LEVEL_MUNDANE, severity - 1) severity = max(EVENT_LEVEL_MUNDANE, severity - 1)
var/actual_severity = severity * rand(1, 3) var/actual_severity = severity * rand(1, 3)
while(actual_severity > 0 && candidates.len) while(actual_severity > 0 && candidates.len)
var/datum/disease2/disease/D = pick(viruses) var/datum/disease2/disease/D = pick(viruses)
infect_mob(candidates[1], D.getcopy()) infect_mob(candidates[1], D.getcopy())
used_candidates += candidates[1]
candidates.Remove(candidates[1]) candidates.Remove(candidates[1])
actual_severity-- actual_severity--
used_viruses |= D
event_viruses |= used_viruses
var/list/used_viruses_links = list()
var/list/used_viruses_text = list()
for(var/datum/disease2/disease/D in used_viruses)
used_viruses_links += "<a href='?src=\ref[D];info=1'>[D.name()]</a>"
used_viruses_text += D.name()
var/list/used_candidates_links = list()
var/list/used_candidates_text = list()
for(var/mob/M in used_candidates)
used_candidates_links += key_name_admin(M)
used_candidates_text += key_name(M)
log_admin("Virus event affecting [english_list(used_candidates_text)] started; Viruses: [english_list(used_viruses_text)]")
message_admins("Virus event affecting [english_list(used_candidates_links)] started; Viruses: [english_list(used_viruses_links)]")

View File

@@ -24,6 +24,8 @@
vine.process() vine.process()
message_admins("<span class='notice'>Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])</span>") message_admins("<span class='notice'>Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])</span>")
return
message_admins("<span class='notice'>Event: Spacevines failed to find a viable turf.</span>")
/obj/effect/dead_plant /obj/effect/dead_plant
anchored = 1 anchored = 1
@@ -56,7 +58,7 @@
var/growth_threshold = 0 var/growth_threshold = 0
var/growth_type = 0 var/growth_type = 0
var/max_growth = 0 var/max_growth = 0
var/sampled
var/list/neighbors = list() var/list/neighbors = list()
var/obj/effect/plant/parent var/obj/effect/plant/parent
var/datum/seed/seed var/datum/seed/seed
@@ -233,8 +235,13 @@
if(istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/weapon/scalpel)) if(istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/weapon/scalpel))
if(!seed) if(!seed)
user << "There is nothing to take a sample from." user << "<span class='danger'>There is nothing to take a sample from.</span>"
return return
if(sampled)
user << "<span class='danger'>You cannot take another sample from \the [src].</span>"
return
if(prob(70))
sampled = 1
seed.harvest(user,0,1) seed.harvest(user,0,1)
health -= (rand(3,5)*10) health -= (rand(3,5)*10)
else else

View File

@@ -5,6 +5,8 @@
w_class = 3.0 w_class = 3.0
throw_speed = 3 throw_speed = 3
throw_range = 3 throw_range = 3
max_amount = 50
var/default_type = DEFAULT_WALL_MATERIAL var/default_type = DEFAULT_WALL_MATERIAL
var/material/material var/material/material
var/perunit var/perunit
@@ -45,7 +47,13 @@
matter[material.name] = SHEET_MATERIAL_AMOUNT matter[material.name] = SHEET_MATERIAL_AMOUNT
return 1 return 1
obj/item/stack/material/iron /obj/item/stack/material/transfer_to(obj/item/stack/S, var/tamount=null, var/type_verified)
var/obj/item/stack/material/M = S
if(!istype(M) || material.name != M.material.name)
return 0
..(S,tamount,1)
/obj/item/stack/material/iron
name = "iron" name = "iron"
icon_state = "sheet-silver" icon_state = "sheet-silver"
default_type = "iron" default_type = "iron"

View File

@@ -48,6 +48,7 @@ var/list/name_to_material
/material /material
var/name // Unique name for use in indexing the list. var/name // Unique name for use in indexing the list.
var/display_name // Prettier name for display. var/display_name // Prettier name for display.
var/use_name
var/flags = 0 // Various status modifiers. var/flags = 0 // Various status modifiers.
// Shards/tables/structures // Shards/tables/structures
@@ -84,7 +85,7 @@ var/list/name_to_material
// Noise made when a simple door made of this material opens or closes. // Noise made when a simple door made of this material opens or closes.
var/dooropen_noise = 'sound/effects/stonedoor_openclose.ogg' var/dooropen_noise = 'sound/effects/stonedoor_openclose.ogg'
// Path to resulting stacktype. Todo remove need for this. // Path to resulting stacktype. Todo remove need for this.
var/stack_type = /obj/item/stack/material/steel var/stack_type
// Wallrot crumble message. // Wallrot crumble message.
var/rotting_touch_message = "crumbles under your touch" var/rotting_touch_message = "crumbles under your touch"
@@ -93,6 +94,8 @@ var/list/name_to_material
..() ..()
if(!display_name) if(!display_name)
display_name = name display_name = name
if(!use_name)
use_name = display_name
if(!shard_icon) if(!shard_icon)
shard_icon = shard_type shard_icon = shard_type
@@ -143,6 +146,9 @@ var/list/name_to_material
/material/proc/is_brittle() /material/proc/is_brittle()
return !!(flags & MATERIAL_BRITTLE) return !!(flags & MATERIAL_BRITTLE)
/material/proc/combustion_effect(var/turf/T, var/temperature)
return
// Datum definitions follow. // Datum definitions follow.
/material/uranium /material/uranium
name = "uranium" name = "uranium"
@@ -175,6 +181,10 @@ var/list/name_to_material
hardness = 40 hardness = 40
stack_origin_tech = list(TECH_MATERIAL = 4) stack_origin_tech = list(TECH_MATERIAL = 4)
/material/gold/bronze //placeholder for ashtrays
name = "bronze"
icon_colour = "#EDD12F"
/material/silver /material/silver
name = "silver" name = "silver"
stack_type = /obj/item/stack/material/silver stack_type = /obj/item/stack/material/silver
@@ -194,6 +204,20 @@ var/list/name_to_material
stack_origin_tech = list(TECH_MATERIAL = 2, TECH_PHORON = 2) stack_origin_tech = list(TECH_MATERIAL = 2, TECH_PHORON = 2)
door_icon_base = "stone" door_icon_base = "stone"
/material/phoron/combustion_effect(var/turf/T, var/temperature, var/effect_multiplier)
if(isnull(ignition_point))
return 0
if(temperature < ignition_point)
return 0
var/totalPhoron = 0
for(var/turf/simulated/floor/target_tile in range(2,T))
var/phoronToDeduce = (temperature/30) * effect_multiplier
totalPhoron += phoronToDeduce
target_tile.assume_gas("phoron", phoronToDeduce, 200+T0C)
spawn (0)
target_tile.hotspot_expose(temperature, 400)
return round(totalPhoron/100)
/material/stone /material/stone
name = "sandstone" name = "sandstone"
stack_type = /obj/item/stack/material/sandstone stack_type = /obj/item/stack/material/sandstone
@@ -324,6 +348,18 @@ var/list/name_to_material
icon_colour = "#5C5454" icon_colour = "#5C5454"
weight = 22 weight = 22
// Adminspawn only, do not let anyone get this.
/material/voxalloy
name = "voxalloy"
display_name = "durable alloy"
stack_type = null
icon_colour = "#6C7364"
integrity = 1200
melting_point = 6000 // Hull plating.
explosion_resistance = 200 // Hull plating.
hardness = 500
weight = 500
/material/wood /material/wood
name = "wood" name = "wood"
stack_type = /obj/item/stack/material/wood stack_type = /obj/item/stack/material/wood
@@ -363,6 +399,7 @@ var/list/name_to_material
name = "cloth" name = "cloth"
stack_origin_tech = list(TECH_MATERIAL = 2) stack_origin_tech = list(TECH_MATERIAL = 2)
door_icon_base = "wood" door_icon_base = "wood"
flags = MATERIAL_PADDING
/material/cult /material/cult
name = "cult" name = "cult"
@@ -397,12 +434,71 @@ var/list/name_to_material
return 1 return 1
return 0 return 0
/material/leather //todo //TODO PLACEHOLDERS:
/material/leather
name = "leather" name = "leather"
icon_colour = "#5C4831" icon_colour = "#5C4831"
stack_origin_tech = list(TECH_MATERIAL = 2) stack_origin_tech = list(TECH_MATERIAL = 2)
flags = MATERIAL_PADDING
/material/carpet /material/carpet
name = "carpet" name = "carpet"
display_name = "padding" display_name = "comfy"
icon_colour = "#A83C1B" use_name = "red upholstery"
icon_colour = "#DA020A"
flags = MATERIAL_PADDING
/material/cotton
name = "cotton"
display_name ="cotton"
icon_colour = "#FFFFFF"
flags = MATERIAL_PADDING
/material/cloth_teal
name = "teal"
display_name ="teal"
use_name = "teal cloth"
icon_colour = "#00EAFA"
flags = MATERIAL_PADDING
/material/cloth_black
name = "black"
display_name = "black"
use_name = "black cloth"
icon_colour = "#505050"
flags = MATERIAL_PADDING
/material/cloth_green
name = "green"
display_name = "green"
use_name = "green cloth"
icon_colour = "#01C608"
flags = MATERIAL_PADDING
/material/cloth_puple
name = "purple"
display_name = "purple"
use_name = "purple cloth"
icon_colour = "#9C56C4"
flags = MATERIAL_PADDING
/material/cloth_blue
name = "blue"
display_name = "blue"
use_name = "blue cloth"
icon_colour = "#6B6FE3"
flags = MATERIAL_PADDING
/material/cloth_beige
name = "beige"
display_name = "beige"
use_name = "beige cloth"
icon_colour = "#E8E7C8"
flags = MATERIAL_PADDING
/material/cloth_lime
name = "lime"
display_name = "lime"
use_name = "lime cloth"
icon_colour = "#62E36C"
flags = MATERIAL_PADDING

View File

@@ -121,3 +121,6 @@
/mob/living/bot/proc/explode() /mob/living/bot/proc/explode()
qdel(src) qdel(src)
/mob/living/bot/attack_throat()
return

View File

@@ -1,6 +1,6 @@
/obj/item/organ/brain /obj/item/organ/brain
name = "brain" name = "brain"
health = 400 //They need to live awhile longer than other organs. health = 400 //They need to live awhile longer than other organs. Is this even used by organ code anymore?
desc = "A piece of juicy meat found in a person's head." desc = "A piece of juicy meat found in a person's head."
organ_tag = "brain" organ_tag = "brain"
parent_organ = "head" parent_organ = "head"

View File

@@ -249,7 +249,10 @@
var/mob/living/carbon/human/H = src var/mob/living/carbon/human/H = src
H.w_uniform.add_fingerprint(M) H.w_uniform.add_fingerprint(M)
if(player_logged) var/show_ssd
var/mob/living/carbon/human/H = src
if(istype(H)) show_ssd = H.species.show_ssd
if(show_ssd && (!client || !key || player_logged))
M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [t_him] up!</span>", \ M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [t_him] up!</span>", \
"<span class='notice'>You shake [src], but they do not respond... Maybe they have S.S.D?</span>") "<span class='notice'>You shake [src], but they do not respond... Maybe they have S.S.D?</span>")
else if(lying || src.sleeping) else if(lying || src.sleeping)
@@ -259,7 +262,6 @@
M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [t_him] up!", \ M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [t_him] up!", \
"<span class='notice'>You shake [src] trying to wake [t_him] up!") "<span class='notice'>You shake [src] trying to wake [t_him] up!")
else else
var/mob/living/carbon/human/H = M
if(istype(H)) if(istype(H))
H.species.hug(H,src) H.species.hug(H,src)
else else

View File

@@ -244,9 +244,9 @@
if(species.show_ssd && (!species.has_organ["brain"] || has_brain()) && stat != DEAD) if(species.show_ssd && (!species.has_organ["brain"] || has_brain()) && stat != DEAD)
if(!key) if(!key)
msg += "<span class='deadsay'>[t_He] [t_is] fast asleep. It doesn't look like they are waking up anytime soon.</span>\n" msg += "<span class='deadsay'>[t_He] [t_is] [species.show_ssd]. It doesn't look like they are waking up anytime soon.</span>\n"
else if(!client) else if(!client)
msg += "[t_He] [t_has] suddenly fallen asleep.\n" msg += "<span class='deadsay'>[t_He] [t_is] [species.show_ssd].</span>\n"
var/list/wound_flavor_text = list() var/list/wound_flavor_text = list()
var/list/is_destroyed = list() var/list/is_destroyed = list()
@@ -256,7 +256,7 @@
var/list/organ_data = species.has_limbs[organ_tag] var/list/organ_data = species.has_limbs[organ_tag]
var/organ_descriptor = organ_data["descriptor"] var/organ_descriptor = organ_data["descriptor"]
is_destroyed["[organ_data["descriptor"]]"] = 1 is_destroyed["organ_descriptor"] = 1
var/obj/item/organ/external/E = organs_by_name[organ_tag] var/obj/item/organ/external/E = organs_by_name[organ_tag]
if(!E) if(!E)
@@ -264,6 +264,7 @@
else if(E.is_stump()) else if(E.is_stump())
wound_flavor_text["[organ_descriptor]"] = "<span class='warning'><b>[t_He] has a stump where [t_his] [organ_descriptor] should be.</b></span>\n" wound_flavor_text["[organ_descriptor]"] = "<span class='warning'><b>[t_He] has a stump where [t_his] [organ_descriptor] should be.</b></span>\n"
else else
is_destroyed["organ_descriptor"] = 0
continue continue
for(var/obj/item/organ/external/temp in organs) for(var/obj/item/organ/external/temp in organs)
@@ -277,7 +278,7 @@
else if(temp.wounds.len > 0 || temp.open) else if(temp.wounds.len > 0 || temp.open)
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has [temp.get_wounds_desc()] on [t_his] [temp.name].</span><br>" wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has [temp.get_wounds_desc()] on [t_his] [temp.name].</span><br>"
if(temp.status & ORGAN_BLEEDING) if(temp.status & ORGAN_BLEEDING)
is_bleeding["[temp.name]"] = 1 is_bleeding["[temp.name]"] = "<span class='danger'>[capitalize(t_his)] [temp.name] is bleeding!</span><br>"
else else
wound_flavor_text["[temp.name]"] = "" wound_flavor_text["[temp.name]"] = ""
if(temp.dislocated == 2) if(temp.dislocated == 2)
@@ -287,41 +288,56 @@
//Handles the text strings being added to the actual description. //Handles the text strings being added to the actual description.
//If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext. //If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext.
// ***********************************************************************************
// THIS NEEDS TO BE ENTIRELY REWRITTEN. Commenting out for now, BADLY NEEDS REWRITING.
// ***********************************************************************************
/*
var/display_chest = 0 var/display_chest = 0
var/display_shoes = 0 var/display_shoes = 0
var/display_gloves = 0 var/display_gloves = 0
if(wound_flavor_text["head"] && (is_destroyed["head"] || (!skipmask && !(wear_mask && istype(wear_mask, /obj/item/clothing/mask/gas))))) if(wound_flavor_text["head"] && (is_destroyed["head"] || (!skipmask && !(wear_mask && istype(wear_mask, /obj/item/clothing/mask/gas)))))
msg += wound_flavor_text["head"] msg += wound_flavor_text["head"]
else if(is_bleeding["head"]) else if(is_bleeding["head"])
msg += "<span class='warning'>[src] has blood running down [t_his] face!</span>\n" msg += "<span class='warning'>[src] has blood running down [t_his] face!</span>\n"
if(wound_flavor_text["upper body"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you. if(wound_flavor_text["upper body"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you.
msg += wound_flavor_text["upper body"] msg += wound_flavor_text["upper body"]
else if(is_bleeding["upper body"]) else if(is_bleeding["upper body"])
display_chest = 1 display_chest = 1
if(wound_flavor_text["left arm"] && (is_destroyed["left arm"] || (!w_uniform && !skipjumpsuit))) if(wound_flavor_text["left arm"] && (is_destroyed["left arm"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["left arm"] msg += wound_flavor_text["left arm"]
else if(is_bleeding["left arm"]) else if(is_bleeding["left arm"])
display_chest = 1 display_chest = 1
if(wound_flavor_text["left hand"] && (is_destroyed["left hand"] || (!gloves && !skipgloves))) if(wound_flavor_text["left hand"] && (is_destroyed["left hand"] || (!gloves && !skipgloves)))
msg += wound_flavor_text["left hand"] msg += wound_flavor_text["left hand"]
else if(is_bleeding["left hand"]) else if(is_bleeding["left hand"])
display_gloves = 1 display_gloves = 1
if(wound_flavor_text["right arm"] && (is_destroyed["right arm"] || (!w_uniform && !skipjumpsuit))) if(wound_flavor_text["right arm"] && (is_destroyed["right arm"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["right arm"] msg += wound_flavor_text["right arm"]
else if(is_bleeding["right arm"]) else if(is_bleeding["right arm"])
display_chest = 1 display_chest = 1
if(wound_flavor_text["right hand"] && (is_destroyed["right hand"] || (!gloves && !skipgloves))) if(wound_flavor_text["right hand"] && (is_destroyed["right hand"] || (!gloves && !skipgloves)))
msg += wound_flavor_text["right hand"] msg += wound_flavor_text["right hand"]
else if(is_bleeding["right hand"]) else if(is_bleeding["right hand"])
display_gloves = 1 display_gloves = 1
if(wound_flavor_text["lower body"] && (is_destroyed["lower body"] || (!w_uniform && !skipjumpsuit))) if(wound_flavor_text["lower body"] && (is_destroyed["lower body"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["lower body"] msg += wound_flavor_text["lower body"]
else if(is_bleeding["lower body"]) else if(is_bleeding["lower body"])
display_chest = 1 display_chest = 1
if(wound_flavor_text["left leg"] && (is_destroyed["left leg"] || (!w_uniform && !skipjumpsuit))) if(wound_flavor_text["left leg"] && (is_destroyed["left leg"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["left leg"] msg += wound_flavor_text["left leg"]
else if(is_bleeding["left leg"]) else if(is_bleeding["left leg"])
display_chest = 1 display_chest = 1
if(wound_flavor_text["left foot"]&& (is_destroyed["left foot"] || (!shoes && !skipshoes))) if(wound_flavor_text["left foot"]&& (is_destroyed["left foot"] || (!shoes && !skipshoes)))
msg += wound_flavor_text["left foot"] msg += wound_flavor_text["left foot"]
else if(is_bleeding["left foot"]) else if(is_bleeding["left foot"])
@@ -334,19 +350,25 @@
msg += wound_flavor_text["right foot"] msg += wound_flavor_text["right foot"]
else if(is_bleeding["right foot"]) else if(is_bleeding["right foot"])
display_shoes = 1 display_shoes = 1
if(display_chest) if(display_chest)
msg += "<span class='danger'>[src] has blood soaking through from under [t_his] clothing!</span>\n" msg += "<span class='danger'>[src] has blood soaking through from under [t_his] clothing!</span>\n"
if(display_shoes) if(display_shoes)
msg += "<span class='danger'>[src] has blood running from [t_his] shoes!</span>\n" msg += "<span class='danger'>[src] has blood running from [t_his] shoes!</span>\n"
if(display_gloves) if(display_gloves)
msg += "<span class='danger'>[src] has blood running from under [t_his] gloves!</span>\n" msg += "<span class='danger'>[src] has blood running from under [t_his] gloves!</span>\n"
*/
for(var/limb in wound_flavor_text)
msg += wound_flavor_text[limb]
is_bleeding[limb] = null
for(var/limb in is_bleeding)
msg += is_bleeding[limb]
for(var/implant in get_visible_implants(0)) for(var/implant in get_visible_implants(0))
msg += "<span class='danger'>[src] has \a [implant] sticking out of [t_his] flesh!</span>\n" msg += "<span class='danger'>[src] has \a [implant] sticking out of [t_his] flesh!</span>\n"
if(digitalcamo) if(digitalcamo)
msg += "[t_He] [t_is] repulsively uncanny!\n" msg += "[t_He] [t_is] repulsively uncanny!\n"
if(hasHUD(usr,"security")) if(hasHUD(usr,"security"))
var/perpname = "wot" var/perpname = "wot"
var/criminal = "None" var/criminal = "None"

View File

@@ -8,6 +8,8 @@
var/total_burn = 0 var/total_burn = 0
var/total_brute = 0 var/total_brute = 0
for(var/obj/item/organ/external/O in organs) //hardcoded to streamline things a bit for(var/obj/item/organ/external/O in organs) //hardcoded to streamline things a bit
if(O.status & ORGAN_ROBOT)
continue //robot limbs don't count towards shock and crit
total_brute += O.brute_dam total_brute += O.brute_dam
total_burn += O.burn_dam total_burn += O.burn_dam
@@ -69,12 +71,16 @@
/mob/living/carbon/human/getBruteLoss() /mob/living/carbon/human/getBruteLoss()
var/amount = 0 var/amount = 0
for(var/obj/item/organ/external/O in organs) for(var/obj/item/organ/external/O in organs)
if(O.status & ORGAN_ROBOT)
continue //robot limbs don't count towards shock and crit
amount += O.brute_dam amount += O.brute_dam
return amount return amount
/mob/living/carbon/human/getFireLoss() /mob/living/carbon/human/getFireLoss()
var/amount = 0 var/amount = 0
for(var/obj/item/organ/external/O in organs) for(var/obj/item/organ/external/O in organs)
if(O.status & ORGAN_ROBOT)
continue //robot limbs don't count towards shock and crit
amount += O.burn_dam amount += O.burn_dam
return amount return amount

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