mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 18:13:34 +01:00
Formatting improvement
This commit is contained in:
@@ -60,6 +60,6 @@
|
||||
#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)]"
|
||||
#define ADMIN_JMP(src) "(<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)"
|
||||
#define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]"
|
||||
#define AREACOORD(src) "[src ? "[get_area_name(src, TRUE)] ([src.x], [src.y], [src.z])" : "nonexistent location"]"
|
||||
#define AREACOORD(src) "[src ? "[get_area_name(src, TRUE)] [COORD(src)]" : "nonexistent location" ]"
|
||||
#define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]"
|
||||
#define ADMIN_VERBOSEJMP(src) "[src ? "[AREACOORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]"
|
||||
|
||||
@@ -218,9 +218,9 @@
|
||||
/obj/machinery/autolathe/proc/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted)
|
||||
switch(id_inserted)
|
||||
if(MAT_METAL)
|
||||
flick("autolathe_o",src)//plays metal insertion animation
|
||||
flick("autolathe_o", src)//plays metal insertion animation
|
||||
if(MAT_GLASS)
|
||||
flick("autolathe_r",src)//plays glass insertion animation
|
||||
flick("autolathe_r", src)//plays glass insertion animation
|
||||
use_power(min(1000, amount_inserted / 100))
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
link_power_station()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/teleporter_hub(null)
|
||||
component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 2)
|
||||
component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 3)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin(null)
|
||||
RefreshParts()
|
||||
|
||||
@@ -289,7 +289,7 @@
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/teleporter_hub(null)
|
||||
component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 2)
|
||||
component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 3)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
|
||||
RefreshParts()
|
||||
|
||||
|
||||
@@ -165,7 +165,6 @@
|
||||
|
||||
var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])]
|
||||
var/multiplier = text2num(href_list["multiplier"])
|
||||
var/atom/creation_loc = (loc == usr) ? usr.loc : loc
|
||||
if(!multiplier)
|
||||
multiplier = 1
|
||||
|
||||
@@ -180,11 +179,11 @@
|
||||
to_chat(usr, "<span class='warning'>The [R.title] won't fit here!</span>")
|
||||
return FALSE
|
||||
|
||||
if(R.one_per_turf && (locate(R.result_type) in creation_loc))
|
||||
if(R.one_per_turf && (locate(R.result_type) in usr.drop_location()))
|
||||
to_chat(usr, "<span class='warning'>There is another [R.title] here!</span>")
|
||||
return 0
|
||||
|
||||
if(R.on_floor && !istype(creation_loc, /turf/simulated))
|
||||
if(R.on_floor && !istype(usr.drop_location(), /turf/simulated))
|
||||
to_chat(usr, "<span class='warning'>\The [R.title] must be constructed on the floor!</span>")
|
||||
return 0
|
||||
|
||||
@@ -196,15 +195,16 @@
|
||||
if(amount < R.req_amount * multiplier)
|
||||
return
|
||||
|
||||
var/atom/O = new R.result_type(creation_loc)
|
||||
var/atom/O
|
||||
if(R.max_res_amount > 1) //Is it a stack?
|
||||
O = new R.result_type(usr.drop_location(), R.res_amount * multiplier)
|
||||
else
|
||||
O = new R.result_type(usr.drop_location())
|
||||
O.setDir(usr.dir)
|
||||
if(R.max_res_amount > 1)
|
||||
var/obj/item/stack/new_item = O
|
||||
new_item.amount = R.res_amount * multiplier
|
||||
use(R.req_amount * multiplier)
|
||||
|
||||
R.post_build(src, O)
|
||||
|
||||
amount -= R.req_amount * multiplier
|
||||
if(amount < 1) // Just in case a stack's amount ends up fractional somehow
|
||||
var/oldsrc = src
|
||||
src = null //dont kill proc after del()
|
||||
@@ -280,11 +280,11 @@
|
||||
//get amount from user
|
||||
var/min = 0
|
||||
var/max = get_amount()
|
||||
var/stackmaterial = round(input(user,"How many sheets do you wish to take out of this stack? (Maximum[max])") as num)
|
||||
if(stackmaterial == null || stackmaterial <= min || stackmaterial >= get_amount())
|
||||
var/stackmaterial = round(input(user, "How many sheets do you wish to take out of this stack? (Maximum: [max])") as num)
|
||||
if(stackmaterial == null || stackmaterial <= min || stackmaterial > get_amount())
|
||||
return
|
||||
change_stack(user,stackmaterial)
|
||||
to_chat(user, "<span class='notice'>You take [stackmaterial] sheets out of the stack</span>")
|
||||
to_chat(user, "<span class='notice'>You take [stackmaterial] sheets out of the stack.</span>")
|
||||
|
||||
/obj/item/stack/proc/change_stack(mob/user,amount)
|
||||
var/obj/item/stack/F = new type(user, amount, FALSE)
|
||||
@@ -294,7 +294,6 @@
|
||||
add_fingerprint(user)
|
||||
F.add_fingerprint(user)
|
||||
use(amount)
|
||||
zero_amount()
|
||||
|
||||
/obj/item/stack/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, merge_type))
|
||||
@@ -302,7 +301,7 @@
|
||||
merge(S)
|
||||
to_chat(user, "<span class='notice'>Your [S.name] stack now contains [S.get_amount()] [S.singular_name]\s.</span>")
|
||||
else
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/proc/zero_amount()
|
||||
if(amount < 1)
|
||||
@@ -322,7 +321,6 @@
|
||||
S.copy_evidences(src)
|
||||
S.add(transfer)
|
||||
use(transfer)
|
||||
zero_amount()
|
||||
|
||||
/obj/item/stack/proc/copy_evidences(obj/item/stack/from)
|
||||
blood_DNA = from.blood_DNA
|
||||
|
||||
@@ -73,8 +73,7 @@
|
||||
if(..())
|
||||
return
|
||||
if(istype(C, /obj/item/shovel))
|
||||
new /obj/item/stack/ore/glass(src)
|
||||
new /obj/item/stack/ore/glass(src) //Make some sand if you shovel grass
|
||||
new /obj/item/stack/ore/glass(src, 2) //Make some sand if you shovel grass
|
||||
to_chat(user, "<span class='notice'>You shovel the grass.</span>")
|
||||
playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1)
|
||||
make_plating()
|
||||
@@ -92,8 +91,7 @@
|
||||
if(..())
|
||||
return
|
||||
if(istype(W, /obj/item/shovel))
|
||||
new /obj/item/stack/ore/glass/basalt(src)
|
||||
new /obj/item/stack/ore/glass/basalt(src)
|
||||
new /obj/item/stack/ore/glass/basalt(src, 2)
|
||||
user.visible_message("<span class='notice'>[user] digs up [src].</span>", "<span class='notice'>You uproot [src].</span>")
|
||||
playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1)
|
||||
make_plating()
|
||||
|
||||
@@ -532,11 +532,7 @@ var/global/list/rockTurfEdgeCache = list(
|
||||
/turf/simulated/floor/plating/airless/asteroid/proc/gets_dug()
|
||||
if(dug)
|
||||
return
|
||||
new/obj/item/stack/ore/glass(src)
|
||||
new/obj/item/stack/ore/glass(src)
|
||||
new/obj/item/stack/ore/glass(src)
|
||||
new/obj/item/stack/ore/glass(src)
|
||||
new/obj/item/stack/ore/glass(src)
|
||||
new/obj/item/stack/ore/glass(src, 5)
|
||||
dug = 1
|
||||
playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1) //FUCK YO RUSTLE I GOT'S THE DIGS SOUND HERE
|
||||
icon_plating = "asteroid_dug"
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
/obj/item/stack/ore/New()
|
||||
..()
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
if(is_mining_level(src.z))
|
||||
pixel_x = rand(0, 16) - 8
|
||||
pixel_y = rand(0, 8) - 8
|
||||
if(is_mining_level(z))
|
||||
score_oremined++ //When ore spawns, increment score. Only include ore spawned on mining asteroid (No Clown Planet)
|
||||
|
||||
/obj/item/stack/ore/attackby(obj/item/I, mob/user, params)
|
||||
@@ -57,11 +57,11 @@
|
||||
if(isnull(refined_type))
|
||||
return
|
||||
else
|
||||
var/amountrefined = round((PROBABILITY_REFINE_BY_FIRE/100) * amount, 1)
|
||||
var/amountrefined = round((PROBABILITY_REFINE_BY_FIRE / 100) * amount, 1)
|
||||
if(amountrefined < 1)
|
||||
qdel(src)
|
||||
else
|
||||
new refined_type(get_turf(src.loc), amountrefined)
|
||||
new refined_type(get_turf(loc), amountrefined)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/ore/uranium
|
||||
@@ -115,7 +115,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
C.EyeBlurry(6)
|
||||
C.adjustStaminaLoss(15)//the pain from your eyes burning does stamina damage
|
||||
C.AdjustConfused(5)
|
||||
to_chat(C, "<span class='userdanger'>\The [src] gets into your eyes! The pain, it burns!</span>")
|
||||
to_chat(C, "<span class='userdanger'>[src] gets into your eyes! The pain, it burns!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/ore/glass/basalt
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
else if(istype(W, /obj/item/crowbar))
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
var/obj/item/crowbar/C = W
|
||||
if(do_after(user, 50*C.toolspeed, target = src))
|
||||
user.visible_message("[user] pries \the [src] apart.", "<span class='notice'>You pry apart \the [src].</span>", "<span class='italics'>You hear splitting wood.</span>")
|
||||
if(do_after(user, 50 * C.toolspeed, target = src))
|
||||
user.visible_message("<span class='notice'>[user] pries [src] apart.</span>", "<span class='notice'>You pry apart [src].</span>", "<span class='italics'>You hear splitting wood.</span>")
|
||||
deconstruct(TRUE, user)
|
||||
|
||||
/obj/structure/ore_box/attack_hand(mob/user)
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/telesci_pad(null)
|
||||
component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 2)
|
||||
component_parts += new /obj/item/stock_parts/capacitor(null)
|
||||
component_parts += new /obj/item/stock_parts/console_screen(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
@@ -25,8 +24,7 @@
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/telesci_pad(null)
|
||||
component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 2)
|
||||
component_parts += new /obj/item/stock_parts/capacitor/super(null)
|
||||
component_parts += new /obj/item/stock_parts/console_screen(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
|
||||
@@ -26,9 +26,8 @@
|
||||
var/teleport_cooldown = 0 // every index requires a bluespace crystal
|
||||
var/list/power_options = list(5, 10, 20, 25, 30, 40, 50, 80)
|
||||
var/teleporting = 0
|
||||
var/starting_crystals = 0
|
||||
var/crystals = 0
|
||||
var/max_crystals = 4
|
||||
var/list/crystals = list()
|
||||
var/obj/item/gps/inserted_gps
|
||||
|
||||
/obj/machinery/computer/telescience/New()
|
||||
@@ -44,29 +43,27 @@
|
||||
|
||||
/obj/machinery/computer/telescience/examine(mob/user)
|
||||
..(user)
|
||||
to_chat(user, "There are [crystals.len ? crystals.len : "no"] bluespace crystal\s in the crystal slots.")
|
||||
to_chat(user, "There are [crystals ? crystals : "no"] bluespace crystal\s in the crystal slots.")
|
||||
|
||||
/obj/machinery/computer/telescience/Initialize()
|
||||
..()
|
||||
for(var/i = 1; i <= starting_crystals; i++)
|
||||
crystals += new /obj/item/stack/ore/bluespace_crystal/artificial(null) // starting crystals
|
||||
|
||||
/obj/machinery/computer/telescience/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/stack/ore/bluespace_crystal))
|
||||
if(crystals.len >= max_crystals)
|
||||
var/obj/item/stack/ore/bluespace_crystal/B = W
|
||||
if(crystals >= max_crystals)
|
||||
to_chat(user, "<span class='warning'>There are not enough crystal slots.</span>")
|
||||
return
|
||||
user.drop_item()
|
||||
crystals += W
|
||||
W.loc = null
|
||||
user.visible_message("<span class='notice'>[user] inserts [W] into \the [src]'s crystal slot.</span>")
|
||||
crystals += 1
|
||||
user.visible_message("<span class='notice'>[user] inserts a [B.singular_name] into [src]'s crystal slot.</span>")
|
||||
B.use(1)
|
||||
updateUsrDialog()
|
||||
else if(istype(W, /obj/item/gps))
|
||||
if(!inserted_gps)
|
||||
inserted_gps = W
|
||||
user.unEquip(W)
|
||||
W.loc = src
|
||||
user.visible_message("<span class='notice'>[user] inserts [W] into \the [src]'s GPS device slot.</span>")
|
||||
user.visible_message("<span class='notice'>[user] inserts [W] into [src]'s GPS device slot.</span>")
|
||||
updateUsrDialog()
|
||||
else if(istype(W, /obj/item/multitool))
|
||||
var/obj/item/multitool/M = W
|
||||
@@ -115,7 +112,7 @@
|
||||
t += "<div class='statusDisplay'>"
|
||||
|
||||
for(var/i = 1; i <= power_options.len; i++)
|
||||
if(crystals.len + telepad.efficiency < i)
|
||||
if(crystals + telepad.efficiency < i)
|
||||
t += "<span class='linkOff'>[power_options[i]]</span>"
|
||||
continue
|
||||
if(power == power_options[i])
|
||||
@@ -322,11 +319,11 @@
|
||||
return
|
||||
|
||||
/obj/machinery/computer/telescience/proc/eject()
|
||||
|
||||
for(var/obj/item/I in crystals)
|
||||
I.loc = loc
|
||||
I.pixel_y = -9
|
||||
crystals -= I
|
||||
var/to_eject
|
||||
for(var/i in 1 to crystals)
|
||||
to_eject += 1
|
||||
crystals -= 1
|
||||
new /obj/item/stack/ore/bluespace_crystal/artificial(drop_location(), to_eject)
|
||||
power = 0
|
||||
|
||||
/obj/machinery/computer/telescience/Topic(href, href_list)
|
||||
@@ -355,7 +352,7 @@
|
||||
var/index = href_list["setpower"]
|
||||
index = text2num(index)
|
||||
if(index != null && power_options[index])
|
||||
if(crystals.len + telepad.efficiency >= index)
|
||||
if(crystals + telepad.efficiency >= index)
|
||||
power = power_options[index]
|
||||
|
||||
if(href_list["setz"])
|
||||
|
||||
Reference in New Issue
Block a user