diff --git a/SpacemanDMM.toml b/SpacemanDMM.toml index 085babef829..c9f7d72f33f 100644 --- a/SpacemanDMM.toml +++ b/SpacemanDMM.toml @@ -1,5 +1,9 @@ [langserver] dreamchecker = true +[code_standards] +disallow_relative_proc_definitions = true +disallow_relative_type_definitions = true + [debugger] engine = "auxtools" diff --git a/__DEFINES/_macros.dm b/__DEFINES/_macros.dm index 37b9c6ab005..218c1bfa4ce 100644 --- a/__DEFINES/_macros.dm +++ b/__DEFINES/_macros.dm @@ -336,7 +336,7 @@ //This one returns the "space" area //#define get_space_area (get_area(locate(1,1,2))) //xd -proc/get_space_area() +/proc/get_space_area() //global.space_area is defined in code/game/areas/areas.dm, and set when the space area is created if(!global.space_area) var/area/new_space_area = new /area diff --git a/__DEFINES/setup.dm b/__DEFINES/setup.dm index 58d0a2966bf..5e8aef032ef 100644 --- a/__DEFINES/setup.dm +++ b/__DEFINES/setup.dm @@ -1775,7 +1775,7 @@ One; Your account number and PIN are required. Two; Your ID card, account number and PIN are required. You can change this mid-game at an ATM."} -proc/bank_security_num2text(var/num) +/proc/bank_security_num2text(var/num) switch(num) if(0) return "Zero" diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm index 3c19bf75ebb..a6f3c502f12 100755 --- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm @@ -1,4 +1,4 @@ -obj/machinery/atmospherics/trinary/filter +/obj/machinery/atmospherics/trinary/filter icon = 'icons/obj/atmospherics/filter.dmi' icon_state = "hintact_off" name = "Gas filter" diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm index ec2275cf252..a9bf2362674 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm @@ -1,4 +1,4 @@ -obj/machinery/atmospherics/trinary/mixer +/obj/machinery/atmospherics/trinary/mixer icon = 'icons/obj/atmospherics/mixer.dmi' icon_state = "intact_off" @@ -16,7 +16,7 @@ obj/machinery/atmospherics/trinary/mixer ex_node_offset = 5 -obj/machinery/atmospherics/trinary/mixer/update_icon() +/obj/machinery/atmospherics/trinary/mixer/update_icon() if(stat & NOPOWER) icon_state = "intact_off" else if(node2 && node3 && node1) @@ -26,26 +26,26 @@ obj/machinery/atmospherics/trinary/mixer/update_icon() on = 0 ..() -obj/machinery/atmospherics/trinary/mixer/power_change() +/obj/machinery/atmospherics/trinary/mixer/power_change() var/old_stat = stat ..() if(old_stat != stat) on = !on update_icon() -obj/machinery/atmospherics/trinary/mixer/New() +/obj/machinery/atmospherics/trinary/mixer/New() ..() air3.volume = 300 -obj/machinery/atmospherics/trinary/mixer/process() +/obj/machinery/atmospherics/trinary/mixer/process() . = ..() if(!on) return var/output_starting_pressure = air3.return_pressure() var/pressure_delta = target_pressure - output_starting_pressure - + if(pressure_delta > 0.01 && ((air1.temperature > 0 && air2.temperature > 0) || air3.temperature > 0)) var/output_volume = air3.volume + (network3 ? network3.volume : 0) //get gas from input #1 @@ -64,13 +64,13 @@ obj/machinery/atmospherics/trinary/mixer/process() var/ratio = min(air1_moles/transfer_moles1, air2_moles/transfer_moles2) transfer_moles1 *= ratio transfer_moles2 *= ratio - + //actually transfer the gas var/datum/gas_mixture/removed1 = air1.remove(transfer_moles1) var/datum/gas_mixture/removed2 = air2.remove(transfer_moles2) air3.merge(removed1) air3.merge(removed2) - + if(network1) network1.update = 1 if(network2) @@ -80,7 +80,7 @@ obj/machinery/atmospherics/trinary/mixer/process() return 1 -obj/machinery/atmospherics/trinary/mixer/attack_hand(user as mob) +/obj/machinery/atmospherics/trinary/mixer/attack_hand(user as mob) if(..()) return src.add_fingerprint(usr) @@ -111,7 +111,7 @@ obj/machinery/atmospherics/trinary/mixer/attack_hand(user as mob) onclose(user, "atmo_mixer") return -obj/machinery/atmospherics/trinary/mixer/Topic(href,href_list) +/obj/machinery/atmospherics/trinary/mixer/Topic(href,href_list) if(..()) return if(href_list["power"]) diff --git a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm index df2663d22f6..8e708a63cc3 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm @@ -1,4 +1,4 @@ -obj/machinery/atmospherics/trinary +/obj/machinery/atmospherics/trinary dir = SOUTH initialize_directions = SOUTH|NORTH|WEST use_power = 1 @@ -30,7 +30,7 @@ obj/machinery/atmospherics/trinary var/node_list = list(node1,node2,node3) ..(adjacent_procd,node_list) -obj/machinery/atmospherics/trinary/New() +/obj/machinery/atmospherics/trinary/New() ..() initialize_directions() air1 = new @@ -51,7 +51,7 @@ obj/machinery/atmospherics/trinary/New() if(WEST) initialize_directions = EAST|WEST|NORTH -obj/machinery/atmospherics/trinary/buildFrom(var/mob/usr,var/obj/item/pipe/pipe) +/obj/machinery/atmospherics/trinary/buildFrom(var/mob/usr,var/obj/item/pipe/pipe) if(!(pipe.dir in list(NORTH, SOUTH, EAST, WEST)) && src.mirror) //because the dir isn't in the right set, we want to make the mirror kind var/obj/machinery/atmospherics/trinary/mirrored_pipe = new mirror(src.loc) pipe.dir = turn(pipe.dir, -45) @@ -103,7 +103,7 @@ obj/machinery/atmospherics/trinary/buildFrom(var/mob/usr,var/obj/item/pipe/pipe) // Housekeeping and pipe network stuff below -obj/machinery/atmospherics/trinary/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference) +/obj/machinery/atmospherics/trinary/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference) if(reference == node1) network1 = new_network @@ -120,7 +120,7 @@ obj/machinery/atmospherics/trinary/network_expand(datum/pipe_network/new_network return null -obj/machinery/atmospherics/trinary/Destroy() +/obj/machinery/atmospherics/trinary/Destroy() if(node1) node1.disconnect(src) if(network1) @@ -140,7 +140,7 @@ obj/machinery/atmospherics/trinary/Destroy() ..() -obj/machinery/atmospherics/trinary/initialize() +/obj/machinery/atmospherics/trinary/initialize() if(node1 && node2 && node3) return @@ -162,7 +162,7 @@ obj/machinery/atmospherics/trinary/initialize() update_icon() add_self_to_holomap() -obj/machinery/atmospherics/trinary/build_network() +/obj/machinery/atmospherics/trinary/build_network() if(!network1 && node1) network1 = new /datum/pipe_network network1.normal_members += src @@ -179,7 +179,7 @@ obj/machinery/atmospherics/trinary/build_network() network3.build_network(node3, src) -obj/machinery/atmospherics/trinary/return_network(obj/machinery/atmospherics/reference) +/obj/machinery/atmospherics/trinary/return_network(obj/machinery/atmospherics/reference) build_network() if(reference==node1) @@ -193,7 +193,7 @@ obj/machinery/atmospherics/trinary/return_network(obj/machinery/atmospherics/ref return null -obj/machinery/atmospherics/trinary/reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network) +/obj/machinery/atmospherics/trinary/reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network) if(network1 == old_network) network1 = new_network if(network2 == old_network) @@ -203,7 +203,7 @@ obj/machinery/atmospherics/trinary/reassign_network(datum/pipe_network/old_netwo return 1 -obj/machinery/atmospherics/trinary/return_network_air(datum/pipe_network/reference) +/obj/machinery/atmospherics/trinary/return_network_air(datum/pipe_network/reference) var/list/results = list() if(network1 == reference) @@ -215,7 +215,7 @@ obj/machinery/atmospherics/trinary/return_network_air(datum/pipe_network/referen return results -obj/machinery/atmospherics/trinary/disconnect(obj/machinery/atmospherics/reference) +/obj/machinery/atmospherics/trinary/disconnect(obj/machinery/atmospherics/reference) if(reference==node1) if(network1) qdel(network1) diff --git a/code/ATMOSPHERICS/components/unary/oxygen_generator.dm b/code/ATMOSPHERICS/components/unary/oxygen_generator.dm index 7fac354f03f..d88a1b62ff4 100644 --- a/code/ATMOSPHERICS/components/unary/oxygen_generator.dm +++ b/code/ATMOSPHERICS/components/unary/oxygen_generator.dm @@ -1,4 +1,4 @@ -obj/machinery/atmospherics/unary/oxygen_generator +/obj/machinery/atmospherics/unary/oxygen_generator icon = 'icons/obj/atmospherics/oxygen_generator.dmi' icon_state = "intact_off" density = 1 @@ -13,7 +13,7 @@ obj/machinery/atmospherics/unary/oxygen_generator var/oxygen_content = 10 -obj/machinery/atmospherics/unary/oxygen_generator/update_icon() +/obj/machinery/atmospherics/unary/oxygen_generator/update_icon() if(node1) icon_state = "intact_[on?("on"):("off")]" else @@ -23,12 +23,12 @@ obj/machinery/atmospherics/unary/oxygen_generator/update_icon() return -obj/machinery/atmospherics/unary/oxygen_generator/New() +/obj/machinery/atmospherics/unary/oxygen_generator/New() ..() air_contents.volume = 50 -obj/machinery/atmospherics/unary/oxygen_generator/process() +/obj/machinery/atmospherics/unary/oxygen_generator/process() . = ..() if(!on) return diff --git a/code/ZAS/ConnectionGroup.dm b/code/ZAS/ConnectionGroup.dm index 6ec62fc44bf..9ff26b81bc8 100644 --- a/code/ZAS/ConnectionGroup.dm +++ b/code/ZAS/ConnectionGroup.dm @@ -204,7 +204,7 @@ Class Procs: if(!A.air.compare(air)) SSair.mark_edge_active(src) -proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles) +/proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles) //This implements a simplistic version of the Stefan-Boltzmann law. var/energy_delta = ((A.temperature - B.temperature) ** 4) * STEFAN_BOLTZMANN_CONSTANT * connecting_tiles * 2.5 var/maximum_energy_delta = max(0, min(A.temperature * A.heat_capacity(), B.temperature * B.heat_capacity())) diff --git a/code/ZAS/Debug.dm b/code/ZAS/Debug.dm index 106208aae6f..dd5158139b2 100644 --- a/code/ZAS/Debug.dm +++ b/code/ZAS/Debug.dm @@ -16,7 +16,3 @@ var/image/mark = image('icons/Testing/Zone.dmi', icon_state = "mark") overlays -= dbg_img overlays += img dbg_img = img - -proc/soft_assert(thing,fail) - if(!thing) - message_admins(fail) \ No newline at end of file diff --git a/code/ZAS/Diagnostic.dm b/code/ZAS/Diagnostic.dm index 40980ed3618..73f35b0fefc 100644 --- a/code/ZAS/Diagnostic.dm +++ b/code/ZAS/Diagnostic.dm @@ -1,4 +1,4 @@ -client/proc/Zone_Info(turf/T as null|turf) +/client/proc/Zone_Info(turf/T as null|turf) set category = "Debug" if(T) if(istype(T,/turf/simulated) && T:zone) @@ -14,9 +14,9 @@ client/proc/Zone_Info(turf/T as null|turf) images -= zone_debug_images[zone] zone_debug_images = null -client/var/list/zone_debug_images +/client/var/list/zone_debug_images -client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf) +/client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf) set category = "Debug" if(!istype(T)) diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm index 9fa093750c3..34563051d4a 100644 --- a/code/ZAS/Fire.dm +++ b/code/ZAS/Fire.dm @@ -276,13 +276,13 @@ Attach to transfer valve and open. BOOM. set_light(0) ..() -turf/simulated/var/fire_protection = 0 //Protects newly extinguished tiles from being overrun again. -turf/proc/apply_fire_protection() -turf/simulated/apply_fire_protection() +/turf/simulated/var/fire_protection = 0 //Protects newly extinguished tiles from being overrun again. +/turf/proc/apply_fire_protection() +/turf/simulated/apply_fire_protection() fire_protection = world.time -datum/gas_mixture/proc/zburn(var/turf/T, force_burn) +/datum/gas_mixture/proc/zburn(var/turf/T, force_burn) // NOTE: zburn is also called from canisters and in tanks/pipes (via react()). Do NOT assume T is always a turf. // In the aforementioned cases, it's null. - N3X. var/value = 0 @@ -380,7 +380,7 @@ datum/gas_mixture/proc/zburn(var/turf/T, force_burn) return still_burning -datum/gas_mixture/proc/check_combustability(var/turf/T, var/objects) +/datum/gas_mixture/proc/check_combustability(var/turf/T, var/objects) //this check comes up very often and is thus centralized here to ease adding stuff // zburn is used in tank fires, as well. This check, among others, broke tankbombs. - N3X /* @@ -404,7 +404,7 @@ datum/gas_mixture/proc/check_combustability(var/turf/T, var/objects) return 0 -datum/gas_mixture/proc/calculate_firelevel(var/turf/T) +/datum/gas_mixture/proc/calculate_firelevel(var/turf/T) //Calculates the firelevel based on one equation instead of having to do this multiple times in different areas. var/total_fuel = 0 diff --git a/code/__HELPERS/angles_dirs.dm b/code/__HELPERS/angles_dirs.dm index 8fcaf491df4..9c15c9cfa1d 100644 --- a/code/__HELPERS/angles_dirs.dm +++ b/code/__HELPERS/angles_dirs.dm @@ -34,7 +34,7 @@ return angle -proc/get_cardinal_dir(atom/A, atom/B) +/proc/get_cardinal_dir(atom/A, atom/B) var/dx = abs(B.x - A.x) var/dy = abs(B.y - A.y) return get_dir(A, B) & (rand() * (dx+dy) < dy ? 3 : 12) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index bb211469245..244d06c8505 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -163,50 +163,6 @@ #define SIGN(X) ((X<0)?-1:1) -proc/inLineOfSight(X1,Y1,X2,Y2,Z=1,PX1=16.5,PY1=16.5,PX2=16.5,PY2=16.5) - var/turf/T - if(X1==X2) - if(Y1==Y2) - return 1 //Light cannot be blocked on same tile - else - var/s = SIGN(Y2-Y1) - Y1+=s - while(Y1!=Y2) - T=locate(X1,Y1,Z) - if(T.opacity) - return 0 - Y1+=s - else - var/m=(32*(Y2-Y1)+(PY2-PY1))/(32*(X2-X1)+(PX2-PX1)) - var/b=(Y1+PY1/32-0.015625)-m*(X1+PX1/32-0.015625) //In tiles - var/signX = SIGN(X2-X1) - var/signY = SIGN(Y2-Y1) - if(X1Has [what_done] [target ? "[target.name][(ismob(target) && target.ckey) ? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "]. [addition]") if(target && ismob(target)) @@ -230,7 +230,7 @@ proc/add_logs(mob/user, mob/target, what_done, var/admin=1, var/object=null, var if(admin) log_attack("[user ? "[user.name][(ismob(user) && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"] [what_done] [target ? "[target.name][(ismob(target) && target.ckey)? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "]. [addition]") -proc/add_ghostlogs(var/mob/user, var/obj/target, var/what_done, var/admin=1, var/addition=null) +/proc/add_ghostlogs(var/mob/user, var/obj/target, var/what_done, var/admin=1, var/addition=null) var/target_text = "NON-EXISTENT TARGET" var/subject_text = "NON-EXISTENT SUBJECT" if(target) diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 4766d75d6c6..1671370b920 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -188,7 +188,7 @@ //checks text for html tags //if tag is not in whitelist (var/list/paper_tag_whitelist in global.dm) //relpaces < with < -proc/checkhtml(var/t) +/proc/checkhtml(var/t) t = sanitize_simple(t, list("&#"=".")) var/p = findtext(t,"<",1) while (p) //going through all the tags @@ -407,7 +407,7 @@ var/list/unit_suffixes = list("", "k", "M", "G", "T", "P", "E", "Z", "Y") //Example: text_ends_with("Woody got wood", "dy got wood") returns 1 // text_ends_with("Woody got wood", "d") returns 1 // text_ends_with("Woody got wood", "Wood") returns 0 -proc/text_ends_with(text, suffix) +/proc/text_ends_with(text, suffix) if(length(suffix) > length(text)) return FALSE @@ -517,7 +517,7 @@ var/quote = ascii2text(34) // to_chat(usr, "\"[jointext(num2words(number), " ")]\"") // Sanitize inputs to avoid SQL injection attacks -proc/sql_sanitize_text(var/text) +/proc/sql_sanitize_text(var/text) text = replacetext(text, "'", "''") text = replacetext(text, ";", "") text = replacetext(text, "&", "") diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index 511f9897250..5df4aa89fae 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -9,7 +9,7 @@ */ //slower then jointext, but correctly processes associative lists. -proc/tg_jointext(list/list, glue = ",") +/proc/tg_jointext(list/list, glue = ",") if(!istype(list) || !list.len) return for(var/i=1 to list.len) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index bc7732d1db1..47fba457b70 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -608,7 +608,7 @@ Turf and target are seperate in case you want to teleport some distance from a t return locate(x, y, A.z) //returns random gauss number -proc/GaussRand(var/sigma) +/proc/GaussRand(var/sigma) var/x,y,rsq do x=2*rand()-1 @@ -618,7 +618,7 @@ proc/GaussRand(var/sigma) return sigma*y*sqrt(-2*log(rsq)/rsq) //returns random gauss number, rounded to 'roundto' -proc/GaussRandRound(var/sigma,var/roundto) +/proc/GaussRandRound(var/sigma,var/roundto) return round(GaussRand(sigma),roundto) //Step-towards method of determining whether one atom can see another. Similar to viewers() @@ -1080,10 +1080,10 @@ proc/GaussRandRound(var/sigma,var/roundto) return copiedobjs //chances are 1:value. anyprob(1) will always return true -proc/anyprob(value) +/proc/anyprob(value) return (rand(1,value)==value) -proc/view_or_range(distance = world.view , center = usr , type) +/proc/view_or_range(distance = world.view , center = usr , type) switch(type) if("view") . = view(distance,center) @@ -1091,7 +1091,7 @@ proc/view_or_range(distance = world.view , center = usr , type) . = range(distance,center) return -proc/oview_or_orange(distance = world.view , center = usr , type) +/proc/oview_or_orange(distance = world.view , center = usr , type) switch(type) if("view") . = oview(distance,center) @@ -1099,7 +1099,7 @@ proc/oview_or_orange(distance = world.view , center = usr , type) . = orange(distance,center) return -proc/get_mob_with_client_list() +/proc/get_mob_with_client_list() var/list/mobs = list() for(var/mob/M in mob_list) if (M.client) @@ -1294,7 +1294,7 @@ var/list/WALLITEMS = list( return 1 return 0 -proc/rotate_icon(file, state, step = 1, aa = FALSE) +/proc/rotate_icon(file, state, step = 1, aa = FALSE) var/icon/base = icon(file, state) var/w diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 09887d72679..48c28ece91e 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -176,26 +176,25 @@ master = null dir = 2 - move - name = "Allow Walking" - icon_state = "no_walk0" - screen_loc = ui_gun2 +/obj/abstract/screen/gun/move + name = "Allow Walking" + icon_state = "no_walk0" + screen_loc = ui_gun2 - run - name = "Allow Running" - icon_state = "no_run0" - screen_loc = ui_gun3 +/obj/abstract/screen/gun/run + name = "Allow Running" + icon_state = "no_run0" + screen_loc = ui_gun3 - item - name = "Allow Item Use" - icon_state = "no_item0" - screen_loc = ui_gun1 +/obj/abstract/screen/gun/item + name = "Allow Item Use" + icon_state = "no_item0" + screen_loc = ui_gun1 - mode - name = "Toggle Gun Mode" - icon_state = "gun0" - screen_loc = ui_gun_select - //dir = 1 +/obj/abstract/screen/gun/mode + name = "Toggle Gun Mode" + icon_state = "gun0" + screen_loc = ui_gun_select /obj/abstract/screen/gun/MouseEntered(location,control,params) openToolTip(usr,src,params,title = name,content = desc) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 6bfe75ab841..1d2a448b362 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -49,12 +49,6 @@ /obj/item/proc/preattack(atom/target, mob/user, proximity_flag, click_parameters) return -obj/item/proc/get_clamped_volume() - if(src.force && src.w_class) - return clamp((src.force + src.w_class) * 4, 30, 100)// Add the item's force to its weight class and multiply by 4, then clamp the value between 30 and 100 - else if(!src.force && src.w_class) - return clamp(src.w_class * 6, 10, 100) // Multiply the item's weight class by 6, then clamp the value between 10 and 100 - /obj/item/proc/attack(mob/living/M as mob, mob/living/user as mob, def_zone, var/originator = null) if(restraint_resist_time > 0) if(restraint_apply_check(M, user)) diff --git a/code/_onclick/overmind.dm b/code/_onclick/overmind.dm index ddd84bcab80..5012318f5aa 100644 --- a/code/_onclick/overmind.dm +++ b/code/_onclick/overmind.dm @@ -16,7 +16,7 @@ if(T) create_shield(T) -mob/camera/blob/DblClickOn(var/atom/A) //Teleport view to another blob +/mob/camera/blob/DblClickOn(var/atom/A) //Teleport view to another blob var/turf/T = get_turf(A) var/obj/effect/blob/B = (locate(/obj/effect/blob) in T) @@ -24,4 +24,4 @@ mob/camera/blob/DblClickOn(var/atom/A) //Teleport view to another blob if(!B) return else - usr.forceMove(T) \ No newline at end of file + usr.forceMove(T) diff --git a/code/controllers/shuttle_controller.dm b/code/controllers/shuttle_controller.dm index ba752ac2c5b..bbad121dedc 100644 --- a/code/controllers/shuttle_controller.dm +++ b/code/controllers/shuttle_controller.dm @@ -15,7 +15,7 @@ var/global/datum/emergency_shuttle/emergency_shuttle -datum/emergency_shuttle +/datum/emergency_shuttle var/alert = 0 //0 = emergency, 1 = crew cycle var/location = 0 //0 = in transit (or on standby), 1 = at the station, 2 = at centcom @@ -49,7 +49,7 @@ datum/emergency_shuttle // if not called before, set the endtime to T+600 seconds // otherwise if outgoing, switch to incoming -datum/emergency_shuttle/proc/incall(coeff = 1) +/datum/emergency_shuttle/proc/incall(coeff = 1) if(shutdown) return if((!universe.OnShuttleCall(null) || deny_shuttle) && alert == 1) //crew transfer shuttle does not gets recalled by gamemode @@ -68,13 +68,13 @@ datum/emergency_shuttle/proc/incall(coeff = 1) if(istype(A, /area/hallway)) A.readyalert() -datum/emergency_shuttle/proc/shuttlealert(var/X) +/datum/emergency_shuttle/proc/shuttlealert(var/X) if(shutdown) return alert = X -datum/emergency_shuttle/proc/recall() +/datum/emergency_shuttle/proc/recall() if(shutdown) return if(!can_recall) @@ -100,7 +100,7 @@ datum/emergency_shuttle/proc/recall() // returns the time (in seconds) before shuttle arrival // note if direction = -1, gives a count-up to SHUTTLEARRIVETIME -datum/emergency_shuttle/proc/timeleft() +/datum/emergency_shuttle/proc/timeleft() if(online) var/timeleft = round((endtime - world.time)/10 ,1) if(direction >= 0) @@ -111,13 +111,13 @@ datum/emergency_shuttle/proc/timeleft() return SHUTTLEARRIVETIME // sets the time left to a given delay (in seconds) -datum/emergency_shuttle/proc/settimeleft(var/delay) +/datum/emergency_shuttle/proc/settimeleft(var/delay) endtime = world.time + delay * 10 timelimit = delay // sets the shuttle direction // 1 = towards SS13, -1 = back to centcom -datum/emergency_shuttle/proc/setdirection(var/dirn) +/datum/emergency_shuttle/proc/setdirection(var/dirn) if(direction == dirn || !direction || !dirn) direction = dirn return @@ -127,7 +127,7 @@ datum/emergency_shuttle/proc/setdirection(var/dirn) endtime = world.time + (SHUTTLEARRIVETIME*10 - ticksleft) return -datum/emergency_shuttle/proc/move_pod(var/pod,var/destination) +/datum/emergency_shuttle/proc/move_pod(var/pod,var/destination) if (!pod || !destination || !(istype(pod, /datum/shuttle/escape)) || !escape_pods.Find(pod)) return @@ -149,7 +149,7 @@ datum/emergency_shuttle/proc/move_pod(var/pod,var/destination) else D.open() -datum/emergency_shuttle/proc/force_shutdown() +/datum/emergency_shuttle/proc/force_shutdown() online=0 shutdown=1 @@ -174,7 +174,7 @@ datum/emergency_shuttle/proc/force_shutdown() // "preload" the assets for when they're needed for the map vote. -datum/emergency_shuttle/proc/vote_preload() +/datum/emergency_shuttle/proc/vote_preload() if (voting_cache) return voting_cache = 1 @@ -183,7 +183,7 @@ datum/emergency_shuttle/proc/vote_preload() spawn vote.interface.sendAssets(C) -datum/emergency_shuttle/proc/hyperspace_sounds(var/phase) +/datum/emergency_shuttle/proc/hyperspace_sounds(var/phase) var/frequency = get_rand_frequency() switch (phase) @@ -214,7 +214,7 @@ datum/emergency_shuttle/proc/hyperspace_sounds(var/phase) if (M_turf.z == shuttle.dock_centcom.z) M.playsound_local(shuttle.dock_centcom, 'sound/machines/hyperspace_end.ogg', 75 - (get_dist(shuttle.dock_centcom,M_turf)*2), 1, frequency, falloff = 5) -datum/emergency_shuttle/proc/shuttle_phase(var/phase, var/casual = 1) +/datum/emergency_shuttle/proc/shuttle_phase(var/phase, var/casual = 1) switch (phase) if ("station") location = 1 @@ -319,7 +319,7 @@ datum/emergency_shuttle/proc/shuttle_phase(var/phase, var/casual = 1) online = 0 -datum/emergency_shuttle/proc/process() +/datum/emergency_shuttle/proc/process() if(!online || shutdown) return diff --git a/code/controllers/subsystem/ambient_sound.dm b/code/controllers/subsystem/ambient_sound.dm index 365975382ca..4411f3c5117 100644 --- a/code/controllers/subsystem/ambient_sound.dm +++ b/code/controllers/subsystem/ambient_sound.dm @@ -27,7 +27,7 @@ Ambience system. var/ambience_buffer // essentially world.time + the length of the ambience sound file. this is to prevent overlap. */ -client/proc/handle_ambience() +/client/proc/handle_ambience() if(!mob)//I have no trust for Byond. return diff --git a/code/datums/climate.dm b/code/datums/climate.dm index 589e0fd6000..27767fa90bc 100644 --- a/code/datums/climate.dm +++ b/code/datums/climate.dm @@ -243,12 +243,12 @@ var/list/snowstorm_ambience_volumes = list(30,40,60,80) mining_shuttle.lockdown = "Under directive 1-49, surface-to-space light craft have been locked for duration of blizzard. Only escape-class shuttles are rated for stability in blizzards." security_shuttle.lockdown = "Under directive 1-49, surface-to-space light craft have been locked for duration of blizzard. Only escape-class shuttles are rated for stability in blizzards." -datum/weather/snow/blizzard/omega +/datum/weather/snow/blizzard/omega name = "dark season" next_weather = list(/datum/weather/snow/heavy = 100) snowfall_prob = 15 snow_fluff_estimate = "more than 13.5cm/minute (Dark Season)" -datum/weather/snow/blizzard/omega/New() +/datum/weather/snow/blizzard/omega/New() ..() - timeleft = 2 HOURS \ No newline at end of file + timeleft = 2 HOURS diff --git a/code/datums/computerfiles.dm b/code/datums/computerfiles.dm deleted file mode 100644 index 109021460a5..00000000000 --- a/code/datums/computerfiles.dm +++ /dev/null @@ -1,6 +0,0 @@ -datum/computer - var/name -datum/computer/folder - var/list/datum/computer/contents = list() - -datum/computer/file \ No newline at end of file diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 0135865fc6e..978376d018c 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -123,172 +123,3 @@ general += G locked += L - - -proc/get_id_photo(var/mob/living/carbon/human/H) - var/icon/preview_icon = null - - var/g = "m" - if (H.gender == FEMALE) - g = "f" - - var/icon/icobase = H.species.icobase - - preview_icon = new /icon(icobase, "torso_[g]") - var/icon/temp - temp = new /icon(icobase, "groin_[g]") - preview_icon.Blend(temp, ICON_OVERLAY) - temp = new /icon(icobase, "head_[g]") - preview_icon.Blend(temp, ICON_OVERLAY) - - for(var/datum/organ/external/E in H.organs) - if(E.status & ORGAN_CUT_AWAY || E.status & ORGAN_DESTROYED) - continue - var/o_icobase=icobase - if(E.status & ORGAN_PEG) - o_icobase='icons/mob/human_races/o_peg.dmi' - else if(E.status & ORGAN_ROBOT) - o_icobase='icons/mob/human_races/o_robot.dmi' - temp = new /icon(o_icobase, "[E.name]") - //if(E.status & ORGAN_ROBOT) - // temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) - preview_icon.Blend(temp, ICON_OVERLAY) - - // Skin tone - if(H.species.anatomy_flags & HAS_SKIN_TONE) - if (H.my_appearance.s_tone >= 0) - preview_icon.Blend(rgb(H.my_appearance.s_tone, H.my_appearance.s_tone, H.my_appearance.s_tone), ICON_ADD) - else - preview_icon.Blend(rgb(-H.my_appearance.s_tone, -H.my_appearance.s_tone, -H.my_appearance.s_tone), ICON_SUBTRACT) - else if(H.species.anatomy_flags & RGBSKINTONE) - preview_icon.Blend(rgb(H.my_appearance.r_hair, H.my_appearance.g_hair, H.my_appearance.b_hair), ICON_ADD) - - var/icon/eyes_s = new/icon("icon" = 'icons/mob/hair_styles.dmi', "icon_state" = H.species ? H.species.eyes : "eyes_s") - - eyes_s.Blend(rgb(H.my_appearance.r_eyes, H.my_appearance.g_eyes, H.my_appearance.b_eyes), ICON_ADD) - - var/datum/sprite_accessory/hair_style = hair_styles_list[H.my_appearance.h_style] - if(hair_style) - var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s") - hair_s.Blend(rgb(H.my_appearance.r_hair, H.my_appearance.g_hair, H.my_appearance.b_hair), ICON_ADD) - eyes_s.Blend(hair_s, ICON_OVERLAY) - - var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[H.my_appearance.f_style] - if(facial_hair_style) - var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s") - facial_s.Blend(rgb(H.my_appearance.r_facial, H.my_appearance.g_facial, H.my_appearance.b_facial), ICON_ADD) - eyes_s.Blend(facial_s, ICON_OVERLAY) - - var/icon/clothes_s = null - switch(H.mind.assigned_role) - if("Head of Personnel") - clothes_s = new /icon('icons/mob/uniform.dmi', "hop_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) - if("Bartender") - clothes_s = new /icon('icons/mob/uniform.dmi', "ba_suit_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - if("Botanist") - clothes_s = new /icon('icons/mob/uniform.dmi', "hydroponics_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - if("Chef") - clothes_s = new /icon('icons/mob/uniform.dmi', "chef_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - if("Janitor") - clothes_s = new /icon('icons/mob/uniform.dmi', "janitor_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - if("Librarian") - clothes_s = new /icon('icons/mob/uniform.dmi', "red_suit_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - if("Quartermaster") - clothes_s = new /icon('icons/mob/uniform.dmi', "qm_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) - if("Cargo Technician") - clothes_s = new /icon('icons/mob/uniform.dmi', "cargotech_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - if("Shaft Miner") - clothes_s = new /icon('icons/mob/uniform.dmi', "miner_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - if("Lawyer") - clothes_s = new /icon('icons/mob/uniform.dmi', "internalaffairs_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) - if("Chaplain") - clothes_s = new /icon('icons/mob/uniform.dmi', "chapblack_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - if("Research Director") - clothes_s = new /icon('icons/mob/uniform.dmi', "director_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY) - if("Scientist") - clothes_s = new /icon('icons/mob/uniform.dmi', "toxinswhite_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY) - if("Xenoarchaeologist") - clothes_s = new /icon('icons/mob/uniform.dmi', "xenoarch") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY) - if("Xenobiologist") - clothes_s = new /icon('icons/mob/uniform.dmi', "xenobio") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY) - if("Chemist") - clothes_s = new /icon('icons/mob/uniform.dmi', "chemistrywhite_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_chem_open"), ICON_OVERLAY) - if("Chief Medical Officer") - clothes_s = new /icon('icons/mob/uniform.dmi', "cmo_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_cmo_open"), ICON_OVERLAY) - if("Medical Doctor") - clothes_s = new /icon('icons/mob/uniform.dmi', "medical_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY) - if("Geneticist") - clothes_s = new /icon('icons/mob/uniform.dmi', "geneticswhite_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_gen_open"), ICON_OVERLAY) - if("Virologist") - clothes_s = new /icon('icons/mob/uniform.dmi', "virologywhite_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_vir_open"), ICON_OVERLAY) - if("Captain") - clothes_s = new /icon('icons/mob/uniform.dmi', "captain_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) - if("Head of Security") - clothes_s = new /icon('icons/mob/uniform.dmi', "hosred_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY) - if("Warden") - clothes_s = new /icon('icons/mob/uniform.dmi', "warden_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY) - if("Detective") - clothes_s = new /icon('icons/mob/uniform.dmi', "detective_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "detective"), ICON_OVERLAY) - if("Security Officer") - clothes_s = new /icon('icons/mob/uniform.dmi', "security_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY) - if("Chief Engineer") - clothes_s = new /icon('icons/mob/uniform.dmi', "chief_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY) - if("Station Engineer") - clothes_s = new /icon('icons/mob/uniform.dmi', "engine_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "orange"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY) - if("Atmospheric Technician") - clothes_s = new /icon('icons/mob/uniform.dmi', "atmos_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY) - if("Roboticist") - clothes_s = new /icon('icons/mob/uniform.dmi', "robotics_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY) - else - clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - preview_icon.Blend(eyes_s, ICON_OVERLAY) - if(clothes_s) - preview_icon.Blend(clothes_s, ICON_OVERLAY) - del(eyes_s) - del(clothes_s) - - return preview_icon diff --git a/code/datums/gamemode/factions/legacy_cult/ritual.dm b/code/datums/gamemode/factions/legacy_cult/ritual.dm index 08d9a2a59ed..7a5b4a17d04 100644 --- a/code/datums/gamemode/factions/legacy_cult/ritual.dm +++ b/code/datums/gamemode/factions/legacy_cult/ritual.dm @@ -474,173 +474,173 @@ var/runedec = 0 // Rune cap ? /obj/item/weapon/tome_legacy/imbued //admin tome, spawns working runes without waiting w_class = W_CLASS_SMALL var/cultistsonly = 1 - attack_self(mob/user as mob) - if(src.cultistsonly && !islegacycultist(usr)) - return - if(!cultwords["travel"]) - my_cult.randomiseWords() - if(user) - var/r - if (!istype(user.loc,/turf)) - to_chat(user, "You do not have enough space to write a proper rune.") - var/list/runes = list("teleport", "itemport", "tome", "armor", "convert", "tear in reality", "emp", "drain", "seer", "raise", "obscure", "reveal", "astral journey", "manifest", "imbue talisman", "sacrifice", "wall", "freedom", "cultsummon", "deafen", "blind", "bloodboil", "communicate", "stun") - r = input("Choose a rune to scribe", "Rune Scribing") in runes //not cancellable. - var/obj/effect/rune_legacy/R = new /obj/effect/rune_legacy - if(istype(user, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = user - R.blood_DNA = list() - R.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type - R.blood_color = H.species.blood_color - switch(r) - if("teleport") - var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri") - var/beacon - if(usr) - beacon = input("Select the last rune", "Rune Scribing") in words - R.word1=cultwords["travel"] - R.word2=cultwords["self"] - R.word3=beacon - R.forceMove(user.loc) - R.check_icon() - if("itemport") - var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri") - var/beacon - if(usr) - beacon = input("Select the last rune", "Rune Scribing") in words - R.word1=cultwords["travel"] - R.word2=cultwords["other"] - R.word3=beacon - R.forceMove(user.loc) - R.check_icon() - if("tome") - R.word1=cultwords["see"] - R.word2=cultwords["blood"] - R.word3=cultwords["hell"] - R.forceMove(user.loc) - R.check_icon() - if("armor") - R.word1=cultwords["hell"] - R.word2=cultwords["destroy"] - R.word3=cultwords["other"] - R.forceMove(user.loc) - R.check_icon() - if("convert") - R.word1=cultwords["join"] - R.word2=cultwords["blood"] - R.word3=cultwords["self"] - R.forceMove(user.loc) - R.check_icon() - if("tear in reality") - R.word1=cultwords["hell"] - R.word2=cultwords["join"] - R.word3=cultwords["self"] - R.forceMove(user.loc) - R.check_icon() - if("emp") - R.word1=cultwords["destroy"] - R.word2=cultwords["see"] - R.word3=cultwords["technology"] - R.forceMove(user.loc) - R.check_icon() - if("drain") - R.word1=cultwords["travel"] - R.word2=cultwords["blood"] - R.word3=cultwords["self"] - R.forceMove(user.loc) - R.check_icon() - if("seer") - R.word1=cultwords["see"] - R.word2=cultwords["hell"] - R.word3=cultwords["join"] - R.forceMove(user.loc) - R.check_icon() - if("raise") - R.word1=cultwords["blood"] - R.word2=cultwords["join"] - R.word3=cultwords["hell"] - R.forceMove(user.loc) - R.check_icon() - if("obscure") - R.word1=cultwords["hide"] - R.word2=cultwords["see"] - R.word3=cultwords["blood"] - R.forceMove(user.loc) - R.check_icon() - if("astral journey") - R.word1=cultwords["hell"] - R.word2=cultwords["travel"] - R.word3=cultwords["self"] - R.forceMove(user.loc) - R.check_icon() - if("manifest") - R.word1=cultwords["blood"] - R.word2=cultwords["see"] - R.word3=cultwords["travel"] - R.forceMove(user.loc) - R.check_icon() - if("imbue talisman") - R.word1=cultwords["hell"] - R.word2=cultwords["technology"] - R.word3=cultwords["join"] - R.forceMove(user.loc) - R.check_icon() - if("sacrifice") - R.word1=cultwords["hell"] - R.word2=cultwords["blood"] - R.word3=cultwords["join"] - R.forceMove(user.loc) - R.check_icon() - if("reveal") - R.word1=cultwords["blood"] - R.word2=cultwords["see"] - R.word3=cultwords["hide"] - R.forceMove(user.loc) - R.check_icon() - if("wall") - R.word1=cultwords["destroy"] - R.word2=cultwords["travel"] - R.word3=cultwords["self"] - R.forceMove(user.loc) - R.check_icon() - if("freedom") - R.word1=cultwords["travel"] - R.word2=cultwords["technology"] - R.word3=cultwords["other"] - R.forceMove(user.loc) - R.check_icon() - if("cultsummon") - R.word1=cultwords["join"] - R.word2=cultwords["other"] - R.word3=cultwords["self"] - R.forceMove(user.loc) - R.check_icon() - if("deafen") - R.word1=cultwords["hide"] - R.word2=cultwords["other"] - R.word3=cultwords["see"] - R.forceMove(user.loc) - R.check_icon() - if("blind") - R.word1=cultwords["destroy"] - R.word2=cultwords["see"] - R.word3=cultwords["other"] - R.forceMove(user.loc) - R.check_icon() - if("bloodboil") - R.word1=cultwords["destroy"] - R.word2=cultwords["see"] - R.word3=cultwords["blood"] - R.forceMove(user.loc) - R.check_icon() - if("communicate") - R.word1=cultwords["self"] - R.word2=cultwords["other"] - R.word3=cultwords["technology"] - R.forceMove(user.loc) - R.check_icon() - if("stun") - R.word1=cultwords["join"] - R.word2=cultwords["hide"] - R.word3=cultwords["technology"] - R.forceMove(user.loc) - R.check_icon() +/obj/item/weapon/tome_legacy/imbued/attack_self(mob/user as mob) + if(src.cultistsonly && !islegacycultist(usr)) + return + if(!cultwords["travel"]) + my_cult.randomiseWords() + if(user) + var/r + if (!istype(user.loc,/turf)) + to_chat(user, "You do not have enough space to write a proper rune.") + var/list/runes = list("teleport", "itemport", "tome", "armor", "convert", "tear in reality", "emp", "drain", "seer", "raise", "obscure", "reveal", "astral journey", "manifest", "imbue talisman", "sacrifice", "wall", "freedom", "cultsummon", "deafen", "blind", "bloodboil", "communicate", "stun") + r = input("Choose a rune to scribe", "Rune Scribing") in runes //not cancellable. + var/obj/effect/rune_legacy/R = new /obj/effect/rune_legacy + if(istype(user, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = user + R.blood_DNA = list() + R.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type + R.blood_color = H.species.blood_color + switch(r) + if("teleport") + var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri") + var/beacon + if(usr) + beacon = input("Select the last rune", "Rune Scribing") in words + R.word1=cultwords["travel"] + R.word2=cultwords["self"] + R.word3=beacon + R.forceMove(user.loc) + R.check_icon() + if("itemport") + var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri") + var/beacon + if(usr) + beacon = input("Select the last rune", "Rune Scribing") in words + R.word1=cultwords["travel"] + R.word2=cultwords["other"] + R.word3=beacon + R.forceMove(user.loc) + R.check_icon() + if("tome") + R.word1=cultwords["see"] + R.word2=cultwords["blood"] + R.word3=cultwords["hell"] + R.forceMove(user.loc) + R.check_icon() + if("armor") + R.word1=cultwords["hell"] + R.word2=cultwords["destroy"] + R.word3=cultwords["other"] + R.forceMove(user.loc) + R.check_icon() + if("convert") + R.word1=cultwords["join"] + R.word2=cultwords["blood"] + R.word3=cultwords["self"] + R.forceMove(user.loc) + R.check_icon() + if("tear in reality") + R.word1=cultwords["hell"] + R.word2=cultwords["join"] + R.word3=cultwords["self"] + R.forceMove(user.loc) + R.check_icon() + if("emp") + R.word1=cultwords["destroy"] + R.word2=cultwords["see"] + R.word3=cultwords["technology"] + R.forceMove(user.loc) + R.check_icon() + if("drain") + R.word1=cultwords["travel"] + R.word2=cultwords["blood"] + R.word3=cultwords["self"] + R.forceMove(user.loc) + R.check_icon() + if("seer") + R.word1=cultwords["see"] + R.word2=cultwords["hell"] + R.word3=cultwords["join"] + R.forceMove(user.loc) + R.check_icon() + if("raise") + R.word1=cultwords["blood"] + R.word2=cultwords["join"] + R.word3=cultwords["hell"] + R.forceMove(user.loc) + R.check_icon() + if("obscure") + R.word1=cultwords["hide"] + R.word2=cultwords["see"] + R.word3=cultwords["blood"] + R.forceMove(user.loc) + R.check_icon() + if("astral journey") + R.word1=cultwords["hell"] + R.word2=cultwords["travel"] + R.word3=cultwords["self"] + R.forceMove(user.loc) + R.check_icon() + if("manifest") + R.word1=cultwords["blood"] + R.word2=cultwords["see"] + R.word3=cultwords["travel"] + R.forceMove(user.loc) + R.check_icon() + if("imbue talisman") + R.word1=cultwords["hell"] + R.word2=cultwords["technology"] + R.word3=cultwords["join"] + R.forceMove(user.loc) + R.check_icon() + if("sacrifice") + R.word1=cultwords["hell"] + R.word2=cultwords["blood"] + R.word3=cultwords["join"] + R.forceMove(user.loc) + R.check_icon() + if("reveal") + R.word1=cultwords["blood"] + R.word2=cultwords["see"] + R.word3=cultwords["hide"] + R.forceMove(user.loc) + R.check_icon() + if("wall") + R.word1=cultwords["destroy"] + R.word2=cultwords["travel"] + R.word3=cultwords["self"] + R.forceMove(user.loc) + R.check_icon() + if("freedom") + R.word1=cultwords["travel"] + R.word2=cultwords["technology"] + R.word3=cultwords["other"] + R.forceMove(user.loc) + R.check_icon() + if("cultsummon") + R.word1=cultwords["join"] + R.word2=cultwords["other"] + R.word3=cultwords["self"] + R.forceMove(user.loc) + R.check_icon() + if("deafen") + R.word1=cultwords["hide"] + R.word2=cultwords["other"] + R.word3=cultwords["see"] + R.forceMove(user.loc) + R.check_icon() + if("blind") + R.word1=cultwords["destroy"] + R.word2=cultwords["see"] + R.word3=cultwords["other"] + R.forceMove(user.loc) + R.check_icon() + if("bloodboil") + R.word1=cultwords["destroy"] + R.word2=cultwords["see"] + R.word3=cultwords["blood"] + R.forceMove(user.loc) + R.check_icon() + if("communicate") + R.word1=cultwords["self"] + R.word2=cultwords["other"] + R.word3=cultwords["technology"] + R.forceMove(user.loc) + R.check_icon() + if("stun") + R.word1=cultwords["join"] + R.word2=cultwords["hide"] + R.word3=cultwords["technology"] + R.forceMove(user.loc) + R.check_icon() diff --git a/code/datums/gamemode/role/giant_spider.dm b/code/datums/gamemode/role/giant_spider.dm index 5ca6244bb80..a3ad76655b6 100644 --- a/code/datums/gamemode/role/giant_spider.dm +++ b/code/datums/gamemode/role/giant_spider.dm @@ -10,7 +10,7 @@ default_admin_voice = "Your Spider Senses" admin_voice_style = "skeleton" -datum/role/giant_spider/Greet(var/greeting,var/custom) +/datum/role/giant_spider/Greet(var/greeting,var/custom) if(!greeting) return diff --git a/code/datums/gamemode/role/madmonkey.dm b/code/datums/gamemode/role/madmonkey.dm index 1ec6eaa37c2..8dbd7a342ce 100644 --- a/code/datums/gamemode/role/madmonkey.dm +++ b/code/datums/gamemode/role/madmonkey.dm @@ -37,7 +37,7 @@ admin_voice_style = "rough" var/countdown = 60 -datum/role/madmonkey/Greet(var/greeting,var/custom) +/datum/role/madmonkey/Greet(var/greeting,var/custom) if(!greeting) return diff --git a/code/datums/gamemode/role/plague_mouse.dm b/code/datums/gamemode/role/plague_mouse.dm index 4ce1beb1661..5741ef20969 100644 --- a/code/datums/gamemode/role/plague_mouse.dm +++ b/code/datums/gamemode/role/plague_mouse.dm @@ -10,7 +10,7 @@ default_admin_voice = "Big Rat" admin_voice_style = "skeleton" // grey, bold and italic -datum/role/plague_mouse/Greet(var/greeting,var/custom) +/datum/role/plague_mouse/Greet(var/greeting,var/custom) if(!greeting) return diff --git a/code/datums/periodic_news.dm b/code/datums/periodic_news.dm index b2d92e12eaf..d5781cbae31 100644 --- a/code/datums/periodic_news.dm +++ b/code/datums/periodic_news.dm @@ -9,109 +9,109 @@ channel_name = "Tau Ceti Daily" can_be_redacted = 0 - revolution_inciting_event +/datum/news_announcement/revolution_inciting_event - paycuts_suspicion - round_time = 60*10 - message = {"Reports have leaked that Nanotrasen Inc. is planning to put paycuts into - effect on many of its Research Stations in Tau Ceti. Apparently these research - stations haven't been able to yield the expected revenue, and thus adjustments - have to be made."} - author = "Unauthorized" +/datum/news_announcement/revolution_inciting_event/paycuts_suspicion + round_time = 60*10 + message = {"Reports have leaked that Nanotrasen Inc. is planning to put paycuts into + effect on many of its Research Stations in Tau Ceti. Apparently these research + stations haven't been able to yield the expected revenue, and thus adjustments + have to be made."} + author = "Unauthorized" - paycuts_confirmation - round_time = 60*40 - message = {"Earlier rumours about paycuts on Research Stations in the Tau Ceti system have - been confirmed. Shockingly, however, the cuts will only affect lower tier - personnel. Heads of Staff will, according to our sources, not be affected."} - author = "Unauthorized" +/datum/news_announcement/revolution_inciting_event/paycuts_confirmation + round_time = 60*40 + message = {"Earlier rumours about paycuts on Research Stations in the Tau Ceti system have + been confirmed. Shockingly, however, the cuts will only affect lower tier + personnel. Heads of Staff will, according to our sources, not be affected."} + author = "Unauthorized" - human_experiments - round_time = 60*90 - message = {"Unbelievable reports about human experimentation have reached our ears. According - to a refugee from one of the Tau Ceti Research Stations, their station, in order - to increase revenue, has refactored several of their facilities to perform experiments - on live humans, including virology research, genetic manipulation, and \"feeding them - to the slimes to see what happens\". Allegedly, these test subjects were neither - humanified monkeys nor volunteers, but rather unqualified staff that were forced into - the experiments, and reported to have died in a \"work accident\" by Nanotrasen Inc."} - author = "Unauthorized" +/datum/news_announcement/revolution_inciting_event/human_experiments + round_time = 60*90 + message = {"Unbelievable reports about human experimentation have reached our ears. According + to a refugee from one of the Tau Ceti Research Stations, their station, in order + to increase revenue, has refactored several of their facilities to perform experiments + on live humans, including virology research, genetic manipulation, and \"feeding them + to the slimes to see what happens\". Allegedly, these test subjects were neither + humanified monkeys nor volunteers, but rather unqualified staff that were forced into + the experiments, and reported to have died in a \"work accident\" by Nanotrasen Inc."} + author = "Unauthorized" - bluespace_research +/datum/news_announcement/bluespace_research - announcement - round_time = 60*20 - message = {"The new field of research trying to explain several interesting spacetime oddities, - also known as \"Bluespace Research\", has reached new heights. Of the several - hundred space stations now orbiting in Tau Ceti, fifteen are now specially equipped - to experiment with and research Bluespace effects. Rumours have it some of these - stations even sport functional \"travel gates\" that can instantly move a whole research - team to an alternate reality."} +/datum/news_announcement/bluespace_research/announcement + round_time = 60*20 + message = {"The new field of research trying to explain several interesting spacetime oddities, + also known as \"Bluespace Research\", has reached new heights. Of the several + hundred space stations now orbiting in Tau Ceti, fifteen are now specially equipped + to experiment with and research Bluespace effects. Rumours have it some of these + stations even sport functional \"travel gates\" that can instantly move a whole research + team to an alternate reality."} - random_junk +/datum/news_announcement/random_junk - cheesy_honkers - author = "Assistant Editor Carl Ritz" - channel_name = "The Gibson Gazette" - message = {"Do cheesy honkers increase risk of having a miscarriage? Several health administrations - say so!"} - round_time = 60 * 15 +/datum/news_announcement/random_junk/cheesy_honkers + author = "Assistant Editor Carl Ritz" + channel_name = "The Gibson Gazette" + message = {"Do cheesy honkers increase risk of having a miscarriage? Several health administrations + say so!"} + round_time = 60 * 15 - net_block - author = "Assistant Editor Carl Ritz" - channel_name = "The Gibson Gazette" - message = {"Several corporations banding together to block access to 'wetskrell.nt', site administrators - claiming violation of net laws."} - round_time = 60 * 50 +/datum/news_announcement/random_junk/net_block + author = "Assistant Editor Carl Ritz" + channel_name = "The Gibson Gazette" + message = {"Several corporations banding together to block access to 'wetskrell.nt', site administrators + claiming violation of net laws."} + round_time = 60 * 50 - found_ssd - channel_name = "Tau Ceti Daily" - author = "Doctor Eric Hanfield" +/datum/news_announcement/random_junk/found_ssd + channel_name = "Tau Ceti Daily" + author = "Doctor Eric Hanfield" - message = {"Several people have been found unconscious at their terminals. It is thought that it was due - to a lack of sleep or of simply migraines from staring at the screen too long. Camera footage - reveals that many of them were playing games instead of working and their pay has been docked - accordingly."} - round_time = 60 * 90 + message = {"Several people have been found unconscious at their terminals. It is thought that it was due + to a lack of sleep or of simply migraines from staring at the screen too long. Camera footage + reveals that many of them were playing games instead of working and their pay has been docked + accordingly."} + round_time = 60 * 90 - lotus_tree +/datum/news_announcement/lotus_tree - explosions - channel_name = "Tau Ceti Daily" - author = "Reporter Leland H. Howards" +/datum/news_announcement/lotus_tree/explosions + channel_name = "Tau Ceti Daily" + author = "Reporter Leland H. Howards" - message = {"The newly-christened civillian transport Lotus Tree suffered two very large explosions near the - bridge today, and there are unconfirmed reports that the death toll has passed 50. The cause of - the explosions remain unknown, but there is speculation that it might have something to do with - the recent change of regulation in the Moore-Lee Corporation, a major funder of the ship, when M-L - announced that they were officially acknowledging inter-species marriage and providing couples - with marriage tax-benefits."} - round_time = 60 * 30 + message = {"The newly-christened civillian transport Lotus Tree suffered two very large explosions near the + bridge today, and there are unconfirmed reports that the death toll has passed 50. The cause of + the explosions remain unknown, but there is speculation that it might have something to do with + the recent change of regulation in the Moore-Lee Corporation, a major funder of the ship, when M-L + announced that they were officially acknowledging inter-species marriage and providing couples + with marriage tax-benefits."} + round_time = 60 * 30 - food_riots +/datum/news_announcement/food_riots - breaking_news - channel_name = "Tau Ceti Daily" - author = "Reporter Ro'kii Ar-Raqis" +/datum/news_announcement/food_riots/breaking_news + channel_name = "Tau Ceti Daily" + author = "Reporter Ro'kii Ar-Raqis" - message = {"Breaking news: Food riots have broken out throughout the Refuge asteroid colony in the Tenebrae - Lupus system. This comes only hours after Nanotrasen officials announced they will no longer trade with the - colony, citing the increased presence of \"hostile factions\" on the colony has made trade too dangerous to - continue. Nanotrasen officials have not given any details about said factions. More on that at the top of - the hour."} - round_time = 60 * 10 + message = {"Breaking news: Food riots have broken out throughout the Refuge asteroid colony in the Tenebrae + Lupus system. This comes only hours after Nanotrasen officials announced they will no longer trade with the + colony, citing the increased presence of \"hostile factions\" on the colony has made trade too dangerous to + continue. Nanotrasen officials have not given any details about said factions. More on that at the top of + the hour."} + round_time = 60 * 10 - more - channel_name = "Tau Ceti Daily" - author = "Reporter Ro'kii Ar-Raqis" +/datum/news_announcement/food_riots/more + channel_name = "Tau Ceti Daily" + author = "Reporter Ro'kii Ar-Raqis" - message = {"More on the Refuge food riots: The Refuge Council has condemned Nanotrasen's withdrawal from - the colony, claiming \"there has been no increase in anti-Nanotrasen activity\", and \"\[the only] reason - Nanotrasen withdrew was because the \[Tenebrae Lupus] system's Plasma deposits have been completely mined out. - We have little to trade with them now\". Nanotrasen officials have denied these allegations, calling them - \"further proof\" of the colony's anti-Nanotrasen stance. Meanwhile, Refuge Security has been unable to quell - the riots. More on this at 6."} - round_time = 60 * 60 + message = {"More on the Refuge food riots: The Refuge Council has condemned Nanotrasen's withdrawal from + the colony, claiming \"there has been no increase in anti-Nanotrasen activity\", and \"\[the only] reason + Nanotrasen withdrew was because the \[Tenebrae Lupus] system's Plasma deposits have been completely mined out. + We have little to trade with them now\". Nanotrasen officials have denied these allegations, calling them + \"further proof\" of the colony's anti-Nanotrasen stance. Meanwhile, Refuge Security has been unable to quell + the riots. More on this at 6."} + round_time = 60 * 60 var/global/list/newscaster_standard_feeds = list(/datum/news_announcement/bluespace_research, /datum/news_announcement/lotus_tree, /datum/news_announcement/random_junk, /datum/news_announcement/food_riots) @@ -121,14 +121,14 @@ proc/process_newscaster() check_for_newscaster_updates(ticker.mode.newscaster_announcements)*/ var/global/tmp/announced_news_types = list() -proc/check_for_newscaster_updates(type) +/proc/check_for_newscaster_updates(type) for(var/subtype in typesof(type)-type) var/datum/news_announcement/news = new subtype() if(news.round_time * 10 <= world.time && !(subtype in announced_news_types)) announced_news_types += subtype announce_newscaster_news(news) -proc/announce_newscaster_news(datum/news_announcement/news) +/proc/announce_newscaster_news(datum/news_announcement/news) var/datum/feed_message/newMsg = new /datum/feed_message diff --git a/code/datums/statistics/json_helpers.dm b/code/datums/statistics/json_helpers.dm index 39d3852786c..420f810cca2 100644 --- a/code/datums/statistics/json_helpers.dm +++ b/code/datums/statistics/json_helpers.dm @@ -7,7 +7,7 @@ var/list/datum_donotcopy = list("tag", "type", "parent_type", "vars", "gcDestroy // thing3 referencing thing1 // you'll end up in an infinite loop // don't use it for that that's bad -proc/datum2list(var/datum/D, var/list/do_not_copy=datum_donotcopy, parent_datum=null) +/proc/datum2list(var/datum/D, var/list/do_not_copy=datum_donotcopy, parent_datum=null) var/list/L = list() for(var/I in D.vars) if(I in do_not_copy) @@ -33,7 +33,7 @@ proc/datum2list(var/datum/D, var/list/do_not_copy=datum_donotcopy, parent_datum= // converts a datum (including atoms!) to a JSON object // do_not_copy is a list of vars to not include in the JSON output -proc/datum2json(var/datum/D, var/list/do_not_copy=datum_donotcopy) +/proc/datum2json(var/datum/D, var/list/do_not_copy=datum_donotcopy) ASSERT(istype(D)) var/list/L = datum2list(D, do_not_copy) diff --git a/code/datums/tether.dm b/code/datums/tether.dm index 881ae26d320..dcafc316c2d 100644 --- a/code/datums/tether.dm +++ b/code/datums/tether.dm @@ -124,7 +124,7 @@ /datum/tether/equal/restrictive //A restrictive equal tether disallows pulling from either side. If either the master or slave attempts to exceed the tether's distance, they simply fail. -proc/tether_equal(atom/movable/first, atom/movable/second, var/distance, var/restrictive = FALSE) +/proc/tether_equal(atom/movable/first, atom/movable/second, var/distance, var/restrictive = FALSE) if(!istype(first) || !istype(second) || !distance) return FALSE if(first.tether_master || second.tether_master) //an atom can only have a single master or equal tether @@ -137,10 +137,10 @@ proc/tether_equal(atom/movable/first, atom/movable/second, var/distance, var/res E.make_tether(first,second,distance) return TRUE -proc/tether_equal_restrictive(atom/movable/first, atom/movable/second, var/distance) +/proc/tether_equal_restrictive(atom/movable/first, atom/movable/second, var/distance) return tether_equal(first, second, distance, TRUE) -proc/tether_master_slave(atom/movable/M, atom/movable/S, var/distance) +/proc/tether_master_slave(atom/movable/M, atom/movable/S, var/distance) if(!istype(M) || !istype(S) || !distance) return FALSE if(S.tether_master) //an atom can only have a single master or equal tether diff --git a/code/defines/obj.dm b/code/defines/obj.dm index b2239fda64a..7ae9d5ba755 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -4,18 +4,18 @@ anchored = 1 density = 1 - attackby(obj/item/weapon/W as obj, mob/user as mob) - return attack_hand(user) +/obj/structure/signpost/attackby(obj/item/weapon/W as obj, mob/user as mob) + return attack_hand(user) - attack_hand(mob/user as mob) - switch(alert("Travel back to ss13?",,"Yes","No")) - if("Yes") - if(user.z != src.z) - return - user.loc.loc.Exited(user) - user.forceMove(pick(latejoin)) - if("No") +/obj/structure/signpost/attack_hand(mob/user as mob) + switch(alert("Travel back to ss13?",,"Yes","No")) + if("Yes") + if(user.z != src.z) return + user.loc.loc.Exited(user) + user.forceMove(pick(latejoin)) + if("No") + return /obj/effect/mark var/mark = "" diff --git a/code/defines/procs/sd_Alert.dm b/code/defines/procs/sd_Alert.dm deleted file mode 100644 index 87d760bcc56..00000000000 --- a/code/defines/procs/sd_Alert.dm +++ /dev/null @@ -1,183 +0,0 @@ -/* sd_Alert library - by Shadowdarke (shadowdarke@byond.com) - - sd_Alert() is a powerful and flexible alternative to the built in BYOND - alert() proc. sd_Alert offers timed popups, unlimited buttons, custom - appearance, and even the option to popup without stealing keyboard focus - from the map or command line. - - Please see demo.dm for detailed examples. - -FORMAT - sd_Alert(who, message, title, buttons, default, duration, unfocus, \ - size, table, style, tag, select, flags) - -ARGUMENTS - who - the client or mob to display the alert to. - message - text message to display - title - title of the alert box - buttons - list of buttons - Default Value: list("Ok") - default - default button selestion - Default Value: the first button in the list - duration - the number of ticks before this alert expires. If not - set, the alert lasts until a button is clicked. - Default Value: 0 (unlimited) - unfocus - if this value is set, the popup will not steal keyboard - focus from the map or command line. - Default Value: 1 (do not take focus) - size - size of the popup window in px - Default Value: "300x200" - table - optional parameters for the HTML table in the alert - Default Value: "width=100% height=100%" (fill the window) - style - optional style sheet information - tag - lets you specify a certain tag for this sd_Alert so you may manipulate it - externally. (i.e. force the alert to close, change options and redisplay, - reuse the same window, etc.) - select - if set, the buttons will be replaced with a selection box with a number of - lines displayed equal to this value. - Default value: 0 (use buttons) - flags - optional flags effecting the alert display. These flags may be ORed (|) - together for multiple effects. - SD_ALERT_SCROLL = display a scrollbar - SD_ALERT_SELECT_MULTI = forces selection box display (instead of - buttons) allows the user to select multiple - choices. - SD_ALERT_LINKS = display each choice as a plain text link. - Any selection box style overrides this flag. - SD_ALERT_NOVALIDATE = don't validate responses - Default value: SD_ALERT_SCROLL - (button display with scroll bar, validate responses) -RETURNS - The text of the selected button, or null if the alert duration expired - without a button click. - -Version 1 changes (from version 0): -* Added the tag, select, and flags arguments, thanks to several suggestions from Foomer. -* Split the sd_Alert/Alert() proc into New(), Display(), and Response() to allow more - customization by developers. Primarily developers would want to use Display() to change - the display of active tagged windows - -*/ - - -#define SD_ALERT_SCROLL 1 -#define SD_ALERT_SELECT_MULTI 2 -#define SD_ALERT_LINKS 4 -#define SD_ALERT_NOVALIDATE 8 - -proc/sd_Alert(client/who, message, title, buttons = list("Ok"), default, duration = 0, unfocus = 1, size = "300x200", table = "width=100% height=100%", style, tag, select, flags = SD_ALERT_SCROLL) - - if(ismob(who)) - var/mob/M = who - who = M.client - if(!istype(who)) - CRASH("sd_Alert: Invalid target:[who] (\ref[who])") - - var/sd_alert/T = locate(tag) - if(T) - if(istype(T)) - qdel(T) - T = null - else - CRASH("sd_Alert: tag \"[tag]\" is already in use by datum '[T]' (type: [T.type])") - T = new(who, tag) - if(duration) - spawn(duration) - if(T) - qdel(T) - T = null - return - T.Display(message,title,buttons,default,unfocus,size,table,style,select,flags) - . = T.Response() - -sd_alert - var/client/target - var/response - var/list/validation - -sd_alert/Del() - target << browse(null,"window=\ref[src]") - ..() - -sd_alert/New(who, tag) - ..() - target = who - src.tag = tag - -sd_alert/Topic(href,params[]) - if(usr.client != target) - return - response = params["clk"] - -sd_alert/proc/Display(message,title,list/buttons,default,unfocus,size,table,style,select,flags) - if(unfocus) - spawn() target << browse(null,null) - if(istext(buttons)) - buttons = list(buttons) - if(!default) - default = buttons[1] - if(!(flags & SD_ALERT_NOVALIDATE)) - validation = buttons.Copy() - - var/html = {"[title][style]\ -
[message]
"} - - if(select || (flags & SD_ALERT_SELECT_MULTI)) // select style choices - html += {"
\ - -
" - else if(flags & SD_ALERT_LINKS) // text link style - for(var/b in buttons) - var/list/L = list() - L["clk"] = b - var/html_string=list2params(L) - var/focus - if(b == default) - focus = " ID=fcs" - html += "[html_encode(b)]\ -
" - else // button style choices - for(var/b in buttons) - var/list/L = list() - L["clk"] = b - var/html_string=list2params(L) - var/focus - if(b == default) - focus = " ID=fcs" - html += " " - - html += "
" - - target << browse(html,"window=\ref[src];size=[size];can_close=0") - -sd_alert/proc/Response() - var/validated - while(!validated) - while(target && !response) // wait for a response - sleep(2) - - if(response && validation) - if(istype(response, /list)) - var/list/L = response - validation - if(L.len) - response = null - else - validated = 1 - else if(response in validation) - validated = 1 - else - response=null - else - validated = 1 - spawn(2) qdel(src) - return response diff --git a/code/defines/procs/statistics.dm b/code/defines/procs/statistics.dm index 714031088f1..a9becffe904 100644 --- a/code/defines/procs/statistics.dm +++ b/code/defines/procs/statistics.dm @@ -96,7 +96,7 @@ log_game("SQL ERROR during death reporting. Error : \[[err]\]\n") qdel(query) -proc/statistic_cycle() +/proc/statistic_cycle() if(!sqllogging) return while(1) @@ -106,7 +106,7 @@ proc/statistic_cycle() sleep(6000) // Poll every ten minutes //This proc is used for feedback. It is executed at round end. -proc/sql_commit_feedback() +/proc/sql_commit_feedback() if(!blackbox) log_game("Round ended without a blackbox recorder. No feedback was sent to the database.") return diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 9e0658bd71d..357f2646a6e 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -100,7 +100,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/ var/list/teleportlocs = list() -proc/process_teleport_locs() +/proc/process_teleport_locs() for(var/area/AR in areas) if(istype(AR, /area/shuttle) || istype(AR, /area/wizard_station)) continue @@ -115,7 +115,7 @@ proc/process_teleport_locs() var/list/ghostteleportlocs = list() -proc/process_ghost_teleport_locs() +/proc/process_ghost_teleport_locs() for(var/area/AR in areas) if(ghostteleportlocs.Find(AR.name)) continue @@ -131,7 +131,7 @@ proc/process_ghost_teleport_locs() var/global/list/adminbusteleportlocs = list() -proc/process_adminbus_teleport_locs() +/proc/process_adminbus_teleport_locs() for(var/area/AR in areas) if(adminbusteleportlocs.Find(AR.name)) continue diff --git a/code/game/asteroid.dm b/code/game/asteroid.dm index 58e57bfe9b6..4ad9b3a77cf 100644 --- a/code/game/asteroid.dm +++ b/code/game/asteroid.dm @@ -29,7 +29,7 @@ proc/admin_spawn_room_at_pos() return */ -proc/check_complex_placement(var/turf/T,var/size_x,var/size_y,var/ignore_walls=0) +/proc/check_complex_placement(var/turf/T,var/size_x,var/size_y,var/ignore_walls=0) var/list/surroundings = list() surroundings |= range(7, locate(T.x,T.y,T.z)) @@ -46,7 +46,7 @@ proc/check_complex_placement(var/turf/T,var/size_x,var/size_y,var/ignore_walls=0 return 1 -proc/make_mining_asteroid_secret() +/proc/make_mining_asteroid_secret() var/turf/T = null var/sanity = 0 var/list/turfs = null diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index 61897f47263..ce0a33af49a 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -3,7 +3,7 @@ Use the regular_hud_updates() proc before process_med_hud(mob) or process_sec_hu the HUD updates properly! */ //Deletes the current HUD images so they can be refreshed with new ones. -mob/proc/regular_hud_updates() //Used in the life.dm of mobs that can use HUDs. +/mob/proc/regular_hud_updates() //Used in the life.dm of mobs that can use HUDs. if(client) for(var/image/hud in client.images) if(findtext(hud.icon_state, "hud", 1, 4)) @@ -14,7 +14,7 @@ mob/proc/regular_hud_updates() //Used in the life.dm of mobs that can use HUDs. sec_hud_users -= src diagnostic_hud_users -= src -proc/check_HUD_visibility(var/atom/target, var/mob/user) +/proc/check_HUD_visibility(var/atom/target, var/mob/user) if (user in confusion_victims) return FALSE if(user.see_invisible < target.invisibility) @@ -34,7 +34,7 @@ proc/check_HUD_visibility(var/atom/target, var/mob/user) return TRUE //Medical HUD outputs. Called by the Life() proc of the mob using it, usually. -proc/process_med_hud(var/mob/M, var/mob/eye) +/proc/process_med_hud(var/mob/M, var/mob/eye) if(!M) return if(!M.client) @@ -150,7 +150,7 @@ proc/process_med_hud(var/mob/M, var/mob/eye) //Security HUDs. Pass a value for the second argument to enable implant viewing or other special features. -proc/process_sec_hud(var/mob/M, var/advanced_mode,var/mob/eye) +/proc/process_sec_hud(var/mob/M, var/advanced_mode,var/mob/eye) if(!M) return if(!M.client) @@ -312,7 +312,7 @@ proc/process_sec_hud(var/mob/M, var/advanced_mode,var/mob/eye) see_invisible = SEE_INVISIBLE_LIVING //Artificer HUD -proc/process_construct_hud(var/mob/M, var/mob/eye) +/proc/process_construct_hud(var/mob/M, var/mob/eye) if(!M) return if(!M.client) diff --git a/code/game/gamemodes/events/powercreeper.dm b/code/game/gamemodes/events/powercreeper.dm index 04d2685ed21..be8c949373e 100644 --- a/code/game/gamemodes/events/powercreeper.dm +++ b/code/game/gamemodes/events/powercreeper.dm @@ -206,7 +206,7 @@ if(T) . += power_list(T, src, turn(dir, 180), powernetless_only) -obj/structure/cable/powercreeper/mergeConnectedNetworks(var/direction) +/obj/structure/cable/powercreeper/mergeConnectedNetworks(var/direction) var/turf/TB = get_step(src, direction) for(var/obj/structure/cable/C in TB) diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm index 717203e0e41..06888c39373 100644 --- a/code/game/gamemodes/sandbox/h_sandbox.dm +++ b/code/game/gamemodes/sandbox/h_sandbox.dm @@ -48,7 +48,7 @@ var/global/list/banned_sandbox_types=list( // /obj/item/weapon/gun/energy/staff ) -proc/is_banned_type(typepath) +/proc/is_banned_type(typepath) for(var/btype in banned_sandbox_types) if(findtext("[typepath]", "[btype]")!=0) return 1 @@ -90,11 +90,11 @@ proc/is_banned_type(typepath) //send2adminirc("\[SANDBOX\] [key_name(usr)] spawned [chosen] at ([usr.x],[usr.y],[usr.z])") feedback_add_details("admin_verb","hSBSA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -datum/hSB +/datum/hSB var/owner = null var/admin = 0 -datum/hSB/proc/update() +/datum/hSB/proc/update() var/hsbpanel = "
h_Sandbox Panel

" if(admin) @@ -107,7 +107,7 @@ datum/hSB/proc/update() hsbpanel += "- Spawn Object

" usr << browse(hsbpanel, "window=hsbpanel") -datum/hSB/Topic(href, href_list) +/datum/hSB/Topic(href, href_list) if(!(src.owner == usr.ckey)) return if(!usr) diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index d4860b3a431..3f140fad57d 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -482,7 +482,7 @@ var/global/list/all_jobs return list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer","BlackOps Commander","Supreme Commander") -proc/FindNameFromID(var/mob/living/carbon/human/H) +/proc/FindNameFromID(var/mob/living/carbon/human/H) ASSERT(istype(H)) var/obj/item/weapon/card/id/C = H.get_active_hand() if( istype(C) || istype(C, /obj/item/device/pda) ) @@ -511,5 +511,5 @@ proc/FindNameFromID(var/mob/living/carbon/human/H) if(ID) return ID.registered_name -proc/get_all_job_icons() //For all existing HUD icons +/proc/get_all_job_icons() //For all existing HUD icons return get_all_jobs() + list("Prisoner", "visitor") diff --git a/code/game/jobs/job/science.dm b/code/game/jobs/job/science.dm index 19f265e409f..2a51eb50d22 100644 --- a/code/game/jobs/job/science.dm +++ b/code/game/jobs/job/science.dm @@ -49,7 +49,7 @@ outfit_datum = /datum/outfit/xenoarchaeologist -datum/job/xenobiologist +/datum/job/xenobiologist title = "Xenobiologist" faction = "Station" total_positions = 2 diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 7a4dd7fcbb5..ad369ccf7aa 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -23,12 +23,6 @@ light_color = LIGHT_COLOR_CYAN light_range_on = 3 light_power_on = 2 - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER)) && occupant) - set_light(light_range_on, light_power_on) - else - set_light(0) var/on = FALSE var/target_time = 0 var/setting @@ -38,6 +32,13 @@ var/cools = 0 var/works_in_crit = FALSE //Will it let you inject chemicals into people in critical condition +/obj/machinery/sleeper/power_change() + ..() + if(!(stat & (BROKEN|NOPOWER)) && occupant) + set_light(light_range_on, light_power_on) + else + set_light(0) + /obj/machinery/sleeper/New() ..() if(map.nameShort == "deff") diff --git a/code/game/machinery/airlock_control.dm b/code/game/machinery/airlock_control.dm index 2eecc105ae0..73b1068f270 100644 --- a/code/game/machinery/airlock_control.dm +++ b/code/game/machinery/airlock_control.dm @@ -98,7 +98,7 @@ send_status() -obj/machinery/door/airlock/proc/send_status() +/obj/machinery/door/airlock/proc/send_status() if(radio_connection) var/datum/signal/signal = new /datum/signal signal.transmission_method = 1 //radio signal @@ -111,19 +111,19 @@ obj/machinery/door/airlock/proc/send_status() radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK) -obj/machinery/door/airlock/open(surpress_send) +/obj/machinery/door/airlock/open(surpress_send) . = ..() if(!surpress_send) send_status() -obj/machinery/door/airlock/close(surpress_send) +/obj/machinery/door/airlock/close(surpress_send) . = ..() if(!surpress_send) send_status() -obj/machinery/door/airlock/Bumped(atom/AM) +/obj/machinery/door/airlock/Bumped(atom/AM) ..(AM) if(istype(AM, /obj/mecha)) var/obj/mecha/mecha = AM @@ -141,7 +141,7 @@ obj/machinery/door/airlock/Bumped(atom/AM) radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK) return -obj/machinery/door/airlock/proc/set_frequency(new_frequency) +/obj/machinery/door/airlock/proc/set_frequency(new_frequency) radio_controller.remove_object(src, frequency) if(new_frequency) frequency = new_frequency diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm index 988db01ab94..292d2599405 100644 --- a/code/game/machinery/atmoalter/scrubber.dm +++ b/code/game/machinery/atmoalter/scrubber.dm @@ -76,12 +76,12 @@ /obj/machinery/portable_atmospherics/scrubber/huge/stationary name = "Stationary Air Scrubber" - attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if(W.is_wrench(user)) - to_chat(user, "The bolts are too tight for you to unscrew!") - return +/obj/machinery/portable_atmospherics/scrubber/huge/stationary/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) + if(W.is_wrench(user)) + to_chat(user, "The bolts are too tight for you to unscrew!") + return - ..() + ..() /obj/machinery/portable_atmospherics/scrubber/update_icon() diff --git a/code/game/machinery/computer/shuttle.dm b/code/game/machinery/computer/shuttle.dm index 42d30d2e4fa..79f1c9eaeb5 100644 --- a/code/game/machinery/computer/shuttle.dm +++ b/code/game/machinery/computer/shuttle.dm @@ -7,62 +7,61 @@ light_color = LIGHT_COLOR_CYAN - attackby(var/obj/item/weapon/card/W as obj, var/mob/user as mob) - if(stat & (BROKEN|NOPOWER)) - return - ..() - if ((!( istype(W, /obj/item/weapon/card) ) || !( ticker ) || emergency_shuttle.location != 1 || !( user ))) - return - if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) - if (istype(W, /obj/item/device/pda)) - var/obj/item/device/pda/pda = W - W = pda.id - if (!W:access) //no access - to_chat(user, "The access level of [W:registered_name]\'s card is not high enough. ") - return - - var/list/cardaccess = W:access - if(!istype(cardaccess, /list) || !cardaccess.len) //no access - to_chat(user, "The access level of [W:registered_name]\'s card is not high enough. ") - return - - if(!(access_heads in W:access)) //doesn't have this access - to_chat(user, "The access level of [W:registered_name]\'s card is not high enough. ") - return 0 - - var/choice = alert(user, text("Would you like to (un)authorize a shortened launch time? [] authorization\s are still needed. Use abort to cancel all authorizations.", src.auth_need - src.authorized.len), "Shuttle Launch", "Authorize", "Repeal", "Abort") - if(emergency_shuttle.location != 1 && user.get_active_hand() != W) - return 0 - switch(choice) - if("Authorize") - if(!emergency_shuttle.location == 1) - return - src.authorized -= W:registered_name - src.authorized += W:registered_name - if (src.auth_need - src.authorized.len > 0) - message_admins("[key_name_admin(user)] has authorized early shuttle launch") - log_game("[user.ckey] has authorized early shuttle launch") - to_chat(world, text("Alert: [] authorizations needed until shuttle is launched early", src.auth_need - src.authorized.len)) - else - message_admins("[key_name_admin(user)] has launched the shuttle") - log_game("[user.ckey] has launched the shuttle early") - to_chat(world, "Alert: Shuttle launch time shortened to 10 seconds!") - emergency_shuttle.online = 1 - emergency_shuttle.settimeleft(10) - emergency_shuttle.was_early_launched = TRUE - //src.authorized = null - del(src.authorized) - src.authorized = list( ) - - if("Repeal") - src.authorized -= W:registered_name - to_chat(world, text("Alert: [] authorizations needed until shuttle is launched early", src.auth_need - src.authorized.len)) - - if("Abort") - to_chat(world, "All authorizations to shortening time for shuttle launch have been revoked!") - src.authorized.len = 0 - src.authorized = list( ) +/obj/machinery/computer/shuttle/attackby(var/obj/item/weapon/card/W as obj, var/mob/user as mob) + if(stat & (BROKEN|NOPOWER)) return + ..() + if ((!( istype(W, /obj/item/weapon/card) ) || !( ticker ) || emergency_shuttle.location != 1 || !( user ))) + return + if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) + if (istype(W, /obj/item/device/pda)) + var/obj/item/device/pda/pda = W + W = pda.id + if (!W:access) //no access + to_chat(user, "The access level of [W:registered_name]\'s card is not high enough. ") + return + + var/list/cardaccess = W:access + if(!istype(cardaccess, /list) || !cardaccess.len) //no access + to_chat(user, "The access level of [W:registered_name]\'s card is not high enough. ") + return + + if(!(access_heads in W:access)) //doesn't have this access + to_chat(user, "The access level of [W:registered_name]\'s card is not high enough. ") + return 0 + + var/choice = alert(user, text("Would you like to (un)authorize a shortened launch time? [] authorization\s are still needed. Use abort to cancel all authorizations.", src.auth_need - src.authorized.len), "Shuttle Launch", "Authorize", "Repeal", "Abort") + if(emergency_shuttle.location != 1 && user.get_active_hand() != W) + return 0 + switch(choice) + if("Authorize") + if(!emergency_shuttle.location == 1) + return + src.authorized -= W:registered_name + src.authorized += W:registered_name + if (src.auth_need - src.authorized.len > 0) + message_admins("[key_name_admin(user)] has authorized early shuttle launch") + log_game("[user.ckey] has authorized early shuttle launch") + to_chat(world, text("Alert: [] authorizations needed until shuttle is launched early", src.auth_need - src.authorized.len)) + else + message_admins("[key_name_admin(user)] has launched the shuttle") + log_game("[user.ckey] has launched the shuttle early") + to_chat(world, "Alert: Shuttle launch time shortened to 10 seconds!") + emergency_shuttle.online = 1 + emergency_shuttle.settimeleft(10) + emergency_shuttle.was_early_launched = TRUE + //src.authorized = null + del(src.authorized) + src.authorized = list( ) + + if("Repeal") + src.authorized -= W:registered_name + to_chat(world, text("Alert: [] authorizations needed until shuttle is launched early", src.auth_need - src.authorized.len)) + + if("Abort") + to_chat(world, "All authorizations to shortening time for shuttle launch have been revoked!") + src.authorized.len = 0 + src.authorized = list( ) /obj/machinery/computer/shuttle/emag(mob/user as mob) if(!emagged) diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 7f5e626f7bf..6b060eb3f85 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -452,7 +452,7 @@ to destroy them and players will be able to make replacements. icon_state = "door_electronics" //origin_tech = Tc_PROGRAMMING + "=2" -obj/item/weapon/circuitboard/rdserver +/obj/item/weapon/circuitboard/rdserver name = "Circuit Board (R&D Server)" desc = "A circuit board used to run a R&D server." build_path = /obj/machinery/r_n_d/server @@ -1428,7 +1428,7 @@ obj/item/weapon/circuitboard/rdserver /obj/item/weapon/stock_parts/capacitor = 2, /obj/item/weapon/stock_parts/micro_laser = 3, /obj/item/weapon/stock_parts/console_screen = 1) - + /obj/item/weapon/circuitboard/cooking/candy name = "circuit board (candy machine)" desc = "A circuit board for a candy machine." @@ -1438,7 +1438,7 @@ obj/item/weapon/circuitboard/rdserver req_components = list( /obj/item/weapon/stock_parts/manipulator = 3, /obj/item/weapon/stock_parts/console_screen = 1) //boring recipe I know, but they're very simple machines - + /obj/item/weapon/circuitboard/cooking/cerealmaker name = "circuit board (cereal maker)" desc = "A circuit board for a cereal maker." diff --git a/code/game/machinery/defibcharger.dm b/code/game/machinery/defibcharger.dm index 42a076ed826..9c14e8bcc3e 100644 --- a/code/game/machinery/defibcharger.dm +++ b/code/game/machinery/defibcharger.dm @@ -1,4 +1,4 @@ -obj/machinery/recharger/defibcharger/wallcharger // obj/machinery/recharger/defibcharger define doesn't exist, don't bother trying to look for it +/obj/machinery/recharger/defibcharger/wallcharger // obj/machinery/recharger/defibcharger define doesn't exist, don't bother trying to look for it name = "defibrillator recharger" desc = "A special wall-mounted recharger used to recharge defibrillators." icon = 'icons/obj/stationobjs.dmi' @@ -29,7 +29,7 @@ obj/machinery/recharger/defibcharger/wallcharger // obj/machinery/recharger/defi RefreshParts() -obj/machinery/recharger/defibcharger/wallcharger/attack_hand(mob/user as mob) +/obj/machinery/recharger/defibcharger/wallcharger/attack_hand(mob/user as mob) add_fingerprint(user) if(charging) @@ -39,10 +39,10 @@ obj/machinery/recharger/defibcharger/wallcharger/attack_hand(mob/user as mob) use_power = 1 update_icon() -obj/machinery/recharger/defibcharger/wallcharger/attack_paw(mob/user as mob) +/obj/machinery/recharger/defibcharger/wallcharger/attack_paw(mob/user as mob) return attack_hand(user) -obj/machinery/recharger/defibcharger/wallcharger/emp_act(severity) +/obj/machinery/recharger/defibcharger/wallcharger/emp_act(severity) if(stat & (NOPOWER|BROKEN) || !anchored) ..(severity) return @@ -52,7 +52,7 @@ obj/machinery/recharger/defibcharger/wallcharger/emp_act(severity) B.charges = 0 ..(severity) -obj/machinery/recharger/defibcharger/wallcharger/update_icon() //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier. +/obj/machinery/recharger/defibcharger/wallcharger/update_icon() //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier. if(charging) icon_state = "wrecharger1" else @@ -60,7 +60,7 @@ obj/machinery/recharger/defibcharger/wallcharger/update_icon() //we have an upda -obj/machinery/recharger/defibcharger/wallcharger/process() +/obj/machinery/recharger/defibcharger/wallcharger/process() if(stat & (NOPOWER|BROKEN) || !anchored) return @@ -91,7 +91,7 @@ obj/machinery/recharger/defibcharger/wallcharger/process() return TRUE return FALSE -obj/machinery/recharger/defibcharger/wallcharger/attackby(obj/item/weapon/G as obj, mob/user as mob) +/obj/machinery/recharger/defibcharger/wallcharger/attackby(obj/item/weapon/G as obj, mob/user as mob) if(istype(G, /obj/item/weapon/melee/defibrillator)) if(..()) return diff --git a/code/game/machinery/doors/mineral.dm b/code/game/machinery/doors/mineral.dm index e2e4b4dc1a6..74ed8ba4244 100644 --- a/code/game/machinery/doors/mineral.dm +++ b/code/game/machinery/doors/mineral.dm @@ -152,9 +152,9 @@ /obj/machinery/door/mineral/transparent opacity = 0 - close() - ..() - opacity = 0 +/obj/machinery/door/mineral/transparent/close() + ..() + opacity = 0 /obj/machinery/door/mineral/transparent/plasma prefix = "plasma" diff --git a/code/game/machinery/embedded_controller/airlock_controllers.dm b/code/game/machinery/embedded_controller/airlock_controllers.dm index cf9926a6824..9fb7c0622e9 100644 --- a/code/game/machinery/embedded_controller/airlock_controllers.dm +++ b/code/game/machinery/embedded_controller/airlock_controllers.dm @@ -2,24 +2,24 @@ /obj/machinery/embedded_controller/radio/advanced_airlock_controller name = "Advanced Airlock Controller" - multitool_menu(var/mob/user, var/obj/item/device/multitool/P) - return {" - - Doors: - - Sensors: - "} +/obj/machinery/embedded_controller/radio/advanced_airlock_controller/multitool_menu(var/mob/user, var/obj/item/device/multitool/P) + return {" + + Doors: + + Sensors: + "} /obj/machinery/embedded_controller/radio/advanced_airlock_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open=NANOUI_FOCUS) if(!program)//we need to initialize the controller to get a program @@ -192,22 +192,22 @@ name = "Airlock Controller" tag_secure = 1 - multitool_menu(var/mob/user, var/obj/item/device/multitool/P) - return {" - - Doors: - - Sensors: - "} +/obj/machinery/embedded_controller/radio/airlock_controller/multitool_menu(var/mob/user, var/obj/item/device/multitool/P) + return {" + + Doors: + + Sensors: + "} /obj/machinery/embedded_controller/radio/airlock_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open=NANOUI_FOCUS) if(!program)//we need to initialize the controller to get a program @@ -355,17 +355,17 @@ name = "Access Controller" tag_secure = 1 - multitool_menu(var/mob/user, var/obj/item/device/multitool/P) - return {" - - Doors: - "} +/obj/machinery/embedded_controller/radio/access_controller/multitool_menu(var/mob/user, var/obj/item/device/multitool/P) + return {" + + Doors: + "} /obj/machinery/embedded_controller/radio/access_controller/update_icon() @@ -476,17 +476,17 @@ name = "Pressure Regulator" tag_secure = 1 - multitool_menu(var/mob/user, var/obj/item/device/multitool/P) - return {" - - Sensors: - "} +/obj/machinery/embedded_controller/radio/pressure_regulator/multitool_menu(var/mob/user, var/obj/item/device/multitool/P) + return {" + + Sensors: + "} /obj/machinery/embedded_controller/radio/pressure_regulator/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open=NANOUI_FOCUS) if(!program)//we need to initialize the controller to get a program diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index cebd8ad7d16..03b127a38bc 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -26,7 +26,7 @@ /******************************************************************** ** Adding Stock Parts to VV so preconstructed shit has its candy ** ********************************************************************/ -obj/machinery/gibber/New() +/obj/machinery/gibber/New() . = ..() component_parts = newlist( diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 43e3f1eeea5..70754cbe8de 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -1251,7 +1251,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co attack_self(loc) -obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob) +/obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W, /obj/item/weapon/pen)) if(scribble_page == curr_page) to_chat(user, "There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?") diff --git a/code/game/machinery/overview.dm b/code/game/machinery/overview.dm index d36f4827a53..ef9f4b44d89 100644 --- a/code/game/machinery/overview.dm +++ b/code/game/machinery/overview.dm @@ -344,13 +344,13 @@ return -proc/getr(col) +/proc/getr(col) return hex2num( copytext(col, 2,4)) -proc/getg(col) +/proc/getg(col) return hex2num( copytext(col, 4,6)) -proc/getb(col) +/proc/getb(col) return hex2num( copytext(col, 6)) diff --git a/code/game/mecha/combat/honker.dm b/code/game/mecha/combat/honker.dm index 210450a513b..80af6cefa50 100644 --- a/code/game/mecha/combat/honker.dm +++ b/code/game/mecha/combat/honker.dm @@ -146,20 +146,12 @@ squeak = 0 return result -obj/mecha/combat/honker/Topic(href, href_list) +/obj/mecha/combat/honker/Topic(href, href_list) ..() if (href_list["play_sound"]) switch(href_list["play_sound"]) if("sadtrombone") playsound(src, 'sound/misc/sadtrombone.ogg', 50) - return - -proc/rand_hex_color() - var/list/colors = list("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f") - var/color="" - for (var/i=0;i<6;i++) - color = color+pick(colors) - return color /obj/mecha/combat/honker/startMechWalking() icon_state = initial_icon + "-move" diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 99f23908c3d..f66f2368de6 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -2156,92 +2156,88 @@ /datum/global_iterator/mecha_preserve_temp //normalizing cabin air temperature to 20 degrees celsium delay = 20 - process(var/obj/mecha/mecha) - if(mecha.cabin_air && mecha.cabin_air.return_volume() > 0) - var/delta = mecha.cabin_air.temperature - T20C - mecha.cabin_air.temperature -= max(-10, min(10, round(delta/4,0.1))) - return +/datum/global_iterator/mecha_preserve_temp/process(var/obj/mecha/mecha) + if(mecha.cabin_air && mecha.cabin_air.return_volume() > 0) + var/delta = mecha.cabin_air.temperature - T20C + mecha.cabin_air.temperature -= max(-10, min(10, round(delta/4,0.1))) /datum/global_iterator/mecha_tank_give_air delay = 15 - process(var/obj/mecha/mecha) - if(mecha.internal_tank) - var/datum/gas_mixture/tank_air = mecha.internal_tank.return_air() - var/datum/gas_mixture/cabin_air = mecha.cabin_air +/datum/global_iterator/mecha_tank_give_air/process(var/obj/mecha/mecha) + if(mecha.internal_tank) + var/datum/gas_mixture/tank_air = mecha.internal_tank.return_air() + var/datum/gas_mixture/cabin_air = mecha.cabin_air - var/release_pressure = mecha.internal_tank_valve - var/cabin_pressure = cabin_air.return_pressure() - var/pressure_delta = min(release_pressure - cabin_pressure, (tank_air.return_pressure() - cabin_pressure)/2) - var/transfer_moles = 0 - if(pressure_delta > 0) //cabin pressure lower than release pressure - if(tank_air.return_temperature() > 0) - transfer_moles = pressure_delta * cabin_air.return_volume() / (cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION) - var/datum/gas_mixture/removed = tank_air.remove(transfer_moles) - cabin_air.merge(removed) - else if(pressure_delta < 0) //cabin pressure higher than release pressure - var/datum/gas_mixture/t_air = mecha.get_turf_air() - pressure_delta = cabin_pressure - release_pressure + var/release_pressure = mecha.internal_tank_valve + var/cabin_pressure = cabin_air.return_pressure() + var/pressure_delta = min(release_pressure - cabin_pressure, (tank_air.return_pressure() - cabin_pressure)/2) + var/transfer_moles = 0 + if(pressure_delta > 0) //cabin pressure lower than release pressure + if(tank_air.return_temperature() > 0) + transfer_moles = pressure_delta * cabin_air.return_volume() / (cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION) + var/datum/gas_mixture/removed = tank_air.remove(transfer_moles) + cabin_air.merge(removed) + else if(pressure_delta < 0) //cabin pressure higher than release pressure + var/datum/gas_mixture/t_air = mecha.get_turf_air() + pressure_delta = cabin_pressure - release_pressure + if(t_air) + pressure_delta = min(cabin_pressure - t_air.return_pressure(), pressure_delta) + if(pressure_delta > 0) //if location pressure is lower than cabin pressure + transfer_moles = pressure_delta * cabin_air.return_volume() / (cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION) + var/datum/gas_mixture/removed = cabin_air.remove(transfer_moles) if(t_air) - pressure_delta = min(cabin_pressure - t_air.return_pressure(), pressure_delta) - if(pressure_delta > 0) //if location pressure is lower than cabin pressure - transfer_moles = pressure_delta * cabin_air.return_volume() / (cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION) - var/datum/gas_mixture/removed = cabin_air.remove(transfer_moles) - if(t_air) - t_air.merge(removed) - else //just delete the cabin gas, we're in space or some shit - qdel(removed) - removed = null - else - return stop() - return + t_air.merge(removed) + else //just delete the cabin gas, we're in space or some shit + qdel(removed) + removed = null + else + return stop() /datum/global_iterator/mecha_intertial_movement //inertial movement in space delay = 7 - process(var/obj/mecha/mecha as obj,direction) - if(direction) - if(!step(mecha, direction)||mecha.check_for_support()) - src.stop() - else +/datum/global_iterator/mecha_intertial_movement/process(var/obj/mecha/mecha as obj,direction) + if(direction) + if(!step(mecha, direction)||mecha.check_for_support()) src.stop() - return + else + src.stop() /datum/global_iterator/mecha_internal_damage // processing internal damage - process(var/obj/mecha/mecha) - if(!mecha.hasInternalDamage()) - return stop() - if(mecha.hasInternalDamage(MECHA_INT_FIRE)) - if(!mecha.hasInternalDamage(MECHA_INT_TEMP_CONTROL) && prob(5)) - mecha.clearInternalDamage(MECHA_INT_FIRE) - if(mecha.internal_tank) - if(mecha.internal_tank.return_pressure()>mecha.internal_tank.maximum_pressure && !(mecha.hasInternalDamage(MECHA_INT_TANK_BREACH))) - mecha.setInternalDamage(MECHA_INT_TANK_BREACH) - var/datum/gas_mixture/int_tank_air = mecha.internal_tank.return_air() - if(int_tank_air && int_tank_air.return_volume()>0) //heat the air_contents - int_tank_air.temperature = min(6000+T0C, int_tank_air.temperature+rand(10,15)) - if(mecha.cabin_air && mecha.cabin_air.return_volume()>0) - mecha.cabin_air.temperature = min(6000+T0C, mecha.cabin_air.return_temperature()+rand(10,15)) - if(mecha.cabin_air.return_temperature()>mecha.max_temperature/2) - mecha.take_damage(4/round(mecha.max_temperature/mecha.cabin_air.return_temperature(),0.1),"fire") - if(mecha.hasInternalDamage(MECHA_INT_TEMP_CONTROL)) //stop the mecha_preserve_temp loop datum - mecha.pr_int_temp_processor.stop() - if(mecha.hasInternalDamage(MECHA_INT_TANK_BREACH)) //remove some air from internal tank - if(mecha.internal_tank) - var/datum/gas_mixture/int_tank_air = mecha.internal_tank.return_air() - var/datum/gas_mixture/leaked_gas = int_tank_air.remove_ratio(0.10) - if(mecha.loc && hascall(mecha.loc,"assume_air")) - mecha.loc.assume_air(leaked_gas) - else - qdel(leaked_gas) - leaked_gas = null - if(mecha.hasInternalDamage(MECHA_INT_SHORT_CIRCUIT)) - if(mecha.get_charge()) - spark(mecha, 2, FALSE) - mecha.cell.charge -= min(20,mecha.cell.charge) - mecha.cell.maxcharge -= min(20,mecha.cell.maxcharge) - return +/datum/global_iterator/mecha_internal_damage/process(var/obj/mecha/mecha) + if(!mecha.hasInternalDamage()) + return stop() + if(mecha.hasInternalDamage(MECHA_INT_FIRE)) + if(!mecha.hasInternalDamage(MECHA_INT_TEMP_CONTROL) && prob(5)) + mecha.clearInternalDamage(MECHA_INT_FIRE) + if(mecha.internal_tank) + if(mecha.internal_tank.return_pressure()>mecha.internal_tank.maximum_pressure && !(mecha.hasInternalDamage(MECHA_INT_TANK_BREACH))) + mecha.setInternalDamage(MECHA_INT_TANK_BREACH) + var/datum/gas_mixture/int_tank_air = mecha.internal_tank.return_air() + if(int_tank_air && int_tank_air.return_volume()>0) //heat the air_contents + int_tank_air.temperature = min(6000+T0C, int_tank_air.temperature+rand(10,15)) + if(mecha.cabin_air && mecha.cabin_air.return_volume()>0) + mecha.cabin_air.temperature = min(6000+T0C, mecha.cabin_air.return_temperature()+rand(10,15)) + if(mecha.cabin_air.return_temperature()>mecha.max_temperature/2) + mecha.take_damage(4/round(mecha.max_temperature/mecha.cabin_air.return_temperature(),0.1),"fire") + if(mecha.hasInternalDamage(MECHA_INT_TEMP_CONTROL)) //stop the mecha_preserve_temp loop datum + mecha.pr_int_temp_processor.stop() + if(mecha.hasInternalDamage(MECHA_INT_TANK_BREACH)) //remove some air from internal tank + if(mecha.internal_tank) + var/datum/gas_mixture/int_tank_air = mecha.internal_tank.return_air() + var/datum/gas_mixture/leaked_gas = int_tank_air.remove_ratio(0.10) + if(mecha.loc && hascall(mecha.loc,"assume_air")) + mecha.loc.assume_air(leaked_gas) + else + qdel(leaked_gas) + leaked_gas = null + if(mecha.hasInternalDamage(MECHA_INT_SHORT_CIRCUIT)) + if(mecha.get_charge()) + spark(mecha, 2, FALSE) + mecha.cell.charge -= min(20,mecha.cell.charge) + mecha.cell.maxcharge -= min(20,mecha.cell.maxcharge) ///////////// diff --git a/code/game/objects/effects/step_triggers.dm b/code/game/objects/effects/step_triggers.dm index 06f5527988f..bd7bd88d5c0 100644 --- a/code/game/objects/effects/step_triggers.dm +++ b/code/game/objects/effects/step_triggers.dm @@ -35,57 +35,57 @@ var/nostop = 0 // if 1: will only be stopped by teleporters var/list/affecting = list() - Trigger(var/atom/A) - if(!A || !istype(A, /atom/movable) || isobserver(A)) +/obj/effect/step_trigger/thrower/Trigger(var/atom/A) + if(!A || !istype(A, /atom/movable) || isobserver(A)) + return + var/atom/movable/AM = A + var/curtiles = 0 + var/stopthrow = 0 + for(var/obj/effect/step_trigger/thrower/T in orange(2, src)) + if(AM in T.affecting) return - var/atom/movable/AM = A - var/curtiles = 0 - var/stopthrow = 0 - for(var/obj/effect/step_trigger/thrower/T in orange(2, src)) - if(AM in T.affecting) - return - if(ismob(AM)) - var/mob/M = AM - if(immobilize) - M.canmove = 0 + if(ismob(AM)) + var/mob/M = AM + if(immobilize) + M.canmove = 0 - affecting.Add(AM) - while(AM && !stopthrow) - if(tiles) - if(curtiles >= tiles) - break - if(AM.z != src.z) + affecting.Add(AM) + while(AM && !stopthrow) + if(tiles) + if(curtiles >= tiles) break + if(AM.z != src.z) + break - curtiles++ + curtiles++ - sleep(speed) + sleep(speed) - // Calculate if we should stop the process - if(!nostop) - for(var/obj/effect/step_trigger/T in get_step(AM, direction)) - if(T.stopper && T != src) - stopthrow = 1 - else - for(var/obj/effect/step_trigger/teleporter/T in get_step(AM, direction)) - if(T.stopper) - stopthrow = 1 + // Calculate if we should stop the process + if(!nostop) + for(var/obj/effect/step_trigger/T in get_step(AM, direction)) + if(T.stopper && T != src) + stopthrow = 1 + else + for(var/obj/effect/step_trigger/teleporter/T in get_step(AM, direction)) + if(T.stopper) + stopthrow = 1 - if(AM) - var/predir = AM.dir - step(AM, direction) - if(!facedir) - AM.dir = predir + if(AM) + var/predir = AM.dir + step(AM, direction) + if(!facedir) + AM.dir = predir - affecting.Remove(AM) + affecting.Remove(AM) - if(ismob(AM)) - var/mob/M = AM - if(immobilize) - M.canmove = 1 + if(ismob(AM)) + var/mob/M = AM + if(immobilize) + M.canmove = 1 /obj/effect/step_trigger/thrower/north dir = NORTH @@ -111,12 +111,12 @@ var/teleport_y = 0 var/teleport_z = 0 - Trigger(var/atom/movable/A) - if(teleport_x && teleport_y && teleport_z) +/obj/effect/step_trigger/teleporter/Trigger(var/atom/movable/A) + if(teleport_x && teleport_y && teleport_z) - A.x = teleport_x - A.y = teleport_y - A.z = teleport_z + A.x = teleport_x + A.y = teleport_y + A.z = teleport_z /* Random teleporter, teleports atoms to locations ranging from teleport_x - teleport_x_offset, etc */ diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index 32d9274adf8..d82fee8d8fa 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -141,10 +141,10 @@ var/explosion_shake_message_cooldown = 0 var/x0 = offcenter.x var/y0 = offcenter.y var/z0 = offcenter.z - + if(epicenter != offcenter) // Not relevant if not in multi-z log_debug("Destroying size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [offcenter.loc.name] ([x0],[y0],[z0])") - + for(var/turf/T in spiral_block(offcenter,max_range,1)) var/dist = cheap_pythag(T.x - x0, T.y - y0) var/_dist = dist @@ -208,8 +208,5 @@ var/explosion_shake_message_cooldown = 0 CHECK_TICK + explosion_destroy_multi_z(epicenter, offcenter, devastation_range / 2, heavy_impact_range / 2, light_impact_range / 2, flash_range / 2, explosion_time) explosion_destroy_multi_z(epicenter, offcenter, devastation_range / 2, heavy_impact_range / 2, light_impact_range / 2, flash_range / 2, explosion_time, whodunnit) - -proc/secondaryexplosion(turf/epicenter, range) - for(var/turf/tile in trange(range, epicenter)) - tile.ex_act(2) diff --git a/code/game/objects/explosion_recursive.dm b/code/game/objects/explosion_recursive.dm index 69508c28e57..5471bac592a 100644 --- a/code/game/objects/explosion_recursive.dm +++ b/code/game/objects/explosion_recursive.dm @@ -25,7 +25,7 @@ var/list/datum/explosion_turf/explosion_turfs = list() var/explosion_in_progress = 0 -proc/get_explosion_turf(var/turf/T) +/proc/get_explosion_turf(var/turf/T) for( var/datum/explosion_turf/ET in explosion_turfs ) if( T == ET.turf ) return ET @@ -34,7 +34,7 @@ proc/get_explosion_turf(var/turf/T) explosion_turfs += ET return ET -proc/explosion_rec(turf/epicenter, power) +/proc/explosion_rec(turf/epicenter, power) var/loopbreak = 0 @@ -160,4 +160,4 @@ proc/explosion_rec(turf/epicenter, power) */ /turf/unsimulated/explosion_spread(power) - return //So it doesn't get to the parent proc, which simulates explosions \ No newline at end of file + return //So it doesn't get to the parent proc, which simulates explosions diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index c18d021a8c1..fe7ae628d44 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -2568,7 +2568,7 @@ var/global/msg_id = 0 else to_chat(usr, "You cannot do this while restrained.") -obj/item/device/pda/CtrlClick() +/obj/item/device/pda/CtrlClick() if ( can_use(usr) ) // Checks that the PDA is in our inventory. This will be checked by the proc anyways, but we don't want to generate an error message if not. verb_remove_pen(usr) return @@ -2597,7 +2597,7 @@ obj/item/device/pda/CtrlClick() else to_chat(usr, "You cannot do this while restrained.") -obj/item/device/pda/AltClick() +/obj/item/device/pda/AltClick() if ( can_use(usr) ) // Checks that the PDA is in our inventory. This will be checked by the proc anyways, but we don't want to generate an error message if not. verb_remove_id(usr) return diff --git a/code/game/objects/items/devices/PDA/games/spess pets.dm b/code/game/objects/items/devices/PDA/games/spess pets.dm index 3ca717a5165..23ad9ce6bbc 100644 --- a/code/game/objects/items/devices/PDA/games/spess pets.dm +++ b/code/game/objects/items/devices/PDA/games/spess pets.dm @@ -333,5 +333,5 @@ last_spoken = "At the current rates you will get [nanocoins_rates] dollars per nanocoins." -proc/nano2dollar(var/nanocoins) +/proc/nano2dollar(var/nanocoins) return round(nanocoins * nanocoins_rates) diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index 15090300ad5..749bfe13e19 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -157,7 +157,7 @@ return 1 return 0 -obj/item/device/multitool/ai_detect/update_icon() +/obj/item/device/multitool/ai_detect/update_icon() if(src.detected) if(src.detected & DETECT_AI) src.icon_state = "[initial(src.icon_state)]_red" @@ -171,7 +171,7 @@ obj/item/device/multitool/ai_detect/update_icon() src.icon_state = initial(src.icon_state) return -obj/item/device/multitool/ai_detect/examine(mob/user) +/obj/item/device/multitool/ai_detect/examine(mob/user) ..() if(src.detected) user << "The screen displays:" diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index e86624054d2..1881c714736 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -130,7 +130,8 @@ BREATHALYZER var/datum/disease2/disease/D = I.virus2[ID] if(ID in virusDB) var/datum/data/record/V = virusDB[ID] - to_chat(user,"Warning: [V.fields["name"]][V.fields["nickname"] ? " \"[V.fields["nickname"]]\"" : ""] detected on \the [src]. Antigen: [D.get_antigen_string()]") + var/nickname = V.fields["nickname"] + to_chat(user,"Warning: [V.fields["name"]][nickname ? " [nickname]" : ""] detected on \the [src]. Antigen: [D.get_antigen_string()]") else to_chat(user,"Warning: Unknown [D.form] detected on \the [src].") else @@ -149,7 +150,7 @@ BREATHALYZER to_chat(user, last_reading) //Note : Used directly by other objects. Could benefit of OOP, maybe ? -proc/healthanalyze(mob/living/M as mob, mob/living/user as mob, var/mode = 0, var/skip_checks = 0, var/silent = 0) +/proc/healthanalyze(mob/living/M as mob, mob/living/user as mob, var/mode = 0, var/skip_checks = 0, var/silent = 0) var/message = "" if(!skip_checks) if(((M_CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) diff --git a/code/game/objects/items/mountable_frames/fire_alarm.dm b/code/game/objects/items/mountable_frames/fire_alarm.dm index 432bfd10c8f..536a733e931 100644 --- a/code/game/objects/items/mountable_frames/fire_alarm.dm +++ b/code/game/objects/items/mountable_frames/fire_alarm.dm @@ -1,4 +1,4 @@ -obj/item/mounted/frame/firealarm +/obj/item/mounted/frame/firealarm name = "fire alarm frame" desc = "Used for building fire alarms." icon = 'icons/obj/monitors.dmi' diff --git a/code/game/objects/items/robot/robot_items/robot_elec_arm.dm b/code/game/objects/items/robot/robot_items/robot_elec_arm.dm index fab703c7b1a..f2bc1edbf8b 100644 --- a/code/game/objects/items/robot/robot_items/robot_elec_arm.dm +++ b/code/game/objects/items/robot/robot_items/robot_elec_arm.dm @@ -3,7 +3,7 @@ icon = 'icons/obj/decals.dmi' icon_state = "shock" -obj/item/borg/stun/attack(mob/M as mob, mob/living/silicon/robot/user as mob) +/obj/item/borg/stun/attack(mob/M as mob, mob/living/silicon/robot/user as mob) user.do_attack_animation(M, src) M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index 9a5df187a5d..e823cd8ddf5 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -542,7 +542,7 @@ var/list/datum/stack_recipe/mythril_recipes = list ( \ origin_tech = Tc_MATERIALS + "=5" perunit = CC_PER_SHEET_MOLITZ -obj/item/stack/sheet/mineral/gingerbread +/obj/item/stack/sheet/mineral/gingerbread name = "gingerbread" icon_state = "sheet-gingerbread" force = 5.0 diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index d88f347c46f..70105df328e 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -147,7 +147,7 @@ material = "fabric" -obj/item/stack/tile/slime +/obj/item/stack/tile/slime name = "tile of slime" desc = "A flat piece of slime made through xenobiology." icon_state = "tile-slime" diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index a2c9b618f10..80d5a04d0ae 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -329,7 +329,7 @@ origin_tech = Tc_COMBAT + "=3;" + Tc_MATERIALS + "=3" affected_area = 4 -obj/item/weapon/grenade/chem_grenade/exgrenade +/obj/item/weapon/grenade/chem_grenade/exgrenade name = "EX Chem Grenade" desc = "A specially designed large grenade that can hold three containers." icon_state = "ex_grenade" @@ -337,7 +337,7 @@ obj/item/weapon/grenade/chem_grenade/exgrenade origin_tech = Tc_COMBAT + "=4;" + Tc_MATERIALS + "=3;" + Tc_ENGINEERING + "=2" affected_area = 4 -obj/item/weapon/grenade/chem_grenade/exgrenade/attackby(obj/item/weapon/W as obj, mob/user as mob) +/obj/item/weapon/grenade/chem_grenade/exgrenade/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W,/obj/item/device/assembly_holder) && (!stage || stage==GRENADE_STAGE_ASSEMBLY_INSERTED) && path != PATH_STAGE_COMPLETE) var/obj/item/device/assembly_holder/det = W if(istype(det.a_left,det.a_right.type) || (!isigniter(det.a_left) && !isigniter(det.a_right))) diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index 415c4a6e730..aa0e118c44e 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -8,7 +8,7 @@ /obj/item/weapon/grenade/flashbang/prime(banglet) flashbangprime(delsrc = TRUE, isbanglet = banglet) -atom/proc/flashbangprime(var/delsrc = FALSE, var/ignore_protection = FALSE, isbanglet = FALSE) +/atom/proc/flashbangprime(var/delsrc = FALSE, var/ignore_protection = FALSE, isbanglet = FALSE) var/turf/flashbang_turf = get_turf(src) if(!flashbang_turf) return @@ -36,7 +36,7 @@ atom/proc/flashbangprime(var/delsrc = FALSE, var/ignore_protection = FALSE, isba if(delsrc) qdel(src) -atom/proc/flashbang(var/turf/T, var/mob/living/M, var/ignore_protection = 0, var/isbanglet = FALSE) +/atom/proc/flashbang(var/turf/T, var/mob/living/M, var/ignore_protection = 0, var/isbanglet = FALSE) if (locate(/obj/item/weapon/cloaking_device, M)) // Called during the loop that bangs people in lockers/containers and when banging for(var/obj/item/weapon/cloaking_device/S in M) // people in normal view. Could theroetically be called during other explosions. S.active = 0 // -- Polymorph diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm index 733f5002adc..4bc64d57082 100644 --- a/code/game/objects/items/weapons/paint.dm +++ b/code/game/objects/items/weapons/paint.dm @@ -184,54 +184,53 @@ var/global/list/paint_types = subtypesof(/datum/reagent/paint) density = 1.808 specheatcap = 0.85 - reaction_turf(var/turf/T, var/volume) - if(!istype(T) || istype(T, /turf/space)) - return - var/ind = "[initial(T.icon)][color]" - if(!cached_icons[ind]) - var/icon/overlay = new/icon(initial(T.icon)) - overlay.Blend(color,ICON_MULTIPLY) - overlay.SetIntensity(1.4) - T.icon = overlay - cached_icons[ind] = T.icon - else - T.icon = cached_icons[ind] +/datum/reagent/paint/reaction_turf(var/turf/T, var/volume) + if(!istype(T) || istype(T, /turf/space)) return + var/ind = "[initial(T.icon)][color]" + if(!cached_icons[ind]) + var/icon/overlay = new/icon(initial(T.icon)) + overlay.Blend(color,ICON_MULTIPLY) + overlay.SetIntensity(1.4) + T.icon = overlay + cached_icons[ind] = T.icon + else + T.icon = cached_icons[ind] - red - name = "Red Paint" - id = "paint_red" - color = "#FF0000" +/datum/reagent/paint/red + name = "Red Paint" + id = "paint_red" + color = "#FF0000" - green - name = "Green Paint" - color = "#00FF00" - id = "paint_green" +/datum/reagent/paint/green + name = "Green Paint" + color = "#00FF00" + id = "paint_green" - blue - name = "Blue Paint" - color = "#0000FF" - id = "paint_blue" +/datum/reagent/paint/blue + name = "Blue Paint" + color = "#0000FF" + id = "paint_blue" - yellow - name = "Yellow Paint" - color = "#FFFF00" - id = "paint_yellow" +/datum/reagent/paint/yellow + name = "Yellow Paint" + color = "#FFFF00" + id = "paint_yellow" - purple - name = "Purple Paint" - color = "#FF00FF" - id = "paint_purple" +/datum/reagent/paint/purple + name = "Purple Paint" + color = "#FF00FF" + id = "paint_purple" - black - name = "Black Paint" - color = "#333333" - id = "paint_black" +/datum/reagent/paint/black + name = "Black Paint" + color = "#333333" + id = "paint_black" - white - name = "White Paint" - color = "#FFFFFF" - id = "paint_white" +/datum/reagent/paint/white + name = "White Paint" + color = "#FFFFFF" + id = "paint_white" /datum/reagent/paint_remover name = "Paint Remover" @@ -240,10 +239,9 @@ var/global/list/paint_types = subtypesof(/datum/reagent/paint) reagent_state = 2 color = "#808080" - reaction_turf(var/turf/T, var/volume) - if(istype(T) && T.icon != initial(T.icon)) - T.icon = initial(T.icon) - return +/datum/reagent/paint_remover/reaction_turf(var/turf/T, var/volume) + if(istype(T) && T.icon != initial(T.icon)) + T.icon = initial(T.icon) /datum/reagent/paint_remover/on_mob_life(var/mob/living/M) if(..()) diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index ef8e300d090..f991aacb6af 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -108,10 +108,10 @@ no_storage_slot = list(slot_head) foldable = /obj/item/folded_bag -obj/item/weapon/storage/bag/plasticbag/can_quick_store(var/obj/item/I) +/obj/item/weapon/storage/bag/plasticbag/can_quick_store(var/obj/item/I) return can_be_inserted(I,1) -obj/item/weapon/storage/bag/plasticbag/quick_store(var/obj/item/I) +/obj/item/weapon/storage/bag/plasticbag/quick_store(var/obj/item/I) return handle_item_insertion(I,0) /obj/item/weapon/storage/bag/plasticbag/suicide_act(var/mob/living/user) diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm index db9c31d784b..310799a071a 100644 --- a/code/game/objects/items/weapons/storage/uplink_kits.dm +++ b/code/game/objects/items/weapons/storage/uplink_kits.dm @@ -329,7 +329,7 @@ new /obj/item/ammo_storage/speedloader/a357(src) return -obj/item/weapon/storage/box/syndie_kit/cheaptide +/obj/item/weapon/storage/box/syndie_kit/cheaptide name = "box (CT)" /obj/item/weapon/storage/box/syndie_kit/cheaptide/New() diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index 292c6849cda..f0de830820e 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -120,7 +120,7 @@ w_class = W_CLASS_MEDIUM attack_verb = list("jabs","stabs","rips") -obj/item/weapon/wirerod +/obj/item/weapon/wirerod name = "wired rod" desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit." icon_state = "wiredrod" @@ -135,7 +135,7 @@ obj/item/weapon/wirerod attack_verb = list("hits", "bludgeons", "whacks", "bonks") -obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob) +/obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob) ..() if(istype(I, /obj/item/weapon/shard)) user.visible_message("[user] starts securing \the [I] to the top of \the [src].",\ @@ -227,7 +227,7 @@ obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob) item_state = "skinningknife" force = 10 -obj/item/weapon/banhammer/admin +/obj/item/weapon/banhammer/admin desc = "A banhammer specifically reserved for admins. Legends tell of a weapon that destroys the target to the utmost capacity." throwforce = 999 force = 999 diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 80c575fd44d..661d56c03f8 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -1,13 +1,13 @@ -obj/structure +/obj/structure icon = 'icons/obj/structures.dmi' penetration_dampening = 5 -obj/structure/blob_act(var/destroy = 0) +/obj/structure/blob_act(var/destroy = 0) ..() if(destroy || (prob(50))) qdel(src) -obj/structure/ex_act(severity) +/obj/structure/ex_act(severity) switch(severity) if(1.0) qdel(src) diff --git a/code/game/objects/structures/altar.dm b/code/game/objects/structures/altar.dm index 5a920fcd831..1b6eee200ff 100644 --- a/code/game/objects/structures/altar.dm +++ b/code/game/objects/structures/altar.dm @@ -30,10 +30,10 @@ /obj/structure/altar/cultify() return -obj/structure/altar/blob_act() +/obj/structure/altar/blob_act() return -obj/structure/altar/ex_act(severity) +/obj/structure/altar/ex_act(severity) return @@ -58,7 +58,7 @@ obj/structure/altar/ex_act(severity) if(prob(66)) qdel(src) -obj/structure/altar/podium/ex_act(severity) +/obj/structure/altar/podium/ex_act(severity) if(prob(10*severity)) qdel(src) diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index cc1d362fddd..c8c7c76b2b6 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -122,21 +122,21 @@ var/target_temp = T0C - 40 var/cooling_power = 40 - return_air() - var/datum/gas_mixture/gas = (..()) - if(!gas) - return null - var/datum/gas_mixture/newgas = new/datum/gas_mixture() - newgas.copy_from(gas) - if(newgas.temperature <= target_temp) - return +/obj/structure/closet/crate/freezer/return_air() + var/datum/gas_mixture/gas = (..()) + if(!gas) + return null + var/datum/gas_mixture/newgas = new/datum/gas_mixture() + newgas.copy_from(gas) + if(newgas.temperature <= target_temp) + return - if((newgas.temperature - cooling_power) > target_temp) - newgas.temperature -= cooling_power - else - newgas.temperature = target_temp - newgas.update_values() - return newgas + if((newgas.temperature - cooling_power) > target_temp) + newgas.temperature -= cooling_power + else + newgas.temperature = target_temp + newgas.update_values() + return newgas /obj/structure/closet/crate/freezer/surgery desc = "A freezer specifically designed to store organic material." diff --git a/code/game/objects/structures/misc_structures.dm b/code/game/objects/structures/misc_structures.dm index 161f7c277b0..0a1a09f18cc 100644 --- a/code/game/objects/structures/misc_structures.dm +++ b/code/game/objects/structures/misc_structures.dm @@ -68,7 +68,7 @@ spear = new (src) ..(A, H) -obj/structure/bigpeppermint_red +/obj/structure/bigpeppermint_red name = "mounted peppermint" icon = 'icons/obj/structures.dmi' icon_state = "bigpeppermint_red" @@ -76,10 +76,10 @@ obj/structure/bigpeppermint_red density = 0 anchored = 1 -obj/structure/bigpeppermint_green +/obj/structure/bigpeppermint_green name = "mounted peppermint" icon = 'icons/obj/structures.dmi' icon_state = "bigpeppermint_green" desc = "Must be a culture thing." density = 0 - anchored = 1 \ No newline at end of file + anchored = 1 diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index 9c17263b04e..9251da17252 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -199,10 +199,10 @@ FLOOR SAFES if(istype(I, /obj/item/clothing/accessory/stethoscope)) recursive_dial(user, show_radial_menu(user,src,choices,'icons/obj/safe_radial.dmi',"radial-safe", custom_check = new /callback(src, .proc/radial_check, user), recursive = TRUE)) -obj/structure/safe/blob_act() +/obj/structure/safe/blob_act() return -obj/structure/safe/ex_act(severity) +/obj/structure/safe/ex_act(severity) return //FLOOR SAFES diff --git a/code/game/objects/structures/skele_stand.dm b/code/game/objects/structures/skele_stand.dm index dcf37b8b5d2..c4598a60fdb 100644 --- a/code/game/objects/structures/skele_stand.dm +++ b/code/game/objects/structures/skele_stand.dm @@ -34,7 +34,7 @@ /obj/structure/skele_stand/attackby(obj/item/weapon/W, mob/user) rattle_bones(user, W) -obj/structure/skele_stand/spook(mob/user) +/obj/structure/skele_stand/spook(mob/user) rattle_bones(user, null) /obj/structure/skele_stand/mrbones diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index bf11dd0da4f..d90813d337f 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -716,7 +716,7 @@ /* * Plastic */ -obj/structure/table/plastic +/obj/structure/table/plastic name = "plastic table" desc = "A plastic table perfect for on a space patio." icon_state = "plastictable" diff --git a/code/game/objects/structures/transit_tubes.dm b/code/game/objects/structures/transit_tubes.dm index 1e1c33f301f..175c5feae58 100644 --- a/code/game/objects/structures/transit_tubes.dm +++ b/code/game/objects/structures/transit_tubes.dm @@ -54,7 +54,7 @@ ..() // When destroyed by explosions, properly handle contents. -obj/structure/transit_tube_pod/ex_act(severity) +/obj/structure/transit_tube_pod/ex_act(severity) switch(severity) if(1.0) for(var/atom/movable/AM in contents) diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 813ec183912..b0da6a0f688 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -37,7 +37,7 @@ ..() update_nearby_tiles() -obj/structure/windoor_assembly/Destroy() +/obj/structure/windoor_assembly/Destroy() setDensity(FALSE) update_nearby_tiles() ..() diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index b087e6b4a6a..e1e5a32ed4a 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -115,7 +115,7 @@ var/global/list/turf/simulated/floor/phazontiles = list() if(!(locate(/obj/effect/decal/cleanable/dirt) in contents)) new /obj/effect/decal/cleanable/dirt(src) -turf/simulated/floor/update_icon() +/turf/simulated/floor/update_icon() if(lava) return diff --git a/code/game/turfs/turf_flick_animations.dm b/code/game/turfs/turf_flick_animations.dm index 303da3af717..f07b73a8d0b 100644 --- a/code/game/turfs/turf_flick_animations.dm +++ b/code/game/turfs/turf_flick_animations.dm @@ -28,7 +28,7 @@ //Does not require sleeptime, specifies for how long the animation should be allowed to exist before returning to pool //Does not require animation direction, but you can specify //Does not require a name -proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num, name as text, lay as num, offX as num, offY as num, col as text, alph as num,plane as num, var/trans, var/invis) +/proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num, name as text, lay as num, offX as num, offY as num, col as text, alph as num,plane as num, var/trans, var/invis) //This proc throws up either an icon or an animation for a specified amount of time. //The variables should be apparent enough. if(!location && target) diff --git a/code/js/byjax.dm b/code/js/byjax.dm index 79c5169d995..be0d81a87e9 100644 --- a/code/js/byjax.dm +++ b/code/js/byjax.dm @@ -38,7 +38,7 @@ callback_args - arguments for callback function Be sure to include required js functions in your page, or it'll raise an exception. */ -proc/send_byjax(receiver, control_id, target_element, new_content=null, callback=null, list/callback_args=null) +/proc/send_byjax(receiver, control_id, target_element, new_content=null, callback=null, list/callback_args=null) if(receiver && target_element && control_id) // && winexists(receiver, control_id)) var/list/argums = list(target_element, new_content) if(callback) diff --git a/code/libs/Get Flat Icon/Get Flat Icon Deluxe.dm b/code/libs/Get Flat Icon/Get Flat Icon Deluxe.dm index 84d604fc15f..c49a98ef0c8 100644 --- a/code/libs/Get Flat Icon/Get Flat Icon Deluxe.dm +++ b/code/libs/Get Flat Icon/Get Flat Icon Deluxe.dm @@ -43,7 +43,7 @@ cons: #define GFI_DX_MAX 12 // Remember to keep this updated should you need to keep track of more variables -proc/getFlatIconDeluxe(list/image_datas, var/turf/center, var/radius = 0, var/override_dir = 0, var/ignore_spawn_items = FALSE) +/proc/getFlatIconDeluxe(list/image_datas, var/turf/center, var/radius = 0, var/override_dir = 0, var/ignore_spawn_items = FALSE) var/icon/flat = icon('icons/effects/224x224.dmi',"empty") // Final flattened icon var/icon/add // Icon of overlay being added diff --git a/code/libs/Get Flat Icon/Get Flat Icon.dm b/code/libs/Get Flat Icon/Get Flat Icon.dm index 875f1f365dd..07c12ff762b 100644 --- a/code/libs/Get Flat Icon/Get Flat Icon.dm +++ b/code/libs/Get Flat Icon/Get Flat Icon.dm @@ -69,7 +69,7 @@ var/list/exception = list( sorted.Insert(compare_index+1, current_atom) // insert it just above the atom it was higher than - or at the bottom if it was higher than nothing. return sorted // return the sorted list. -proc/getFlatIcon(atom/A, dir, cache=1, exact=0) // 1 = use cache, 2 = override cache, 0 = ignore cache //exact = 1 means the atom won't be rotated if it's a lying mob/living/carbon +/proc/getFlatIcon(atom/A, dir, cache=1, exact=0) // 1 = use cache, 2 = override cache, 0 = ignore cache //exact = 1 means the atom won't be rotated if it's a lying mob/living/carbon var/hash = "" // Hash of overlay combination diff --git a/code/libs/IconProcs/IconProcs.dm b/code/libs/IconProcs/IconProcs.dm index 9972d5212d5..4a005b8a082 100644 --- a/code/libs/IconProcs/IconProcs.dm +++ b/code/libs/IconProcs/IconProcs.dm @@ -11,14 +11,14 @@ #define TO_HEX_DIGIT(n) ascii2text((n&15) + ((n&15)<10 ? 48 : 87)) // Multiply all alpha values by this float -icon/proc/ChangeOpacity(opacity = 1.0) +/icon/proc/ChangeOpacity(opacity = 1.0) MapColors(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,opacity, 0,0,0,0) // Convert to grayscale -icon/proc/GrayScale() +/icon/proc/GrayScale() MapColors(0.3,0.3,0.3, 0.59,0.59,0.59, 0.11,0.11,0.11, 0,0,0) -icon/proc/ColorTone(tone) +/icon/proc/ColorTone(tone) GrayScale() var/list/TONE = ReadRGB(tone) @@ -37,14 +37,14 @@ icon/proc/ColorTone(tone) Blend(upper, ICON_ADD) // Take the minimum color of two icons; combine transparency as if blending with ICON_ADD -icon/proc/MinColors(icon) +/icon/proc/MinColors(icon) var/icon/I = new(src) I.Opaque() I.Blend(icon, ICON_SUBTRACT) Blend(I, ICON_SUBTRACT) // Take the maximum color of two icons; combine opacity as if blending with ICON_OR -icon/proc/MaxColors(icon) +/icon/proc/MaxColors(icon) var/icon/I if(isicon(icon)) I = new(icon) @@ -60,21 +60,21 @@ icon/proc/MaxColors(icon) Blend(I, ICON_OR) // make this icon fully opaque--transparent pixels become black -icon/proc/Opaque(background = "#000000") +/icon/proc/Opaque(background = "#000000") SwapColor(null, background) MapColors(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,0, 0,0,0,1) // Change a grayscale icon into a white icon where the original color becomes the alpha // I.e., black -> transparent, gray -> translucent white, white -> solid white -icon/proc/BecomeAlphaMask() +/icon/proc/BecomeAlphaMask() SwapColor(null, "#000000ff") // don't let transparent become gray MapColors(0,0,0,0.3, 0,0,0,0.59, 0,0,0,0.11, 0,0,0,0, 1,1,1,0) -icon/proc/UseAlphaMask(mask) +/icon/proc/UseAlphaMask(mask) Opaque() AddAlphaMask(mask) -icon/proc/AddAlphaMask(mask) +/icon/proc/AddAlphaMask(mask) var/icon/M = new(mask) M.Blend("#ffffff", ICON_SUBTRACT) // apply mask @@ -102,7 +102,7 @@ icon/proc/AddAlphaMask(mask) Higher value means brighter color */ -proc/ReadRGB(rgb) +/proc/ReadRGB(rgb) if(!rgb) return @@ -167,7 +167,7 @@ proc/ReadRGB(rgb) if(usealpha) . += alpha -proc/ReadHSV(hsv) +/proc/ReadHSV(hsv) if(!hsv) return @@ -221,7 +221,7 @@ proc/ReadHSV(hsv) if(usealpha) . += alpha -proc/HSVtoRGB(hsv) +/proc/HSVtoRGB(hsv) if(!hsv) return "#000000" var/list/HSV = ReadHSV(hsv) @@ -270,7 +270,7 @@ proc/HSVtoRGB(hsv) return (HSV.len > 3) ? rgb(r,g,b,HSV[4]) : rgb(r,g,b) -proc/RGBtoHSV(rgb) +/proc/RGBtoHSV(rgb) if(!rgb) return "#0000000" var/list/RGB = ReadRGB(rgb) @@ -321,7 +321,7 @@ proc/RGBtoHSV(rgb) return hsv(hue, sat, val, (RGB.len>3 ? RGB[4] : null)) -proc/hsv(hue, sat, val, alpha) +/proc/hsv(hue, sat, val, alpha) if(hue < 0 || hue >= 1536) hue %= 1536 if(hue < 0) @@ -363,7 +363,7 @@ proc/hsv(hue, sat, val, alpha) amount<0 or amount>1 are allowed */ -proc/BlendHSV(hsv1, hsv2, amount) +/proc/BlendHSV(hsv1, hsv2, amount) var/list/HSV1 = ReadHSV(hsv1) var/list/HSV2 = ReadHSV(hsv2) @@ -435,7 +435,7 @@ proc/BlendHSV(hsv1, hsv2, amount) amount<0 or amount>1 are allowed */ -proc/BlendRGB(rgb1, rgb2, amount) +/proc/BlendRGB(rgb1, rgb2, amount) var/list/RGB1 = ReadRGB(rgb1) var/list/RGB2 = ReadRGB(rgb2) @@ -453,10 +453,10 @@ proc/BlendRGB(rgb1, rgb2, amount) return isnull(alpha) ? rgb(r, g, b) : rgb(r, g, b, alpha) -proc/BlendRGBasHSV(rgb1, rgb2, amount) +/proc/BlendRGBasHSV(rgb1, rgb2, amount) return HSVtoRGB(RGBtoHSV(rgb1), RGBtoHSV(rgb2), amount) -proc/HueToAngle(hue) +/proc/HueToAngle(hue) // normalize hsv in case anything is screwy if(hue < 0 || hue >= 1536) hue %= 1536 @@ -466,7 +466,7 @@ proc/HueToAngle(hue) hue -= hue >> 8 return hue / (1530/360) -proc/AngleToHue(angle) +/proc/AngleToHue(angle) // normalize hsv in case anything is screwy if(angle < 0 || angle >= 360) angle -= 360 * round(angle / 360) @@ -477,7 +477,7 @@ proc/AngleToHue(angle) // positive angle rotates forward through red->green->blue -proc/RotateHue(hsv, angle) +/proc/RotateHue(hsv, angle) var/list/HSV = ReadHSV(hsv) // normalize hsv in case anything is screwy @@ -504,13 +504,13 @@ proc/RotateHue(hsv, angle) return hsv(HSV[1], HSV[2], HSV[3], (HSV.len > 3 ? HSV[4] : null)) // Convert an rgb color to grayscale -proc/GrayScale(rgb) +/proc/GrayScale(rgb) var/list/RGB = ReadRGB(rgb) var/gray = RGB[1]*0.3 + RGB[2]*0.59 + RGB[3]*0.11 return (RGB.len > 3) ? rgb(gray, gray, gray, RGB[4]) : rgb(gray, gray, gray) // Change grayscale color to black->tone->white range -proc/ColorTone(rgb, tone) +/proc/ColorTone(rgb, tone) var/list/RGB = ReadRGB(rgb) var/list/TONE = ReadRGB(tone) diff --git a/code/libs/s_html/hexadecimal.dm b/code/libs/s_html/hexadecimal.dm index 59f45e28c82..4ae8b6c0b16 100644 --- a/code/libs/s_html/hexadecimal.dm +++ b/code/libs/s_html/hexadecimal.dm @@ -12,7 +12,7 @@ encompasses a larger field. **************************************/ -proc/hex2num(hex) +/proc/hex2num(hex) //Converts a hexadecimal string (eg. "9F") into a numeral (eg. 159). if(!istext(hex)) diff --git a/code/libs/s_html/inverthtml.dm b/code/libs/s_html/inverthtml.dm index 1471bea13ab..0066f31159d 100644 --- a/code/libs/s_html/inverthtml.dm +++ b/code/libs/s_html/inverthtml.dm @@ -4,7 +4,7 @@ //This will *ONLY* accept a colour in the // form "#XXXXXX". Nothing else will work! -proc/invertHTML(HTMLstring) +/proc/invertHTML(HTMLstring) if(!istext(HTMLstring)) CRASH("Given non-text argument!") else if(length(HTMLstring) != 7) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index efa11393d2d..9bc37bd5ee4 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1464,7 +1464,7 @@ var/global/floorIsLava = 0 var/admin_shuttle_location = 0 // 0 = centcom 13, 1 = station -proc/move_admin_shuttle() +/proc/move_admin_shuttle() var/area/fromArea var/area/toArea if (admin_shuttle_location == 1) @@ -1484,7 +1484,7 @@ proc/move_admin_shuttle() var/alien_ship_location = 1 // 0 = base , 1 = mine -proc/move_alien_ship() +/proc/move_alien_ship() var/area/fromArea var/area/toArea if (alien_ship_location == 1) @@ -1500,7 +1500,7 @@ proc/move_alien_ship() alien_ship_location = 1 return -proc/formatJumpTo(location, where = "") +/proc/formatJumpTo(location, where = "") var/turf/loc if (isturf(location)) @@ -1513,7 +1513,7 @@ proc/formatJumpTo(location, where = "") return "[where]" -proc/formatLocation(location) +/proc/formatLocation(location) var/turf/loc if (isturf(location)) @@ -1525,7 +1525,7 @@ proc/formatLocation(location) var/answer = "[istype(A) ? "[A.name]" : "UNKNOWN"] - [istype(loc) ? "[loc.x],[loc.y],[loc.z]" : "UNKNOWN"]" return answer -proc/formatPlayerPanel(var/mob/U,var/text="PP") +/proc/formatPlayerPanel(var/mob/U,var/text="PP") return "[text]" //Credit to MrStonedOne from TG for this QoL improvement diff --git a/code/modules/admin/buildmode.dm b/code/modules/admin/buildmode.dm index 0d384fb9318..25699b7ef56 100644 --- a/code/modules/admin/buildmode.dm +++ b/code/modules/admin/buildmode.dm @@ -54,19 +54,19 @@ /obj/effect/bmode/builddir icon_state = "build" screen_loc = "NORTH,WEST" - Click() - switch(dir) - if(NORTH) - dir = EAST - if(EAST) - dir = SOUTH - if(SOUTH) - dir = WEST - if(WEST) - dir = SOUTHWEST - if(SOUTHWEST) - dir = NORTH - return 1 +/obj/effect/bmode/builddir/Click() + switch(dir) + if(NORTH) + dir = EAST + if(EAST) + dir = SOUTH + if(SOUTH) + dir = WEST + if(WEST) + dir = SOUTHWEST + if(SOUTHWEST) + dir = NORTH + return 1 /obj/effect/bmode/buildhelp icon = 'icons/misc/buildmode.dmi' @@ -159,7 +159,7 @@ var/global/list/obj/effect/bmode/buildholder/buildmodeholders = list() var/strictness = FALSE var/warnings = TRUE -obj/effect/bmode/buildholder/New() +/obj/effect/bmode/buildholder/New() ..() buildmodeholders |= src diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index e76674192f2..d47ff245a1e 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -874,7 +874,7 @@ var/global/blood_virus_spreading_disabled = 0 else alert("Invalid mob, needs to be a human.") -client/proc/make_invulnerable(var/mob/M in mob_list) +/client/proc/make_invulnerable(var/mob/M in mob_list) set name = "Toggle Invulnerability" set desc = "Make the target atom invulnerable to all form of damage." set category = "Fun" @@ -896,7 +896,7 @@ client/proc/make_invulnerable(var/mob/M in mob_list) log_admin("[ckey(key)]/([mob]) has toggled [M]'s invulnerability [(M.flags & INVULNERABLE) ? "on" : "off"]") message_admins("[ckey(key)]/([mob]) has toggled [M]'s invulnerability [(M.flags & INVULNERABLE) ? "on" : "off"]") -client/proc/delete_all_adminbus() +/client/proc/delete_all_adminbus() set name = "Delete every Adminbus" set desc = "When the world cannot handle them anymore." set category = "Fun" @@ -907,7 +907,7 @@ client/proc/delete_all_adminbus() for(var/obj/structure/bed/chair/vehicle/adminbus/AB in world) AB.Adminbus_Deletion() -client/proc/delete_all_bomberman() +/client/proc/delete_all_bomberman() set name = "Remove all that Bomberman shit" set desc = "4th wall ointment." set category = "Fun" @@ -963,7 +963,7 @@ client/proc/delete_all_bomberman() for(var/obj/structure/powerup/O in bombermangear) qdel(O) -client/proc/create_bomberman_arena() +/client/proc/create_bomberman_arena() set name = "Create a Bomberman Arena" set desc = "Create a customizable Bomberman-type arena." set category = "Fun" @@ -985,7 +985,7 @@ client/proc/create_bomberman_arena() var/datum/bomberman_arena/A = new /datum/bomberman_arena(T, arena_type, src.mob) arenas += A -client/proc/control_bomberman_arena() +/client/proc/control_bomberman_arena() set name = "Arena Control Panel" set desc = "Control or Remove an existing Bomberman-type arena." set category = "Fun" @@ -1069,7 +1069,7 @@ client/proc/control_bomberman_arena() -client/proc/mob_list() +/client/proc/mob_list() set name = "show mob list" set category = "Debug" @@ -1088,7 +1088,7 @@ client/proc/mob_list() to_chat(usr, "Found [foundnull] null entries in the mob list, running null clearer.") listclearnulls(mob_list) -client/proc/check_bomb() +/client/proc/check_bomb() set name = "Check Bomb Impact" set category = "Debug" @@ -1167,7 +1167,7 @@ client/proc/check_bomb() if("Stealthy") stealthy_level = input("How long do you want the fade-in to last? (in tenth of seconds)","Stealthy Preferences") as num -client/proc/cure_disease() +/client/proc/cure_disease() set name = "Cure Disease" set category = "Debug" if(!holder) @@ -1207,7 +1207,7 @@ client/proc/cure_disease() log_admin("[src]/([ckey(src.key)] Cured all mobs of [disease_name == "-Cure All-" ? "all diseases." : "[disease_name]"]") message_admins("[src]/([ckey(src.key)] Cured all mobs of [disease_name == "-Cure All-" ? "all diseases." : "[disease_name]"]") -client/proc/check_convertables() +/client/proc/check_convertables() set name = "Check Convertables (Cult v2.0)" set category = "Debug" if(!holder || !ticker || !ticker.mode) @@ -1231,7 +1231,7 @@ client/proc/check_convertables() to_chat(usr, dat) -client/proc/toggle_convertibles() +/client/proc/toggle_convertibles() set name = "Toggle Convertibles HUD (Cult 3.0+)" set category = "Debug" set desc = "Displays a marker over crew members showing their propension to get converted." diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 25816589791..76e0d4f4fb0 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -1,4 +1,4 @@ -client/proc/one_click_antag() +/client/proc/one_click_antag() set name = "Create Antagonist" set desc = "Auto-create an antagonist of your choice" set category = "Admin" diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 0c0ae28a7a5..a3c763214b3 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -163,7 +163,7 @@ feedback_add_details("admin_verb","GOD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0) +/proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0) if(automute) if(!config.automute_on) return diff --git a/code/modules/atmos_automation/implementation/digital_valves.dm b/code/modules/atmos_automation/implementation/digital_valves.dm index e27e56603fc..1e79a056f8c 100644 --- a/code/modules/atmos_automation/implementation/digital_valves.dm +++ b/code/modules/atmos_automation/implementation/digital_valves.dm @@ -5,38 +5,38 @@ var/valve=null var/state=0 - Export() - var/list/json = ..() - json["valve"]=valve - json["state"]=state - return json +/datum/automation/set_valve_state/Export() + var/list/json = ..() + json["valve"]=valve + json["state"]=state + return json - Import(var/list/json) - ..(json) - valve = json["valve"] - state = text2num(json["state"]) +/datum/automation/set_valve_state/Import(var/list/json) + ..(json) + valve = json["valve"] + state = text2num(json["state"]) - process() - if(valve) - parent.send_signal(list ("tag" = valve, "command"="valve_set","state"=state)) - return 0 +/datum/automation/set_valve_state/process() + if(valve) + parent.send_signal(list ("tag" = valve, "command"="valve_set","state"=state)) + return 0 - GetText() - return "Set digital valve [fmtString(valve)] to [state?"open":"closed"]." +/datum/automation/set_valve_state/GetText() + return "Set digital valve [fmtString(valve)] to [state?"open":"closed"]." - Topic(href,href_list) - if(href_list["set_state"]) - state=!state - parent.updateUsrDialog() - return 1 - if(href_list["set_subject"]) - var/list/valves=list() - for(var/obj/machinery/atmospherics/binary/valve/digital/V in atmos_machines) - if(!isnull(V.id_tag) && V.frequency == parent.frequency) - valves|=V.id_tag - if(valves.len==0) - to_chat(usr, "Unable to find any digital valves on this frequency.") - return - valve = input("Select a valve:", "Sensor Data", valve) as null|anything in valves - parent.updateUsrDialog() - return 1 \ No newline at end of file +/datum/automation/set_valve_state/Topic(href,href_list) + if(href_list["set_state"]) + state=!state + parent.updateUsrDialog() + return 1 + if(href_list["set_subject"]) + var/list/valves=list() + for(var/obj/machinery/atmospherics/binary/valve/digital/V in atmos_machines) + if(!isnull(V.id_tag) && V.frequency == parent.frequency) + valves|=V.id_tag + if(valves.len==0) + to_chat(usr, "Unable to find any digital valves on this frequency.") + return + valve = input("Select a valve:", "Sensor Data", valve) as null|anything in valves + parent.updateUsrDialog() + return 1 diff --git a/code/modules/atmos_automation/implementation/passive_gates.dm b/code/modules/atmos_automation/implementation/passive_gates.dm index c48a2e2ca61..2a328711877 100644 --- a/code/modules/atmos_automation/implementation/passive_gates.dm +++ b/code/modules/atmos_automation/implementation/passive_gates.dm @@ -3,38 +3,38 @@ var/gate=null var/state=0 - Export() - var/list/json = ..() - json["gate"]=gate - json["state"]=state - return json +/datum/automation/set_passive_gate_state/Export() + var/list/json = ..() + json["gate"]=gate + json["state"]=state + return json - Import(var/list/json) - ..(json) - gate = json["gate"] - state = text2num(json["state"]) +/datum/automation/set_passive_gate_state/Import(var/list/json) + ..(json) + gate = json["gate"] + state = text2num(json["state"]) - process() - if(gate) - parent.send_signal(list ("tag" = gate, "command"="gate_set","state"=state)) - return 0 +/datum/automation/set_passive_gate_state/process() + if(gate) + parent.send_signal(list ("tag" = gate, "command"="gate_set","state"=state)) + return 0 - GetText() - return "Set passive gate [fmtString(gate)] to [state?"open":"closed"]." +/datum/automation/set_passive_gate_state/GetText() + return "Set passive gate [fmtString(gate)] to [state?"open":"closed"]." - Topic(href,href_list) - if(href_list["set_state"]) - state=!state - parent.updateUsrDialog() - return 1 - if(href_list["set_subject"]) - var/list/gates=list() - for(var/obj/machinery/atmospherics/binary/passive_gate/G in atmos_machines) - if(!isnull(G.id_tag) && G.frequency == parent.frequency) - gates|=G.id_tag - if(gates.len==0) - to_chat(usr, "Unable to find any passive gates on this frequency.") - return - gate = input("Select a gate:", "Sensor Data", gate) as null|anything in gates - parent.updateUsrDialog() - return 1 \ No newline at end of file +/datum/automation/set_passive_gate_state/Topic(href,href_list) + if(href_list["set_state"]) + state=!state + parent.updateUsrDialog() + return 1 + if(href_list["set_subject"]) + var/list/gates=list() + for(var/obj/machinery/atmospherics/binary/passive_gate/G in atmos_machines) + if(!isnull(G.id_tag) && G.frequency == parent.frequency) + gates|=G.id_tag + if(gates.len==0) + to_chat(usr, "Unable to find any passive gates on this frequency.") + return + gate = input("Select a gate:", "Sensor Data", gate) as null|anything in gates + parent.updateUsrDialog() + return 1 diff --git a/code/modules/atmos_automation/implementation/registers.dm b/code/modules/atmos_automation/implementation/registers.dm index a2801c8da36..59933752aec 100644 --- a/code/modules/atmos_automation/implementation/registers.dm +++ b/code/modules/atmos_automation/implementation/registers.dm @@ -83,7 +83,7 @@ out += ")" return out -datum/automation/set_register_data/Topic(href, href_list) +/datum/automation/set_register_data/Topic(href, href_list) . = ..() if(.) return diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index 6c87fcdbd44..863387142ad 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -57,7 +57,7 @@ var/list/gateways = list() //List containing the gateways on away missions -obj/machinery/gateway/centerstation/process() +/obj/machinery/gateway/centerstation/process() if(stat & (NOPOWER)) if(active) toggleoff() @@ -179,7 +179,7 @@ obj/machinery/gateway/centerstation/process() /obj/machinery/gateway/centeraway/Destroy() gateways.Remove(src) - + ..() /obj/machinery/gateway/centeraway/initialize() diff --git a/code/modules/awaymissions/maploader/dmm_suite.dm b/code/modules/awaymissions/maploader/dmm_suite.dm index dcae72a28fa..603a54dca42 100644 --- a/code/modules/awaymissions/maploader/dmm_suite.dm +++ b/code/modules/awaymissions/maploader/dmm_suite.dm @@ -1,6 +1,6 @@ var/global/dmm_suite/maploader = new -dmm_suite{ +/dmm_suite /* dmm_suite version 1.0 @@ -53,27 +53,23 @@ dmm_suite{ */ - verb/load_map(var/dmm_file as file, var/z_offset as num, var/x_offset as num, var/y_offset as num, var/datum/map_element/map_element as null, var/fast_load as null){ - // dmm_file: A .dmm file to load (Required). - // z_offset: A number representing the z-level on which to start loading the map (Optional). - // map_element: The map element that the .dmm file belongs to (Optional). - // fast_load: If true, - } - verb/write_map(var/turf/t1 as turf, var/turf/t2 as turf, var/flags as num){ - // t1: A turf representing one corner of a three dimensional grid (Required). - // t2: Another turf representing the other corner of the same grid (Required). - // flags: Any, or a combination, of several bit flags (Optional, see documentation). - } +// dmm_file: A .dmm file to load (Required). +// z_offset: A number representing the z-level on which to start loading the map (Optional). +// map_element: The map element that the .dmm file belongs to (Optional). +// fast_load: If true, +/dmm_suite/proc/load_map(var/dmm_file as file, var/z_offset as num, var/x_offset as num, var/y_offset as num, var/datum/map_element/map_element as null, var/fast_load as null) - // save_map is included as a legacy proc. Use write_map instead. - verb/save_map(var/turf/t1 as turf, var/turf/t2 as turf, var/map_name as text, var/flags as num){ - // t1: A turf representing one corner of a three dimensional grid (Required). - // t2: Another turf representing the other corner of the same grid (Required). - // map_name: A valid name for the map to be saved, such as "castle" (Required). - // flags: Any, or a combination, of several bit flags (Optional, see documentation). - } +// t1: A turf representing one corner of a three dimensional grid (Required). +// t2: Another turf representing the other corner of the same grid (Required). +// flags: Any, or a combination, of several bit flags (Optional, see documentation). +/dmm_suite/proc/write_map(var/turf/t1 as turf, var/turf/t2 as turf, var/flags as num) - verb/get_map_dimensions(var/dmm_file as file){ - // dmm_file: A .dmm file to check (Required). - } - } \ No newline at end of file +// save_map is included as a legacy proc. Use write_map instead. +// t1: A turf representing one corner of a three dimensional grid (Required). +// t2: Another turf representing the other corner of the same grid (Required). +// map_name: A valid name for the map to be saved, such as "castle" (Required). +// flags: Any, or a combination, of several bit flags (Optional, see documentation). +/dmm_suite/proc/save_map(var/turf/t1 as turf, var/turf/t2 as turf, var/map_name as text, var/flags as num) + +// dmm_file: A .dmm file to check (Required). +/dmm_suite/proc/get_map_dimensions(var/dmm_file as file) diff --git a/code/modules/awaymissions/maploader/swapmaps.dm b/code/modules/awaymissions/maploader/swapmaps.dm index ba411897f03..a7a9be44a51 100644 --- a/code/modules/awaymissions/maploader/swapmaps.dm +++ b/code/modules/awaymissions/maploader/swapmaps.dm @@ -126,7 +126,7 @@ contain only turfs, or even only atoms. */ -swapmap +/swapmap var/id // a string identifying this map uniquely var/x1 // minimum x,y,z coords var/y1 @@ -138,7 +138,7 @@ swapmap var/tmp/mode // save as text-mode var/ischunk // tells the load routine to load to the specified location -swapmap/New(_id,x,y,z) +/swapmap/New(_id,x,y,z) if(isnull(_id)) return id=_id @@ -164,7 +164,7 @@ swapmap/New(_id,x,y,z) z2=z?(z):1 AllocateSwapMap() -swapmap/Del() +/swapmap/Del() // a temporary datum for a chunk can be deleted outright // for others, some cleanup is necessary if(!ischunk) @@ -208,7 +208,7 @@ swapmap/Del() AREA // if non-default; saved as a number (index into areas list) vars // all other changed vars */ -swapmap/Write(savefile/S) +/swapmap/Write(savefile/S) var/x var/y var/z @@ -251,7 +251,7 @@ swapmap/Write(savefile/S) locked=0 del(areas) -swapmap/Read(savefile/S,_id,turf/locorner) +/swapmap/Read(savefile/S,_id,turf/locorner) var/x var/y var/z @@ -322,7 +322,7 @@ swapmap/Read(savefile/S,_id,turf/locorner) Ignore certain operations if loading a map as a chunk. Use the x1,y1,z1 position for it, and *don't* count it as a loaded map. */ -swapmap/proc/AllocateSwapMap() +/swapmap/proc/AllocateSwapMap() InitializeSwapMaps() world.maxx=max(x2,world.maxx) // stretch x/y if necessary world.maxy=max(y2,world.maxy) @@ -344,7 +344,7 @@ swapmap/proc/AllocateSwapMap() swapmaps_loaded[src]=null swapmaps_byname[id]=src -swapmap/proc/ConsiderRegion(X1,Y1,X2,Y2,Z1,Z2) +/swapmap/proc/ConsiderRegion(X1,Y1,X2,Y2,Z1,Z2) while(1) var/nextz=0 var/swapmap/M @@ -382,7 +382,7 @@ swapmap/proc/ConsiderRegion(X1,Y1,X2,Y2,Z1,Z2) X1=1;X2=world.maxx Y1=1;Y2=world.maxy -swapmap/proc/CutXYZ() +/swapmap/proc/CutXYZ() var/mx=swapmaps_compiled_maxx var/my=swapmaps_compiled_maxy var/mz=swapmaps_compiled_maxz @@ -395,11 +395,11 @@ swapmap/proc/CutXYZ() world.maxz=mz // save and delete -swapmap/proc/Unload() +/swapmap/proc/Unload() Save() del(src) -swapmap/proc/Save() +/swapmap/proc/Save() if(id==src) return 0 var/savefile/S=mode?(new):new("map_[id].sav") @@ -411,30 +411,30 @@ swapmap/proc/Save() return 1 // this will not delete existing savefiles for this map -swapmap/proc/SetID(newid) +/swapmap/proc/SetID(newid) swapmaps_byname-=id id=newid swapmaps_byname[id]=src -swapmap/proc/AllTurfs(z) +/swapmap/proc/AllTurfs(z) if(isnum(z) && (zz2)) return null return block(LoCorner(z),HiCorner(z)) // this could be safely called for an obj or mob as well, but // probably not an area -swapmap/proc/Contains(turf/T) +/swapmap/proc/Contains(turf/T) return (T && T.x>=x1 && T.x<=x2\ && T.y>=y1 && T.y<=y2\ && T.z>=z1 && T.z<=z2) -swapmap/proc/InUse() +/swapmap/proc/InUse() for(var/turf/T in AllTurfs()) for(var/mob/M in T) if(M.key) return 1 -swapmap/proc/LoCorner(z=z1) +/swapmap/proc/LoCorner(z=z1) return locate(x1,y1,z) -swapmap/proc/HiCorner(z=z2) +/swapmap/proc/HiCorner(z=z2) return locate(x2,y2,z) /* @@ -444,7 +444,7 @@ swapmap/proc/HiCorner(z=z2) /turf/wall /obj/fence{icon_state="iron"} */ -swapmap/proc/BuildFilledRectangle(turf/T1,turf/T2,item) +/swapmap/proc/BuildFilledRectangle(turf/T1,turf/T2,item) if(!Contains(T1) || !Contains(T2)) return var/turf/T=T1 @@ -453,7 +453,7 @@ swapmap/proc/BuildFilledRectangle(turf/T1,turf/T2,item) T2=locate(max(T.x,T2.x),max(T.y,T2.y),max(T.z,T2.z)) for(T in block(T1,T2)) new item(T) -swapmap/proc/BuildRectangle(turf/T1,turf/T2,item) +/swapmap/proc/BuildRectangle(turf/T1,turf/T2,item) if(!Contains(T1) || !Contains(T2)) return var/turf/T=T1 @@ -473,11 +473,11 @@ swapmap/proc/BuildRectangle(turf/T1,turf/T2,item) Supplementary build proc: Takes a list of turfs, plus an item type. Actually the list doesn't have to be just turfs. */ -swapmap/proc/BuildInTurfs(list/turfs,item) +/swapmap/proc/BuildInTurfs(list/turfs,item) for(var/T in turfs) new item(T) -atom/Write(savefile/S) +/atom/Write(savefile/S) for(var/V in vars-"x"-"y"-"z"-"contents"-"icon"-"overlays"-"underlays") if(issaved(vars[V])) if(vars[V] != initial(vars[V])) @@ -506,7 +506,7 @@ atom/Write(savefile/S) if(l != contents) del(l) -atom/Read(savefile/S) +/atom/Read(savefile/S) var/list/l if(contents.len) l=contents @@ -543,7 +543,7 @@ var/swapmaps_initialized var/swapmaps_loaded var/swapmaps_byname -proc/InitializeSwapMaps() +/proc/InitializeSwapMaps() if(swapmaps_initialized) return swapmaps_initialized=1 @@ -558,17 +558,17 @@ proc/InitializeSwapMaps() // so you can look up an icon file by name or vice-versa swapmaps_iconcache[swapmaps_iconcache[V]]=V -proc/SwapMaps_AddIconToCache(name,icon) +/proc/SwapMaps_AddIconToCache(name,icon) if(!swapmaps_iconcache) swapmaps_iconcache=list() swapmaps_iconcache[name]=icon swapmaps_iconcache[icon]=name -proc/SwapMaps_Find(id) +/proc/SwapMaps_Find(id) InitializeSwapMaps() return swapmaps_byname[id] -proc/SwapMaps_Load(id) +/proc/SwapMaps_Load(id) InitializeSwapMaps() var/swapmap/M=swapmaps_byname[id] if(!M) @@ -590,20 +590,20 @@ proc/SwapMaps_Load(id) M.mode=text return M -proc/SwapMaps_Save(id) +/proc/SwapMaps_Save(id) InitializeSwapMaps() var/swapmap/M=swapmaps_byname[id] if(M) M.Save() return M -proc/SwapMaps_Save_All() +/proc/SwapMaps_Save_All() InitializeSwapMaps() for(var/swapmap/M in swapmaps_loaded) if(M) M.Save() -proc/SwapMaps_Unload(id) +/proc/SwapMaps_Unload(id) InitializeSwapMaps() var/swapmap/M=swapmaps_byname[id] if(!M) @@ -611,11 +611,11 @@ proc/SwapMaps_Unload(id) M.Unload() return 1 -proc/SwapMaps_DeleteFile(id) +/proc/SwapMaps_DeleteFile(id) fdel("map_[id].sav") fdel("map_[id].txt") -proc/SwapMaps_CreateFromTemplate(template_id) +/proc/SwapMaps_CreateFromTemplate(template_id) var/swapmap/M=new var/savefile/S var/text=0 @@ -642,7 +642,7 @@ proc/SwapMaps_CreateFromTemplate(template_id) while(M.locked) sleep(1) return M -proc/SwapMaps_LoadChunk(chunk_id,turf/locorner) +/proc/SwapMaps_LoadChunk(chunk_id,turf/locorner) var/swapmap/M=new var/savefile/S var/text=0 @@ -669,7 +669,7 @@ proc/SwapMaps_LoadChunk(chunk_id,turf/locorner) del(M) return 1 -proc/SwapMaps_SaveChunk(chunk_id,turf/corner1,turf/corner2) +/proc/SwapMaps_SaveChunk(chunk_id,turf/corner1,turf/corner2) if(!corner1 || !corner2) world.log << "SwapMaps error in SwapMaps_SaveChunk():" if(!corner1) @@ -692,7 +692,7 @@ proc/SwapMaps_SaveChunk(chunk_id,turf/corner1,turf/corner2) del(M) return 1 -proc/SwapMaps_GetSize(id) +/proc/SwapMaps_GetSize(id) var/savefile/S var/text=0 if(swapmaps_mode==SWAPMAPS_TEXT && fexists("map_[id].txt")) diff --git a/code/modules/bomberman/bomberman.dm b/code/modules/bomberman/bomberman.dm index bdd24f4349e..50b015e97ce 100644 --- a/code/modules/bomberman/bomberman.dm +++ b/code/modules/bomberman/bomberman.dm @@ -304,7 +304,7 @@ var/global/list/bombermangear = list() sleep(5) qdel(src) -obj/structure/bomberflame/Destroy() +/obj/structure/bomberflame/Destroy() ..() bombermangear -= src diff --git a/code/modules/client/edge_sliding/keystate/1constants.dm b/code/modules/client/edge_sliding/keystate/1constants.dm deleted file mode 100644 index 061ea3fc8be..00000000000 --- a/code/modules/client/edge_sliding/keystate/1constants.dm +++ /dev/null @@ -1,118 +0,0 @@ -#define KS_SHIFT_SHIFT 1 -#define KS_SHIFT_CTRL 2 -#define KS_SHIFT_ALT 4 - -#define KS_BACKSPACE 8 -#define KS_TAB 9 - -#define KS_NUM_CENTER 12 - -#define KS_ENTER 13 - -#define KS_SHIFT 16 -#define KS_CTRL 17 -#define KS_ALT 18 - -#define KS_BREAK 19 - -#define KS_CAPSLOCK 20 -#define KS_ESCAPE 27 - -#define KS_SPACE 32 - -#define KS_PAGEUP 33 -#define KS_PAGEDOWN 34 -#define KS_END 35 -#define KS_HOME 36 - -#define KS_LEFT 37 -#define KS_UP 38 -#define KS_RIGHT 39 -#define KS_DOWN 40 - -#define KS_INSERT 45 -#define KS_DEL 46 - -#define KS_0 48 -#define KS_1 49 -#define KS_2 50 -#define KS_3 51 -#define KS_4 52 -#define KS_5 53 -#define KS_6 54 -#define KS_7 55 -#define KS_8 56 -#define KS_9 57 - -#define KS_A 65 -#define KS_B 66 -#define KS_C 67 -#define KS_D 68 -#define KS_E 69 -#define KS_F 70 -#define KS_G 71 -#define KS_H 72 -#define KS_I 73 -#define KS_J 74 -#define KS_K 75 -#define KS_L 76 -#define KS_M 77 -#define KS_N 78 -#define KS_O 79 -#define KS_P 80 -#define KS_Q 81 -#define KS_R 82 -#define KS_S 83 -#define KS_T 84 -#define KS_U 85 -#define KS_V 86 -#define KS_W 87 -#define KS_X 88 -#define KS_Y 89 -#define KS_Z 90 - - -#define KS_NUM_0 96 -#define KS_NUM_1 97 -#define KS_NUM_2 98 -#define KS_NUM_3 99 -#define KS_NUM_4 100 -#define KS_NUM_5 101 -#define KS_NUM_6 102 -#define KS_NUM_7 103 -#define KS_NUM_8 104 -#define KS_NUM_9 105 -#define KS_NUM_ASTERISK 106 -#define KS_NUM_ADD 107 -#define KS_NUM_SUBTRACT 109 -#define KS_NUM_PERIOD 110 -#define KS_NUM_SLASH 111 - -#define KS_F1 112 -#define KS_F2 113 -#define KS_F3 114 -#define KS_F4 115 -#define KS_F5 116 -#define KS_F6 117 -#define KS_F7 118 -#define KS_F8 119 -#define KS_F9 120 -#define KS_F10 121 -#define KS_F11 122 -#define KS_F12 123 - -#define KS_NUM_LOCK 144 -#define KS_SCROLL_LOCK 145 - -#define KS_COLON 186 -#define KS_EQUAL 187 -#define KS_COMMA 188 -#define KS_SUBTRACT 189 -#define KS_PERIOD 190 -#define KS_SLASH 191 -#define KS_BACK_APOSTROPHE 192 - -#define KS_OPEN_BRACKET 219 -#define KS_BACKSLASH 220 -#define KS_CLOSE_BRACKET 221 -#define KS_APOSTROPHE 222 \ No newline at end of file diff --git a/code/modules/client/edge_sliding/keystate/1definitions.dm b/code/modules/client/edge_sliding/keystate/1definitions.dm deleted file mode 100644 index 50d1af3403c..00000000000 --- a/code/modules/client/edge_sliding/keystate/1definitions.dm +++ /dev/null @@ -1,17 +0,0 @@ -client - var/manual_focus = 0 - -client/proc/KeyDown(KeyCode,shift) -client/proc/KeyUp(KeyCode,shift) - -KeyState - var/key_repeat = 0 - var/open = 1 - -KeyState/proc/open() - open = 1 - if(client)client.KeyFocus() - -KeyState/proc/close() - open = 0 - if(client)client<