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:
- sudo apt-get update -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:
- 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)
- ( md5sum -c - <<< "0af969f671fba6cf9696c78cd175a14a *baystation12.int")
- 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\telekinesis.dm"
#include "code\_onclick\hud\_defines.dm"
#include "code\_onclick\hud\action.dm"
#include "code\_onclick\hud\alien_larva.dm"
#include "code\_onclick\hud\hud.dm"
#include "code\_onclick\hud\human.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\robot.dm"
#include "code\_onclick\hud\screen_objects.dm"
@@ -101,6 +103,7 @@
#include "code\controllers\voting.dm"
#include "code\controllers\Processes\air.dm"
#include "code\controllers\Processes\alarm.dm"
#include "code\controllers\Processes\chemistry.dm"
#include "code\controllers\Processes\disease.dm"
#include "code\controllers\Processes\emergencyShuttle.dm"
#include "code\controllers\Processes\event.dm"
@@ -176,6 +179,7 @@
#include "code\datums\diseases\advance\symptoms\weight.dm"
#include "code\datums\helper_datums\construction_datum.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\teleport.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\vending.dm"
#include "code\datums\wires\wires.dm"
#include "code\defines\gases.dm"
#include "code\defines\obj.dm"
#include "code\defines\obj\weapon.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_structures.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\runes.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\vaultspawner.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\bodybag.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\implantpad.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\kitchen.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\generator.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\particle_accelerator\particle.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\cartridge.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\dispenser_presets.dm"
#include "code\modules\reagents\dispenser\supply.dm"
@@ -1692,6 +1698,8 @@
#include "code\modules\virus2\helpers.dm"
#include "code\modules\virus2\isolator.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_presets.dm"
#include "code\TriDimension\Movement.dm"
@@ -1700,8 +1708,6 @@
#include "code\TriDimension\Structures_presets.dm"
#include "code\TriDimension\Turfs.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\Atom.dm"
#include "code\ZAS\Connection.dm"
@@ -1711,7 +1717,6 @@
#include "code\ZAS\Debug.dm"
#include "code\ZAS\Diagnostic.dm"
#include "code\ZAS\Fire.dm"
#include "code\ZAS\Gas.dm"
#include "code\ZAS\Phoron.dm"
#include "code\ZAS\Turf.dm"
#include "code\ZAS\Variable Settings.dm"

View File

@@ -92,16 +92,6 @@
turf += src
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
. = ..()

View File

@@ -45,6 +45,45 @@
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()
if(zone && zone.invalid)
@@ -60,7 +99,7 @@
if(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)
else
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/joblist = list() //list of all jobstypes, minus borg and AI
var/global/list/turfs = list() //list of all turfs
//Languages/species/whitelist.
var/global/list/all_species[0]
var/global/list/all_languages[0]

View File

@@ -81,3 +81,15 @@
/proc/log_misc(text)
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

@@ -325,3 +325,47 @@ proc/tg_list2text(list/list, glue=",")
. = 0
else
. = 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"
*/
//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
#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/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)
mymob = owner
@@ -279,8 +280,6 @@ datum/hud/New(mob/owner)
src.client.screen -= src.hud_used.other
if(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:
//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
if(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.hud_used.action_intent //we want the intent swticher visible
else

View File

@@ -385,52 +385,6 @@
client.screen -= hud_used.hotkeybuttons
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.
/mob/living/carbon/human/proc/set_cloned_appearance()
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()
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
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
// 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
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)])" )
/////////////////////////
// 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
if(HULK in user.mutations)
power *= 2
@@ -72,7 +61,7 @@ attacked_by() will handle hitting/missing/logging as it does now, and will call
// Handle striking to cripple.
var/dislocation_str
if(user.a_intent == "disarm")
if(user.a_intent == I_DISARM)
dislocation_str = H.attack_joint(src, user, def_zone)
if(H.attacked_by(src, user, def_zone) && hitsound)
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/wikiurl
var/forumurl
var/githuburl
//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."
@@ -396,6 +397,9 @@ var/list/gamemode_cache = list()
if ("forumurl")
config.forumurl = value
if ("githuburl")
config.githuburl = value
if ("guest_jobban")
config.guest_jobban = 1

View File

@@ -55,7 +55,7 @@
usr.client.debug_variables(antag)
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 name = "Debug Controller"
set desc = "Debug the various periodic loop controllers for the game (be careful!)"
@@ -119,5 +119,8 @@
if("Nano")
debug_variables(nanomanager)
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.")
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>)"
. += "</li><li>"
//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>"
else
. += "<font color='grey'>Restart (Disallowed)</font>"
@@ -375,7 +375,7 @@ datum/controller/vote
if(config.allow_vote_restart || usr.client.holder)
initiate_vote("crew_transfer",usr.key)
if("add_antagonist")
if(config.allow_extra_antags || usr.client.holder)
if(config.allow_extra_antags)
initiate_vote("add_antagonist",usr.key)
if("custom")
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/pen/paralysis,
/obj/item/weapon/pen/reagent/paralysis,
/obj/item/weapon/grenade/chem_grenade/incendiary)
cost = 20
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)
cost = 25
containertype = /obj/structure/closet/crate/secure/hydrosec
containertype = /obj/structure/closet/crate/hydroponics
containername = "Weed control crate"
access = access_hydroponics
group = "Hydroponics"

View File

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

View File

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

View File

@@ -33,51 +33,46 @@ In short:
/datum/universal_state/hell/OnTurfChange(var/turf/T)
var/turf/space/spess = T
if(istype(spess))
spess.overlays += "hell01"
var/turf/space/S = T
if(istype(S))
S.color = "#FF0000"
else
S.color = initial(S.color)
// Apply changes when entering state
/datum/universal_state/hell/OnEnter()
set background = 1
garbage_collector.garbage_collect = 0
escape_list = get_area_turfs(locate(/area/hallway/secondary/exit))
//Separated into separate procs for profiling
AreaSet()
OverlaySet()
MiscSet()
APCSet()
KillMobs()
AmbientSet()
OverlayAndAmbientSet()
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.
A.fire = null
A.atmos = 1
A.atmosalm = 0
A.poweralm = 1
A.party = null
/datum/universal_state/hell/proc/AreaSet()
for(var/area/A in all_areas)
if(!istype(A,/area) || istype(A, /area/space))
continue
A.updateicon()
/datum/universal_state/hell/proc/OverlaySet()
var/image/I = image("icon" = 'icons/turf/space.dmi', "icon_state" = "hell01", "layer" = 10)
for(var/turf/space/spess in world)
spess.overlays += I
/datum/universal_state/hell/proc/AmbientSet()
/datum/universal_state/hell/OverlayAndAmbientSet()
spawn(0)
for(var/atom/movable/lighting_overlay/L in world)
L.update_lumcount(1, 0, 0)
for(var/turf/space/T in turfs)
OnTurfChange(T)
/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))
new /obj/effect/gateway/active/cult(T)
@@ -87,7 +82,7 @@ In short:
/datum/universal_state/hell/proc/APCSet()
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
if(APC.cell)
APC.cell.charge = 0

View File

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

View File

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

View File

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

View File

@@ -8,9 +8,9 @@
move_self = 0
announce=0
narnar=0
cause_hell=0
layer=12 // ITS SO BRIGHT
layer=LIGHTING_LAYER+2 // ITS SO BRIGHT
consume_range = 6
@@ -35,7 +35,17 @@
return 0
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
else if (isturf(A))
var/turf/T = A
var/dist = get_dist(T, src)
@@ -51,6 +61,9 @@
continue
if (dist > consume_range)
if(!(AM.singuloCanEat()))
continue
if (101 == AM.invisibility)
continue
@@ -63,19 +76,19 @@
var/image/riftimage = null
/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)
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
var/new_x = 32 * (R.x - src.x) + R.pixel_x
var/new_y = 32 * (R.y - src.y) + R.pixel_y
var/new_x = 32 * (R.x - T_mob.x) + R.pixel_x
var/new_y = 32 * (R.y - T_mob.y) + R.pixel_y
riftimage.pixel_x = new_x
riftimage.pixel_y = new_y
riftimage.loc = src.loc
riftimage.loc = T_mob
src << riftimage
else
if(riftimage)
qdel(riftimage)

View File

@@ -1,3 +1,5 @@
var/global/universe_has_ended = 0
/datum/universal_state/supermatter_cascade
name = "Supermatter Cascade"
@@ -11,9 +13,11 @@
return 0
/datum/universal_state/supermatter_cascade/OnTurfChange(var/turf/T)
var/turf/space/spess = T
if(istype(spess))
spess.overlays += "end01"
var/turf/space/S = T
if(istype(S))
S.color = "#0066FF"
else
S.color = initial(S.color)
/datum/universal_state/supermatter_cascade/DecayTurf(var/turf/T)
if(istype(T,/turf/simulated/wall))
@@ -46,13 +50,13 @@
emergency_shuttle.recall()
AreaSet()
OverlaySet()
MiscSet()
APCSet()
AmbientSet()
OverlayAndAmbientSet()
// Disable Nar-Sie.
cult.allow_narsie = 0
PlayerSet()
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\[\[###!!!-
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")
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)
ticker.declare_completion()
ticker.station_explosion_cinematic(0,null) // TODO: Custom cinematic
world << "<B>Resetting in 30 seconds!</B>"
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()
universe_has_ended = 1
return
/datum/universal_state/supermatter_cascade/proc/AreaSet()
for(var/area/A in world)
if(A.z in config.admin_levels)
for(var/area/A in all_areas)
if(!istype(A,/area) || istype(A, /area/space) || istype(A,/area/beach))
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()
/datum/universal_state/supermatter_cascade/proc/OverlaySet()
for(var/turf/space/spess in world)
spess.overlays += "end01"
/datum/universal_state/supermatter_cascade/proc/AmbientSet()
/datum/universal_state/supermatter_cascade/OverlayAndAmbientSet()
spawn(0)
for(var/atom/movable/lighting_overlay/L in world)
if(!(L.z in config.admin_levels))
L.update_lumcount(0.5, 1, 0)
if(L.z in config.admin_levels)
L.update_lumcount(1,1,1)
else
L.update_lumcount(0.0, 0.4, 1)
for(var/turf/space/T in turfs)
OnTurfChange(T)
/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))
alm.ex_act(2)
/datum/universal_state/supermatter_cascade/proc/APCSet()
for (var/obj/machinery/power/apc/APC in world)
if (!(APC.stat & BROKEN))
for (var/obj/machinery/power/apc/APC in machines)
if (!(APC.stat & BROKEN) && !APC.is_critical)
APC.chargemode = 0
if(APC.cell)
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/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/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/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)
mode_finished = (!post_game && mode.check_finished())
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
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)
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/shoes/black(H), slot_shoes)
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(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)
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)
if(H.age>49)
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)
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

View File

@@ -37,6 +37,10 @@
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
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
@@ -69,6 +73,10 @@
H.equip_to_slot_or_del(new /obj/item/device/pda/engineering(H), slot_l_store)
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
@@ -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/weapon/storage/belt/utility/atmostech/(H), slot_belt)
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)
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()
/datum/job/proc/equip_preview(mob/living/carbon/human/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/device/pda/heads/cmo(H), slot_belt)
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/device/flashlight/pen(H), slot_s_store)
return 1
/datum/job/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/device/pda/medical(H), slot_l_store)
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)
return 1
/datum/job/xenobiologist
title = "Xenobiologist"
flag = XENOBIOLOGIST
@@ -78,8 +76,8 @@
spawn_positions = 2
supervisors = "the research director"
selection_color = "#ffeeff"
access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology)
minimal_access = list(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, access_hydroponics, access_tox_storage)
alt_titles = list("Xenobotanist")
minimal_player_age = 14

View File

@@ -14,6 +14,10 @@
if(!H) return 0
return 1
equip_survival(var/mob/living/carbon/human/H)
if(!H) return 0
return 1
/datum/job/ai/is_position_available()
return (empty_playable_ai_cores.len != 0)
@@ -37,6 +41,11 @@
if(!H) return 0
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)
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)

View File

@@ -393,8 +393,8 @@ var/global/datum/controller/occupations/job_master
spawn_in_storage += thing
//Equip job items.
job.equip(H)
job.equip_survival(H)
job.apply_fingerprints(H)
H.species.equip_survival_gear(H)
//If some custom items could not be equipped before, try again now.
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)
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.
if(spawn_in_storage && spawn_in_storage.len)
var/obj/item/weapon/storage/B

View File

@@ -47,8 +47,7 @@
/obj/machinery/optable/attack_hand(mob/user as mob)
if (HULK in usr.mutations)
usr << text("<span class='notice'>You destroy the table.</span>")
visible_message("<span class='warning'>\The [usr] destroys the operating table!</span>")
visible_message("<span class='danger'>\The [usr] destroys \the [src]!</span>")
src.density = 0
qdel(src)
return
@@ -87,9 +86,13 @@
/obj/machinery/optable/proc/take_victim(mob/living/carbon/C, mob/living/carbon/user as mob)
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
<<<<<<< HEAD
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)
C.client.perspective = EYE_PERSPECTIVE
C.client.eye = src
@@ -134,12 +137,20 @@
return
/obj/machinery/optable/proc/check_table(mob/living/carbon/patient as mob)
<<<<<<< HEAD
if(src.victim)
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
if(patient.buckled)
<<<<<<< HEAD
usr << "<span class='warning'>Unbuckle first!</span>"
=======
usr << "<span class='notice'>Unbuckle \the [patient] first!</span>"
>>>>>>> upstream/dev
return 0
return 1

View File

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

View File

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

View File

@@ -71,7 +71,7 @@
if(charging)
usr.put_in_hands(charging)
charging.add_fingerprint(user)
charging.updateicon()
charging.update_icon()
src.charging = null
user.visible_message("[user] removes the cell from the charger.", "You remove the cell from the charger.")
@@ -84,7 +84,7 @@
return
charging.loc = src.loc
charging.updateicon()
charging.update_icon()
charging = null
update_icon()
user.visible_message("[user] removes the cell from the charger.", "You remove the cell from the charger.")

View File

@@ -277,7 +277,7 @@
target_tile.assume_gas("phoron", 35, 400+T0C)
spawn (0) target_tile.hotspot_expose(temperature, 400)
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))
D.ignite(temperature/4)
new/obj/structure/door_assembly( src.loc )
@@ -950,10 +950,10 @@ About the new airlock wires panel:
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
if(istype(src, /obj/machinery/door/airlock/glass))
playsound(src.loc, 'sound/machines/windowdoor.ogg', 30, 1)
if(arePowerSystemsOn())
playsound(src.loc, open_sound_powered, 100, 1)
else
playsound(src.loc, 'sound/machines/airlock.ogg', 30, 1)
playsound(src.loc, open_sound_unpowered, 100, 1)
for(var/turf/turf in locs)
var/obj/structure/window/killthis = (locate(/obj/structure/window) in turf)
if(killthis)

View File

@@ -7,28 +7,71 @@
density = 1
var/on = 0
var/obj/item/weapon/cell/high/cell = null
var/use = 5
var/use = 200 // 200W light
var/unlocked = 0
var/open = 0
var/brightness_on = 8 //can't remember what the maxed out value is
/obj/machinery/floodlight/New()
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]"
/obj/machinery/floodlight/process()
if(on && cell && cell.charge >= use)
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>")
if(!on)
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)
if(open && cell)
if(ishuman(user))
@@ -39,29 +82,22 @@
cell.loc = loc
cell.add_fingerprint(user)
cell.updateicon()
cell.update_icon()
src.cell = null
on = 0
set_light(0)
user << "You remove the power cell"
updateicon()
update_icon()
return
if(on)
on = 0
user << "<span class='notice'>You turn off the light</span>"
set_light(0)
turn_off(1)
else
if(!cell)
return
if(cell.charge <= 0)
return
on = 1
user << "<span class='notice'>You turn on the light</span>"
set_light(brightness_on)
if(!turn_on(1))
user << "You try to turn on \the [src] but it does not work."
updateicon()
update_icon()
/obj/machinery/floodlight/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -94,4 +130,4 @@
W.loc = src
cell = W
user << "You insert the power cell."
updateicon()
update_icon()

View File

@@ -204,7 +204,7 @@
item_quants[O.name]++
else
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)

View File

@@ -120,8 +120,8 @@
if("cellremove")
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>")
cell.updateicon()
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.update_icon()
usr.put_in_hands(cell)
cell.add_fingerprint(usr)
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/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/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/datum/action/item_action/action = null
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.
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,10 +399,8 @@ var/list/global/slot_flags_enumeration = list(
//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.
/obj/item/proc/ui_action_click()
if( src in usr )
attack_self(usr)
/obj/item/proc/IsShield()
return 0

View File

@@ -10,7 +10,7 @@
matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 20)
icon_action_button = "action_flashlight"
action_button_name = "Toggle Flashlight"
var/on = 0
var/brightness_on = 4 //luminosity when on
@@ -141,7 +141,7 @@
light_color = "#e58775"
icon_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/on_damage = 7
var/produce_heat = 1500

View File

@@ -91,9 +91,9 @@ REAGENT SCANNER
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
usr << "\red You don't have the dexterity to do this!"
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
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)

View File

@@ -112,7 +112,7 @@
cell.loc = get_turf(loc)
cell.add_fingerprint(user)
cell.updateicon()
cell.update_icon()
user << "You remove the [src.cell]."
src.cell = null

View File

@@ -4,26 +4,40 @@
Cyborg Spec Items
***********************************************************************/
//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
name = "electrified arm"
icon = 'icons/obj/decals.dmi'
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)
if(!istype(M))
return
// How the Hell.
if(!istype(user))
var/mob/living/temp = user
if(istype(temp))
temp.drop_from_inventory(src)
qdel(src)
return
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(!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
M.Weaken(5)
if (M.stuttering < 5)
M.stuttering = 5
M.Stun(5)
for(var/mob/O in viewers(M, null))
if (O.client)
O.show_message("\red <B>[user] has prodded [M] with an electrically-charged arm!</B>", 1, "\red You hear someone fall", 2)
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
name = "overdrive"

View File

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

View File

@@ -223,10 +223,10 @@
*/
//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())
return 0
if (stacktype != S.stacktype)
if ((stacktype != S.stacktype) && !type_verified)
return 0
if (isnull(tamount))
tamount = src.get_amount()
@@ -240,7 +240,6 @@
transfer_fingerprints_to(S)
if(blood_DNA)
S.blood_DNA |= blood_DNA
//todo bloody overlay
return transfer
return 0
@@ -314,10 +313,8 @@
return
/obj/item/stack/attackby(obj/item/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/stack))
var/obj/item/stack/S = W
if (user.get_inactive_hand()==src)
src.transfer_to(S, 1)
else
@@ -328,7 +325,8 @@
S.interact(usr)
if (src && usr.machine==src)
src.interact(usr)
else return ..()
else
return ..()
/*
* Recipe datum

View File

@@ -76,32 +76,27 @@ var/global/list/ashtray_cache = list()
health = max(0,health - W.force)
user << "You hit [src] with [W]."
if (health < 1)
die()
shatter()
return
/obj/item/weapon/material/ashtray/throw_impact(atom/hit_atom)
if (health > 0)
health = max(0,health - 3)
if (health < 1)
die()
return
if (contents.len)
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)
O.loc = src.loc
if (health < 1)
shatter()
return
update_icon()
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)
..(newloc, "plastic")
/obj/item/weapon/material/ashtray/bronze/New(var/newloc)
..(newloc, "gold") //placeholder
..(newloc, "bronze")
/obj/item/weapon/material/ashtray/glass/New(var/newloc)
..(newloc, "glass")

View File

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

View File

@@ -56,7 +56,7 @@
new /obj/item/clothing/mask/breath( src )
new /obj/item/weapon/tank/emergency_oxygen( src )
/obj/item/weapon/storage/box/survival/vox/
/obj/item/weapon/storage/box/vox/
New()
..()
new /obj/item/clothing/mask/breath( src )

View File

@@ -11,7 +11,7 @@
if("stealth")
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)
return

View File

@@ -73,7 +73,7 @@
else if(istype(W, /obj/item/weapon/screwdriver))
if(bcell)
bcell.updateicon()
bcell.update_icon()
bcell.loc = get_turf(src.loc)
bcell = null
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)
flags = CONDUCT
force = 15.0
w_class = 2.0
w_class = 3
origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1)
attack_verb = list("drilled")
@@ -82,7 +82,7 @@
force = 10.0
sharp = 1
edge = 1
w_class = 2.0
w_class = 1
throwforce = 5.0
throw_speed = 3
throw_range = 5
@@ -136,7 +136,7 @@
hitsound = 'sound/weapons/circsawhit.ogg'
flags = CONDUCT
force = 15.0
w_class = 2.0
w_class = 3
throwforce = 9.0
throw_speed = 3
throw_range = 5

View File

@@ -11,7 +11,7 @@
var/on = 0.0
var/stabilization_on = 0
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()
..()

View File

@@ -416,11 +416,11 @@
icon_state = "red_crowbar"
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))
var/obj/item/organ/external/S = M:organs_by_name[user.zone_sel.selecting]
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting]
if (!S) return
if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP)
@@ -429,12 +429,12 @@
if(S.brute_dam)
if(S.brute_dam < ROBOLIMB_SELF_REPAIR_CAP)
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].")
else
user << "\red The damage is far too severe to patch over externally."
return
else
user << "Nothing to fix!"
user.visible_message("<span class='notice'>\The [user] patches some dents on \the [M]'s [S.name] with \the [src].</span>")
else if(S.open != 2)
user << "<span class='danger'>The damage is far too severe to patch over externally.</span>"
return 1
else if(S.open != 2)
user << "<span class='notice'>Nothing to fix!</span>"
else
return ..()

View File

@@ -174,9 +174,9 @@
else if(istype(W, /obj/item/weapon/wrench) && state == 0)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
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
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(!src) return
@@ -225,7 +225,7 @@
return
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(!src) return

View File

@@ -21,7 +21,7 @@
if(notices < 5)
O.add_fingerprint(user)
add_fingerprint(user)
user.drop_item()
user.drop_from_inventory(O)
O.loc = src
notices++
icon_state = "nboard0[notices]" //update sprite
@@ -29,13 +29,22 @@
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>"
/obj/structure/noticeboard/attack_hand(user as mob)
/obj/structure/noticeboard/attack_hand(var/mob/user)
examine(user)
// 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)
..()
@@ -44,18 +53,16 @@
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
return
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.add_fingerprint(usr)
add_fingerprint(usr)
notices--
icon_state = "nboard0[notices]"
if(href_list["write"])
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
return
var/obj/item/P = locate(href_list["write"])
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
add_fingerprint(usr)
@@ -66,14 +73,9 @@
P.attackby(usr.l_hand, usr)
else
usr << "<span class='notice'>You'll need something to write with!</span>"
if(href_list["read"])
var/obj/item/weapon/paper/P = locate(href_list["read"])
if((P && P.loc == src))
if(!( istype(usr, /mob/living/carbon/human) ))
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY><TT>[stars(P.info)]</TT></BODY></HTML>", "window=[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

View File

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

View File

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

View File

@@ -10,28 +10,56 @@
/obj/structure/bed
name = "bed"
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"
pressure_resistance = 15
anchored = 1
can_buckle = 1
buckle_lying = 1
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)
if(!new_material)
new_material = DEFAULT_WALL_MATERIAL
material = get_material_by_name(new_material)
if(!istype(material))
qdel(src)
return
if(apply_cosmetics)
color = material.icon_colour
if(new_padding_material)
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)]"
desc = "[initial(desc)] It's made of [material.display_name]."
desc += " It's made of [material.use_name]."
/obj/structure/bed/ex_act(severity)
switch(severity)
@@ -55,8 +83,43 @@
/obj/structure/bed/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
material.place_sheet(get_turf(src))
dismantle()
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))
user.visible_message("<span class='notice'>[user] attempts to buckle [W:affecting] into \the [src]!</span>")
if(do_after(user, 20))
@@ -69,21 +132,36 @@
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
name = "psychiatrist's couch"
desc = "For prime comfort during psychiatric evaluations."
icon_state = "psychbed"
apply_cosmetics = 0
base_icon = "psychbed"
/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
name = "resting contraption"
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)
..(newloc,"resin")
@@ -96,10 +174,14 @@
icon = 'icons/obj/rollerbed.dmi'
icon_state = "down"
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)
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)
user_unbuckle_mob(user)
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
name = "chair"
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
var/propelled = 0 // Check for fire-extinguisher-driven chairs
/obj/structure/bed/chair/New(var/newloc, var/material)
..(newloc, material) //Todo make metal/stone chairs display as thrones
/obj/structure/bed/chair/New()
..() //Todo make metal/stone chairs display as thrones
spawn(3) //sorry. i don't think there's a better way to do this.
update_layer()
return
/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
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
user.drop_item()
var/obj/structure/bed/chair/e_chair/E = new (src.loc, material.name)
@@ -34,6 +35,20 @@
rotate()
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()
if(src.dir == NORTH)
src.layer = FLY_LAYER
@@ -65,70 +80,49 @@
src.set_dir(turn(src.dir, 90))
return
// Chair types
/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"
// Leaving this in for the sake of compilation.
/obj/structure/bed/chair/comfy
name = "comfy chair"
desc = "It looks comfy."
icon_state = "comfychair"
color = rgb(255,255,255)
var/image/armrest = null
apply_cosmetics = 0
desc = "It's a chair. It looks comfy."
icon_state = "comfychair_preview"
/obj/structure/bed/chair/comfy/New()
armrest = image("icons/obj/objects.dmi", "comfychair_armrest")
armrest.layer = MOB_LAYER + 0.1
/obj/structure/bed/chair/comfy/brown/New(var/newloc,var/newmaterial)
..(newloc,"steel","leather")
return ..()
/obj/structure/bed/chair/comfy/red/New(var/newloc,var/newmaterial)
..(newloc,"steel","carpet")
/obj/structure/bed/chair/comfy/post_buckle_mob()
if(buckled_mob)
overlays += armrest
else
overlays -= armrest
/obj/structure/bed/chair/comfy/teal/New(var/newloc,var/newmaterial)
..(newloc,"steel","teal")
/obj/structure/bed/chair/comfy/brown
color = rgb(141,70,0)
/obj/structure/bed/chair/comfy/black/New(var/newloc,var/newmaterial)
..(newloc,"steel","black")
/obj/structure/bed/chair/comfy/red
color = rgb(218,2,10)
/obj/structure/bed/chair/comfy/green/New(var/newloc,var/newmaterial)
..(newloc,"steel","green")
/obj/structure/bed/chair/comfy/teal
color = rgb(0,234,250)
/obj/structure/bed/chair/comfy/purp/New(var/newloc,var/newmaterial)
..(newloc,"steel","purple")
/obj/structure/bed/chair/comfy/black
color = rgb(60,60,60)
/obj/structure/bed/chair/comfy/blue/New(var/newloc,var/newmaterial)
..(newloc,"steel","blue")
/obj/structure/bed/chair/comfy/green
color = rgb(1,196,8)
/obj/structure/bed/chair/comfy/beige/New(var/newloc,var/newmaterial)
..(newloc,"steel","beige")
/obj/structure/bed/chair/comfy/purp
color = rgb(112,2,176)
/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/comfy/lime/New(var/newloc,var/newmaterial)
..(newloc,"steel","lime")
/obj/structure/bed/chair/office
anchored = 0
buckle_movable = 1
apply_cosmetics = 0
/obj/structure/bed/chair/comfy/lime
color = rgb(255,251,0)
/obj/structure/bed/chair/office/update_icon()
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()
..()
@@ -175,3 +169,23 @@
/obj/structure/bed/chair/office/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
name = "stool"
desc = "Apply butt."
icon = 'icons/obj/objects.dmi'
icon = 'icons/obj/furniture.dmi'
icon_state = "stool_preview" //set for the map
force = 10
throwforce = 10
@@ -30,17 +30,16 @@ var/global/list/stool_cache = list() //haha stool
update_icon()
/obj/item/weapon/stool/padded/New(var/newloc, var/new_material)
..(newloc, "steel", "leather")
..(newloc, "steel", "carpet")
/obj/item/weapon/stool/update_icon()
// Prep icon.
icon_state = "stool"
icon_state = ""
overlays.Cut()
// Base icon.
var/cache_key = "stool-[material.name]"
if(isnull(stool_cache[cache_key]))
var/image/I = image('icons/obj/objects.dmi', base_icon)
color = material.icon_colour
var/image/I = image(icon, base_icon)
I.color = material.icon_colour
stool_cache[cache_key] = I
overlays |= stool_cache[cache_key]
@@ -48,17 +47,17 @@ var/global/list/stool_cache = list() //haha stool
if(padding_material)
var/padding_cache_key = "stool-padding-[padding_material.name]"
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
stool_cache[padding_cache_key] = I
overlays |= stool_cache[padding_cache_key]
// Strings.
if(padding_material)
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
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)
padding_material = get_material_by_name(padding_type)
@@ -127,7 +126,7 @@ var/global/list/stool_cache = list() //haha stool
padding_type = "carpet"
else if(istype(W,/obj/item/stack/material))
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]"
if(!padding_type)
user << "You cannot pad \the [src] with that."

View File

@@ -9,6 +9,8 @@
var/mob/living/pulling = null
var/bloodiness
/obj/structure/bed/chair/wheelchair/update_icon()
return
/obj/structure/bed/chair/wheelchair/set_dir()
..()
@@ -18,6 +20,11 @@
if(buckled_mob)
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)
// Redundant check?
if(user.stat || user.stunned || user.weakened || user.paralysis || user.lying || user.restrained())

View File

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

View File

@@ -2,18 +2,17 @@
icon_state = "rgeneric"
/turf/simulated/wall/r_wall/New(var/newloc)
..(newloc, DEFAULT_WALL_MATERIAL,"plasteel") //3strong
/turf/simulated/wall/cult
icon_state = "cult"
/turf/simulated/wall/cult/New(var/newloc)
..(newloc,"cult","cult2")
/turf/unsimulated/wall/cult
name = "cult wall"
desc = "Hideous images dance beneath the surface."
icon = 'icons/turf/wall_masks.dmi'
icon_state = "cult"
/turf/simulated/wall/iron/New(var/newloc)
..(newloc,"iron")
/turf/simulated/wall/uranium/New(var/newloc)
@@ -28,7 +27,6 @@
..(newloc,"phoron")
/turf/simulated/wall/sandstone/New(var/newloc)
..(newloc,"sandstone")
/turf/simulated/wall/ironphoron/New(var/newloc)
..(newloc,"iron","phoron")
/turf/simulated/wall/golddiamond/New(var/newloc)
@@ -38,6 +36,8 @@
/turf/simulated/wall/sandstonediamond/New(var/newloc)
..(newloc,"sandstone","diamond")
/turf/simulated/wall/cult/New(var/newloc)
..(newloc,"cult","cult2")
// Kind of wondering if this is going to bite me in the butt.
/turf/simulated/wall/voxshuttle/New(var/newloc)
..(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)
if(istype(Proj,/obj/item/projectile/beam))
ignite(2500)
burn(2500)
else if(istype(Proj,/obj/item/projectile/ion))
ignite(500)
burn(500)
// Tasers and stuff? No thanks. Also no clone or tox damage crap.
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
@@ -143,10 +143,10 @@ var/list/global/wall_cache = list()
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 :(
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)
ignite(adj_temp)
burn(adj_temp)
if(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
/turf/simulated/wall/proc/burn(temperature)
if(material.combustion_effect(src, temperature, 0.7))
spawn(2)
new /obj/structure/girder(src)
src.ChangeTurf(/turf/simulated/floor)
for(var/turf/simulated/floor/target_tile in range(0,src))
if(material == "phoron") //ergh
target_tile.assume_gas("phoron", 20, 400+T0C)
spawn (0) target_tile.hotspot_expose(temperature, 400)
for(var/turf/simulated/wall/W in range(3,src))
W.ignite((temperature/4))
W.burn((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))
icon_state = "[((x + y) ^ ~(x * y) + z) % 25]"
update_starlight()
..()
/turf/space/proc/update_starlight()
if(!config.starlight)

View File

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

View File

@@ -997,18 +997,18 @@ var/global/floorIsLava = 0
return 0
/datum/admins/proc/spawn_fruit()
/datum/admins/proc/spawn_fruit(seedtype in plant_controller.seeds)
set category = "Debug"
set desc = "Spawn the product of a seed."
set name = "Spawn Fruit"
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])
return
var/datum/seed/S = plant_controller.seeds[seedtype]
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()
set category = "Debug"
@@ -1050,17 +1050,17 @@ var/global/floorIsLava = 0
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]"
/datum/admins/proc/spawn_plant()
/datum/admins/proc/spawn_plant(seedtype in plant_controller.seeds)
set category = "Debug"
set desc = "Spawn a spreading plant effect."
set name = "Spawn Plant"
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])
return
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)
set category = "Debug"

View File

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

View File

@@ -2270,14 +2270,14 @@
if("hellonearth")
feedback_inc("admin_secrets_fun_used",1)
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")
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.")
if("supermattercascade")
feedback_inc("admin_secrets_fun_used",1)
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")
explosion(get_turf(usr), 8, 16, 24, 32, 1)
new /turf/unsimulated/wall/supermatter(get_turf(usr))

View File

@@ -108,6 +108,7 @@
C << 'sound/effects/adminhelp.ogg'
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
for(var/client/X in admins)

View File

@@ -250,11 +250,6 @@ BLIND // can't see anything
var/brightness_on
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)
if(brightness_on)
if(!isturf(user.loc))

View File

@@ -37,7 +37,7 @@
desc = "Used for seeing walls, floors, and stuff through anything."
icon_state = "meson"
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)
toggleable = 1
vision_flags = SEE_TURFS
@@ -57,7 +57,6 @@
icon_state = "purple"
item_state = "glasses"
toggleable = 1
icon_action_button = "action_science"
/obj/item/clothing/glasses/science/New()
..()
@@ -76,7 +75,6 @@
origin_tech = list(TECH_MAGNET = 2)
darkness_view = 7
toggleable = 1
icon_action_button = "action_nvg"
off_state = "denight"
/obj/item/clothing/glasses/night/New()
@@ -102,7 +100,6 @@
desc = "Very confusing glasses."
icon_state = "material"
item_state = "glasses"
icon_action_button = "action_material"
origin_tech = list(TECH_MAGNET = 3, TECH_ENGINERING = 3)
toggleable = 1
vision_flags = SEE_OBJS
@@ -147,7 +144,7 @@
desc = "Protects the eyes from welders, approved by the mad scientist association."
icon_state = "welding-g"
item_state = "welding-g"
icon_action_button = "action_welding_g"
action_button_name = "Flip Welding Goggles"
var/up = 0
/obj/item/clothing/glasses/welding/attack_self()
@@ -182,7 +179,6 @@
desc = "Welding goggles made from more expensive materials, strangely smells like potatoes."
icon_state = "rwelding-g"
item_state = "rwelding-g"
icon_action_button = "action_welding_g"
/obj/item/clothing/glasses/sunglasses/blindfold
name = "blindfold"
@@ -223,7 +219,6 @@
item_state = "glasses"
origin_tech = list(TECH_MAGNET = 3)
toggleable = 1
icon_action_button = "action_thermal"
vision_flags = SEE_MOBS
invisa_view = 2
@@ -254,7 +249,7 @@
/obj/item/clothing/glasses/thermal/plain
toggleable = 0
activation_sound = null
icon_action_button = ""
action_button_name = null
/obj/item/clothing/glasses/thermal/plain/monocle
name = "Thermoncle"

View File

@@ -22,7 +22,7 @@
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
flags_inv = (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
body_parts_covered = HEAD|FACE|EYES
icon_action_button = "action_welding"
action_button_name = "Flip Welding Mask"
siemens_coefficient = 0.9
w_class = 3

View File

@@ -7,8 +7,7 @@
overshoes = 1
var/magpulse = 0
var/icon_base = "magboots"
icon_action_button = "action_blank"
action_button_name = "Toggle the magboots"
action_button_name = "Toggle Magboots"
var/obj/item/clothing/shoes/shoes = null //Undershoes
var/mob/living/carbon/human/wearer = null //For shoe procs

View File

@@ -20,7 +20,7 @@
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
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
siemens_coefficient = 0.1
siemens_coefficient = 0.2
permeability_coefficient = 0.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."
suit_type = "ERT engineer"
icon_state = "ert_engineer_rig"
glove_type = /obj/item/clothing/gloves/rig/ert_engineer
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 100)
siemens_coefficient = 0
initial_modules = list(
/obj/item/rig_module/ai_container,
@@ -39,10 +39,6 @@
/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
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."

View File

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

View File

@@ -43,7 +43,8 @@
/obj/item/clothing/accessory/badge/holo
name = "holobadge"
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
icon_state = "holobadge-cord"

View File

@@ -45,10 +45,5 @@
return pick(apcs)
/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)
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
var/list/viruses = list()
@@ -40,10 +42,30 @@ datum/event/viral_infection/start()
if(!candidates.len) return
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)
var/actual_severity = severity * rand(1, 3)
while(actual_severity > 0 && candidates.len)
var/datum/disease2/disease/D = pick(viruses)
infect_mob(candidates[1], D.getcopy())
used_candidates += candidates[1]
candidates.Remove(candidates[1])
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()
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
anchored = 1
@@ -56,7 +58,7 @@
var/growth_threshold = 0
var/growth_type = 0
var/max_growth = 0
var/sampled
var/list/neighbors = list()
var/obj/effect/plant/parent
var/datum/seed/seed
@@ -233,8 +235,13 @@
if(istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/weapon/scalpel))
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
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)
health -= (rand(3,5)*10)
else

View File

@@ -5,6 +5,8 @@
w_class = 3.0
throw_speed = 3
throw_range = 3
max_amount = 50
var/default_type = DEFAULT_WALL_MATERIAL
var/material/material
var/perunit
@@ -45,7 +47,13 @@
matter[material.name] = SHEET_MATERIAL_AMOUNT
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"
icon_state = "sheet-silver"
default_type = "iron"

View File

@@ -48,6 +48,7 @@ var/list/name_to_material
/material
var/name // Unique name for use in indexing the list.
var/display_name // Prettier name for display.
var/use_name
var/flags = 0 // Various status modifiers.
// 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.
var/dooropen_noise = 'sound/effects/stonedoor_openclose.ogg'
// Path to resulting stacktype. Todo remove need for this.
var/stack_type = /obj/item/stack/material/steel
var/stack_type
// Wallrot crumble message.
var/rotting_touch_message = "crumbles under your touch"
@@ -93,6 +94,8 @@ var/list/name_to_material
..()
if(!display_name)
display_name = name
if(!use_name)
use_name = display_name
if(!shard_icon)
shard_icon = shard_type
@@ -143,6 +146,9 @@ var/list/name_to_material
/material/proc/is_brittle()
return !!(flags & MATERIAL_BRITTLE)
/material/proc/combustion_effect(var/turf/T, var/temperature)
return
// Datum definitions follow.
/material/uranium
name = "uranium"
@@ -175,6 +181,10 @@ var/list/name_to_material
hardness = 40
stack_origin_tech = list(TECH_MATERIAL = 4)
/material/gold/bronze //placeholder for ashtrays
name = "bronze"
icon_colour = "#EDD12F"
/material/silver
name = "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)
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
name = "sandstone"
stack_type = /obj/item/stack/material/sandstone
@@ -324,6 +348,18 @@ var/list/name_to_material
icon_colour = "#5C5454"
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
name = "wood"
stack_type = /obj/item/stack/material/wood
@@ -363,6 +399,7 @@ var/list/name_to_material
name = "cloth"
stack_origin_tech = list(TECH_MATERIAL = 2)
door_icon_base = "wood"
flags = MATERIAL_PADDING
/material/cult
name = "cult"
@@ -397,12 +434,71 @@ var/list/name_to_material
return 1
return 0
/material/leather //todo
//TODO PLACEHOLDERS:
/material/leather
name = "leather"
icon_colour = "#5C4831"
stack_origin_tech = list(TECH_MATERIAL = 2)
flags = MATERIAL_PADDING
/material/carpet
name = "carpet"
display_name = "padding"
icon_colour = "#A83C1B"
display_name = "comfy"
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()
qdel(src)
/mob/living/bot/attack_throat()
return

View File

@@ -1,6 +1,6 @@
/obj/item/organ/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."
organ_tag = "brain"
parent_organ = "head"

View File

@@ -249,7 +249,10 @@
var/mob/living/carbon/human/H = src
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>", \
"<span class='notice'>You shake [src], but they do not respond... Maybe they have S.S.D?</span>")
else if(lying || src.sleeping)
@@ -259,7 +262,6 @@
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!")
else
var/mob/living/carbon/human/H = M
if(istype(H))
H.species.hug(H,src)
else

View File

@@ -244,9 +244,9 @@
if(species.show_ssd && (!species.has_organ["brain"] || has_brain()) && stat != DEAD)
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)
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/is_destroyed = list()
@@ -256,7 +256,7 @@
var/list/organ_data = species.has_limbs[organ_tag]
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]
if(!E)
@@ -264,6 +264,7 @@
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"
else
is_destroyed["organ_descriptor"] = 0
continue
for(var/obj/item/organ/external/temp in organs)
@@ -277,7 +278,7 @@
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>"
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
wound_flavor_text["[temp.name]"] = ""
if(temp.dislocated == 2)
@@ -287,41 +288,56 @@
//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.
// ***********************************************************************************
// THIS NEEDS TO BE ENTIRELY REWRITTEN. Commenting out for now, BADLY NEEDS REWRITING.
// ***********************************************************************************
/*
var/display_chest = 0
var/display_shoes = 0
var/display_gloves = 0
if(wound_flavor_text["head"] && (is_destroyed["head"] || (!skipmask && !(wear_mask && istype(wear_mask, /obj/item/clothing/mask/gas)))))
msg += wound_flavor_text["head"]
else if(is_bleeding["head"])
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.
msg += wound_flavor_text["upper body"]
else if(is_bleeding["upper body"])
display_chest = 1
if(wound_flavor_text["left arm"] && (is_destroyed["left arm"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["left arm"]
else if(is_bleeding["left arm"])
display_chest = 1
if(wound_flavor_text["left hand"] && (is_destroyed["left hand"] || (!gloves && !skipgloves)))
msg += wound_flavor_text["left hand"]
else if(is_bleeding["left hand"])
display_gloves = 1
if(wound_flavor_text["right arm"] && (is_destroyed["right arm"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["right arm"]
else if(is_bleeding["right arm"])
display_chest = 1
if(wound_flavor_text["right hand"] && (is_destroyed["right hand"] || (!gloves && !skipgloves)))
msg += wound_flavor_text["right hand"]
else if(is_bleeding["right hand"])
display_gloves = 1
if(wound_flavor_text["lower body"] && (is_destroyed["lower body"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["lower body"]
else if(is_bleeding["lower body"])
display_chest = 1
if(wound_flavor_text["left leg"] && (is_destroyed["left leg"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["left leg"]
else if(is_bleeding["left leg"])
display_chest = 1
if(wound_flavor_text["left foot"]&& (is_destroyed["left foot"] || (!shoes && !skipshoes)))
msg += wound_flavor_text["left foot"]
else if(is_bleeding["left foot"])
@@ -334,19 +350,25 @@
msg += wound_flavor_text["right foot"]
else if(is_bleeding["right foot"])
display_shoes = 1
if(display_chest)
msg += "<span class='danger'>[src] has blood soaking through from under [t_his] clothing!</span>\n"
if(display_shoes)
msg += "<span class='danger'>[src] has blood running from [t_his] shoes!</span>\n"
if(display_gloves)
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))
msg += "<span class='danger'>[src] has \a [implant] sticking out of [t_his] flesh!</span>\n"
if(digitalcamo)
msg += "[t_He] [t_is] repulsively uncanny!\n"
if(hasHUD(usr,"security"))
var/perpname = "wot"
var/criminal = "None"

View File

@@ -8,6 +8,8 @@
var/total_burn = 0
var/total_brute = 0
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_burn += O.burn_dam
@@ -69,12 +71,16 @@
/mob/living/carbon/human/getBruteLoss()
var/amount = 0
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
return amount
/mob/living/carbon/human/getFireLoss()
var/amount = 0
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
return amount

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