Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into tguideps
Browse files Browse the repository at this point in the history
Conflicts:
	tgui/assets/tgui.js
  • Loading branch information
Mervill committed Dec 9, 2016
2 parents 8ee7e4c + fb237b0 commit 7cce8cc
Show file tree
Hide file tree
Showing 174 changed files with 1,310 additions and 1,062 deletions.
7 changes: 7 additions & 0 deletions code/__DEFINES/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,10 @@
#define TANK_MAX_RELEASE_PRESSURE (ONE_ATMOSPHERE*3)
#define TANK_MIN_RELEASE_PRESSURE 0
#define TANK_DEFAULT_RELEASE_PRESSURE 16


#define ATMOS_PASS_YES 1
#define ATMOS_PASS_NO 0
#define ATMOS_PASS_PROC -1 //ask CanAtmosPass()
#define ATMOS_PASS_DENSITY -2 //just check density
#define CANATMOSPASS(A, O) ( A.CanAtmosPass == ATMOS_PASS_PROC ? A.CanAtmosPass(O) : ( A.CanAtmosPass == ATMOS_PASS_DENSITY ? !A.density : A.CanAtmosPass ) )
6 changes: 6 additions & 0 deletions code/__DEFINES/construction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@
#define CANT_UNFASTEN 0
#define FAILED_UNFASTEN 1
#define SUCCESSFUL_UNFASTEN 2

//disposal unit mode defines, which do double time as the construction defines
#define PRESSURE_OFF 0
#define PRESSURE_ON 1
#define PRESSURE_MAXED 2
#define SCREWS_OUT -1
6 changes: 0 additions & 6 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -427,12 +427,6 @@ var/global/list/ghost_others_options = list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
#define TRIGGER_GUARD_NONE 0
#define TRIGGER_GUARD_NORMAL 1

// Plant types
#define PLANT_NORMAL 0
#define PLANT_WEED 1
#define PLANT_MUSHROOM 2
#define PLANT_ALIEN 3

// Maploader bounds indices
#define MAP_MINX 1
#define MAP_MINY 2
Expand Down
71 changes: 34 additions & 37 deletions code/__HELPERS/icon_smoothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,19 @@

return adjacencies

//do not use, use queue_smooth(atom)
/proc/smooth_icon(atom/A)
if(qdeleted(A))
if(!A || !A.smooth || !A.z)
return
if(!A || !A.smooth)
if(qdeleted(A))
return
spawn(0)
if((A.smooth & SMOOTH_TRUE) || (A.smooth & SMOOTH_MORE))
var/adjacencies = calculate_adjacencies(A)
if((A.smooth & SMOOTH_TRUE) || (A.smooth & SMOOTH_MORE))
var/adjacencies = calculate_adjacencies(A)

if(A.smooth & SMOOTH_DIAGONAL)
A.diagonal_smooth(adjacencies)
else
cardinal_smooth(A, adjacencies)
if(A.smooth & SMOOTH_DIAGONAL)
A.diagonal_smooth(adjacencies)
else
cardinal_smooth(A, adjacencies)

/atom/proc/diagonal_smooth(adjacencies)
switch(adjacencies)
Expand Down Expand Up @@ -153,12 +153,12 @@
/turf/closed/wall/diagonal_smooth(adjacencies)
adjacencies = reverse_ndir(..())
if(adjacencies)
underlays.Cut()
var/list/U = list()
if(fixed_underlay)
if(fixed_underlay["space"])
underlays += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER)
U += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER)
else
underlays += image(fixed_underlay["icon"], fixed_underlay["icon_state"], layer=TURF_LAYER)
U += image(fixed_underlay["icon"], fixed_underlay["icon_state"], layer=TURF_LAYER)
else
var/turf/T = get_step(src, turn(adjacencies, 180))
if(T && (T.density || T.smooth))
Expand All @@ -167,13 +167,15 @@
T = get_step(src, turn(adjacencies, 225))

if(isspaceturf(T) && !istype(T, /turf/open/space/transit))
underlays += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER)
U += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER)
else if(T && !T.density && !T.smooth)
underlays += T
U += T
else if(baseturf && !initial(baseturf.density) && !initial(baseturf.smooth))
underlays += image(initial(baseturf.icon), initial(baseturf.icon_state), layer=TURF_LAYER)
U += image(initial(baseturf.icon), initial(baseturf.icon_state), layer=TURF_LAYER)
else
underlays += DEFAULT_UNDERLAY_IMAGE
U += DEFAULT_UNDERLAY_IMAGE
underlays = U


/proc/cardinal_smooth(atom/A, adjacencies)
//NW CORNER
Expand Down Expand Up @@ -228,25 +230,31 @@
else if(adjacencies & N_EAST)
se = "4-e"

var/list/New = list()

if(A.top_left_corner != nw)
A.overlays -= A.top_left_corner
A.top_left_corner = nw
A.add_overlay(nw)
New += nw

if(A.top_right_corner != ne)
A.overlays -= A.top_right_corner
A.top_right_corner = ne
A.add_overlay(ne)
New += ne

if(A.bottom_right_corner != sw)
A.overlays -= A.bottom_right_corner
A.bottom_right_corner = sw
A.add_overlay(sw)
New += sw

if(A.bottom_left_corner != se)
A.overlays -= A.bottom_left_corner
A.bottom_left_corner = se
A.add_overlay(se)
New += se

if(New.len)
A.add_overlay(New)


/proc/find_type_in_direction(atom/source, direction)
var/turf/target_turf = get_step(source, direction)
Expand Down Expand Up @@ -307,14 +315,16 @@

/atom/proc/replace_smooth_overlays(nw, ne, sw, se)
clear_smooth_overlays()
var/list/O = list()
top_left_corner = nw
add_overlay(nw)
O += nw
top_right_corner = ne
add_overlay(ne)
O += ne
bottom_left_corner = sw
add_overlay(sw)
O += sw
bottom_right_corner = se
add_overlay(se)
O += se
add_overlay(O)

/proc/reverse_ndir(ndir)
switch(ndir)
Expand Down Expand Up @@ -353,19 +363,6 @@
else
return 0

//SSicon_smooth
/proc/ss_smooth_icon(atom/A)
if(qdeleted(A))
return
if(!istype(A) || (A && !A.smooth))
return
if((A.smooth & SMOOTH_TRUE) || (A.smooth & SMOOTH_MORE))
var/adjacencies = calculate_adjacencies(A)
if(A.smooth & SMOOTH_DIAGONAL)
A.diagonal_smooth(adjacencies)
else
cardinal_smooth(A, adjacencies)

//SSicon_smooth
/proc/queue_smooth_neighbors(atom/A)
for(var/V in orange(1,A))
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/configuration.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ var/global/comms_allowed = 0 //By default, the server does not allow messages to
//Cross server communications
var/global/cross_address = "byond://" //This needs to be global as the message sent contains the comms key.
var/global/cross_allowed = 0 //Don't bother attempting to send if the address wasn't set.
var/global/panic_address = "byond://" //Reconnect a player this linked server if this server isn't accepting new players

var/global/medal_hub = null
var/global/medal_pass = " "
Expand Down
11 changes: 6 additions & 5 deletions code/_onclick/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@

if(control_disabled || stat)
return

if(!cameranet.checkTurfVis(get_turf_pixel(A)))
log_admin("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click)")
message_admins("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click)")
send2irc_adminless_only("NOCHEAT", "[key_name(src)] might be running a modified client! (failed checkTurfVis on AI click)")

var/turf/pixel_turf = get_turf_pixel(A)
if(pixel_turf && !cameranet.checkTurfVis(pixel_turf))
log_admin("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(pixel_turf)])")
message_admins("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([ADMIN_COORDJMP(pixel_turf)]))")
send2irc_adminless_only("NOCHEAT", "[key_name(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(pixel_turf)]))")
return

var/list/modifiers = params2list(params)
Expand Down
11 changes: 4 additions & 7 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,10 @@
ML.pulled(src)

/mob/living/carbon/human/CtrlClick(mob/user)
if(ishuman(user) && Adjacent(user))
var/mob/living/carbon/human/H = user
H.dna.species.grab(H, src, H.martial_art)
H.changeNext_move(CLICK_CD_MELEE)
return TRUE
return ..()

if(ishuman(user) && Adjacent(user))
var/mob/living/carbon/human/H = user
H.dna.species.grab(H, src, H.martial_art)
H.next_click = world.time + CLICK_CD_MELEE
/*
Alt click
Unused except for AI
Expand Down
9 changes: 9 additions & 0 deletions code/controllers/configuration.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@

var/check_randomizer = 0

var/allow_panic_bunker_bounce = 0 //Send new players somewhere else
var/panic_server_name = "somewhere else"

//IP Intel vars
var/ipintel_email
var/ipintel_rating_bad = 1
Expand Down Expand Up @@ -388,6 +391,12 @@
global.cross_allowed = 1
if("cross_comms_name")
cross_name = value
if("panic_server_name")
panic_server_name = value
if("panic_server_address")
global.panic_address = value
if(value != "byond:\\address:port")
allow_panic_bunker_bounce = 1
if("medal_hub_address")
global.medal_hub = value
if("medal_hub_password")
Expand Down
12 changes: 8 additions & 4 deletions code/controllers/subsystem/icon_smooth.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var/datum/subsystem/icon_smooth/SSicon_smooth
while(smooth_queue.len)
var/atom/A = smooth_queue[smooth_queue.len]
smooth_queue.len--
ss_smooth_icon(A)
smooth_icon(A)
if (MC_TICK_CHECK)
return
if (!smooth_queue.len)
Expand All @@ -25,8 +25,12 @@ var/datum/subsystem/icon_smooth/SSicon_smooth
/datum/subsystem/icon_smooth/Initialize()
smooth_zlevel(1,TRUE)
smooth_zlevel(2,TRUE)
for(var/V in smooth_queue)
var/queue = smooth_queue
smooth_queue = list()
for(var/V in queue)
var/atom/A = V
if(A.z == 1 || A.z == 2)
smooth_queue -= A
if(!A || A.z <= 2)
continue
smooth_icon(A)

..()
2 changes: 2 additions & 0 deletions code/datums/action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,13 @@
/datum/action/item_action/New(Target)
..()
var/obj/item/I = target
LAZYINITLIST(I.actions)
I.actions += src

/datum/action/item_action/Destroy()
var/obj/item/I = target
I.actions -= src
UNSETEMPTY(I.actions)
return ..()

/datum/action/item_action/Trigger()
Expand Down
7 changes: 3 additions & 4 deletions code/datums/ruins.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
//name = "A Chest of Doubloons"
name = null
var/id = null // For blacklisting purposes, all ruins need an id
var/description = "In the middle of a clearing in the rockface, there's a \
chest filled with gold coins with Spanish engravings. How is there a \
wooden container filled with 18th century coinage in the middle of a \
lavawracked hellscape? It is clearly a mystery."
var/description = "In the middle of a clearing in the rockface, there's a chest filled with gold coins with Spanish engravings. \
How is there a wooden container filled with 18th century coinage in the middle of a lavawracked hellscape? \
It is clearly a mystery."

var/cost = null
var/allow_duplicates = TRUE
Expand Down
Loading

0 comments on commit 7cce8cc

Please sign in to comment.