Skip to content

Commit 9e40f4e

Browse files
author
Arthurdentist
committed
Merge pull request #3 from d3athrow/Bleeding-Edge
updating
2 parents 94ce73c + 54ca1ad commit 9e40f4e

File tree

186 files changed

+4146
-4892
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+4146
-4892
lines changed

baystation12.dme

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@
239239
#include "code\game\communications.dm"
240240
#include "code\game\data_huds.dm"
241241
#include "code\game\response_team.dm"
242+
#include "code\game\say.dm"
242243
#include "code\game\shuttle_engines.dm"
243244
#include "code\game\skincmd.dm"
244245
#include "code\game\smoothwall.dm"
@@ -565,8 +566,6 @@
565566
#include "code\game\objects\effects\spawners\bombspawner.dm"
566567
#include "code\game\objects\effects\spawners\gibspawner.dm"
567568
#include "code\game\objects\effects\spawners\vaultspawner.dm"
568-
#include "code\game\objects\items\airlock_control_frame.dm"
569-
#include "code\game\objects\items\apc_frame.dm"
570569
#include "code\game\objects\items\blueprints.dm"
571570
#include "code\game\objects\items\bodybag.dm"
572571
#include "code\game\objects\items\candle.dm"
@@ -614,6 +613,18 @@
614613
#include "code\game\objects\items\devices\radio\headset.dm"
615614
#include "code\game\objects\items\devices\radio\intercom.dm"
616615
#include "code\game\objects\items\devices\radio\radio.dm"
616+
#include "code\game\objects\items\mountable_frames\access_button.dm"
617+
#include "code\game\objects\items\mountable_frames\air_alarm.dm"
618+
#include "code\game\objects\items\mountable_frames\airlock_controller_frame.dm"
619+
#include "code\game\objects\items\mountable_frames\airlock_sensor.dm"
620+
#include "code\game\objects\items\mountable_frames\apc_frame.dm"
621+
#include "code\game\objects\items\mountable_frames\fire_alarm.dm"
622+
#include "code\game\objects\items\mountable_frames\frames.dm"
623+
#include "code\game\objects\items\mountable_frames\intercoms.dm"
624+
#include "code\game\objects\items\mountable_frames\lights.dm"
625+
#include "code\game\objects\items\mountable_frames\mountables.dm"
626+
#include "code\game\objects\items\mountable_frames\wallmed.dm"
627+
#include "code\game\objects\items\mountable_frames\posters\poster.dm"
617628
#include "code\game\objects\items\robot\robot_designs.dm"
618629
#include "code\game\objects\items\robot\robot_items.dm"
619630
#include "code\game\objects\items\robot\robot_parts.dm"
@@ -798,7 +809,6 @@
798809
#include "code\game\turfs\unsimulated\beach.dm"
799810
#include "code\game\turfs\unsimulated\floor.dm"
800811
#include "code\game\turfs\unsimulated\walls.dm"
801-
#include "code\game\verbs\atom_verbs.dm"
802812
#include "code\game\verbs\ooc.dm"
803813
#include "code\game\verbs\suicide.dm"
804814
#include "code\game\verbs\who.dm"

code/WorkInProgress/Cael_Aislinn/Rust/core_gen.dm

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ max volume of plasma storeable by the field = the total volume of a number of ti
6161
idle_power_usage = 50
6262
active_power_usage = 500 //multiplied by field strength
6363
var/cached_power_avail = 0
64-
directwired = 1
6564
anchored = 0
6665

6766
var/locked = 1
@@ -88,10 +87,8 @@ max volume of plasma storeable by the field = the total volume of a number of ti
8887
switch(state)
8988
if(1)
9089
connect_to_network()
91-
src.directwired = 1
9290
if(2)
9391
disconnect_from_network()
94-
src.directwired = 0
9592
return 1
9693
return -1
9794

code/WorkInProgress/Cael_Aislinn/Rust/fuel_assembly_port_construction.dm

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,25 @@
11

22
//frame assembly
33

4-
/obj/item/rust_fuel_assembly_port_frame
4+
/obj/item/mounted/frame/rust_fuel_assembly_port
55
name = "Fuel Assembly Port frame"
66
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
77
icon_state = "port2"
88
w_class = 4
9+
mount_reqs = list("simfloor", "nospace")
910
flags = FPRINT
1011
siemens_coefficient = 1
1112

12-
/obj/item/rust_fuel_assembly_port_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
13+
/obj/item/mounted/frame/rust_fuel_assembly_port/attackby(obj/item/weapon/W as obj, mob/user as mob)
1314
if (istype(W, /obj/item/weapon/wrench))
1415
new /obj/item/stack/sheet/plasteel( get_turf(src.loc), 12 )
1516
del(src)
1617
return
1718
..()
1819

19-
/obj/item/rust_fuel_assembly_port_frame/proc/try_build(turf/on_wall)
20-
if (get_dist(on_wall,usr)>1)
21-
return
22-
var/ndir = get_dir(usr,on_wall)
23-
if (!(ndir in cardinal))
24-
return
25-
var/turf/loc = get_turf(usr)
26-
var/area/A = loc.loc
27-
if (!istype(loc, /turf/simulated/floor))
28-
usr << "\red Port cannot be placed on this spot."
29-
return
30-
if (A.requires_power == 0 || A.name == "Space")
31-
usr << "\red Port cannot be placed in this area."
32-
return
33-
new /obj/machinery/rust_fuel_assembly_port(loc, ndir, 1)
34-
del(src)
20+
/obj/item/mounted/frame/rust_fuel_assembly_port/do_build(turf/on_wall, mob/user)
21+
new /obj/machinery/rust_fuel_assembly_port(get_turf(user), get_dir(user, on_wall), 1)
22+
qdel(src)
3523

3624
//construction steps
3725
/obj/machinery/rust_fuel_assembly_port/New(turf/loc, var/ndir, var/building=0)
@@ -123,7 +111,7 @@
123111
playsound(get_turf(src), 'sound/items/Welder.ogg', 50, 1)
124112
if(do_after(user, 50))
125113
if(!src || !WT.remove_fuel(3, user)) return
126-
new /obj/item/rust_fuel_assembly_port_frame(loc)
114+
new /obj/item/mounted/frame/rust_fuel_assembly_port(loc)
127115
user.visible_message(\
128116
"\red [src] has been cut away from the wall by [user.name].",\
129117
"You detached the port frame.",\

code/WorkInProgress/Cael_Aislinn/Rust/fuel_compressor_construction.dm

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,25 @@
11

22
//frame assembly
33

4-
/obj/item/rust_fuel_compressor_frame
4+
/obj/item/mounted/frame/rust_fuel_compressor
55
name = "Fuel Compressor frame"
66
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
77
icon_state = "fuel_compressor0"
88
w_class = 4
9+
mount_reqs = list("simfloor", "nospace")
910
flags = FPRINT
1011
siemens_coefficient = 1
1112

12-
/obj/item/rust_fuel_compressor_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
13+
/obj/item/mounted/frame/rust_fuel_compressor/attackby(obj/item/weapon/W as obj, mob/user as mob)
1314
if (istype(W, /obj/item/weapon/wrench))
1415
new /obj/item/stack/sheet/plasteel( get_turf(src.loc), 12 )
1516
del(src)
1617
return
1718
..()
1819

19-
/obj/item/rust_fuel_compressor_frame/proc/try_build(turf/on_wall)
20-
if (get_dist(on_wall,usr)>1)
21-
return
22-
var/ndir = get_dir(usr,on_wall)
23-
if (!(ndir in cardinal))
24-
return
25-
var/turf/loc = get_turf(usr)
26-
var/area/A = loc.loc
27-
if (!istype(loc, /turf/simulated/floor))
28-
usr << "\red Compressor cannot be placed on this spot."
29-
return
30-
if (A.requires_power == 0 || A.name == "Space")
31-
usr << "\red Compressor cannot be placed in this area."
32-
return
33-
new /obj/machinery/rust_fuel_compressor(loc, ndir, 1)
34-
del(src)
20+
/obj/item/mounted/frame/rust_fuel_compressor/do_build(turf/on_wall, mob/user)
21+
new /obj/machinery/rust_fuel_compressor(get_turf(user), get_dir(user, on_wall), 1)
22+
qdel(src)
3523

3624
//construction steps
3725
/obj/machinery/rust_fuel_compressor/New(turf/loc, var/ndir, var/building=0)
@@ -150,7 +138,7 @@
150138
playsound(get_turf(src), 'sound/items/Welder.ogg', 50, 1)
151139
if(do_after(user, 50))
152140
if(!src || !WT.remove_fuel(3, user)) return
153-
new /obj/item/rust_fuel_assembly_port_frame(loc)
141+
new /obj/item/mounted/frame/rust_fuel_assembly_port(loc)
154142
user.visible_message(\
155143
"\red [src] has been cut away from the wall by [user.name].",\
156144
"You detached the compressor frame.",\

code/WorkInProgress/Cael_Aislinn/Rust/fuel_injector.dm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use_power = 1
1919
idle_power_usage = 10
2020
active_power_usage = 500
21-
directwired = 0
2221
var/remote_access_enabled = 1
2322
var/cached_power_avail = 0
2423
var/emergency_insert_ready = 0

code/WorkInProgress/kilakk/fax.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ var/list/alldepartments = list("Central Command")
111111
if(findtext(tofax.name,"Demotion"))
112112
new /obj/item/demote_chip(src.loc)
113113
if(findtext(tofax.name,"Commendation"))
114-
new /obj/item/weapon/contraband/poster(src.loc,-1)
114+
new /obj/item/mounted/poster(src.loc,-1)
115115
sendcooldown = 1800
116116

117117
else

code/ZAS/Airflow.dm

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ proc/AirflowSpace(zone/A)
248248
/atom/movable/proc/GotoAirflowDest(n)
249249
last_airflow = world.time
250250
if(airflow_dest == loc)
251-
step_away(src,loc)
251+
return
252252
if(ismob(src))
253253
if(src:status_flags & GODMODE)
254254
return
@@ -365,21 +365,24 @@ proc/AirflowSpace(zone/A)
365365
airflow_speed = 0
366366
airflow_time = 0
367367
. = ..()
368+
sound_override = 0
368369

369370
atom/movable/proc/airflow_hit(atom/A)
370371
airflow_speed = 0
371372
airflow_dest = null
372373

373374
mob/airflow_hit(atom/A)
374-
for(var/mob/M in hearers(src))
375-
M.show_message("\red <B>\The [src] slams into \a [A]!</B>",1,"\red You hear a loud slam!",2)
375+
if(!sound_override)
376+
for(var/mob/M in hearers(src))
377+
M.show_message("\red <B>\The [src] slams into \a [A]!</B>",1,"\red You hear a loud slam!",2)
376378
//playsound(get_turf(src), "smash.ogg", 25, 1, -1)
377379
weakened = max(weakened, (istype(A,/obj/item) ? A:w_class : rand(1,5))) //Heheheh
378380
. = ..()
379381

380382
obj/airflow_hit(atom/A)
381-
for(var/mob/M in hearers(src))
382-
M.show_message("\red <B>\The [src] slams into \a [A]!</B>",1,"\red You hear a loud slam!",2)
383+
if(!sound_override)
384+
for(var/mob/M in hearers(src))
385+
M.show_message("\red <B>\The [src] slams into \a [A]!</B>",1,"\red You hear a loud slam!",2)
383386
//playsound(get_turf(src), "smash.ogg", 25, 1, -1)
384387
. = ..()
385388

code/__HELPERS/game.dm

Lines changed: 63 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,17 @@
4141
return 0 //not in range and not telekinetic
4242

4343
// Like view but bypasses luminosity check
44-
/proc/hear(var/range, var/atom/source)
44+
/proc/get_hear(var/range, var/atom/source)
45+
4546
var/lum = source.luminosity
4647
source.luminosity = 6
47-
. = view(range, source)
48+
49+
var/list/heard = view(range, source)
4850
source.luminosity = lum
4951

52+
return heard
53+
54+
5055
/proc/alone_in_area(var/area/the_area, var/mob/must_be_alone, var/check_type = /mob/living/carbon)
5156
var/area/our_area = get_area_master(the_area)
5257
for(var/C in living_mob_list)
@@ -123,63 +128,87 @@
123128
return turfs
124129

125130

131+
//This is the new version of recursive_mob_check, used for say().
132+
//The other proc was left intact because morgue trays use it.
133+
/proc/recursive_hear_check(var/atom/O)
134+
var/list/processing_list = list(O)
135+
var/list/processed_list = list()
136+
var/list/found_atoms = list()
137+
138+
while(processing_list.len)
139+
var/atom/A = processing_list[1]
140+
141+
if(A.flags & HEAR)
142+
found_atoms |= A
143+
144+
for(var/atom/B in A)
145+
if(!processed_list[B])
146+
processing_list |= B
147+
148+
processing_list.Cut(1, 2)
149+
processed_list[A] = A
150+
151+
return found_atoms
126152

127153
//var/debug_mob = 0
128154

129155
// Will recursively loop through an atom's contents and check for mobs, then it will loop through every atom in that atom's contents.
130156
// It will keep doing this until it checks every content possible. This will fix any problems with mobs, that are inside objects,
131157
// being unable to hear people due to being in a box within a bag.
132158

133-
/proc/recursive_mob_check(var/atom/O, var/list/L = list(), var/recursion_limit = 3, var/client_check = 1, var/sight_check = 1, var/include_radio = 1)
159+
/proc/recursive_mob_check(var/atom/O,var/client_check=1,var/sight_check=1,var/include_radio=1)
134160

135-
//debug_mob += O.contents.len
136-
if(!recursion_limit)
137-
return L
138-
for(var/atom/movable/A in O.contents)
161+
var/list/processing_list = list(O)
162+
var/list/processed_list = list()
163+
var/list/found_mobs = list()
164+
165+
while(processing_list.len)
166+
167+
var/atom/A = processing_list[1]
168+
var/passed = 0
139169

140170
if(ismob(A))
141-
var/mob/M = A
142-
if(client_check && !M.client)
143-
L = recursive_mob_check(A, L, recursion_limit - 1, client_check, sight_check, include_radio)
144-
continue
145-
if(sight_check && !isInSight(A, O))
146-
continue
147-
L |= M
148-
//world.log << "[recursion_limit] = [M] - [get_turf(M)] - ([M.x], [M.y], [M.z])"
171+
var/mob/A_tmp = A
172+
passed=1
173+
174+
if(client_check && !A_tmp.client)
175+
passed=0
176+
177+
if(sight_check && !isInSight(A_tmp, O))
178+
passed=0
149179

150180
else if(include_radio && istype(A, /obj/item/device/radio))
181+
passed=1
182+
151183
if(sight_check && !isInSight(A, O))
152-
continue
153-
L |= A
184+
passed=0
154185

155-
L = recursive_mob_check(A, L, recursion_limit - 1, client_check, sight_check, include_radio)
186+
if(passed)
187+
found_mobs |= A
156188

157-
return L
189+
for(var/atom/B in A)
190+
if(!processed_list[B])
191+
processing_list |= B
192+
193+
processing_list.Cut(1, 2)
194+
processed_list[A] = A
195+
196+
return found_mobs
158197

159198
// The old system would loop through lists for a total of 5000 per function call, in an empty server.
160199
// This new system will loop at around 1000 in an empty server.
161200

162-
/proc/get_mobs_in_view(var/R, var/atom/source)
163-
// Returns a list of mobs in range of R from source. Used in radio and say code.
164-
201+
/proc/get_hearers_in_view(var/R, var/atom/source)
202+
// Returns a list of hearers in range of R from source. Used in saycode.
165203
var/turf/T = get_turf(source)
166204
var/list/hear = list()
167205

168206
if(!T)
169207
return hear
170208

171-
var/list/range = hear(R, T)
172-
209+
var/list/range = get_hear(R, T)
173210
for(var/atom/movable/A in range)
174-
if(ismob(A))
175-
var/mob/M = A
176-
if(M.client)
177-
hear.Add(M)
178-
//world.log << "Start = [M] - [get_turf(M)] - ([M.x], [M.y], [M.z])"
179-
else if(istype(A, /obj/item/device/radio))
180-
hear.Add(A)
181-
182-
hear = recursive_mob_check(A, hear, 3, 1, 0, 1)
211+
hear |= recursive_hear_check(A)
183212

184213
return hear
185214

@@ -195,7 +224,7 @@
195224
if(R)
196225
var/turf/speaker = get_turf(R)
197226
if(speaker)
198-
for(var/turf/T in hear(R.canhear_range,speaker))
227+
for(var/turf/T in get_hear(R.canhear_range,speaker))
199228
speaker_coverage[T] = T
200229

201230

code/__HELPERS/text.dm

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,17 @@
4444
index = findtext(t, char)
4545
return t
4646

47+
/proc/strip_html_properly(var/input)
48+
var/opentag = 1 //These store the position of < and > respectively.
49+
var/closetag = 1
50+
while(1)
51+
opentag = findtext(input, "<")
52+
closetag = findtext(input, ">")
53+
if(!closetag || !opentag)
54+
break
55+
input = copytext(input, 1, opentag) + copytext(input, (closetag + 1))
56+
return input
57+
4758
//Removes a few problematic characters
4859
/proc/sanitize_simple(var/t,var/list/repl_chars = list("\n"="#","\t"="#",""=""))
4960
for(var/char in repl_chars)

0 commit comments

Comments
 (0)