mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Merge remote-tracking branch 'upstream/master' into dev
This commit is contained in:
@@ -163,13 +163,14 @@ datum/controller/vote
|
||||
restart = 1
|
||||
else
|
||||
master_mode = .
|
||||
if(!going)
|
||||
going = 1
|
||||
world << "<font color='red'><b>The round will start soon.</b></font>"
|
||||
if("crew_transfer")
|
||||
if(. == "Initiate Crew Transfer")
|
||||
init_shift_change(null, 1)
|
||||
|
||||
if(mode == "gamemode") //fire this even if the vote fails.
|
||||
if(!going)
|
||||
going = 1
|
||||
world << "<font color='red'><b>The round will start soon.</b></font>"
|
||||
|
||||
if(restart)
|
||||
world << "World restarting due to vote..."
|
||||
|
||||
@@ -317,7 +317,43 @@ its easier to just keep the beam vertical.
|
||||
var/full_print = md5(H.dna.uni_identity)
|
||||
|
||||
// Add the fingerprints
|
||||
fingerprints[full_print] = full_print
|
||||
//
|
||||
if(fingerprints[full_print])
|
||||
switch(stringpercent(fingerprints[full_print])) //tells us how many stars are in the current prints.
|
||||
|
||||
if(28 to 32)
|
||||
if(prob(1))
|
||||
fingerprints[full_print] = full_print // You rolled a one buddy.
|
||||
else
|
||||
fingerprints[full_print] = stars(full_print, rand(0,40)) // 24 to 32
|
||||
|
||||
if(24 to 27)
|
||||
if(prob(3))
|
||||
fingerprints[full_print] = full_print //Sucks to be you.
|
||||
else
|
||||
fingerprints[full_print] = stars(full_print, rand(15, 55)) // 20 to 29
|
||||
|
||||
if(20 to 23)
|
||||
if(prob(5))
|
||||
fingerprints[full_print] = full_print //Had a good run didn't ya.
|
||||
else
|
||||
fingerprints[full_print] = stars(full_print, rand(30, 70)) // 15 to 25
|
||||
|
||||
if(16 to 19)
|
||||
if(prob(5))
|
||||
fingerprints[full_print] = full_print //Welp.
|
||||
else
|
||||
fingerprints[full_print] = stars(full_print, rand(40, 100)) // 0 to 21
|
||||
|
||||
if(0 to 15)
|
||||
if(prob(5))
|
||||
fingerprints[full_print] = stars(full_print, rand(0,50)) // small chance you can smudge.
|
||||
else
|
||||
fingerprints[full_print] = full_print
|
||||
|
||||
else
|
||||
fingerprints[full_print] = stars(full_print, rand(0, 20)) //Initial touch, not leaving much evidence the first time.
|
||||
|
||||
|
||||
return 1
|
||||
else
|
||||
|
||||
@@ -187,8 +187,8 @@
|
||||
var/heat_capacity = gas.heat_capacity()
|
||||
var/energy_used = min( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE)
|
||||
|
||||
//Use power. Assuming that each power unit represents 1000 watts....
|
||||
use_power(energy_used/1000, ENVIRON)
|
||||
//Use power. Assuming that each power unit represents 1 watts....
|
||||
use_power(energy_used, ENVIRON)
|
||||
|
||||
//We need to cool ourselves.
|
||||
if(environment.temperature > target_temperature)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
power_channel = EQUIP
|
||||
var/obj/item/weapon/cell/charging = null
|
||||
var/chargelevel = -1
|
||||
var/efficiency = 0.875 //<1.0 means some power is lost in the charging process, >1.0 means free energy.
|
||||
proc
|
||||
updateicon()
|
||||
icon_state = "ccharger[charging ? 1 : 0]"
|
||||
@@ -91,8 +92,10 @@
|
||||
//world << "ccpt [charging] [stat]"
|
||||
if(!charging || (stat & (BROKEN|NOPOWER)) || !anchored)
|
||||
return
|
||||
|
||||
use_power(200) //this used to use CELLRATE, but CELLRATE is fucking awful. feel free to fix this properly!
|
||||
charging.give(175) //inefficiency.
|
||||
|
||||
|
||||
var/power_used = 100000 //for 200 units of charge. Yes, thats right, 100 kW. Is something wrong with CELLRATE?
|
||||
|
||||
power_used = charging.give(power_used*CELLRATE*efficiency)
|
||||
use_power(power_used)
|
||||
|
||||
updateicon()
|
||||
|
||||
@@ -115,7 +115,8 @@ var/list/reg_dna = list( )
|
||||
|
||||
var/mouse_respawn_time = 5 //Amount of time that must pass between a player dying as a mouse and repawning as a mouse. In minutes.
|
||||
|
||||
var/CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: 0.02 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
|
||||
var/CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: 0.02 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
|
||||
//It's a conversion constant. power_used*CELLRATE = charge_provided, or charge_used/CELLRATE = power_provided
|
||||
var/CHARGELEVEL = 0.0005 // Cap for how fast cells charge, as a percentage-per-tick (0.01 means cellcharge is capped to 1% per second)
|
||||
|
||||
var/shuttle_z = 2 //default
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
|
||||
//takes input from cmd_admin_pm_context, cmd_admin_pm_panel or /client/Topic and sends them a PM.
|
||||
//Fetching a message if needed. src is the sender and C is the target client
|
||||
/client/proc/cmd_admin_pm(var/client/C, var/msg)
|
||||
|
||||
/client/proc/cmd_admin_pm(var/client/C, var/msg = null)
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
src << "<font color='red'>Error: Private-Message: You are unable to use PM-s (muted).</font>"
|
||||
return
|
||||
@@ -45,14 +46,6 @@
|
||||
else adminhelp(msg) //admin we are replying to left. adminhelp instead
|
||||
return
|
||||
|
||||
/*if(C && C.last_pm_recieved + config.simultaneous_pm_warning_timeout > world.time && holder)
|
||||
//send a warning to admins, but have a delay popup for mods
|
||||
if(holder.rights & R_ADMIN)
|
||||
src << "\red <b>Simultaneous PMs warning:</b> that player has been PM'd in the last [config.simultaneous_pm_warning_timeout / 10] seconds by: [C.ckey_last_pm]"
|
||||
else
|
||||
if(alert("That player has been PM'd in the last [config.simultaneous_pm_warning_timeout / 10] seconds by: [C.ckey_last_pm]","Simultaneous PMs warning","Continue","Cancel") == "Cancel")
|
||||
return*/
|
||||
|
||||
//get message text, limit it's length.and clean/escape html
|
||||
if(!msg)
|
||||
msg = input(src,"Message:", "Private message to [key_name(C, 0, holder ? 1 : 0)]") as text|null
|
||||
@@ -85,7 +78,10 @@
|
||||
else
|
||||
recieve_color = "maroon"
|
||||
send_pm_type = holder.rank + " "
|
||||
recieve_pm_type = holder.rank
|
||||
if(!C.holder && holder && holder.fakekey)
|
||||
recieve_pm_type = "Admin"
|
||||
else
|
||||
recieve_pm_type = holder.rank
|
||||
|
||||
else if(!C.holder)
|
||||
src << "<font color='red'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</font>"
|
||||
@@ -112,70 +108,15 @@
|
||||
adminhelp(reply) //sender has left, adminhelp instead
|
||||
return
|
||||
|
||||
recieve_message = "<font color='[recieve_color]'>[recieve_pm_type] PM from-<b>[get_options_bar(C, 1, C.holder ? 1 : 0, 1)]</b>: [msg]</font>"
|
||||
recieve_message = "<font color='[recieve_color]'>[recieve_pm_type] PM from-<b>[get_options_bar(src, C.holder ? 1 : 0, C.holder ? 1 : 0, 1)]</b>: [msg]</font>"
|
||||
C << recieve_message
|
||||
src << "<font color='blue'>[send_pm_type]PM to-<b>[get_options_bar(C, 1, holder ? 1 : 0, 1)]</b>: [msg]</font>"
|
||||
|
||||
/*if(holder && !C.holder)
|
||||
C.last_pm_recieved = world.time
|
||||
C.ckey_last_pm = ckey*/
|
||||
src << "<font color='blue'>[send_pm_type]PM to-<b>[get_options_bar(C, holder ? 1 : 0, holder ? 1 : 0, 1)]</b>: [msg]</font>"
|
||||
|
||||
//play the recieving admin the adminhelp sound (if they have them enabled)
|
||||
//non-admins shouldn't be able to disable this
|
||||
if(C.prefs.toggles & SOUND_ADMINHELP)
|
||||
C << 'sound/effects/adminhelp.ogg'
|
||||
|
||||
/*
|
||||
if(C.holder)
|
||||
if(holder) //both are admins
|
||||
if(holder.rank == "Moderator") //If moderator
|
||||
C << "<font color='maroon'>Mod PM from-<b>[key_name(src, C, 1)]</b>: [msg]</font>"
|
||||
src << "<font color='blue'>Mod PM to-<b>[key_name(C, src, 1)]</b>: [msg]</font>"
|
||||
else
|
||||
C << "<font color='red'>Admin PM from-<b>[key_name(src, C, 1)]</b>: [msg]</font>"
|
||||
src << "<font color='blue'>Admin PM to-<b>[key_name(C, src, 1)]</b>: [msg]</font>"
|
||||
|
||||
else //recipient is an admin but sender is not
|
||||
C << "<font color='red'>Reply PM from-<b>[key_name(src, C, 1)]</b>: [msg]</font>"
|
||||
src << "<font color='blue'>PM to-<b>Admins</b>: [msg]</font>"
|
||||
|
||||
//play the recieving admin the adminhelp sound (if they have them enabled)
|
||||
if(C.prefs.toggles & SOUND_ADMINHELP)
|
||||
C << 'sound/effects/adminhelp.ogg'
|
||||
|
||||
else
|
||||
if(holder) //sender is an admin but recipient is not. Do BIG RED TEXT
|
||||
if(holder.rank == "Moderator")
|
||||
C << "<font color='maroon'>Mod PM from-<b>[key_name(src, C, 0)]</b>: [msg]</font>"
|
||||
C << "<font color='maroon'><i>Click on the moderators's name to reply.</i></font>"
|
||||
src << "<font color='blue'>Mod PM to-<b>[key_name(C, src, 1)]</b>: [msg]</font>"
|
||||
else
|
||||
C << "<font color='red' size='4'><b>-- Administrator private message --</b></font>"
|
||||
C << "<font color='red'>Admin PM from-<b>[key_name(src, C, 0)]</b>: [msg]</font>"
|
||||
C << "<font color='red'><i>Click on the administrator's name to reply.</i></font>"
|
||||
src << "<font color='blue'>Admin PM to-<b>[key_name(C, src, 1)]</b>: [msg]</font>"
|
||||
|
||||
//always play non-admin recipients the adminhelp sound
|
||||
C << 'sound/effects/adminhelp.ogg'
|
||||
|
||||
//AdminPM popup for ApocStation and anybody else who wants to use it. Set it with POPUP_ADMIN_PM in config.txt ~Carn
|
||||
if(config.popup_admin_pm)
|
||||
spawn() //so we don't hold the caller proc up
|
||||
var/sender = src
|
||||
var/sendername = key
|
||||
var/reply = input(C, msg,"Admin PM from-[sendername]", "") as text|null //show message and await a reply
|
||||
if(C && reply)
|
||||
if(sender)
|
||||
C.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them
|
||||
else
|
||||
adminhelp(reply) //sender has left, adminhelp instead
|
||||
return
|
||||
|
||||
else //neither are admins
|
||||
src << "<font color='red'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</font>"
|
||||
return
|
||||
*/
|
||||
|
||||
log_admin("PM: [key_name(src)]->[key_name(C)]: [msg]")
|
||||
|
||||
//we don't use message_admins here because the sender/receiver might get it too
|
||||
|
||||
@@ -191,6 +191,7 @@
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id, datediff(Now(),firstseen) as age FROM erro_player WHERE ckey = '[sql_ckey]'")
|
||||
query.Execute()
|
||||
var/sql_id = 0
|
||||
player_age = 0 // New players won't have an entry so knowing we have a connection we set this to zero to be updated if their is a record.
|
||||
while(query.NextRow())
|
||||
sql_id = query.item[1]
|
||||
player_age = text2num(query.item[2])
|
||||
|
||||
@@ -424,7 +424,7 @@ datum/preferences
|
||||
|
||||
var/HTML = "<body>"
|
||||
HTML += "<tt><center>"
|
||||
HTML += "<b>Choose occupation chances</b><br>Unavailable occupations are in red.<br><br>"
|
||||
HTML += "<b>Choose occupation chances</b><br>Unavailable occupations are crossed out.<br><br>"
|
||||
HTML += "<center><a href='?_src_=prefs;preference=job;task=close'>\[Done\]</a></center><br>" // Easier to press up here.
|
||||
HTML += "<table width='100%' cellpadding='1' cellspacing='0'><tr><td width='20%'>" // Table within a table for alignment, also allows you to easily add more colomns.
|
||||
HTML += "<table width='100%' cellpadding='1' cellspacing='0'>"
|
||||
@@ -449,11 +449,11 @@ datum/preferences
|
||||
var/rank = job.title
|
||||
lastJob = job
|
||||
if(jobban_isbanned(user, rank))
|
||||
HTML += "<font color=red>[rank]</font></td><td><font color=red><b> \[BANNED]</b></font></td></tr>"
|
||||
HTML += "<del>[rank]</del></td><td><b> \[BANNED]</b></td></tr>"
|
||||
continue
|
||||
if(!job.player_old_enough(user.client))
|
||||
var/available_in_days = job.available_in_days(user.client)
|
||||
HTML += "<font color=red>[rank]</font></td><td><font color=red> \[IN [(available_in_days)] DAYS]</font></td></tr>"
|
||||
HTML += "<del>[rank]</del></td><td> \[IN [(available_in_days)] DAYS]</td></tr>"
|
||||
continue
|
||||
if((job_civilian_low & ASSISTANT) && (rank != "Assistant"))
|
||||
HTML += "<font color=orange>[rank]</font></td><td></td></tr>"
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
if(stat == 2)
|
||||
return say_dead(message)
|
||||
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle)) //Todo: Add this to speech_problem_flag checks.
|
||||
return
|
||||
|
||||
if(copytext(message,1,2) == "*")
|
||||
return emote(copytext(message,2))
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
|
||||
|
||||
|
||||
//Baseline portable generator. Has all the default handling. Not intended to be used on it's own (since it generates unlimited power).
|
||||
//PACMAN variant that can run on the small plasma tanks.
|
||||
/obj/machinery/power/port_gen/pacman2
|
||||
name = "Pacman II"
|
||||
desc = "P.A.C.M.A.N. type II portable generator. Uses liquid phoron as a fuel source."
|
||||
|
||||
@@ -93,6 +93,7 @@ display round(lastgen) and phorontank amount
|
||||
else
|
||||
usr << "\blue The generator is off."
|
||||
|
||||
//A power generator that runs on solid plasma sheets.
|
||||
/obj/machinery/power/port_gen/pacman
|
||||
name = "P.A.C.M.A.N.-type Portable Generator"
|
||||
var/sheets = 0
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user