mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-21 03:52:54 +01:00
Merge remote-tracking branch 'upstream/dev' into RoboCircuit
This commit is contained in:
@@ -102,7 +102,6 @@ var/list/admin_verbs_fun = list(
|
||||
/client/proc/cmd_admin_add_random_ai_law,
|
||||
/client/proc/make_sound,
|
||||
/client/proc/toggle_random_events,
|
||||
/client/proc/set_ooc,
|
||||
/client/proc/editappear
|
||||
)
|
||||
var/list/admin_verbs_spawn = list(
|
||||
@@ -170,7 +169,6 @@ var/list/admin_verbs_rejuv = list(
|
||||
|
||||
//verbs which can be hidden - needs work
|
||||
var/list/admin_verbs_hideable = list(
|
||||
/client/proc/set_ooc,
|
||||
/client/proc/deadmin_self,
|
||||
// /client/proc/deadchat,
|
||||
/client/proc/toggleprayers,
|
||||
@@ -467,10 +465,13 @@ var/list/admin_verbs_mentor = list(
|
||||
set category = "Fun"
|
||||
set name = "OOC Text Color"
|
||||
if(!holder) return
|
||||
var/new_ooccolor = input(src, "Please select your OOC colour.", "OOC colour") as color|null
|
||||
if(new_ooccolor)
|
||||
prefs.ooccolor = new_ooccolor
|
||||
prefs.save_preferences()
|
||||
var/response = alert(src, "Please choose a distinct color that is easy to read and doesn't mix with all the other chat and radio frequency colors.", "Change own OOC color", "Pick new color", "Reset to default", "Cancel")
|
||||
if(response == "Pick new color")
|
||||
prefs.ooccolor = input(src, "Please select your OOC colour.", "OOC colour") as color
|
||||
else if(response == "Reset to default")
|
||||
prefs.ooccolor = initial(prefs.ooccolor)
|
||||
prefs.save_preferences()
|
||||
|
||||
feedback_add_details("admin_verb","OC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ datum/preferences
|
||||
|
||||
//game-preferences
|
||||
var/lastchangelog = "" //Saved changlog filesize to detect if there was a change
|
||||
var/ooccolor = "#b82e00"
|
||||
var/ooccolor = "#010000" //Whatever this is set to acts as 'reset' color and is thus unusable as an actual custom color
|
||||
var/be_special = 0 //Special role selection
|
||||
var/UI_style = "Midnight"
|
||||
var/toggles = TOGGLES_DEFAULT
|
||||
|
||||
@@ -217,6 +217,7 @@ log transactions
|
||||
if("transfer")
|
||||
if(authenticated_account)
|
||||
var/transfer_amount = text2num(href_list["funds_amount"])
|
||||
transfer_amount = round(transfer_amount, 0.01)
|
||||
if(transfer_amount <= 0)
|
||||
alert("That is not a valid amount.")
|
||||
else if(transfer_amount <= authenticated_account.money)
|
||||
@@ -302,6 +303,7 @@ log transactions
|
||||
previous_account_number = tried_account_num
|
||||
if("e_withdrawal")
|
||||
var/amount = max(text2num(href_list["funds_amount"]),0)
|
||||
amount = round(amount, 0.01)
|
||||
if(amount <= 0)
|
||||
alert("That is not a valid amount.")
|
||||
else if(authenticated_account && amount > 0)
|
||||
@@ -327,6 +329,7 @@ log transactions
|
||||
usr << "\icon[src]<span class='warning'>You don't have enough funds to do that!</span>"
|
||||
if("withdrawal")
|
||||
var/amount = max(text2num(href_list["funds_amount"]),0)
|
||||
amount = round(amount, 0.01)
|
||||
if(amount <= 0)
|
||||
alert("That is not a valid amount.")
|
||||
else if(authenticated_account && amount > 0)
|
||||
|
||||
@@ -67,15 +67,24 @@
|
||||
/obj/item/weapon/spacecash/bundle/update_icon()
|
||||
overlays.Cut()
|
||||
var/sum = src.worth
|
||||
var/num = 0
|
||||
for(var/i in list(1000,500,200,100,50,20,10,1))
|
||||
while(sum >= i)
|
||||
while(sum >= i && num < 50)
|
||||
sum -= i
|
||||
num++
|
||||
var/image/banknote = image('icons/obj/items.dmi', "spacecash[i]")
|
||||
var/matrix/M = matrix()
|
||||
M.Translate(rand(-6, 6), rand(-4, 8))
|
||||
M.Turn(pick(-45, -27.5, 0, 0, 0, 0, 0, 0, 0, 27.5, 45))
|
||||
banknote.transform = M
|
||||
src.overlays += banknote
|
||||
if(num == 0) // Less than one thaler, let's just make it look like 1 for ease
|
||||
var/image/banknote = image('icons/obj/items.dmi', "spacecash1")
|
||||
var/matrix/M = matrix()
|
||||
M.Translate(rand(-6, 6), rand(-4, 8))
|
||||
M.Turn(pick(-45, -27.5, 0, 0, 0, 0, 0, 0, 0, 27.5, 45))
|
||||
banknote.transform = M
|
||||
src.overlays += banknote
|
||||
src.desc = "They are worth [worth] Thalers."
|
||||
|
||||
/obj/item/weapon/spacecash/bundle/attack_self()
|
||||
|
||||
@@ -98,11 +98,8 @@
|
||||
message = stars(message)
|
||||
|
||||
if(language)
|
||||
verb = language.speech_verb
|
||||
style = language.colour
|
||||
|
||||
|
||||
|
||||
if(hard_to_hear)
|
||||
message = stars(message)
|
||||
|
||||
|
||||
@@ -313,10 +313,10 @@
|
||||
src << "\red You are trying to eqip this item to an unsupported inventory slot. How the heck did you manage that? Stop it..."
|
||||
return
|
||||
|
||||
if(W == src.l_hand)
|
||||
if((W == src.l_hand) && (slot != slot_l_hand))
|
||||
src.l_hand = null
|
||||
update_inv_l_hand() //So items actually disappear from hands.
|
||||
else if(W == src.r_hand)
|
||||
else if((W == src.r_hand) && (slot != slot_r_hand))
|
||||
src.r_hand = null
|
||||
update_inv_r_hand()
|
||||
|
||||
|
||||
@@ -247,11 +247,17 @@ var/list/global/organ_rel_size = list(
|
||||
n = length(n)
|
||||
var/p = null
|
||||
p = 1
|
||||
var/intag = 0
|
||||
while(p <= n)
|
||||
if ((copytext(te, p, p + 1) == " " || prob(pr)))
|
||||
t = text("[][]", t, copytext(te, p, p + 1))
|
||||
var/char = copytext(te, p, p + 1)
|
||||
if (char == "<") //let's try to not break tags
|
||||
intag = !intag
|
||||
if (intag || char == " " || prob(pr))
|
||||
t = text("[][]", t, char)
|
||||
else
|
||||
t = text("[]*", t)
|
||||
if (char == ">")
|
||||
intag = !intag
|
||||
p++
|
||||
return t
|
||||
|
||||
|
||||
+8
-13
@@ -34,7 +34,6 @@
|
||||
|
||||
/mob/proc/say_dead(var/message)
|
||||
var/name = src.real_name
|
||||
var/alt_name = ""
|
||||
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
usr << "\red Speech is currently admin-disabled."
|
||||
@@ -54,22 +53,18 @@
|
||||
else
|
||||
name = real_name
|
||||
if(name != real_name)
|
||||
alt_name = " (died as [real_name])"
|
||||
|
||||
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[name]</span>[alt_name] [pick("complains","moans","whines","laments","blubbers")], <span class='message'>\"[message]\"</span></span>"
|
||||
name += " (died as [real_name])"
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
if(istype(M, /mob/new_player))
|
||||
continue
|
||||
if(M.client && M.stat == DEAD && (M.client.prefs.toggles & CHAT_DEAD))
|
||||
M << rendered
|
||||
continue
|
||||
|
||||
if(M.client && M.client.holder && !is_mentor(M.client) && (M.client.prefs.toggles & CHAT_DEAD) ) // Show the message to admins/mods with deadchat toggled on
|
||||
M << rendered //Admins can hear deadchat, if they choose to, no matter if they're blind/deaf or not.
|
||||
|
||||
|
||||
return
|
||||
if(M.client && (M.stat == DEAD || (M.client.holder && !is_mentor(M.client)) && (M.client.prefs.toggles & CHAT_DEAD)))
|
||||
var/follow = ""
|
||||
if(src != M)
|
||||
follow = " (<a href='byond://?src=\ref[M];track=\ref[src]'>follow</a>)"
|
||||
if(M.stat != DEAD && M.client.holder)
|
||||
follow = " (<a href='?src=\ref[M.client.holder];adminplayerobservejump=\ref[src]'>JMP</a>)"
|
||||
M << "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[name]</span>[follow] [pick("complains","moans","whines","laments","blubbers")], <span class='message'>\"[message]\"</span></span>"
|
||||
|
||||
/mob/proc/say_understands(var/mob/other,var/datum/language/speaking = null)
|
||||
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
pixel_x = rand(-9, 9)
|
||||
stamps = ""
|
||||
|
||||
if(name != "paper")
|
||||
desc = "This is a paper titled '" + name + "'."
|
||||
|
||||
if(info != initial(info))
|
||||
info = html_encode(info)
|
||||
info = replacetext(info, "\n", "<BR>")
|
||||
@@ -60,10 +63,11 @@
|
||||
icon_state = "paper"
|
||||
|
||||
/obj/item/weapon/paper/examine(mob/user)
|
||||
if(in_range(user, src))
|
||||
..()
|
||||
if(in_range(user, src) || istype(user, /mob/dead/observer))
|
||||
show_content(usr)
|
||||
else
|
||||
user << "<span class='notice'>It is too far away.</span>"
|
||||
user << "<span class='notice'>You have to go closer if you want to read it.</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/paper/proc/show_content(var/mob/user, var/forceshow=0)
|
||||
@@ -84,7 +88,9 @@
|
||||
return
|
||||
var/n_name = copytext(sanitize(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text), 1, MAX_NAME_LEN)
|
||||
if((loc == usr && usr.stat == 0))
|
||||
name = "[(n_name ? text("[n_name]") : "paper")]"
|
||||
name = "[(n_name ? text("[n_name]") : initial(name))]"
|
||||
if(name != "paper")
|
||||
desc = "This is a paper titled '" + name + "'."
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
@@ -204,14 +210,14 @@
|
||||
t = replacetext(t, "\[/large\]", "</font>")
|
||||
t = replacetext(t, "\[sign\]", "<font face=\"[signfont]\"><i>[user ? user.real_name : "Anonymous"]</i></font>")
|
||||
t = replacetext(t, "\[field\]", "<span class=\"paper_field\"></span>")
|
||||
|
||||
|
||||
t = replacetext(t, "\[h1\]", "<H1>")
|
||||
t = replacetext(t, "\[/h1\]", "</H1>")
|
||||
t = replacetext(t, "\[h2\]", "<H2>")
|
||||
t = replacetext(t, "\[/h2\]", "</H2>")
|
||||
t = replacetext(t, "\[h3\]", "<H3>")
|
||||
t = replacetext(t, "\[/h3\]", "</H3>")
|
||||
|
||||
|
||||
if(!iscrayon)
|
||||
t = replacetext(t, "\[*\]", "<li>")
|
||||
t = replacetext(t, "\[hr\]", "<HR>")
|
||||
|
||||
@@ -14,11 +14,15 @@
|
||||
construction_state = 0
|
||||
active = 0
|
||||
dir = 1
|
||||
var/strength_upper_limit = 2
|
||||
var/interface_control = 1
|
||||
var/list/obj/structure/particle_accelerator/connected_parts
|
||||
var/assembled = 0
|
||||
var/parts = null
|
||||
var/datum/wires/particle_acc/control_box/wires = null
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/New()
|
||||
wires = new(src)
|
||||
connected_parts = list()
|
||||
active_power_usage = initial(active_power_usage) * (strength + 1)
|
||||
..()
|
||||
@@ -27,6 +31,8 @@
|
||||
/obj/machinery/particle_accelerator/control_box/attack_hand(mob/user as mob)
|
||||
if(construction_state >= 3)
|
||||
interact(user)
|
||||
else if(construction_state == 2) // Wires exposed
|
||||
wires.Interact(user)
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/update_state()
|
||||
if(construction_state < 3)
|
||||
@@ -79,49 +85,51 @@
|
||||
usr << browse(null, "window=pacontrol")
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
if(href_list["togglep"])
|
||||
src.toggle_power()
|
||||
investigate_log("turned [active?"<font color='red'>ON</font>":"<font color='green'>OFF</font>"] by [usr.key]","singulo")
|
||||
if (active)
|
||||
message_admins("PA Control Computer turned ON by [key_name(usr, usr.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("PA Control Computer turned ON by [usr.ckey]([usr]) in ([x],[y],[z])")
|
||||
if(!wires.IsIndexCut(PARTICLE_TOGGLE_WIRE))
|
||||
src.toggle_power()
|
||||
else if(href_list["scan"])
|
||||
src.part_scan()
|
||||
|
||||
else if(href_list["strengthup"])
|
||||
var/old_strength = strength
|
||||
strength++
|
||||
if(strength > 2)
|
||||
strength = 2
|
||||
else
|
||||
message_admins("PA Control Computer increased to [strength] by [key_name(usr, usr.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("PA Control Computer increased to [strength] by [usr.ckey]([usr]) in ([x],[y],[z])")
|
||||
investigate_log("increased to <font color='red'>[strength]</font> by [usr.key]","singulo")
|
||||
for(var/obj/structure/particle_accelerator/part in connected_parts)
|
||||
part.strength = strength
|
||||
part.update_icon()
|
||||
|
||||
if (strength != old_strength)
|
||||
active_power_usage = initial(active_power_usage) * (strength + 1)
|
||||
use_power(0) //update power usage
|
||||
if(!wires.IsIndexCut(PARTICLE_STRENGTH_WIRE))
|
||||
add_strength()
|
||||
|
||||
else if(href_list["strengthdown"])
|
||||
var/old_strength = strength
|
||||
strength--
|
||||
if(strength < 0)
|
||||
strength = 0
|
||||
else
|
||||
investigate_log("decreased to <font color='green'>[strength]</font> by [usr.key]","singulo")
|
||||
for(var/obj/structure/particle_accelerator/part in connected_parts)
|
||||
part.strength = strength
|
||||
part.update_icon()
|
||||
|
||||
if (strength != old_strength)
|
||||
active_power_usage = initial(active_power_usage) * (strength + 1)
|
||||
use_power(0) //update power usage
|
||||
if(!wires.IsIndexCut(PARTICLE_STRENGTH_WIRE))
|
||||
remove_strength()
|
||||
|
||||
src.updateDialog()
|
||||
src.update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/proc/strength_change()
|
||||
for(var/obj/structure/particle_accelerator/part in connected_parts)
|
||||
part.strength = strength
|
||||
part.update_icon()
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/proc/add_strength(var/s)
|
||||
if(assembled)
|
||||
strength++
|
||||
if(strength > strength_upper_limit)
|
||||
strength = strength_upper_limit
|
||||
else
|
||||
message_admins("PA Control Computer increased to [strength] by [key_name(usr, usr.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("PA Control Computer increased to [strength] by [usr.ckey]([usr]) in ([x],[y],[z])")
|
||||
investigate_log("increased to <font color='red'>[strength]</font> by [usr.key]","singulo")
|
||||
strength_change()
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/proc/remove_strength(var/s)
|
||||
if(assembled)
|
||||
strength--
|
||||
if(strength < 0)
|
||||
strength = 0
|
||||
else
|
||||
message_admins("PA Control Computer decreased to [strength] by [key_name(usr, usr.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("PA Control Computer decreased to [strength] by [usr.ckey]([usr]) in ([x],[y],[z])")
|
||||
investigate_log("decreased to <font color='green'>[strength]</font> by [usr.key]","singulo")
|
||||
strength_change()
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/power_change()
|
||||
..()
|
||||
@@ -198,6 +206,9 @@
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/proc/toggle_power()
|
||||
src.active = !src.active
|
||||
investigate_log("turned [active?"<font color='red'>ON</font>":"<font color='green'>OFF</font>"] by [usr ? usr.key : "outside forces"]","singulo")
|
||||
message_admins("PA Control Computer turned [active ?"ON":"OFF"] by [key_name(usr, usr.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("PA Control Computer turned [active ?"ON":"OFF"] by [usr.ckey]([usr]) in ([x],[y],[z])")
|
||||
if(src.active)
|
||||
update_use_power(2)
|
||||
for(var/obj/structure/particle_accelerator/part in connected_parts)
|
||||
@@ -241,4 +252,4 @@
|
||||
|
||||
user << browse(dat, "window=pacontrol;size=420x500")
|
||||
onclose(user, "pacontrol")
|
||||
return
|
||||
return
|
||||
|
||||
@@ -42,7 +42,7 @@ var/global/list/uneatable = list(
|
||||
spawn(temp)
|
||||
del(src)
|
||||
..()
|
||||
for(var/obj/machinery/singularity_beacon/singubeacon in machines)
|
||||
for(var/obj/machinery/power/singularity_beacon/singubeacon in machines)
|
||||
if(singubeacon.active)
|
||||
target = singubeacon
|
||||
break
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
var/max_w_class = 3 // Hopper intake size.
|
||||
var/max_combined_w_class = 20 // Total internal storage size.
|
||||
var/obj/item/weapon/tank/tank = null // Tank of gas for use in firing the cannon.
|
||||
var/obj/item/weapon/storage/tank_container = new() // Something to hold the tank item so we don't accidentally fire it.
|
||||
var/obj/item/weapon/storage/tank_container // Something to hold the tank item so we don't accidentally fire it.
|
||||
var/pressure_setting = 10 // Percentage of the gas in the tank used to fire the projectile.
|
||||
var/possible_pressure_amounts = list(5,10,20,25,50) // Possible pressure settings.
|
||||
var/minimum_tank_pressure = 10 // Minimum pressure to fire the gun.
|
||||
@@ -23,6 +23,7 @@
|
||||
// analyzer with a force_divisor of 10 hit with a damage multiplier of 3000+.
|
||||
/obj/item/weapon/gun/launcher/pneumatic/New()
|
||||
..()
|
||||
tank_container = new(src)
|
||||
tank_container.tag = "gas_tank_holder"
|
||||
|
||||
/obj/item/weapon/gun/launcher/pneumatic/verb/set_pressure() //set amount of tank pressure.
|
||||
|
||||
@@ -270,14 +270,15 @@
|
||||
if(mode==-1 && !href_list["eject"]) // only allow ejecting if mode is -1
|
||||
usr << "\red The disposal units power is disabled."
|
||||
return
|
||||
..()
|
||||
src.add_fingerprint(usr)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
if(usr.stat || usr.restrained() || src.flushing)
|
||||
return
|
||||
|
||||
if (in_range(src, usr) && istype(src.loc, /turf))
|
||||
if(istype(src.loc, /turf))
|
||||
usr.set_machine(src)
|
||||
|
||||
if(href_list["close"])
|
||||
@@ -292,12 +293,13 @@
|
||||
mode = 0
|
||||
update()
|
||||
|
||||
if(href_list["handle"])
|
||||
flush = text2num(href_list["handle"])
|
||||
update()
|
||||
if(!isAI(usr))
|
||||
if(href_list["handle"])
|
||||
flush = text2num(href_list["handle"])
|
||||
update()
|
||||
|
||||
if(href_list["eject"])
|
||||
eject()
|
||||
if(href_list["eject"])
|
||||
eject()
|
||||
else
|
||||
usr << browse(null, "window=disposal")
|
||||
usr.unset_machine()
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
//-------------------------------------------
|
||||
/obj/vehicle/train/cargo/engine/New()
|
||||
..()
|
||||
cell = new /obj/item/weapon/cell/high
|
||||
key = new()
|
||||
cell = new /obj/item/weapon/cell/high(src)
|
||||
key = new(src)
|
||||
var/image/I = new(icon = 'icons/obj/vehicles.dmi', icon_state = "cargo_engine_overlay", layer = src.layer + 0.2) //over mobs
|
||||
overlays += I
|
||||
turn_off() //so engine verbs are correctly set
|
||||
|
||||
Reference in New Issue
Block a user