Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/tgstation/-tg-station int…
Browse files Browse the repository at this point in the history
…o clothessec

Conflicts:
	icons/mob/uniform.dmi
	icons/obj/clothing/uniforms.dmi
  • Loading branch information
paprka committed Feb 6, 2015
2 parents 2ef8848 + ec79511 commit c527491
Show file tree
Hide file tree
Showing 186 changed files with 3,238 additions and 1,453 deletions.
4 changes: 2 additions & 2 deletions _maps/map_files/MiniStation/MiniStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@
"vY" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/turf/simulated/shuttle/plating,/area/space)
"vZ" = (/obj/machinery/door/airlock/shuttle{name = "Arrivals Shuttle Airlock"},/obj/docking_port/mobile{dir = 2; dwidth = 5; height = 7; id = "arrival"; name = "arrival shuttle"; travelDir = -90; width = 15},/obj/docking_port/stationary{dir = 2; dwidth = 5; height = 7; id = "arrival_home"; name = "port bay 1"; width = 15},/turf/simulated/shuttle/floor,/area/space)
"wa" = (/turf/simulated/shuttle/wall{icon_state = "swall_s6"; dir = 2},/area/space)
"wb" = (/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/weapon/tank/emergency_oxygen,/turf/simulated/floor/plating,/area/hallway/primary/central)
"wb" = (/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/weapon/tank/internals/emergency_oxygen,/turf/simulated/floor/plating,/area/hallway/primary/central)
"wc" = (/turf/simulated/wall,/area/crew_quarters/heads{name = "\improper Job Assignment"})
"wd" = (/obj/machinery/light/small{dir = 1},/obj/structure/closet,/turf/simulated/floor/plating,/area/hallway/primary/central)
"we" = (/obj/structure/piano,/turf/simulated/floor/plasteel{icon_state = "bar"},/area/crew_quarters/bar)
Expand Down Expand Up @@ -1385,7 +1385,7 @@
"AG" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 9},/obj/structure/dispenser,/turf/simulated/floor/plasteel,/area/engine/engineering)
"AH" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/door/airlock/glass_engineering{name = "Engineering"; req_access_txt = "10"; req_one_access_txt = "0"},/turf/simulated/floor/plasteel,/area/engine/engineering)
"AI" = (/obj/machinery/firealarm{dir = 8; pixel_x = -24},/turf/simulated/floor/plasteel,/area/engine/engineering)
"AJ" = (/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/clothing/suit/hazardvest,/obj/item/clothing/suit/hazardvest,/obj/item/weapon/tank/emergency_oxygen/engi,/obj/item/weapon/tank/emergency_oxygen/engi,/turf/simulated/floor/plasteel,/area/engine/engineering)
"AJ" = (/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/clothing/suit/hazardvest,/obj/item/clothing/suit/hazardvest,/obj/item/weapon/tank/internals/emergency_oxygen/engi,/obj/item/weapon/tank/internals/emergency_oxygen/engi,/turf/simulated/floor/plasteel,/area/engine/engineering)
"AK" = (/obj/machinery/door/airlock/glass_engineering{name = "Engineering"; req_access_txt = "10"; req_one_access_txt = "0"},/turf/simulated/floor/plasteel,/area/engine/engineering)
"AL" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/turf/simulated/floor/plasteel,/area/engine/engineering)
"AM" = (/obj/machinery/light{icon_state = "tube1"; dir = 4},/turf/simulated/floor/plasteel,/area/engine/engineering)
Expand Down
92 changes: 49 additions & 43 deletions _maps/map_files/TgStation/tgstation.2.1.3.dmm

Large diffs are not rendered by default.

234 changes: 105 additions & 129 deletions _maps/map_files/generic/z2.dmm

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions _maps/map_files/generic/z3.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"aH" = (/turf/simulated/shuttle/floor{icon_state = "floor3"},/turf/simulated/shuttle/wall{icon_state = "swall_f6"; dir = 2},/area/derelict/ship)
"aI" = (/obj/item/weapon/stock_parts/cell{charge = 100; maxcharge = 15000},/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/space)
"aJ" = (/turf/simulated/shuttle/wall{tag = "icon-swall_f14"; icon_state = "swall_f14"},/area/space)
"aK" = (/obj/structure/rack,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/storage/toolbox/mechanical,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/space)
"aK" = (/obj/structure/rack,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/weapon/storage/toolbox/mechanical,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/space)
"aL" = (/obj/structure/cable,/obj/structure/computerframe{anchored = 1},/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/space)
"aM" = (/turf/simulated/shuttle/wall{tag = "icon-swall_f11"; icon_state = "swall_f11"},/area/space)
"aN" = (/obj/structure/lattice,/turf/space,/area/space)
Expand All @@ -56,7 +56,7 @@
"bd" = (/turf/simulated/shuttle/wall{icon_state = "swall11"; dir = 2},/area/space)
"be" = (/obj/structure/stool/bed/chair{dir = 4},/obj/effect/decal/remains/human,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/space)
"bf" = (/obj/machinery/portable_atmospherics/canister/oxygen,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/space)
"bg" = (/obj/structure/table,/obj/item/weapon/tank/oxygen,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/space)
"bg" = (/obj/structure/table,/obj/item/weapon/tank/internals/oxygen,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/space)
"bh" = (/obj/machinery/door/airlock/shuttle,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/space)
"bi" = (/turf/simulated/shuttle/wall{icon_state = "swall_s9"; dir = 2},/area/derelict/ship)
"bj" = (/turf/simulated/shuttle/wall{icon_state = "swall_s5"; dir = 2},/area/derelict/ship)
Expand Down
2 changes: 1 addition & 1 deletion _maps/map_files/generic/z5.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
"eb" = (/obj/machinery/atmospherics/unary/vent_pump{on = 1},/turf/simulated/floor/plasteel{dir = 2; icon_state = "whiteblue"},/area/mine/laborcamp)
"ec" = (/obj/machinery/navbeacon{codes_txt = "patrol;next_patrol=1-Storage"; location = "Sleeper"},/turf/simulated/floor/plasteel{dir = 2; icon_state = "whiteblue"},/area/mine/laborcamp)
"ed" = (/obj/machinery/light/small{dir = 4},/obj/structure/stool/bed/roller,/turf/simulated/floor/plasteel{dir = 2; icon_state = "whiteblue"},/area/mine/laborcamp)
"ee" = (/obj/machinery/atmospherics/pipe/simple,/obj/structure/closet/crate/internals,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/tank/emergency_oxygen,/obj/item/clothing/mask/breath,/obj/item/clothing/mask/breath,/obj/item/clothing/mask/breath,/obj/item/clothing/mask/breath,/turf/simulated/floor/plasteel{icon_state = "floorgrime"; temperature = 273.15},/area/mine/laborcamp)
"ee" = (/obj/machinery/atmospherics/pipe/simple,/obj/structure/closet/crate/internals,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/clothing/mask/breath,/obj/item/clothing/mask/breath,/obj/item/clothing/mask/breath,/obj/item/clothing/mask/breath,/turf/simulated/floor/plasteel{icon_state = "floorgrime"; temperature = 273.15},/area/mine/laborcamp)
"ef" = (/obj/machinery/light/small,/turf/simulated/floor/plasteel{icon_state = "floorgrime"; temperature = 273.15},/area/mine/laborcamp)
"eg" = (/obj/machinery/bot/secbot/beepsky{desc = "Powered by tears and swet of laborer."; name = "Prison Ofitser"},/obj/machinery/navbeacon{codes_txt = "patrol;next_patrol=2-NMine"; location = "1-Storage"},/turf/simulated/floor/plasteel{icon_state = "asteroidfloor"; temperature = 273.15},/area/mine/laborcamp)
"eh" = (/obj/structure/plasticflaps/mining,/turf/simulated/floor/plasteel{icon_state = "asteroidfloor"; temperature = 273.15},/area/mine/laborcamp)
Expand Down
75 changes: 53 additions & 22 deletions code/__HELPERS/text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
return t

//Removes a few problematic characters
/proc/sanitize_simple(var/t,var/list/repl_chars = list("\n"="#","\t"="#",""=""))
/proc/sanitize_simple(var/t,var/list/repl_chars = list("\n"="#","\t"="#"))
for(var/char in repl_chars)
var/index = findtext(t, char)
while(index)
t = copytext(t, 1, index) + repl_chars[char] + copytext(t, index+1)
index = findtext(t, char)
index = findtext(t, char, index+1)
return t

//Runs byond's sanitization proc along-side sanitize_simple
Expand Down Expand Up @@ -147,32 +147,63 @@

return t_out

//this proc strips html properly, but it's not lazy like the other procs.
//this means that it doesn't just remove < and > and call it a day. seriously, who the fuck thought that would be useful.
//this proc strips html properly, this means that it removes everything between < and >, and between "http" and "://"
//also limit the size of the input, if specified to
/proc/strip_html_properly(var/input,var/max_length=MAX_MESSAGE_LEN)
if(!input)
return
var/opentag = 1 //These store the position of < and > respectively.
var/closetag = 1
while(1)
opentag = findtext(input, "<")
closetag = findtext(input, ">")
if(closetag && opentag)
if(closetag < opentag)
input = copytext(input, (closetag + 1))
else
input = copytext(input, 1, opentag) + copytext(input, (closetag + 1))
else if(closetag || opentag)
if(opentag)
input = copytext(input, 1, opentag)
else
input = copytext(input, (closetag + 1))
else
break

if(max_length)
input = copytext(input,1,max_length)
return input

var/sanitized_output
var/next_html_tag = findtext(input, "<")
var/next_http = findtext(input, "http", 1, next_html_tag)

//the opening and closing of the expression to skip, e.g '<' and '>'
var/opening = non_zero_min(next_html_tag, next_http)
var/closing

sanitized_output = copytext(input, 1, opening)

while(next_html_tag || next_http)

//we treat < ... >
if(opening == next_html_tag)
closing = findtext(input, ">", opening + 1)
if(closing)
next_html_tag = findtext(input, "<", closing)
next_http = findtext(input, "http", closing, next_html_tag)
else //no matching ">"
next_html_tag = 0

//we treat "http(s)://"
else
closing = findtext(input, "://", opening + 1)
if(closing)
closing += 2 //skip these extra //
next_http = findtext(input, "http", closing)
next_html_tag = findtext(input, "<", closing, next_http)
else //no matching "://"
next_http = 0

//check if we've something to skip
if(closing)
opening = non_zero_min(next_html_tag, next_http)
sanitized_output += copytext(input, closing + 1, opening)

sanitized_output += copytext(input, opening) //don't forget the remaining text

return sanitized_output

//strip_html_properly helper proc that returns the smallest non null of two numbers
//or 0 if they're both null (needed because of findtext returning 0 when a value is not present)
/proc/non_zero_min(var/a, var/b)
if(!a)
return b
if(!b)
return a
return (a < b ? a : b)

/*
* Text searches
Expand Down
2 changes: 1 addition & 1 deletion code/_globalvars/station.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var/global/obj/effect/datacore/data_core = null
var/global/datum/datacore/data_core = null
//var/global/defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event
//Noble idea, but doing this made GC fail. The gains from waiting on deffering are lost by using del()

Expand Down
14 changes: 7 additions & 7 deletions code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,29 +133,29 @@
C << "<span class='notice'>You are not wearing a mask.</span>"
return 1
else
if(istype(C.l_hand, /obj/item/weapon/tank))
if(istype(C.l_hand, /obj/item/weapon/tank/internals))
C << "<span class='notice'>You are now running on internals from the [C.l_hand] on your left hand.</span>"
C.internal = C.l_hand
else if(istype(C.r_hand, /obj/item/weapon/tank))
else if(istype(C.r_hand, /obj/item/weapon/tank/internals))
C << "<span class='notice'>You are now running on internals from the [C.r_hand] on your right hand.</span>"
C.internal = C.r_hand
else if(ishuman(C))
var/mob/living/carbon/human/H = C
if(istype(H.s_store, /obj/item/weapon/tank))
if(istype(H.s_store, /obj/item/weapon/tank/internals))
H << "<span class='notice'>You are now running on internals from the [H.s_store] on your [H.wear_suit].</span>"
H.internal = H.s_store
else if(istype(H.belt, /obj/item/weapon/tank))
else if(istype(H.belt, /obj/item/weapon/tank/internals))
H << "<span class='notice'>You are now running on internals from the [H.belt] on your belt.</span>"
H.internal = H.belt
else if(istype(H.l_store, /obj/item/weapon/tank))
else if(istype(H.l_store, /obj/item/weapon/tank/internals))
H << "<span class='notice'>You are now running on internals from the [H.l_store] in your left pocket.</span>"
H.internal = H.l_store
else if(istype(H.r_store, /obj/item/weapon/tank))
else if(istype(H.r_store, /obj/item/weapon/tank/internals))
H << "<span class='notice'>You are now running on internals from the [H.r_store] in your right pocket.</span>"
H.internal = H.r_store

//Seperate so CO2 jetpacks are a little less cumbersome.
if(!C.internal && istype(C.back, /obj/item/weapon/tank))
if(!C.internal && istype(C.back, /obj/item/weapon/tank/internals))
C << "<span class='notice'>You are now running on internals from the [C.back] on your back.</span>"
C.internal = C.back

Expand Down
4 changes: 4 additions & 0 deletions code/_onclick/telekinesis.dm
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ var/const/tk_maxrange = 15
overlays += icon(focus.icon,focus.icon_state)
return

obj/item/tk_grab/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is using \his telekinesis to choke \himself! It looks like \he's trying to commit suicide.</span>")
return (OXYLOSS)

/*Not quite done likely needs to use something thats not get_step_to
/obj/item/tk_grab/proc/check_path()
var/turf/ref = get_turf(src.loc)
Expand Down
Loading

0 comments on commit c527491

Please sign in to comment.