mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
Merge branch 'incremental_tg' r5067 into bs12_with_tgport
removed extraneous admin attack messages, temporarily disabled much moderator stuff (will be re-enabled in future updates) Conflicts: baystation12.dme code/__HELPERS/type2type.dm code/controllers/configuration.dm code/datums/datumvars.dm code/datums/helper_datums/getrev.dm code/defines/obj.dm code/game/gamemodes/events/black_hole.dm code/game/gamemodes/events/space_ninja.dm code/game/gamemodes/wizard/rightandwrong.dm code/game/jobs/job/captain.dm code/game/jobs/job/job.dm code/game/jobs/job_controller.dm code/game/machinery/bots/medbot.dm code/game/machinery/computer/card.dm code/game/machinery/telecomms/traffic_control.dm code/game/machinery/turrets.dm code/game/machinery/wishgranter.dm code/game/objects/items/blueprints.dm code/game/objects/items/devices/uplinks.dm code/game/objects/items/stacks/stack.dm code/game/objects/items/weapons/surgery_tools.dm code/game/turfs/turf.dm code/game/verbs/ooc.dm code/global.dm code/modules/admin/IsBanned.dm code/modules/admin/admin.dm code/modules/admin/admin_memo.dm code/modules/admin/admin_verbs.dm code/modules/admin/holder2.dm code/modules/admin/player_panel.dm code/modules/admin/verbs/adminpm.dm code/modules/admin/verbs/diagnostics.dm code/modules/assembly/igniter.dm code/modules/client/client defines.dm code/modules/client/client procs.dm code/modules/clothing/spacesuits/miscellaneous.dm code/modules/clothing/suits/armor.dm code/modules/clothing/suits/jobs.dm code/modules/mining/mine_turfs.dm code/modules/mob/living/carbon/human/say.dm code/modules/mob/living/carbon/human/update_icons.dm code/modules/mob/living/living.dm code/modules/mob/living/living_defense.dm code/modules/mob/living/silicon/robot/emote.dm code/modules/mob/living/silicon/robot/life.dm code/modules/mob/mob_cleanup.dm code/modules/mob/new_player/new_player.dm code/modules/mob/new_player/preferences.dm code/modules/paperwork/paper.dm code/modules/paperwork/photocopier.dm code/modules/projectiles/guns/projectile/automatic.dm code/modules/reagents/Chemistry-Machinery.dm code/setup.dm code/stylesheet.dm code/world.dm config/admins.txt config/config.txt html/changelog.html icons/mob/items_lefthand.dmi icons/mob/items_righthand.dmi icons/mob/suit.dmi icons/obj/clothing/suits.dmi icons/turf/areas.dmi Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -49,7 +49,6 @@
|
||||
#define FILE_DIR "sound/voice"
|
||||
#define FILE_DIR "sound/weapons"
|
||||
// END_FILE_DIR
|
||||
|
||||
// BEGIN_PREFERENCES
|
||||
// END_PREFERENCES
|
||||
|
||||
@@ -138,6 +137,22 @@
|
||||
#include "code\datums\diseases\robotic_transformation.dm"
|
||||
#include "code\datums\diseases\wizarditis.dm"
|
||||
#include "code\datums\diseases\xeno_transformation.dm"
|
||||
#include "code\datums\diseases\advance\advance.dm"
|
||||
#include "code\datums\diseases\advance\cold.dm"
|
||||
#include "code\datums\diseases\advance\flu.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\confusion.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\cough.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\damage_converter.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\dizzy.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\fever.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\hallucigen.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\headache.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\itching.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\shivering.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\sneeze.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\symptoms.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\vomit.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\weight.dm"
|
||||
#include "code\datums\helper_datums\construction_datum.dm"
|
||||
#include "code\datums\helper_datums\events.dm"
|
||||
#include "code\datums\helper_datums\getrev.dm"
|
||||
@@ -173,7 +188,6 @@
|
||||
#include "code\defines\procs\captain_announce.dm"
|
||||
#include "code\defines\procs\command_alert.dm"
|
||||
#include "code\defines\procs\dbcore.dm"
|
||||
#include "code\defines\procs\forum_activation.dm"
|
||||
#include "code\defines\procs\statistics.dm"
|
||||
#include "code\game\asteroid.dm"
|
||||
#include "code\game\atoms.dm"
|
||||
@@ -402,7 +416,6 @@
|
||||
#include "code\game\mecha\equipment\weapons\weapons.dm"
|
||||
#include "code\game\mecha\medical\medical.dm"
|
||||
#include "code\game\mecha\medical\odysseus.dm"
|
||||
#include "code\game\mecha\working\firefighter.dm"
|
||||
#include "code\game\mecha\working\ripley.dm"
|
||||
#include "code\game\mecha\working\working.dm"
|
||||
#include "code\game\objects\empulse.dm"
|
||||
@@ -506,7 +519,6 @@
|
||||
#include "code\game\objects\items\weapons\kitchen.dm"
|
||||
#include "code\game\objects\items\weapons\manuals.dm"
|
||||
#include "code\game\objects\items\weapons\mop.dm"
|
||||
#include "code\game\objects\items\weapons\mousetraps.dm"
|
||||
#include "code\game\objects\items\weapons\paint.dm"
|
||||
#include "code\game\objects\items\weapons\paiwire.dm"
|
||||
#include "code\game\objects\items\weapons\photography.dm"
|
||||
@@ -607,7 +619,6 @@
|
||||
#include "code\game\objects\structures\stool_bed_chair_nest\bed.dm"
|
||||
#include "code\game\objects\structures\stool_bed_chair_nest\chairs.dm"
|
||||
#include "code\game\objects\structures\stool_bed_chair_nest\stools.dm"
|
||||
#include "code\game\player\admin_report.dm"
|
||||
#include "code\game\turfs\simulated.dm"
|
||||
#include "code\game\turfs\turf.dm"
|
||||
#include "code\game\turfs\unsimulated.dm"
|
||||
@@ -638,6 +649,7 @@
|
||||
#include "code\modules\admin\admin.dm"
|
||||
#include "code\modules\admin\admin_investigate.dm"
|
||||
#include "code\modules\admin\admin_memo.dm"
|
||||
#include "code\modules\admin\admin_ranks.dm"
|
||||
#include "code\modules\admin\admin_verbs.dm"
|
||||
#include "code\modules\admin\banjob.dm"
|
||||
#include "code\modules\admin\create_mob.dm"
|
||||
@@ -650,9 +662,9 @@
|
||||
#include "code\modules\admin\newbanjob.dm"
|
||||
#include "code\modules\admin\player_notes.dm"
|
||||
#include "code\modules\admin\player_panel.dm"
|
||||
#include "code\modules\admin\topic.dm"
|
||||
#include "code\modules\admin\ToRban.dm"
|
||||
#include "code\modules\admin\DB ban\functions.dm"
|
||||
#include "code\modules\admin\permissionverbs\assignment.dm"
|
||||
#include "code\modules\admin\permissionverbs\permissionedit.dm"
|
||||
#include "code\modules\admin\verbs\adminhelp.dm"
|
||||
#include "code\modules\admin\verbs\adminjump.dm"
|
||||
@@ -685,6 +697,7 @@
|
||||
#include "code\modules\assembly\holder.dm"
|
||||
#include "code\modules\assembly\igniter.dm"
|
||||
#include "code\modules\assembly\infrared.dm"
|
||||
#include "code\modules\assembly\mousetrap.dm"
|
||||
#include "code\modules\assembly\proximity.dm"
|
||||
#include "code\modules\assembly\shock_kit.dm"
|
||||
#include "code\modules\assembly\signaler.dm"
|
||||
|
||||
@@ -88,14 +88,14 @@ obj/machinery/atmospherics/binary/passive_gate
|
||||
|
||||
return 1
|
||||
|
||||
interact(mob/user as mob)
|
||||
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
|
||||
<b>Desirable output pressure: </b>
|
||||
[round(target_pressure,0.1)]kPa | <a href='?src=\ref[src];set_press=1'>Change</a>
|
||||
"}
|
||||
interact(mob/user as mob)
|
||||
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
|
||||
<b>Desirable output pressure: </b>
|
||||
[round(target_pressure,0.1)]kPa | <a href='?src=\ref[src];set_press=1'>Change</a>
|
||||
"}
|
||||
|
||||
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_pump")
|
||||
onclose(user, "atmo_pump")
|
||||
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_pump")
|
||||
onclose(user, "atmo_pump")
|
||||
|
||||
initialize()
|
||||
..()
|
||||
|
||||
@@ -107,14 +107,14 @@ obj/machinery/atmospherics/binary/pump
|
||||
|
||||
return 1
|
||||
|
||||
interact(mob/user as mob)
|
||||
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
|
||||
<b>Desirable output pressure: </b>
|
||||
[round(target_pressure,0.1)]kPa | <a href='?src=\ref[src];set_press=1'>Change</a>
|
||||
"}
|
||||
interact(mob/user as mob)
|
||||
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
|
||||
<b>Desirable output pressure: </b>
|
||||
[round(target_pressure,0.1)]kPa | <a href='?src=\ref[src];set_press=1'>Change</a>
|
||||
"}
|
||||
|
||||
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_pump")
|
||||
onclose(user, "atmo_pump")
|
||||
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_pump")
|
||||
onclose(user, "atmo_pump")
|
||||
|
||||
initialize()
|
||||
..()
|
||||
|
||||
@@ -97,14 +97,14 @@ obj/machinery/atmospherics/binary/volume_pump
|
||||
|
||||
return 1
|
||||
|
||||
interact(mob/user as mob)
|
||||
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
|
||||
<b>Desirable output flow: </b>
|
||||
[round(transfer_rate,1)]l/s | <a href='?src=\ref[src];set_transfer_rate=1'>Change</a>
|
||||
"}
|
||||
interact(mob/user as mob)
|
||||
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
|
||||
<b>Desirable output flow: </b>
|
||||
[round(transfer_rate,1)]l/s | <a href='?src=\ref[src];set_transfer_rate=1'>Change</a>
|
||||
"}
|
||||
|
||||
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_pump")
|
||||
onclose(user, "atmo_pump")
|
||||
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_pump")
|
||||
onclose(user, "atmo_pump")
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
else
|
||||
chance_of_deletion = 100
|
||||
if(prob(chance_of_deletion))
|
||||
T.ReplaceWithSpace()
|
||||
T.ChangeTurf(/turf/space)
|
||||
else
|
||||
T.to_be_destroyed = 0
|
||||
T.max_fire_temperature_sustained = 0
|
||||
|
||||
@@ -13,15 +13,6 @@
|
||||
spawn(0)
|
||||
core_generator = locate() in world
|
||||
|
||||
attack_ai(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
interact(user)
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if( href_list["shutdown"] )
|
||||
@@ -52,36 +43,35 @@
|
||||
if(updating)
|
||||
src.updateDialog()
|
||||
|
||||
proc
|
||||
interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=core_monitor")
|
||||
return
|
||||
var/t = "<B>Reactor Core Primary Monitor</B><BR>"
|
||||
if(core_generator)
|
||||
t += "<font color=blue>[core_generator.on ? "Core Generator connected" : "Core Generator operational"]</font><br>"
|
||||
if(core_generator.owned_field)
|
||||
t += "<font color=green>Core suspension field online</font> <a href='?src=\ref[src];shutdown=1'>\[Bring field offline\]</a><br>"
|
||||
t += "Electromagnetic plasma suspension field status:<br>"
|
||||
t += " <font color=blue>Strength (T): [core_generator.owned_field.field_strength]</font> <a href='?src=\ref[src];modify_field_strength=1'>\[Modify\]</a><br>"
|
||||
t += " <font color=blue>Energy levels (MeV): [core_generator.owned_field.mega_energy]</font><br>"
|
||||
t += " <font color=blue>Core frequency: [core_generator.owned_field.frequency]</font><br>"
|
||||
t += " <font color=blue>Moles of plasma: [core_generator.owned_field.held_plasma.toxins]</font><br>"
|
||||
t += " <font color=blue>Core temperature: [core_generator.owned_field.held_plasma.temperature]</font><br>"
|
||||
t += "<hr>"
|
||||
t += "<b>Core atomic and subatomic constituents:</font></b><br>"
|
||||
if(core_generator.owned_field.dormant_reactant_quantities && core_generator.owned_field.dormant_reactant_quantities.len)
|
||||
for(var/reagent in core_generator.owned_field.dormant_reactant_quantities)
|
||||
t += " <font color=green>[reagent]:</font> [core_generator.owned_field.dormant_reactant_quantities[reagent]]<br>"
|
||||
else
|
||||
t += " <font color=blue>No reactants present.</font><br>"
|
||||
interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=core_monitor")
|
||||
return
|
||||
var/t = "<B>Reactor Core Primary Monitor</B><BR>"
|
||||
if(core_generator)
|
||||
t += "<font color=blue>[core_generator.on ? "Core Generator connected" : "Core Generator operational"]</font><br>"
|
||||
if(core_generator.owned_field)
|
||||
t += "<font color=green>Core suspension field online</font> <a href='?src=\ref[src];shutdown=1'>\[Bring field offline\]</a><br>"
|
||||
t += "Electromagnetic plasma suspension field status:<br>"
|
||||
t += " <font color=blue>Strength (T): [core_generator.owned_field.field_strength]</font> <a href='?src=\ref[src];modify_field_strength=1'>\[Modify\]</a><br>"
|
||||
t += " <font color=blue>Energy levels (MeV): [core_generator.owned_field.mega_energy]</font><br>"
|
||||
t += " <font color=blue>Core frequency: [core_generator.owned_field.frequency]</font><br>"
|
||||
t += " <font color=blue>Moles of plasma: [core_generator.owned_field.held_plasma.toxins]</font><br>"
|
||||
t += " <font color=blue>Core temperature: [core_generator.owned_field.held_plasma.temperature]</font><br>"
|
||||
t += "<hr>"
|
||||
t += "<b>Core atomic and subatomic constituents:</font></b><br>"
|
||||
if(core_generator.owned_field.dormant_reactant_quantities && core_generator.owned_field.dormant_reactant_quantities.len)
|
||||
for(var/reagent in core_generator.owned_field.dormant_reactant_quantities)
|
||||
t += " <font color=green>[reagent]:</font> [core_generator.owned_field.dormant_reactant_quantities[reagent]]<br>"
|
||||
else
|
||||
t += "<font color=red>Core suspension field offline</font> <a href='?src=\ref[src];startup=1'>\[Bring field online\]</a><br>"
|
||||
t += " <font color=blue>No reactants present.</font><br>"
|
||||
else
|
||||
t += "<b><font color=red>Core Generator unresponsive</font></b><br>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=core_monitor;size=500x400")
|
||||
user.machine = src
|
||||
t += "<font color=red>Core suspension field offline</font> <a href='?src=\ref[src];startup=1'>\[Bring field online\]</a><br>"
|
||||
else
|
||||
t += "<b><font color=red>Core Generator unresponsive</font></b><br>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=core_monitor;size=500x400")
|
||||
user.machine = src
|
||||
|
||||
@@ -68,21 +68,20 @@ var/const/max_assembly_amount = 300
|
||||
F.loc = src.loc
|
||||
return
|
||||
|
||||
proc
|
||||
interact(mob/user)
|
||||
/*if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=fuelcomp")
|
||||
return*/
|
||||
var/t = "<B>Reactor Fuel Rod Compressor / Assembler</B><BR>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
t += "<A href='?src=\ref[src];activate=1'><b>Activate Fuel Synthesis</b></A><BR> (fuel assemblies require no more than [max_assembly_amount] rods).<br>"
|
||||
t += "<hr>"
|
||||
t += "- New fuel assembly constituents:- <br>"
|
||||
for(var/reagent in new_assembly_quantities)
|
||||
t += " [reagent] rods: [new_assembly_quantities[reagent]] \[<A href='?src=\ref[src];reagent=1'>Modify</A>\]<br>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=fuelcomp;size=500x800")
|
||||
user.machine = src
|
||||
interact(mob/user)
|
||||
/*if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=fuelcomp")
|
||||
return*/
|
||||
var/t = "<B>Reactor Fuel Rod Compressor / Assembler</B><BR>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
t += "<A href='?src=\ref[src];activate=1'><b>Activate Fuel Synthesis</b></A><BR> (fuel assemblies require no more than [max_assembly_amount] rods).<br>"
|
||||
t += "<hr>"
|
||||
t += "- New fuel assembly constituents:- <br>"
|
||||
for(var/reagent in new_assembly_quantities)
|
||||
t += " [reagent] rods: [new_assembly_quantities[reagent]] \[<A href='?src=\ref[src];reagent=1'>Modify</A>\]<br>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=fuelcomp;size=500x800")
|
||||
user.machine = src
|
||||
|
||||
@@ -121,53 +121,52 @@
|
||||
..()
|
||||
src.updateDialog()
|
||||
|
||||
proc
|
||||
interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=fuel_monitor")
|
||||
return
|
||||
var/t = "<B>Reactor Core Fuel Control</B><BR>"
|
||||
var/cooling = 0
|
||||
for(var/stage in stage_status)
|
||||
if(stage_status[stage])
|
||||
t += "Fuel injection: <font color=blue>Active</font><br>"
|
||||
t += "<a href='?src=\ref[src];cooldown=1;'>Enter cooldown phase</a><br>"
|
||||
cooling = 1
|
||||
break
|
||||
if(!cooling)
|
||||
t += "Fuel injection: <font color=blue>Cooling</font><br>"
|
||||
t += "----<br>"
|
||||
//
|
||||
t += "Fuel depletion announcement: "
|
||||
t += "[announce_fueldepletion ? "<a href='?src=\ref[src];disable_fueldepletion=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_fueldepletion == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_fueldepletion=1'>Announce</a>"] "
|
||||
t += "[announce_fueldepletion == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_fueldepletion=1'>Broadcast</a>"]<br>"
|
||||
t += "Stage progression announcement: "
|
||||
t += "[announce_stageprogression ? "<a href='?src=\ref[src];disable_stageprogression=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_stageprogression == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_stageprogression=1'>Announce</a>"] "
|
||||
t += "[announce_stageprogression == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_stageprogression=1'>Broadcast</a>"] "
|
||||
t += "<hr>"
|
||||
t += "<table border=1><tr>"
|
||||
t += "<td><b>Injector Status</b></td>"
|
||||
t += "<td><b>Injection interval (sec)</b></td>"
|
||||
t += "<td><b>Assembly consumption per injection</b></td>"
|
||||
t += "<td><b>Fuel Assembly Port</b></td>"
|
||||
t += "<td><b>Assembly depletion percentage</b></td>"
|
||||
t += "</tr>"
|
||||
for(var/stage_name in fuel_injectors)
|
||||
var/list/cur_stage = fuel_injectors[stage_name]
|
||||
t += "<tr><td colspan=5><b>Fuel Injection Stage:</b> [stage_name]</font>, [stage_status[stage_name] ? "<font color=green>Active</font> <a href='?src=\ref[src];begincool=[stage_name]'>\[Enter cooldown\]</a>" : "Cooling <a href='?src=\ref[src];beginstage=[stage_name]'>\[Begin injection\]</a>"]</td></tr>"
|
||||
for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
|
||||
t += "<tr>"
|
||||
t += "<td>[Injector.on && Injector.remote_enabled ? "<font color=green>Operational</font>" : "<font color=red>Unresponsive</font>"]</td>"
|
||||
t += "<td>[Injector.rate/10] <a href='?src=\ref[Injector];cyclerate=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.fuel_usage*100]% <a href='?src=\ref[Injector];fuel_usage=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "<font color=green>Loaded</font>": "<font color=blue>Empty</font>"]" : "<font color=red>Disconnected</font>" ]</td>"
|
||||
t += "<td>[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[Injector.owned_assembly_port.cur_assembly.percent_depleted]%" : ""]</td>"
|
||||
t += "</tr>"
|
||||
t += "</table>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=fuel_monitor;size=500x600")
|
||||
user.machine = src
|
||||
interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=fuel_monitor")
|
||||
return
|
||||
var/t = "<B>Reactor Core Fuel Control</B><BR>"
|
||||
var/cooling = 0
|
||||
for(var/stage in stage_status)
|
||||
if(stage_status[stage])
|
||||
t += "Fuel injection: <font color=blue>Active</font><br>"
|
||||
t += "<a href='?src=\ref[src];cooldown=1;'>Enter cooldown phase</a><br>"
|
||||
cooling = 1
|
||||
break
|
||||
if(!cooling)
|
||||
t += "Fuel injection: <font color=blue>Cooling</font><br>"
|
||||
t += "----<br>"
|
||||
//
|
||||
t += "Fuel depletion announcement: "
|
||||
t += "[announce_fueldepletion ? "<a href='?src=\ref[src];disable_fueldepletion=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_fueldepletion == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_fueldepletion=1'>Announce</a>"] "
|
||||
t += "[announce_fueldepletion == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_fueldepletion=1'>Broadcast</a>"]<br>"
|
||||
t += "Stage progression announcement: "
|
||||
t += "[announce_stageprogression ? "<a href='?src=\ref[src];disable_stageprogression=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_stageprogression == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_stageprogression=1'>Announce</a>"] "
|
||||
t += "[announce_stageprogression == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_stageprogression=1'>Broadcast</a>"] "
|
||||
t += "<hr>"
|
||||
t += "<table border=1><tr>"
|
||||
t += "<td><b>Injector Status</b></td>"
|
||||
t += "<td><b>Injection interval (sec)</b></td>"
|
||||
t += "<td><b>Assembly consumption per injection</b></td>"
|
||||
t += "<td><b>Fuel Assembly Port</b></td>"
|
||||
t += "<td><b>Assembly depletion percentage</b></td>"
|
||||
t += "</tr>"
|
||||
for(var/stage_name in fuel_injectors)
|
||||
var/list/cur_stage = fuel_injectors[stage_name]
|
||||
t += "<tr><td colspan=5><b>Fuel Injection Stage:</b> [stage_name]</font>, [stage_status[stage_name] ? "<font color=green>Active</font> <a href='?src=\ref[src];begincool=[stage_name]'>\[Enter cooldown\]</a>" : "Cooling <a href='?src=\ref[src];beginstage=[stage_name]'>\[Begin injection\]</a>"]</td></tr>"
|
||||
for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
|
||||
t += "<tr>"
|
||||
t += "<td>[Injector.on && Injector.remote_enabled ? "<font color=green>Operational</font>" : "<font color=red>Unresponsive</font>"]</td>"
|
||||
t += "<td>[Injector.rate/10] <a href='?src=\ref[Injector];cyclerate=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.fuel_usage*100]% <a href='?src=\ref[Injector];fuel_usage=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "<font color=green>Loaded</font>": "<font color=blue>Empty</font>"]" : "<font color=red>Disconnected</font>" ]</td>"
|
||||
t += "<td>[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[Injector.owned_assembly_port.cur_assembly.percent_depleted]%" : ""]</td>"
|
||||
t += "</tr>"
|
||||
t += "</table>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=fuel_monitor;size=500x600")
|
||||
user.machine = src
|
||||
|
||||
@@ -97,59 +97,58 @@
|
||||
return*/
|
||||
interact(user)
|
||||
|
||||
proc
|
||||
interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=fuel_injector")
|
||||
return
|
||||
var/t = "<B>Reactor Core Fuel Injector</B><hr>"
|
||||
t += "<b>Stage:</b> <font color=blue>[stage]</font><br>"
|
||||
t += "<b>Status:</b> [injecting ? "<font color=green>Active</font> <a href='?src=\ref[src];end_injecting=1'>\[Disable\]</a>" : "<font color=blue>Standby</font> <a href='?src=\ref[src];begin_injecting=1'>\[Enable\]</a>"]<br>"
|
||||
t += "<b>Interval (sec):</b> <font color=blue>[rate/10]</font> <a href='?src=\ref[src];cyclerate=1'>\[Modify\]</a><br>"
|
||||
t += "<b>Fuel usage:</b> [fuel_usage*100]% <a href='?src=\ref[src];fuel_usage=1'>\[Modify\]</a><br>"
|
||||
/*
|
||||
var/t = "<B>Reactor Core Fuel Control</B><BR>"
|
||||
t += "Current fuel injection stage: [active_stage]<br>"
|
||||
if(active_stage == "Cooling")
|
||||
//t += "<a href='?src=\ref[src];restart=1;'>Restart injection cycle</a><br>"
|
||||
t += "----<br>"
|
||||
else
|
||||
t += "<a href='?src=\ref[src];cooldown=1;'>Enter cooldown phase</a><br>"
|
||||
t += "Fuel depletion announcement: "
|
||||
t += "[announce_fueldepletion ? "<a href='?src=\ref[src];disable_fueldepletion=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_fueldepletion == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_fueldepletion=1'>Announce</a>"] "
|
||||
t += "[announce_fueldepletion == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_fueldepletion=1'>Broadcast</a>"]<br>"
|
||||
t += "Stage progression announcement: "
|
||||
t += "[announce_stageprogression ? "<a href='?src=\ref[src];disable_stageprogression=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_stageprogression == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_stageprogression=1'>Announce</a>"] "
|
||||
t += "[announce_stageprogression == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_stageprogression=1'>Broadcast</a>"] "
|
||||
t += "<hr>"
|
||||
t += "<table border=1><tr>"
|
||||
t += "<td><b>Injector Status</b></td>"
|
||||
t += "<td><b>Injection interval (sec)</b></td>"
|
||||
t += "<td><b>Assembly consumption per injection</b></td>"
|
||||
t += "<td><b>Fuel Assembly Port</b></td>"
|
||||
t += "<td><b>Assembly depletion percentage</b></td>"
|
||||
t += "</tr>"
|
||||
for(var/stage in fuel_injectors)
|
||||
var/list/cur_stage = fuel_injectors[stage]
|
||||
t += "<tr><td colspan=5><b>Fuel Injection Stage:</b> <font color=blue>[stage]</font> [active_stage == stage ? "<font color=green> (Currently active)</font>" : "<a href='?src=\ref[src];beginstage=[stage]'>Activate</a>"]</td></tr>"
|
||||
for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
|
||||
t += "<tr>"
|
||||
t += "<td>[Injector.on && Injector.remote_enabled ? "<font color=green>Operational</font>" : "<font color=red>Unresponsive</font>"]</td>"
|
||||
t += "<td>[Injector.rate/10] <a href='?src=\ref[Injector];cyclerate=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.fuel_usage*100]% <a href='?src=\ref[Injector];fuel_usage=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "<font color=green>Loaded</font>": "<font color=blue>Empty</font>"]" : "<font color=red>Disconnected</font>" ]</td>"
|
||||
t += "<td>[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[100 - Injector.owned_assembly_port.cur_assembly.amount_depleted*100]%" : ""]</td>"
|
||||
t += "</tr>"
|
||||
t += "</table>"
|
||||
*/
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=fuel_injector;size=500x800")
|
||||
user.machine = src
|
||||
interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=fuel_injector")
|
||||
return
|
||||
var/t = "<B>Reactor Core Fuel Injector</B><hr>"
|
||||
t += "<b>Stage:</b> <font color=blue>[stage]</font><br>"
|
||||
t += "<b>Status:</b> [injecting ? "<font color=green>Active</font> <a href='?src=\ref[src];end_injecting=1'>\[Disable\]</a>" : "<font color=blue>Standby</font> <a href='?src=\ref[src];begin_injecting=1'>\[Enable\]</a>"]<br>"
|
||||
t += "<b>Interval (sec):</b> <font color=blue>[rate/10]</font> <a href='?src=\ref[src];cyclerate=1'>\[Modify\]</a><br>"
|
||||
t += "<b>Fuel usage:</b> [fuel_usage*100]% <a href='?src=\ref[src];fuel_usage=1'>\[Modify\]</a><br>"
|
||||
/*
|
||||
var/t = "<B>Reactor Core Fuel Control</B><BR>"
|
||||
t += "Current fuel injection stage: [active_stage]<br>"
|
||||
if(active_stage == "Cooling")
|
||||
//t += "<a href='?src=\ref[src];restart=1;'>Restart injection cycle</a><br>"
|
||||
t += "----<br>"
|
||||
else
|
||||
t += "<a href='?src=\ref[src];cooldown=1;'>Enter cooldown phase</a><br>"
|
||||
t += "Fuel depletion announcement: "
|
||||
t += "[announce_fueldepletion ? "<a href='?src=\ref[src];disable_fueldepletion=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_fueldepletion == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_fueldepletion=1'>Announce</a>"] "
|
||||
t += "[announce_fueldepletion == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_fueldepletion=1'>Broadcast</a>"]<br>"
|
||||
t += "Stage progression announcement: "
|
||||
t += "[announce_stageprogression ? "<a href='?src=\ref[src];disable_stageprogression=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_stageprogression == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_stageprogression=1'>Announce</a>"] "
|
||||
t += "[announce_stageprogression == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_stageprogression=1'>Broadcast</a>"] "
|
||||
t += "<hr>"
|
||||
t += "<table border=1><tr>"
|
||||
t += "<td><b>Injector Status</b></td>"
|
||||
t += "<td><b>Injection interval (sec)</b></td>"
|
||||
t += "<td><b>Assembly consumption per injection</b></td>"
|
||||
t += "<td><b>Fuel Assembly Port</b></td>"
|
||||
t += "<td><b>Assembly depletion percentage</b></td>"
|
||||
t += "</tr>"
|
||||
for(var/stage in fuel_injectors)
|
||||
var/list/cur_stage = fuel_injectors[stage]
|
||||
t += "<tr><td colspan=5><b>Fuel Injection Stage:</b> <font color=blue>[stage]</font> [active_stage == stage ? "<font color=green> (Currently active)</font>" : "<a href='?src=\ref[src];beginstage=[stage]'>Activate</a>"]</td></tr>"
|
||||
for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
|
||||
t += "<tr>"
|
||||
t += "<td>[Injector.on && Injector.remote_enabled ? "<font color=green>Operational</font>" : "<font color=red>Unresponsive</font>"]</td>"
|
||||
t += "<td>[Injector.rate/10] <a href='?src=\ref[Injector];cyclerate=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.fuel_usage*100]% <a href='?src=\ref[Injector];fuel_usage=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "<font color=green>Loaded</font>": "<font color=blue>Empty</font>"]" : "<font color=red>Disconnected</font>" ]</td>"
|
||||
t += "<td>[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[100 - Injector.owned_assembly_port.cur_assembly.amount_depleted*100]%" : ""]</td>"
|
||||
t += "</tr>"
|
||||
t += "</table>"
|
||||
*/
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=fuel_injector;size=500x800")
|
||||
user.machine = src
|
||||
|
||||
proc/BeginInjecting()
|
||||
if(!injecting && owned_assembly_port && owned_assembly_port.cur_assembly)
|
||||
|
||||
@@ -163,36 +163,26 @@
|
||||
pixel_x = -pixel_x
|
||||
pixel_y = -pixel_y
|
||||
|
||||
attack_ai(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
/*if(stat & (BROKEN|NOPOWER))
|
||||
return*/
|
||||
interact(user)
|
||||
|
||||
proc
|
||||
interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=gyro_monitor")
|
||||
return
|
||||
var/t = "<B>Free electron MASER (Gyrotron) Control Panel</B><BR>"
|
||||
if(owned_gyrotron && owned_gyrotron.on)
|
||||
t += "<font color=green>Gyrotron operational</font><br>"
|
||||
t += "Operational mode: <font color=blue>"
|
||||
if(owned_gyrotron.emitting)
|
||||
t += "Emitting</font> <a href='?src=\ref[owned_gyrotron];deactivate=1'>\[Deactivate\]</a><br>"
|
||||
else
|
||||
t += "Not emitting</font> <a href='?src=\ref[owned_gyrotron];activate=1'>\[Activate\]</a><br>"
|
||||
t += "Emission rate: [owned_gyrotron.rate] <a href='?src=\ref[owned_gyrotron];modifyrate=1'>\[Modify\]</a><br>"
|
||||
t += "Beam frequency: [owned_gyrotron.frequency] <a href='?src=\ref[owned_gyrotron];modifyfreq=1'>\[Modify\]</a><br>"
|
||||
t += "Beam power: [owned_gyrotron.mega_energy] <a href='?src=\ref[owned_gyrotron];modifypower=1'>\[Modify\]</a><br>"
|
||||
interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=gyro_monitor")
|
||||
return
|
||||
var/t = "<B>Free electron MASER (Gyrotron) Control Panel</B><BR>"
|
||||
if(owned_gyrotron && owned_gyrotron.on)
|
||||
t += "<font color=green>Gyrotron operational</font><br>"
|
||||
t += "Operational mode: <font color=blue>"
|
||||
if(owned_gyrotron.emitting)
|
||||
t += "Emitting</font> <a href='?src=\ref[owned_gyrotron];deactivate=1'>\[Deactivate\]</a><br>"
|
||||
else
|
||||
t += "<b><font color=red>Gyrotron unresponsive</font></b>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=gyro_monitor;size=500x800")
|
||||
user.machine = src
|
||||
t += "Not emitting</font> <a href='?src=\ref[owned_gyrotron];activate=1'>\[Activate\]</a><br>"
|
||||
t += "Emission rate: [owned_gyrotron.rate] <a href='?src=\ref[owned_gyrotron];modifyrate=1'>\[Modify\]</a><br>"
|
||||
t += "Beam frequency: [owned_gyrotron.frequency] <a href='?src=\ref[owned_gyrotron];modifyfreq=1'>\[Modify\]</a><br>"
|
||||
t += "Beam power: [owned_gyrotron.mega_energy] <a href='?src=\ref[owned_gyrotron];modifypower=1'>\[Modify\]</a><br>"
|
||||
else
|
||||
t += "<b><font color=red>Gyrotron unresponsive</font></b>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=gyro_monitor;size=500x800")
|
||||
user.machine = src
|
||||
|
||||
@@ -7,20 +7,6 @@
|
||||
New()
|
||||
..()
|
||||
|
||||
attack_ai(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
/*if(stat & (BROKEN|NOPOWER))
|
||||
return*/
|
||||
interact(user)
|
||||
|
||||
/*updateDialog()
|
||||
for(var/mob/M in range(1))
|
||||
if(M.machine == src)
|
||||
interact(m)*/
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if( href_list["close"] )
|
||||
@@ -37,66 +23,65 @@
|
||||
if(updating)
|
||||
src.updateDialog()
|
||||
|
||||
proc
|
||||
interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=gyrotron_controller")
|
||||
return
|
||||
var/t = "<B>Gyrotron Remote Control Console</B><BR>"
|
||||
t += "<hr>"
|
||||
for(var/obj/machinery/rust/gyrotron/gyro in world)
|
||||
if(gyro.remoteenabled && gyro.on)
|
||||
t += "<font color=green>Gyrotron operational</font><br>"
|
||||
t += "Operational mode: <font color=blue>"
|
||||
if(gyro.emitting)
|
||||
t += "Emitting</font> <a href='?src=\ref[gyro];deactivate=1'>\[Deactivate\]</a><br>"
|
||||
else
|
||||
t += "Not emitting</font> <a href='?src=\ref[gyro];activate=1'>\[Activate\]</a><br>"
|
||||
t += "Emission rate: [gyro.rate] <a href='?src=\ref[gyro];modifyrate=1'>\[Modify\]</a><br>"
|
||||
t += "Beam frequency: [gyro.frequency] <a href='?src=\ref[gyro];modifyfreq=1'>\[Modify\]</a><br>"
|
||||
t += "Beam power: [gyro.mega_energy] <a href='?src=\ref[gyro];modifypower=1'>\[Modify\]</a><br>"
|
||||
interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=gyrotron_controller")
|
||||
return
|
||||
var/t = "<B>Gyrotron Remote Control Console</B><BR>"
|
||||
t += "<hr>"
|
||||
for(var/obj/machinery/rust/gyrotron/gyro in world)
|
||||
if(gyro.remoteenabled && gyro.on)
|
||||
t += "<font color=green>Gyrotron operational</font><br>"
|
||||
t += "Operational mode: <font color=blue>"
|
||||
if(gyro.emitting)
|
||||
t += "Emitting</font> <a href='?src=\ref[gyro];deactivate=1'>\[Deactivate\]</a><br>"
|
||||
else
|
||||
t += "<b><font color=red>Gyrotron unresponsive</font></b>"
|
||||
t += "<hr>"
|
||||
/*
|
||||
var/t = "<B>Reactor Core Fuel Control</B><BR>"
|
||||
t += "Current fuel injection stage: [active_stage]<br>"
|
||||
if(active_stage == "Cooling")
|
||||
//t += "<a href='?src=\ref[src];restart=1;'>Restart injection cycle</a><br>"
|
||||
t += "----<br>"
|
||||
t += "Not emitting</font> <a href='?src=\ref[gyro];activate=1'>\[Activate\]</a><br>"
|
||||
t += "Emission rate: [gyro.rate] <a href='?src=\ref[gyro];modifyrate=1'>\[Modify\]</a><br>"
|
||||
t += "Beam frequency: [gyro.frequency] <a href='?src=\ref[gyro];modifyfreq=1'>\[Modify\]</a><br>"
|
||||
t += "Beam power: [gyro.mega_energy] <a href='?src=\ref[gyro];modifypower=1'>\[Modify\]</a><br>"
|
||||
else
|
||||
t += "<a href='?src=\ref[src];cooldown=1;'>Enter cooldown phase</a><br>"
|
||||
t += "Fuel depletion announcement: "
|
||||
t += "[announce_fueldepletion ? "<a href='?src=\ref[src];disable_fueldepletion=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_fueldepletion == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_fueldepletion=1'>Announce</a>"] "
|
||||
t += "[announce_fueldepletion == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_fueldepletion=1'>Broadcast</a>"]<br>"
|
||||
t += "Stage progression announcement: "
|
||||
t += "[announce_stageprogression ? "<a href='?src=\ref[src];disable_stageprogression=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_stageprogression == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_stageprogression=1'>Announce</a>"] "
|
||||
t += "[announce_stageprogression == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_stageprogression=1'>Broadcast</a>"] "
|
||||
t += "<b><font color=red>Gyrotron unresponsive</font></b>"
|
||||
t += "<hr>"
|
||||
t += "<table border=1><tr>"
|
||||
t += "<td><b>Injector Status</b></td>"
|
||||
t += "<td><b>Injection interval (sec)</b></td>"
|
||||
t += "<td><b>Assembly consumption per injection</b></td>"
|
||||
t += "<td><b>Fuel Assembly Port</b></td>"
|
||||
t += "<td><b>Assembly depletion percentage</b></td>"
|
||||
t += "</tr>"
|
||||
for(var/stage in fuel_injectors)
|
||||
var/list/cur_stage = fuel_injectors[stage]
|
||||
t += "<tr><td colspan=5><b>Fuel Injection Stage:</b> <font color=blue>[stage]</font> [active_stage == stage ? "<font color=green> (Currently active)</font>" : "<a href='?src=\ref[src];beginstage=[stage]'>Activate</a>"]</td></tr>"
|
||||
for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
|
||||
t += "<tr>"
|
||||
t += "<td>[Injector.on && Injector.remote_enabled ? "<font color=green>Operational</font>" : "<font color=red>Unresponsive</font>"]</td>"
|
||||
t += "<td>[Injector.rate/10] <a href='?src=\ref[Injector];cyclerate=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.fuel_usage*100]% <a href='?src=\ref[Injector];fuel_usage=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "<font color=green>Loaded</font>": "<font color=blue>Empty</font>"]" : "<font color=red>Disconnected</font>" ]</td>"
|
||||
t += "<td>[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[Injector.owned_assembly_port.cur_assembly.amount_depleted*100]%" : ""]</td>"
|
||||
t += "</tr>"
|
||||
t += "</table>"
|
||||
*/
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=gyrotron_controller;size=500x400")
|
||||
user.machine = src
|
||||
/*
|
||||
var/t = "<B>Reactor Core Fuel Control</B><BR>"
|
||||
t += "Current fuel injection stage: [active_stage]<br>"
|
||||
if(active_stage == "Cooling")
|
||||
//t += "<a href='?src=\ref[src];restart=1;'>Restart injection cycle</a><br>"
|
||||
t += "----<br>"
|
||||
else
|
||||
t += "<a href='?src=\ref[src];cooldown=1;'>Enter cooldown phase</a><br>"
|
||||
t += "Fuel depletion announcement: "
|
||||
t += "[announce_fueldepletion ? "<a href='?src=\ref[src];disable_fueldepletion=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_fueldepletion == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_fueldepletion=1'>Announce</a>"] "
|
||||
t += "[announce_fueldepletion == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_fueldepletion=1'>Broadcast</a>"]<br>"
|
||||
t += "Stage progression announcement: "
|
||||
t += "[announce_stageprogression ? "<a href='?src=\ref[src];disable_stageprogression=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_stageprogression == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_stageprogression=1'>Announce</a>"] "
|
||||
t += "[announce_stageprogression == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_stageprogression=1'>Broadcast</a>"] "
|
||||
t += "<hr>"
|
||||
t += "<table border=1><tr>"
|
||||
t += "<td><b>Injector Status</b></td>"
|
||||
t += "<td><b>Injection interval (sec)</b></td>"
|
||||
t += "<td><b>Assembly consumption per injection</b></td>"
|
||||
t += "<td><b>Fuel Assembly Port</b></td>"
|
||||
t += "<td><b>Assembly depletion percentage</b></td>"
|
||||
t += "</tr>"
|
||||
for(var/stage in fuel_injectors)
|
||||
var/list/cur_stage = fuel_injectors[stage]
|
||||
t += "<tr><td colspan=5><b>Fuel Injection Stage:</b> <font color=blue>[stage]</font> [active_stage == stage ? "<font color=green> (Currently active)</font>" : "<a href='?src=\ref[src];beginstage=[stage]'>Activate</a>"]</td></tr>"
|
||||
for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
|
||||
t += "<tr>"
|
||||
t += "<td>[Injector.on && Injector.remote_enabled ? "<font color=green>Operational</font>" : "<font color=red>Unresponsive</font>"]</td>"
|
||||
t += "<td>[Injector.rate/10] <a href='?src=\ref[Injector];cyclerate=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.fuel_usage*100]% <a href='?src=\ref[Injector];fuel_usage=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "<font color=green>Loaded</font>": "<font color=blue>Empty</font>"]" : "<font color=red>Disconnected</font>" ]</td>"
|
||||
t += "<td>[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[Injector.owned_assembly_port.cur_assembly.amount_depleted*100]%" : ""]</td>"
|
||||
t += "</tr>"
|
||||
t += "</table>"
|
||||
*/
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=gyrotron_controller;size=500x400")
|
||||
user.machine = src
|
||||
|
||||
@@ -14,36 +14,26 @@
|
||||
if(las.id == src.id)
|
||||
lasers += las
|
||||
|
||||
attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
interact(user)
|
||||
|
||||
attack_ai(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
process()
|
||||
..()
|
||||
updateDialog()
|
||||
|
||||
proc
|
||||
interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=laser_control")
|
||||
return
|
||||
var/t = "<TT><B>Laser status monitor</B><HR>"
|
||||
for(var/obj/machinery/zero_point_emitter/laser in lasers)
|
||||
t += "Zero Point Laser<br>"
|
||||
t += "Power level: <A href = '?src=\ref[laser];input=-0.005'>-</A> <A href = '?src=\ref[laser];input=-0.001'>-</A> <A href = '?src=\ref[laser];input=-0.0005'>-</A> <A href = '?src=\ref[laser];input=-0.0001'>-</A> [laser.energy]MeV <A href = '?src=\ref[laser];input=0.0001'>+</A> <A href = '?src=\ref[laser];input=0.0005'>+</A> <A href = '?src=\ref[laser];input=0.001'>+</A> <A href = '?src=\ref[laser];input=0.005'>+</A><BR>"
|
||||
t += "Frequency: <A href = '?src=\ref[laser];freq=-10000'>-</A> <A href = '?src=\ref[laser];freq=-1000'>-</A> [laser.freq] <A href = '?src=\ref[laser];freq=1000'>+</A> <A href = '?src=\ref[laser];freq=10000'>+</A><BR>"
|
||||
t += "Output: [laser.active ? "<B>Online</B> <A href = '?src=\ref[laser];online=1'>Offline</A>" : "<A href = '?src=\ref[laser];online=1'>Online</A> <B>Offline</B> "]<BR>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=laser_control;size=500x800")
|
||||
user.machine = src
|
||||
interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=laser_control")
|
||||
return
|
||||
var/t = "<TT><B>Laser status monitor</B><HR>"
|
||||
for(var/obj/machinery/zero_point_emitter/laser in lasers)
|
||||
t += "Zero Point Laser<br>"
|
||||
t += "Power level: <A href = '?src=\ref[laser];input=-0.005'>-</A> <A href = '?src=\ref[laser];input=-0.001'>-</A> <A href = '?src=\ref[laser];input=-0.0005'>-</A> <A href = '?src=\ref[laser];input=-0.0001'>-</A> [laser.energy]MeV <A href = '?src=\ref[laser];input=0.0001'>+</A> <A href = '?src=\ref[laser];input=0.0005'>+</A> <A href = '?src=\ref[laser];input=0.001'>+</A> <A href = '?src=\ref[laser];input=0.005'>+</A><BR>"
|
||||
t += "Frequency: <A href = '?src=\ref[laser];freq=-10000'>-</A> <A href = '?src=\ref[laser];freq=-1000'>-</A> [laser.freq] <A href = '?src=\ref[laser];freq=1000'>+</A> <A href = '?src=\ref[laser];freq=10000'>+</A><BR>"
|
||||
t += "Output: [laser.active ? "<B>Online</B> <A href = '?src=\ref[laser];online=1'>Offline</A>" : "<A href = '?src=\ref[laser];online=1'>Online</A> <B>Offline</B> "]<BR>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=laser_control;size=500x800")
|
||||
user.machine = src
|
||||
|
||||
/*
|
||||
/obj/machinery/computer/lasercon/proc/interact(mob/user)
|
||||
|
||||
@@ -119,10 +119,6 @@
|
||||
if(M == user) continue
|
||||
M.show_message("\red The [src.name] has been hit with the [W.name] by [user.name]!")
|
||||
|
||||
/obj/machinery/shield_capacitor/attack_hand(mob/user as mob)
|
||||
interact(user)
|
||||
src.add_fingerprint(user)
|
||||
|
||||
/obj/machinery/shield_capacitor/Topic(href, href_list[])
|
||||
..()
|
||||
if( href_list["close"] )
|
||||
@@ -144,7 +140,7 @@
|
||||
//
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/shield_capacitor/proc/interact(mob/user)
|
||||
/obj/machinery/shield_capacitor/interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
|
||||
@@ -148,11 +148,6 @@
|
||||
//
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/shield_gen/attack_hand(mob/user as mob)
|
||||
|
||||
interact(user)
|
||||
src.add_fingerprint(user)
|
||||
|
||||
/obj/machinery/shield_gen/attackby(obj/item/W, mob/user)
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
|
||||
@@ -241,7 +236,7 @@
|
||||
//
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/shield_gen/proc/interact(mob/user)
|
||||
/obj/machinery/shield_gen/interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
|
||||
@@ -31,7 +31,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
if(!uplink_data)
|
||||
uplink_data = ticker.mode.uplink_items
|
||||
|
||||
items = dd_replacetext(uplink_data, "\n", "") // Getting the text string of items
|
||||
items = replacetext(uplink_data, "\n", "") // Getting the text string of items
|
||||
ItemList = dd_text2list(src.items, ";") // Parsing the items text string
|
||||
uses = ticker.mode.uplink_uses
|
||||
|
||||
|
||||
@@ -149,13 +149,13 @@
|
||||
if(objholder in removed_paths)
|
||||
alert("That path is not allowed.")
|
||||
objholder = "/obj/structure/closet"
|
||||
else if (dd_hasprefix(objholder, "/mob") && !(usr.client.holder.rank in list("Game Master", "Game Admin", "Badmin")))
|
||||
else if (dd_hasprefix(objholder, "/mob") && !check_rights(R_DEBUG,0))
|
||||
objholder = "/obj/structure/closet"
|
||||
if(3)
|
||||
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine")
|
||||
|
||||
master.buildmode.varholder = input(usr,"Enter variable name:" ,"Name", "name")
|
||||
if(master.buildmode.varholder in locked && !(usr.client.holder.rank in list("Game Master", "Game Admin")))
|
||||
if(master.buildmode.varholder in locked && !check_rights(R_DEBUG,0))
|
||||
return
|
||||
var/thetype = input(usr,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference")
|
||||
if(!thetype) return
|
||||
@@ -186,28 +186,28 @@
|
||||
if(istype(object,/turf) && pa.Find("left") && !pa.Find("alt") && !pa.Find("ctrl") )
|
||||
if(istype(object,/turf/space))
|
||||
var/turf/T = object
|
||||
T.ReplaceWithFloor()
|
||||
T.ChangeTurf(/turf/simulated/floor)
|
||||
return
|
||||
else if(istype(object,/turf/simulated/floor))
|
||||
var/turf/T = object
|
||||
T.ReplaceWithWall()
|
||||
T.ChangeTurf(/turf/simulated/wall)
|
||||
return
|
||||
else if(istype(object,/turf/simulated/wall))
|
||||
var/turf/T = object
|
||||
T.ReplaceWithRWall()
|
||||
T.ChangeTurf(/turf/simulated/wall/r_wall)
|
||||
return
|
||||
else if(pa.Find("right"))
|
||||
if(istype(object,/turf/simulated/wall))
|
||||
var/turf/T = object
|
||||
T.ReplaceWithFloor()
|
||||
T.ChangeTurf(/turf/simulated/floor)
|
||||
return
|
||||
else if(istype(object,/turf/simulated/floor))
|
||||
var/turf/T = object
|
||||
T.ReplaceWithSpace()
|
||||
T.ChangeTurf(/turf/space)
|
||||
return
|
||||
else if(istype(object,/turf/simulated/wall/r_wall))
|
||||
var/turf/T = object
|
||||
T.ReplaceWithWall()
|
||||
T.ChangeTurf(/turf/simulated/wall)
|
||||
return
|
||||
else if(istype(object,/obj))
|
||||
del(object)
|
||||
@@ -235,7 +235,6 @@
|
||||
if(pa.Find("left"))
|
||||
var/obj/A = new holder.buildmode.objholder (get_turf(object))
|
||||
A.dir = holder.builddir.dir
|
||||
blink(A)
|
||||
else if(pa.Find("right"))
|
||||
if(isobj(object)) del(object)
|
||||
|
||||
@@ -244,14 +243,12 @@
|
||||
if(object.vars.Find(holder.buildmode.varholder))
|
||||
log_admin("[key_name(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]")
|
||||
object.vars[holder.buildmode.varholder] = holder.buildmode.valueholder
|
||||
blink(object)
|
||||
else
|
||||
usr << "\red [initial(object.name)] does not have a var called '[holder.buildmode.varholder]'"
|
||||
if(pa.Find("right"))
|
||||
if(object.vars.Find(holder.buildmode.varholder))
|
||||
log_admin("[key_name(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]")
|
||||
object.vars[holder.buildmode.varholder] = initial(object.vars[holder.buildmode.varholder])
|
||||
blink(object)
|
||||
else
|
||||
usr << "\red [initial(object.name)] does not have a var called '[holder.buildmode.varholder]'"
|
||||
|
||||
@@ -262,8 +259,3 @@
|
||||
if(holder.throw_atom)
|
||||
holder.throw_atom.throw_at(object, 10, 1)
|
||||
|
||||
/proc/blink(atom/A)
|
||||
A.icon += rgb(0,75,75)
|
||||
spawn(5)
|
||||
if(A)
|
||||
A.icon = initial(A.icon)
|
||||
|
||||
@@ -281,7 +281,7 @@ pl_control
|
||||
var/txt = vars["[V]_RANDOM"]
|
||||
if(findtextEx(txt,"PROB"))
|
||||
txt = text2list(txt,"/")
|
||||
txt[1] = dd_replacetext(txt[1],"PROB","")
|
||||
txt[1] = replacetext(txt[1],"PROB","")
|
||||
var/p = text2num(txt[1])
|
||||
var/r = txt[2]
|
||||
if(prob(p))
|
||||
@@ -289,7 +289,7 @@ pl_control
|
||||
else
|
||||
newvalue = vars[V]
|
||||
else if(findtextEx(txt,"PICK"))
|
||||
txt = dd_replacetext(txt,"PICK","")
|
||||
txt = replacetext(txt,"PICK","")
|
||||
txt = text2list(txt,",")
|
||||
newvalue = pick(txt)
|
||||
else
|
||||
|
||||
@@ -20,7 +20,6 @@ var/global/list/landmarks_list = list() //list of all landmarks created
|
||||
//////////////////////////
|
||||
/////Initial Building/////
|
||||
//////////////////////////
|
||||
//Realistically, these should never be run, but ideally, they should only be run once at round-start
|
||||
|
||||
/proc/make_datum_references_lists()
|
||||
var/list/paths
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
// Run all strings to be used in an SQL query through this proc first to properly escape out injection attempts.
|
||||
/proc/sanitizeSQL(var/t as text)
|
||||
var/sanitized_text = dd_replacetext(t, "'", "\\'")
|
||||
sanitized_text = dd_replacetext(sanitized_text, "\"", "\\\"")
|
||||
var/sanitized_text = replacetext(t, "'", "\\'")
|
||||
sanitized_text = replacetext(sanitized_text, "\"", "\\\"")
|
||||
return sanitized_text
|
||||
|
||||
/*
|
||||
@@ -177,18 +177,33 @@
|
||||
/*
|
||||
* Text modification
|
||||
*/
|
||||
/proc/replacetext(text, find, replacement)
|
||||
var/find_len = length(find)
|
||||
if(find_len < 1) return text
|
||||
. = ""
|
||||
var/last_found = 1
|
||||
while(1)
|
||||
var/found = findtext(text, find, last_found, 0)
|
||||
. += copytext(text, last_found, found)
|
||||
if(found)
|
||||
. += replacement
|
||||
last_found = found + find_len
|
||||
continue
|
||||
return .
|
||||
|
||||
//Search and replace a sub-string within a string
|
||||
/proc/dd_replacetext(text, search_string, replacement_string)
|
||||
if(!text || !istext(text) || !search_string || !istext(search_string) || !istext(replacement_string))
|
||||
return null
|
||||
var/textList = text2list(text, search_string)
|
||||
return dd_list2text(textList, replacement_string)
|
||||
|
||||
//Search and replace a case sensitive sub-string within a string
|
||||
/proc/dd_replacetext_case(text, search_string, replacement_string)
|
||||
var/textList = text2list(text, search_string)
|
||||
return dd_list2text(textList, replacement_string)
|
||||
/proc/replacetextEx(text, find, replacement)
|
||||
var/find_len = length(find)
|
||||
if(find_len < 1) return text
|
||||
. = ""
|
||||
var/last_found = 1
|
||||
while(1)
|
||||
var/found = findtextEx(text, find, last_found, 0)
|
||||
. += copytext(text, last_found, found)
|
||||
if(found)
|
||||
. += replacement
|
||||
last_found = found + find_len
|
||||
continue
|
||||
return .
|
||||
|
||||
//Adds 'u' number of zeros ahead of the text 't'
|
||||
/proc/add_zero(t, u)
|
||||
|
||||
@@ -129,6 +129,8 @@ proc/tg_list2text(list/list, glue=",")
|
||||
|
||||
if(last_i <= text_len)
|
||||
. += copytext(text, last_i, 0)
|
||||
else
|
||||
. += text
|
||||
return .
|
||||
|
||||
//Converts a text string into a list by splitting the string at each seperator found in text (discarding the seperator)
|
||||
@@ -141,7 +143,7 @@ proc/tg_list2text(list/list, glue=",")
|
||||
var/text_len = length(text) //length of the input text
|
||||
var/seperator_len = length(seperator) //length of the seperator text
|
||||
|
||||
if(text_len > seperator_len)
|
||||
if(text_len >= seperator_len)
|
||||
var/i
|
||||
var/last_i = 1
|
||||
|
||||
@@ -153,6 +155,8 @@ proc/tg_list2text(list/list, glue=",")
|
||||
|
||||
if(last_i <= text_len)
|
||||
. += copytext(text, last_i, 0)
|
||||
else
|
||||
. += text
|
||||
return .
|
||||
|
||||
//Splits the text of a file at seperator and returns them in a list.
|
||||
@@ -208,14 +212,45 @@ proc/tg_list2text(list/list, glue=",")
|
||||
/proc/angle2dir(var/degree)
|
||||
degree = ((degree+22.5)%365)
|
||||
if(degree < 45) return NORTH
|
||||
if(degree < 90) return NORTH|EAST
|
||||
if(degree < 90) return NORTHEAST
|
||||
if(degree < 135) return EAST
|
||||
if(degree < 180) return SOUTH|EAST
|
||||
if(degree < 180) return SOUTHEAST
|
||||
if(degree < 225) return SOUTH
|
||||
if(degree < 270) return SOUTH|WEST
|
||||
if(degree < 270) return SOUTHWEST
|
||||
if(degree < 315) return WEST
|
||||
return NORTH|WEST
|
||||
|
||||
//returns the north-zero clockwise angle in degrees, given a direction
|
||||
|
||||
/proc/dir2angle(var/D)
|
||||
switch(D)
|
||||
if(NORTH) return 0
|
||||
if(SOUTH) return 180
|
||||
if(EAST) return 90
|
||||
if(WEST) return 270
|
||||
if(NORTHEAST) return 45
|
||||
if(SOUTHEAST) return 135
|
||||
if(NORTHWEST) return 315
|
||||
if(SOUTHWEST) return 225
|
||||
else return null
|
||||
|
||||
//Returns the angle in english
|
||||
/proc/angle2text(var/degree)
|
||||
return dir2text(angle2dir(degree))
|
||||
|
||||
//Converts a rights bitfield into a string
|
||||
/proc/rights2text(rights)
|
||||
if(rights & R_BUILDMODE) . += "+BUILDMODE"
|
||||
if(rights & R_ADMIN) . += "+ADMIN"
|
||||
if(rights & R_BAN) . += "+BAN"
|
||||
if(rights & R_FUN) . += "+FUN"
|
||||
if(rights & R_SERVER) . += "+SERVER"
|
||||
if(rights & R_DEBUG) . += "+DEBUG"
|
||||
if(rights & R_POSSESS) . += "+POSSESS"
|
||||
if(rights & R_PERMISSIONS) . += "+PERMISSIONS"
|
||||
if(rights & R_STEALTH) . += "+STEALTH"
|
||||
if(rights & R_REJUVINATE) . += "+REJUVINATE"
|
||||
if(rights & R_VAREDIT) . += "+VAREDIT"
|
||||
if(rights & R_SOUNDS) . += "+SOUND"
|
||||
if(rights & R_SPAWN) . += "+SPAWN"
|
||||
return .
|
||||
|
||||
@@ -945,7 +945,7 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
|
||||
corner.density = 1
|
||||
corner.anchored = 1
|
||||
corner.icon = X.icon
|
||||
corner.icon_state = dd_replacetext(X.icon_state, "_s", "_f")
|
||||
corner.icon_state = replacetext(X.icon_state, "_s", "_f")
|
||||
corner.tag = "delete me"
|
||||
corner.name = "wall"
|
||||
|
||||
@@ -965,7 +965,7 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
|
||||
// Reset the shuttle corners
|
||||
if(O.tag == "delete me")
|
||||
X.icon = 'icons/turf/shuttle.dmi'
|
||||
X.icon_state = dd_replacetext(O.icon_state, "_f", "_s") // revert the turf to the old icon_state
|
||||
X.icon_state = replacetext(O.icon_state, "_f", "_s") // revert the turf to the old icon_state
|
||||
X.name = "wall"
|
||||
del(O) // prevents multiple shuttle corners from stacking
|
||||
continue
|
||||
@@ -995,7 +995,7 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
|
||||
fromupdate += ttl
|
||||
|
||||
else
|
||||
T.ReplaceWithSpace()
|
||||
T.ChangeTurf(/turf/space)
|
||||
|
||||
refined_src -= T
|
||||
refined_trg -= B
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
var/log_pda = 0 // log pda messages
|
||||
var/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits
|
||||
var/sql_enabled = 1 // for sql switching
|
||||
var/allow_admin_ooccolor = 0 // Allows admins with relevant permissions to have their own ooc colour
|
||||
var/allow_vote_restart = 0 // allow votes to restart
|
||||
var/allow_vote_mode = 0 // allow votes to change mode
|
||||
var/allow_admin_jump = 1 // allows admin jumping
|
||||
@@ -102,7 +103,11 @@
|
||||
var/metroid_delay = 0
|
||||
var/animal_delay = 0
|
||||
|
||||
var/admin_legacy_system = 0 //Defines whether the server uses the legacy admin system with admins.txt or the SQL system.
|
||||
var/admin_legacy_system = 0 //Defines whether the server uses the legacy admin system with admins.txt or the SQL system. Config option in config.txt
|
||||
var/ban_legacy_system = 0 //Defines whether the server uses the legacy banning system with the files in /data or the SQL system. Config option in config.txt
|
||||
|
||||
var/assistant_maint = 0 //Do assistants get maint access?
|
||||
var/gateway_delay = 18000 //How long the gateway takes before it activates. Default is half an hour.
|
||||
|
||||
/datum/configuration/New()
|
||||
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
|
||||
@@ -152,6 +157,9 @@
|
||||
if ("admin_legacy_system")
|
||||
config.admin_legacy_system = 1
|
||||
|
||||
if ("ban_legacy_system")
|
||||
config.ban_legacy_system = 1
|
||||
|
||||
if ("log_ooc")
|
||||
config.log_ooc = 1
|
||||
|
||||
@@ -194,6 +202,9 @@
|
||||
if ("log_hrefs")
|
||||
config.log_hrefs = 1
|
||||
|
||||
if("allow_admin_ooccolor")
|
||||
config.allow_admin_ooccolor = 1
|
||||
|
||||
if ("allow_vote_restart")
|
||||
config.allow_vote_restart = 1
|
||||
|
||||
@@ -354,6 +365,12 @@
|
||||
limitalienplayers = 1
|
||||
alien_to_human_ratio = text2num(value)
|
||||
|
||||
if("assistant_maint")
|
||||
config.assistant_maint = 1
|
||||
|
||||
if("gateway_delay")
|
||||
config.gateway_delay = text2num(value)
|
||||
|
||||
else
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ datum/controller/vote
|
||||
var/trialmin = 0
|
||||
if(C.holder)
|
||||
admin = 1
|
||||
if (C.holder.level >= 3)
|
||||
if(C.holder.rights & R_ADMIN)
|
||||
trialmin = 1
|
||||
voting |= C
|
||||
|
||||
|
||||
@@ -180,12 +180,12 @@ client
|
||||
body += "<br><font size='1'><a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=ckey'>[M.ckey ? M.ckey : "No ckey"]</a> / <a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=real_name'>[M.real_name ? M.real_name : "No real name"]</a></font>"
|
||||
body += {"
|
||||
<br><font size='1'>
|
||||
BRUTE:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=\ref["brute"]'>[M.getBruteLoss()]</a>
|
||||
FIRE:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=\ref["fire"]'>[M.getFireLoss()]</a>
|
||||
TOXIN:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=\ref["toxin"]'>[M.getToxLoss()]</a>
|
||||
OXY:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=\ref["oxygen"]'>[M.getOxyLoss()]</a>
|
||||
CLONE:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=\ref["clone"]'>[M.getCloneLoss()]</a>
|
||||
BRAIN:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=\ref["brain"]'>[M.getBrainLoss()]</a>
|
||||
BRUTE:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=brute'>[M.getBruteLoss()]</a>
|
||||
FIRE:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=fire'>[M.getFireLoss()]</a>
|
||||
TOXIN:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=toxin'>[M.getToxLoss()]</a>
|
||||
OXY:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=oxygen'>[M.getOxyLoss()]</a>
|
||||
CLONE:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=clone'>[M.getCloneLoss()]</a>
|
||||
BRAIN:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=brain'>[M.getBrainLoss()]</a>
|
||||
</font>
|
||||
|
||||
|
||||
@@ -402,14 +402,18 @@ client
|
||||
//This should all be moved over to datum/admins/Topic() or something ~Carn
|
||||
if( (usr.client == src) && src.holder )
|
||||
. = 1 //default return
|
||||
if (href_list["Vars"])
|
||||
if(href_list["Vars"])
|
||||
debug_variables(locate(href_list["Vars"]))
|
||||
|
||||
//~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records).
|
||||
else if (href_list["rename"])
|
||||
else if(href_list["rename"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["rename"])
|
||||
if(!istype(M)) return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
var/new_name = copytext(sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null),1,MAX_NAME_LEN)
|
||||
if( !new_name || !M ) return
|
||||
|
||||
@@ -417,431 +421,370 @@ client
|
||||
M.fully_replace_character_name(M.real_name,new_name)
|
||||
href_list["datumrefresh"] = href_list["rename"]
|
||||
|
||||
else if (href_list["varnameedit"])
|
||||
if(!href_list["datumedit"] || !href_list["varnameedit"])
|
||||
usr << "Varedit error: Not all information has been sent. Contact a coder."
|
||||
return
|
||||
var/DAT = locate(href_list["datumedit"])
|
||||
if(!DAT)
|
||||
usr << "Item not found"
|
||||
return
|
||||
if(!istype(DAT,/datum) && !istype(DAT,/client))
|
||||
usr << "Can't edit an item of this type. Type must be /datum or /client, so anything except simple variables."
|
||||
return
|
||||
modify_variables(DAT, href_list["varnameedit"], 1)
|
||||
else if (href_list["varnamechange"])
|
||||
if(!href_list["datumchange"] || !href_list["varnamechange"])
|
||||
usr << "Varedit error: Not all information has been sent. Contact a coder."
|
||||
return
|
||||
var/DAT = locate(href_list["datumchange"])
|
||||
if(!DAT)
|
||||
usr << "Item not found"
|
||||
return
|
||||
if(!istype(DAT,/datum) && !istype(DAT,/client))
|
||||
usr << "Can't edit an item of this type. Type must be /datum or /client, so anything except simple variables."
|
||||
return
|
||||
modify_variables(DAT, href_list["varnamechange"], 0)
|
||||
else if (href_list["varnamemass"])
|
||||
if(!href_list["datummass"] || !href_list["varnamemass"])
|
||||
usr << "Varedit error: Not all information has been sent. Contact a coder."
|
||||
return
|
||||
var/atom/A = locate(href_list["datummass"])
|
||||
if(!A)
|
||||
usr << "Item not found"
|
||||
return
|
||||
if(!istype(A,/atom))
|
||||
usr << "Can't mass edit an item of this type. Type must be /atom, so an object, turf, mob or area. You cannot mass edit clients!"
|
||||
return
|
||||
cmd_mass_modify_object_variables(A, href_list["varnamemass"])
|
||||
else if (href_list["mob_player_panel"])
|
||||
if(!href_list["mob_player_panel"])
|
||||
return
|
||||
var/mob/MOB = locate(href_list["mob_player_panel"])
|
||||
if(!MOB)
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
return
|
||||
if(!src.holder)
|
||||
return
|
||||
src.holder.show_player_panel(MOB)
|
||||
href_list["datumrefresh"] = href_list["mob_player_panel"]
|
||||
else if (href_list["give_spell"])
|
||||
if(!href_list["give_spell"])
|
||||
return
|
||||
var/mob/MOB = locate(href_list["give_spell"])
|
||||
if(!MOB)
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
return
|
||||
if(!src.holder)
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
src.give_spell(MOB)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
else if (href_list["give_disease"])
|
||||
if(!href_list["give_disease"])
|
||||
return
|
||||
var/mob/MOB = locate(href_list["give_disease"])
|
||||
if(!MOB)
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
return
|
||||
if(!src.holder)
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
src.give_disease(MOB)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
else if (href_list["ninja"])
|
||||
if(!href_list["ninja"])
|
||||
return
|
||||
var/mob/MOB = locate(href_list["ninja"])
|
||||
if(!MOB)
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
return
|
||||
if(!src.holder)
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
src.cmd_admin_ninjafy(MOB)
|
||||
href_list["datumrefresh"] = href_list["ninja"]
|
||||
else if (href_list["godmode"])
|
||||
if(!href_list["godmode"])
|
||||
return
|
||||
var/mob/MOB = locate(href_list["godmode"])
|
||||
if(!MOB)
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
return
|
||||
if(!src.holder)
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
src.cmd_admin_godmode(MOB)
|
||||
href_list["datumrefresh"] = href_list["godmode"]
|
||||
else if (href_list["gib"])
|
||||
if(!href_list["gib"])
|
||||
return
|
||||
var/mob/MOB = locate(href_list["gib"])
|
||||
if(!MOB)
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
return
|
||||
if(!src.holder)
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
src.cmd_admin_gib(MOB)
|
||||
else if(href_list["varnameedit"] && href_list["datumedit"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
else if (href_list["build_mode"])
|
||||
if(!href_list["build_mode"])
|
||||
var/D = locate(href_list["datumedit"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
usr << "This can only be used on instances of types /client or /datum"
|
||||
return
|
||||
var/mob/MOB = locate(href_list["build_mode"])
|
||||
if(!MOB)
|
||||
|
||||
modify_variables(D, href_list["varnameedit"], 1)
|
||||
|
||||
else if(href_list["varnamechange"] && href_list["datumchange"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/D = locate(href_list["datumchange"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
usr << "This can only be used on instances of types /client or /datum"
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
|
||||
modify_variables(D, href_list["varnamechange"], 0)
|
||||
|
||||
else if(href_list["varnamemass"] && href_list["datummass"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["datummass"])
|
||||
if(!istype(A))
|
||||
usr << "This can only be used on instances of type /atom"
|
||||
return
|
||||
if(!src.holder)
|
||||
|
||||
cmd_mass_modify_object_variables(A, href_list["varnamemass"])
|
||||
|
||||
else if(href_list["mob_player_panel"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["mob_player_panel"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
togglebuildmode(MOB)
|
||||
|
||||
src.holder.show_player_panel(M)
|
||||
href_list["datumrefresh"] = href_list["mob_player_panel"]
|
||||
|
||||
else if(href_list["give_spell"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_spell"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.give_spell(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["give_disease"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_disease"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.give_disease(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["ninja"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["ninja"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_ninjafy(M)
|
||||
href_list["datumrefresh"] = href_list["ninja"]
|
||||
|
||||
else if(href_list["godmode"])
|
||||
if(!check_rights(R_REJUVINATE)) return
|
||||
|
||||
var/mob/M = locate(href_list["godmode"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_godmode(M)
|
||||
href_list["datumrefresh"] = href_list["godmode"]
|
||||
|
||||
else if(href_list["gib"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["gib"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_gib(M)
|
||||
|
||||
else if(href_list["build_mode"])
|
||||
if(!check_rights(R_BUILDMODE)) return
|
||||
|
||||
var/mob/M = locate(href_list["build_mode"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
togglebuildmode(M)
|
||||
href_list["datumrefresh"] = href_list["build_mode"]
|
||||
|
||||
else if (href_list["drop_everything"])
|
||||
if(!href_list["drop_everything"])
|
||||
return
|
||||
var/mob/MOB = locate(href_list["drop_everything"])
|
||||
if(!MOB)
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
return
|
||||
if(!src.holder)
|
||||
else if(href_list["drop_everything"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["drop_everything"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
usr.client.cmd_admin_drop_everything(MOB)
|
||||
usr.client.cmd_admin_drop_everything(M)
|
||||
|
||||
else if (href_list["direct_control"])
|
||||
if(!href_list["direct_control"])
|
||||
return
|
||||
var/mob/MOB = locate(href_list["direct_control"])
|
||||
if(!MOB)
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
return
|
||||
if(!src.holder)
|
||||
else if(href_list["direct_control"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["direct_control"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
usr.client.cmd_assume_direct_control(MOB)
|
||||
usr.client.cmd_assume_direct_control(M)
|
||||
|
||||
else if (href_list["make_skeleton"])
|
||||
if(!href_list["make_skeleton"])
|
||||
return
|
||||
var/mob/MOB = locate(href_list["make_skeleton"])
|
||||
if(!MOB)
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
return
|
||||
if(!src.holder)
|
||||
else if(href_list["make_skeleton"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["make_skeleton"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(ishuman(MOB))
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
var/mob/living/carbon/human/HUMANMOB = MOB
|
||||
HUMANMOB.makeSkeleton()
|
||||
H.makeSkeleton()
|
||||
href_list["datumrefresh"] = href_list["make_skeleton"]
|
||||
|
||||
else if (href_list["delall"])
|
||||
if(!href_list["delall"])
|
||||
else if(href_list["delall"])
|
||||
if(!check_rights(R_DEBUG|R_SERVER)) return
|
||||
|
||||
var/obj/O = locate(href_list["delall"])
|
||||
if(!isobj(O))
|
||||
usr << "This can only be used on instances of type /obj"
|
||||
return
|
||||
var/atom/A = locate(href_list["delall"])
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!A)
|
||||
|
||||
var/action_type = alert("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
|
||||
if(action_type == "Cancel" || !action_type)
|
||||
return
|
||||
if(!isobj(A))
|
||||
usr << "This can only be used on objects (of type /obj)"
|
||||
return
|
||||
if(!A.type)
|
||||
return
|
||||
var/action_type = alert("Strict type ([A.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
|
||||
if(!action_type || action_type == "Cancel")
|
||||
return
|
||||
if(alert("Are you really sure you want to delete all objects of type [A.type]?",,"Yes","No") != "Yes")
|
||||
|
||||
if(alert("Are you really sure you want to delete all objects of type [O.type]?",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
|
||||
return
|
||||
var/a_type = A.type
|
||||
if(action_type == "Strict type")
|
||||
var/i = 0
|
||||
for(var/obj/O in world)
|
||||
if(O.type == a_type)
|
||||
i++
|
||||
del(O)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of scrict type [a_type] ([i] objects deleted) ")
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of scrict type [a_type] ([i] objects deleted) ", 1)
|
||||
else if(action_type == "Type and subtypes")
|
||||
var/i = 0
|
||||
for(var/obj/O in world)
|
||||
if(istype(O,a_type))
|
||||
i++
|
||||
del(O)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of scrict type with subtypes [a_type] ([i] objects deleted) ")
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of type with subtypes [a_type] ([i] objects deleted) ", 1)
|
||||
|
||||
else if (href_list["explode"])
|
||||
if(!href_list["explode"])
|
||||
return
|
||||
var/O_type = O.type
|
||||
switch(action_type)
|
||||
if("Strict type")
|
||||
var/i = 0
|
||||
for(var/obj/Obj in world)
|
||||
if(Obj.type == O_type)
|
||||
i++
|
||||
del(Obj)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ", 1)
|
||||
if("Type and subtypes")
|
||||
var/i = 0
|
||||
for(var/obj/Obj in world)
|
||||
if(istype(Obj,O_type))
|
||||
i++
|
||||
del(Obj)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ", 1)
|
||||
|
||||
else if(href_list["explode"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["explode"])
|
||||
if(!A)
|
||||
return
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
|
||||
src.cmd_admin_explosion(A)
|
||||
href_list["datumrefresh"] = href_list["explode"]
|
||||
else if (href_list["emp"])
|
||||
if(!href_list["emp"])
|
||||
return
|
||||
|
||||
else if(href_list["emp"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["emp"])
|
||||
if(!A)
|
||||
return
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
|
||||
src.cmd_admin_emp(A)
|
||||
href_list["datumrefresh"] = href_list["emp"]
|
||||
else if (href_list["mark_object"])
|
||||
if(!href_list["mark_object"])
|
||||
return
|
||||
|
||||
else if(href_list["mark_object"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/datum/D = locate(href_list["mark_object"])
|
||||
if(!D)
|
||||
if(!istype(D))
|
||||
usr << "This can only be done to instances of type /datum"
|
||||
return
|
||||
if(!src.holder)
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
|
||||
src.holder.marked_datum = D
|
||||
href_list["datumrefresh"] = href_list["mark_object"]
|
||||
else if (href_list["rotatedatum"])
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!href_list["rotatedir"])
|
||||
return
|
||||
|
||||
else if(href_list["rotatedatum"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["rotatedatum"])
|
||||
if(!A)
|
||||
return
|
||||
if(!istype(A,/atom))
|
||||
usr << "This can only be done to objects of type /atom"
|
||||
return
|
||||
if(!src.holder)
|
||||
if(!istype(A))
|
||||
usr << "This can only be done to instances of type /atom"
|
||||
return
|
||||
|
||||
switch(href_list["rotatedir"])
|
||||
if("right")
|
||||
A.dir = turn(A.dir, -45)
|
||||
if("left")
|
||||
A.dir = turn(A.dir, 45)
|
||||
if("right") A.dir = turn(A.dir, -45)
|
||||
if("left") A.dir = turn(A.dir, 45)
|
||||
href_list["datumrefresh"] = href_list["rotatedatum"]
|
||||
else if (href_list["makemonkey"])
|
||||
var/mob/M = locate(href_list["makemonkey"])
|
||||
if(!M)
|
||||
|
||||
else if(href_list["makemonkey"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makemonkey"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!ishuman(M))
|
||||
usr << "This can only be done to objects of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!src.holder)
|
||||
usr << "You are not an administrator."
|
||||
return
|
||||
var/action_type = alert("Confirm mob type change?",,"Transform","Cancel")
|
||||
if(!action_type || action_type == "Cancel")
|
||||
return
|
||||
if(!M)
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("monkeyone"=href_list["makemonkey"]))
|
||||
else if (href_list["makerobot"])
|
||||
var/mob/M = locate(href_list["makerobot"])
|
||||
if(!M)
|
||||
|
||||
else if(href_list["makerobot"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!ishuman(M))
|
||||
usr << "This can only be done to objects of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!src.holder)
|
||||
usr << "You are not an administrator."
|
||||
return
|
||||
var/action_type = alert("Confirm mob type change?",,"Transform","Cancel")
|
||||
if(!action_type || action_type == "Cancel")
|
||||
return
|
||||
if(!M)
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makerobot"=href_list["makerobot"]))
|
||||
else if (href_list["makealien"])
|
||||
var/mob/M = locate(href_list["makealien"])
|
||||
if(!M)
|
||||
|
||||
else if(href_list["makealien"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makealien"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!ishuman(M))
|
||||
usr << "This can only be done to objects of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!src.holder)
|
||||
usr << "You are not an administrator."
|
||||
return
|
||||
var/action_type = alert("Confirm mob type change?",,"Transform","Cancel")
|
||||
if(!action_type || action_type == "Cancel")
|
||||
return
|
||||
if(!M)
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makealien"=href_list["makealien"]))
|
||||
else if (href_list["makemetroid"])
|
||||
var/mob/M = locate(href_list["makemetroid"])
|
||||
if(!M)
|
||||
|
||||
else if(href_list["makemetroid"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makemetroid"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!ishuman(M))
|
||||
usr << "This can only be done to objects of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!src.holder)
|
||||
usr << "You are not an administrator."
|
||||
return
|
||||
var/action_type = alert("Confirm mob type change?",,"Transform","Cancel")
|
||||
if(!action_type || action_type == "Cancel")
|
||||
return
|
||||
if(!M)
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makemetroid"=href_list["makemetroid"]))
|
||||
else if (href_list["makeai"])
|
||||
var/mob/M = locate(href_list["makeai"])
|
||||
if(!M)
|
||||
|
||||
else if(href_list["makeai"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeai"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!ishuman(M))
|
||||
usr << "This can only be done to objects of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!src.holder)
|
||||
usr << "You are not an administrator."
|
||||
return
|
||||
var/action_type = alert("Confirm mob type change?",,"Transform","Cancel")
|
||||
if(!action_type || action_type == "Cancel")
|
||||
return
|
||||
if(!M)
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makeai"=href_list["makeai"]))
|
||||
else if (href_list["setmutantrace"])
|
||||
|
||||
else if(href_list["setmutantrace"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["setmutantrace"])
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to objects of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!src.holder)
|
||||
usr << "You are not an administrator."
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
var/new_mutantrace = input("Please choose a new mutantrace","Mutantrace",null) as null|anything in list("NONE","golem","lizard","metroid","plant","tajaran","skrell") //BS12 EDIT TAJ EDIT SKR
|
||||
switch(new_mutantrace)
|
||||
if(null) return
|
||||
if("NONE") new_mutantrace = ""
|
||||
if(!H || !istype(H))
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
if(H.dna)
|
||||
H.dna.mutantrace = new_mutantrace
|
||||
H.update_mutantrace()
|
||||
else if (href_list["regenerateicons"])
|
||||
|
||||
else if(href_list["regenerateicons"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["regenerateicons"])
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!istype(M))
|
||||
usr << "This can only be done to objects of type /mob"
|
||||
return
|
||||
if(!src.holder)
|
||||
usr << "You are not an administrator."
|
||||
if(!ismob(M))
|
||||
usr << "This can only be done to instances of type /mob"
|
||||
return
|
||||
M.regenerate_icons()
|
||||
else if (href_list["adjustDamage"] && href_list["mobToDamage"])
|
||||
var/mob/M = locate(href_list["mobToDamage"])
|
||||
var/Text = locate(href_list["adjustDamage"])
|
||||
|
||||
if(!isliving(M)) return
|
||||
var/mob/living/L = M
|
||||
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
var/mob/living/L = locate(href_list["mobToDamage"])
|
||||
if(!istype(L)) return
|
||||
|
||||
var/Text = href_list["adjustDamage"]
|
||||
|
||||
var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
|
||||
if(Text == "brute")
|
||||
L.adjustBruteLoss(amount)
|
||||
else if(Text == "fire")
|
||||
L.adjustFireLoss(amount)
|
||||
else if(Text == "toxin")
|
||||
L.adjustToxLoss(amount)
|
||||
else if(Text == "oxygen")
|
||||
L.adjustOxyLoss(amount)
|
||||
else if(Text == "brain")
|
||||
L.adjustBrainLoss(amount)
|
||||
else if(Text == "clone")
|
||||
L.adjustCloneLoss(amount)
|
||||
else
|
||||
usr << "You caused an error. DEBUG: Text:[Text] Mob:[M]"
|
||||
|
||||
if(!L)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
|
||||
switch(Text)
|
||||
if("brute") L.adjustBruteLoss(amount)
|
||||
if("fire") L.adjustFireLoss(amount)
|
||||
if("toxin") L.adjustToxLoss(amount)
|
||||
if("oxygen")L.adjustOxyLoss(amount)
|
||||
if("brain") L.adjustBrainLoss(amount)
|
||||
if("clone") L.adjustCloneLoss(amount)
|
||||
else
|
||||
usr << "You caused an error. DEBUG: Text:[Text] Mob:[L]"
|
||||
return
|
||||
|
||||
if(amount != 0)
|
||||
log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [M] ")
|
||||
message_admins("\blue [key_name(usr)] dealt [amount] amount of [Text] damage to [M] ", 1)
|
||||
log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
|
||||
message_admins("\blue [key_name(usr)] dealt [amount] amount of [Text] damage to [L] ", 1)
|
||||
href_list["datumrefresh"] = href_list["mobToDamage"]
|
||||
else
|
||||
. = 0
|
||||
if (href_list["datumrefresh"])
|
||||
|
||||
if(href_list["datumrefresh"])
|
||||
var/datum/DAT = locate(href_list["datumrefresh"])
|
||||
if(!DAT)
|
||||
return
|
||||
if(!istype(DAT,/datum))
|
||||
if(!istype(DAT, /datum))
|
||||
return
|
||||
src.debug_variables(DAT)
|
||||
. = 1
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#define NON_CONTAGIOUS -1
|
||||
#define SPECIAL 0
|
||||
#define CONTACT_GENERAL 1
|
||||
#define CONTACT_HANDS 2
|
||||
#define CONTACT_FEET 3
|
||||
#define AIRBORNE 4
|
||||
#define BLOOD 5
|
||||
#define SPECIAL -1
|
||||
#define NON_CONTAGIOUS 0
|
||||
#define BLOOD 1
|
||||
#define CONTACT_FEET 2
|
||||
#define CONTACT_HANDS 3
|
||||
#define CONTACT_GENERAL 4
|
||||
#define AIRBORNE 5
|
||||
|
||||
#define SCANNER 1
|
||||
#define PANDEMIC 2
|
||||
@@ -30,6 +30,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
var/cure_list = null // allows for multiple possible cure combinations
|
||||
var/cure_chance = 8//chance for the cure to do its job
|
||||
var/spread = null //spread type description
|
||||
var/initial_spread = null
|
||||
var/spread_type = AIRBORNE
|
||||
var/contagious_period = 0//the disease stage when it can be spread
|
||||
var/list/affected_species = list()
|
||||
@@ -60,7 +61,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
//world << "[affected_mob] is carrier"
|
||||
return
|
||||
|
||||
spread = (cure_present?"Remissive":initial(spread))
|
||||
spread = (cure_present?"Remissive":initial_spread)
|
||||
|
||||
if(stage > max_stages)
|
||||
stage = max_stages
|
||||
@@ -96,10 +97,15 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
return result
|
||||
|
||||
|
||||
/datum/disease/proc/spread(var/atom/source=null)
|
||||
/datum/disease/proc/spread(var/atom/source=null, var/airborne_range = 2, var/force_spread)
|
||||
//world << "Disease [src] proc spread was called from holder [source]"
|
||||
|
||||
if(spread_type == SPECIAL || spread_type == NON_CONTAGIOUS)//does not spread
|
||||
// If we're overriding how we spread, say so here
|
||||
var/how_spread = spread_type
|
||||
if(force_spread)
|
||||
how_spread = force_spread
|
||||
|
||||
if(how_spread == SPECIAL || how_spread == NON_CONTAGIOUS)//does not spread
|
||||
return
|
||||
|
||||
if(stage < contagious_period) //the disease is not contagious at this stage
|
||||
@@ -112,26 +118,32 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
return
|
||||
|
||||
|
||||
var/check_range = AIRBORNE//defaults to airborne - range 4
|
||||
var/check_range = airborne_range//defaults to airborne - range 2
|
||||
|
||||
if(spread_type != AIRBORNE && spread_type != SPECIAL)
|
||||
check_range = 0 // everything else, like infect-on-contact things, only infect things on top of it
|
||||
if(how_spread != AIRBORNE && how_spread != SPECIAL)
|
||||
check_range = 1 // everything else, like infect-on-contact things, only infect things on top of it
|
||||
|
||||
for(var/mob/living/carbon/M in oview(check_range, source)) //I have no idea why oview works when oviewers doesn't. -Pete
|
||||
M.contract_disease(src)
|
||||
if(isturf(source.loc))
|
||||
for(var/mob/living/carbon/M in oview(check_range, source))
|
||||
if(isturf(M.loc))
|
||||
if(AStar(source.loc, M.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, check_range))
|
||||
M.contract_disease(src, 0, 1, force_spread)
|
||||
|
||||
return
|
||||
|
||||
|
||||
/datum/disease/proc/process()
|
||||
if(!holder) return
|
||||
if(!holder)
|
||||
active_diseases -= src
|
||||
return
|
||||
if(prob(65))
|
||||
spread(holder)
|
||||
|
||||
if(affected_mob)
|
||||
for(var/datum/disease/D in affected_mob.viruses)
|
||||
if(D != src)
|
||||
if(istype(src, D.type))
|
||||
if(IsSame(D))
|
||||
//error("Deleting [D.name] because it's the same as [src.name].")
|
||||
del(D) // if there are somehow two viruses of the same kind in the system, delete the other one
|
||||
|
||||
if(holder == affected_mob)
|
||||
@@ -161,10 +173,19 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
return
|
||||
|
||||
|
||||
/datum/disease/New(var/process=1)//process = 1 - adding the object to global list. List is processed by master controller.
|
||||
/datum/disease/New(var/process=1, var/datum/disease/D)//process = 1 - adding the object to global list. List is processed by master controller.
|
||||
cure_list = list(cure_id) // to add more cures, add more vars to this list in the actual disease's New()
|
||||
if(process) // Viruses in list are considered active.
|
||||
active_diseases += src
|
||||
initial_spread = spread
|
||||
|
||||
/datum/disease/proc/IsSame(var/datum/disease/D)
|
||||
if(istype(src, D.type))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/disease/proc/Copy()
|
||||
return new type(0, src)
|
||||
|
||||
/*
|
||||
/datum/disease/Del()
|
||||
|
||||
379
code/datums/diseases/advance/advance.dm
Normal file
379
code/datums/diseases/advance/advance.dm
Normal file
@@ -0,0 +1,379 @@
|
||||
/*
|
||||
|
||||
Advance Disease is a system for Virologist to Engineer their own disease with symptoms that have effects and properties
|
||||
which add onto the overall disease.
|
||||
|
||||
If you need help with creating new symptoms or expanding the advance disease, ask for Giacom on #coderbus.
|
||||
|
||||
*/
|
||||
|
||||
#define RANDOM_STARTING_LEVEL 2
|
||||
|
||||
var/list/archive_diseases = list()
|
||||
|
||||
|
||||
/*
|
||||
|
||||
PROPERTIES
|
||||
|
||||
*/
|
||||
|
||||
/datum/disease/advance
|
||||
|
||||
name = "Unknown" // We will always let our Virologist name our disease.
|
||||
desc = "An engineered disease which can contain a multitude of symptoms."
|
||||
form = "Advance Disease" // Will let med-scanners know that this disease was engineered.
|
||||
agent = "advance microbes"
|
||||
max_stages = 5
|
||||
spread = "Unknown"
|
||||
affected_species = list("Human","Monkey")
|
||||
|
||||
// NEW VARS
|
||||
|
||||
var/list/symptoms = list() // The symptoms of the disease.
|
||||
|
||||
/*
|
||||
|
||||
OLD PROCS
|
||||
|
||||
*/
|
||||
|
||||
/datum/disease/advance/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
|
||||
// Setup our dictionary if it hasn't already.
|
||||
if(!dictionary_symptoms.len)
|
||||
for(var/symp in list_symptoms)
|
||||
var/datum/symptom/S = new symp
|
||||
dictionary_symptoms[S.id] = symp
|
||||
|
||||
if(!istype(D))
|
||||
D = null
|
||||
// Generate symptoms if we weren't given any.
|
||||
|
||||
if(!symptoms || !symptoms.len)
|
||||
|
||||
if(!D || !D.symptoms || !D.symptoms.len)
|
||||
symptoms = GenerateSymptoms()
|
||||
else
|
||||
for(var/datum/symptom/S in D.symptoms)
|
||||
symptoms += new S.type
|
||||
name = D.name
|
||||
|
||||
Refresh(!copy)
|
||||
..(process, D)
|
||||
return
|
||||
|
||||
// Randomly pick a symptom to activate.
|
||||
/datum/disease/advance/stage_act()
|
||||
..()
|
||||
if(symptoms && symptoms.len)
|
||||
for(var/datum/symptom/S in symptoms)
|
||||
S.Activate(src)
|
||||
else
|
||||
CRASH("We do not have any symptoms during stage_act()!")
|
||||
|
||||
// Compares type then ID.
|
||||
/datum/disease/advance/IsSame(var/datum/disease/advance/D)
|
||||
if(!(istype(D, /datum/disease/advance)))
|
||||
//error("Returning 0 because not same type.")
|
||||
|
||||
return 0
|
||||
//error("Comparing [src.GetDiseaseID()] [D.GetDiseaseID()]")
|
||||
if(src.GetDiseaseID() != D.GetDiseaseID())
|
||||
//error("Returing 0")
|
||||
return 0
|
||||
//error("Returning 1")
|
||||
return 1
|
||||
|
||||
// To add special resistances.
|
||||
/datum/disease/advance/cure(var/resistance=1)
|
||||
if(affected_mob)
|
||||
var/id = "[GetDiseaseID()]"
|
||||
if(resistance && !(id in affected_mob.resistances))
|
||||
affected_mob.resistances[id] = id
|
||||
affected_mob.viruses -= src //remove the datum from the list
|
||||
del(src) //delete the datum to stop it processing
|
||||
return
|
||||
|
||||
// Returns the advance disease with a different reference memory.
|
||||
/datum/disease/advance/Copy()
|
||||
return new /datum/disease/advance(0, src, 1)
|
||||
|
||||
/*
|
||||
|
||||
NEW PROCS
|
||||
|
||||
*/
|
||||
|
||||
// Mix the symptoms of two diseases (the src and the argument)
|
||||
/datum/disease/advance/proc/Mix(var/datum/disease/advance/D)
|
||||
if(!(src.IsSame(D)))
|
||||
var/list/possible_symptoms = shuffle(D.symptoms)
|
||||
for(var/datum/symptom/S in possible_symptoms)
|
||||
AddSymptom(new S.type)
|
||||
|
||||
/datum/disease/advance/proc/HasSymptom(var/datum/symptom/S)
|
||||
for(var/datum/symptom/symp in symptoms)
|
||||
if(symp.id == S.id)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// Will generate new unique symptoms, use this if there are none. Returns a list of symptoms that were generated.
|
||||
/datum/disease/advance/proc/GenerateSymptoms(var/type_level_limit = RANDOM_STARTING_LEVEL, var/amount_get = 0)
|
||||
|
||||
var/list/generated = list() // Symptoms we generated.
|
||||
|
||||
// Generate symptoms. By default, we only choose non-deadly symptoms.
|
||||
var/list/possible_symptoms = list()
|
||||
for(var/symp in list_symptoms)
|
||||
var/datum/symptom/S = new symp
|
||||
if(S.level <= type_level_limit)
|
||||
if(!HasSymptom(S))
|
||||
possible_symptoms += S
|
||||
|
||||
if(!possible_symptoms.len)
|
||||
return
|
||||
//error("Advance Disease - We weren't able to get any possible symptoms in GenerateSymptoms([type_level_limit], [amount_get])")
|
||||
|
||||
// Random chance to get more than one symptom
|
||||
var/number_of = amount_get
|
||||
if(!amount_get)
|
||||
number_of = 1
|
||||
while(prob(20))
|
||||
number_of += 1
|
||||
|
||||
for(var/i = 1; number_of >= i; i++)
|
||||
var/datum/symptom/S = pick(possible_symptoms)
|
||||
generated += S
|
||||
possible_symptoms -= S
|
||||
|
||||
return generated
|
||||
|
||||
/datum/disease/advance/proc/Refresh(var/save = 1)
|
||||
//world << "[src.name] \ref[src] - REFRESH!"
|
||||
var/list/properties = GenerateProperties()
|
||||
AssignProperties(properties)
|
||||
if(save)
|
||||
archive_diseases[GetDiseaseID()] = new /datum/disease/advance(0, src, 1)
|
||||
|
||||
//Generate disease properties based on the effects. Returns an associated list.
|
||||
/datum/disease/advance/proc/GenerateProperties()
|
||||
|
||||
if(!symptoms || !symptoms.len)
|
||||
CRASH("We did not have any symptoms before generating properties.")
|
||||
return
|
||||
|
||||
var/list/properties = list("resistance" = 1, "stealth" = 1, "stage_rate" = 1, "transmittable" = 1, "severity" = 1)
|
||||
|
||||
for(var/datum/symptom/S in symptoms)
|
||||
|
||||
properties["resistance"] += S.resistance
|
||||
properties["stealth"] += S.stealth
|
||||
properties["stage_rate"] += S.stage_speed
|
||||
properties["transmittable"] += S.transmittable
|
||||
properties["severity"] = max(properties["severity"], S.level) // severity is based on the highest level symptom
|
||||
|
||||
return properties
|
||||
|
||||
// Assign the properties that are in the list.
|
||||
/datum/disease/advance/proc/AssignProperties(var/list/properties = list())
|
||||
|
||||
if(properties && properties.len)
|
||||
|
||||
hidden = list( (properties["stealth"] > 2), (properties["stealth"] > 3) )
|
||||
// The more symptoms we have, the less transmittable it is but some symptoms can make up for it.
|
||||
SetSpread(max(BLOOD, min(properties["transmittable"] - symptoms.len, AIRBORNE)))
|
||||
permeability_mod = max(round(0.5 * properties["transmittable"]), 1)
|
||||
stage_prob = max(properties["stage_rate"], 1)
|
||||
SetSeverity(properties["severity"])
|
||||
GenerateCure(properties)
|
||||
else
|
||||
CRASH("Our properties were empty or null!")
|
||||
|
||||
|
||||
// Assign the spread type and give it the correct description.
|
||||
/datum/disease/advance/proc/SetSpread(var/spread_id)
|
||||
switch(spread_id)
|
||||
|
||||
if(NON_CONTAGIOUS)
|
||||
spread = "None"
|
||||
if(SPECIAL)
|
||||
spread = "None"
|
||||
if(CONTACT_GENERAL, CONTACT_HANDS, CONTACT_FEET)
|
||||
spread = "On contact"
|
||||
if(AIRBORNE)
|
||||
spread = "Airborne"
|
||||
if(BLOOD)
|
||||
spread = "Blood"
|
||||
|
||||
spread_type = spread_id
|
||||
//world << "Setting spread type to [spread_id]/[spread]"
|
||||
|
||||
/datum/disease/advance/proc/SetSeverity(var/level_sev)
|
||||
|
||||
switch(level_sev)
|
||||
|
||||
if(0)
|
||||
severity = "Non-Threat"
|
||||
if(1)
|
||||
severity = "Minor"
|
||||
if(2)
|
||||
severity = "Medium"
|
||||
if(3)
|
||||
severity = "Harmful"
|
||||
if(4)
|
||||
severity = "Dangerous!"
|
||||
if(5)
|
||||
severity = "BIOHAZARD THREAT!"
|
||||
else
|
||||
severity = "Unknown"
|
||||
|
||||
|
||||
// Will generate a random cure, the less resistance the symptoms have, the harder the cure.
|
||||
/datum/disease/advance/proc/GenerateCure(var/list/properties = list())
|
||||
if(properties && properties.len)
|
||||
var/res = max(properties["resistance"] - (symptoms.len / 2), 0)
|
||||
//world << "Res = [res]"
|
||||
switch(round(res))
|
||||
// Due to complications, I cannot randomly generate cures or randomly give cures.
|
||||
if(0)
|
||||
cure_id = "nutriment"
|
||||
|
||||
if(1)
|
||||
cure_id = "sodiumchloride"
|
||||
|
||||
if(2)
|
||||
cure_id = "orangejuice"
|
||||
|
||||
if(3)
|
||||
cure_id = "spaceacillin"
|
||||
|
||||
if(4)
|
||||
cure_id = "ethanol"
|
||||
|
||||
if(5)
|
||||
cure_id = "ethylredoxrazine"
|
||||
|
||||
if(6)
|
||||
cure_id = "synaptizine"
|
||||
|
||||
if(7)
|
||||
cure_id = "silver"
|
||||
|
||||
if(8)
|
||||
cure_id = "gold"
|
||||
|
||||
if(9)
|
||||
cure_id = "mindbreaker"
|
||||
|
||||
else
|
||||
cure_id = "plasma"
|
||||
|
||||
// Get the cure name from the cure_id
|
||||
var/datum/reagent/D = chemical_reagents_list[cure_id]
|
||||
cure = D.name
|
||||
|
||||
|
||||
return
|
||||
|
||||
// Randomly generate a symptom, has a chance to lose or gain a symptom.
|
||||
/datum/disease/advance/proc/Evolve(var/level = 2)
|
||||
var/s = safepick(GenerateSymptoms(level, 1))
|
||||
if(s)
|
||||
AddSymptom(s)
|
||||
Refresh()
|
||||
return
|
||||
|
||||
// Randomly remove a symptom.
|
||||
/datum/disease/advance/proc/Devolve()
|
||||
if(symptoms.len > 1)
|
||||
var/s = safepick(symptoms)
|
||||
if(s)
|
||||
RemoveSymptom(s)
|
||||
Refresh()
|
||||
return
|
||||
|
||||
// Name the disease.
|
||||
/datum/disease/advance/proc/AssignName(var/name = "Unknown")
|
||||
src.name = name
|
||||
return
|
||||
|
||||
// Return a unique ID of the disease.
|
||||
/datum/disease/advance/proc/GetDiseaseID()
|
||||
var/list/L = list()
|
||||
for(var/datum/symptom/S in symptoms)
|
||||
L += S.id
|
||||
L = sortList(L) // Sort the list so it doesn't matter which order the symptoms are in.
|
||||
return dd_list2text(L, ":")
|
||||
|
||||
// Add a symptom, if it is over the limit (with a small chance to be able to go over)
|
||||
// we take a random symptom away and add the new one.
|
||||
/datum/disease/advance/proc/AddSymptom(var/datum/symptom/S)
|
||||
|
||||
if(HasSymptom(S))
|
||||
return
|
||||
|
||||
if(symptoms.len < 3 + rand(-1, 1))
|
||||
symptoms += S
|
||||
else
|
||||
RemoveSymptom(pick(symptoms))
|
||||
symptoms += S
|
||||
return
|
||||
|
||||
// Simply removes the symptom.
|
||||
/datum/disease/advance/proc/RemoveSymptom(var/datum/symptom/S)
|
||||
symptoms -= S
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
Static Procs
|
||||
|
||||
*/
|
||||
|
||||
// Mix a list of advance diseases and return the mixed result.
|
||||
/proc/Advance_Mix(var/list/D_list)
|
||||
|
||||
//world << "Mixing!!!!"
|
||||
|
||||
var/list/diseases = list()
|
||||
|
||||
for(var/datum/disease/advance/A in D_list.Copy())
|
||||
diseases += A.Copy()
|
||||
|
||||
if(!diseases.len)
|
||||
return null
|
||||
if(diseases.len <= 1)
|
||||
return pick(diseases) // Just return the only entry.
|
||||
|
||||
var/i = 0
|
||||
// Mix our diseases until we are left with only one result.
|
||||
while(i < 20 && diseases.len > 1)
|
||||
|
||||
i++
|
||||
|
||||
var/datum/disease/advance/D1 = pick(diseases)
|
||||
diseases -= D1
|
||||
|
||||
var/datum/disease/advance/D2 = pick(diseases)
|
||||
D2.Mix(D1)
|
||||
|
||||
// Should be only 1 entry left, but if not let's only return a single entry
|
||||
//world << "END MIXING!!!!!"
|
||||
var/datum/disease/advance/to_return = pick(diseases)
|
||||
to_return.Refresh()
|
||||
return to_return
|
||||
|
||||
/proc/SetViruses(var/datum/reagent/R, var/list/data)
|
||||
if(data)
|
||||
var/list/preserve = list()
|
||||
if(istype(data) && data["viruses"])
|
||||
for(var/datum/disease/A in data["viruses"])
|
||||
preserve += A.Copy()
|
||||
R.data = data.Copy()
|
||||
else
|
||||
R.data = data
|
||||
if(preserve.len)
|
||||
R.data["viruses"] = preserve
|
||||
|
||||
#undef RANDOM_STARTING_LEVEL
|
||||
5
code/datums/diseases/advance/cold.dm
Normal file
5
code/datums/diseases/advance/cold.dm
Normal file
@@ -0,0 +1,5 @@
|
||||
/datum/disease/advance/cold/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
if(!D)
|
||||
name = "Cold"
|
||||
symptoms = list(new/datum/symptom/sneeze)
|
||||
..(process, D, copy)
|
||||
5
code/datums/diseases/advance/flu.dm
Normal file
5
code/datums/diseases/advance/flu.dm
Normal file
@@ -0,0 +1,5 @@
|
||||
/datum/disease/advance/flu/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
if(!D)
|
||||
name = "Flu"
|
||||
symptoms = list(new/datum/symptom/cough)
|
||||
..(process, D, copy)
|
||||
39
code/datums/diseases/advance/symptoms/confusion.dm
Normal file
39
code/datums/diseases/advance/symptoms/confusion.dm
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Confusion
|
||||
|
||||
Little bit hidden.
|
||||
Lowers resistance.
|
||||
Decreases stage speed.
|
||||
Not very transmittable.
|
||||
Intense Level.
|
||||
|
||||
Bonus
|
||||
Makes the affected mob be confused for short periods of time.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/confusion
|
||||
|
||||
name = "Confusion"
|
||||
stealth = 1
|
||||
resistance = -1
|
||||
stage_speed = -3
|
||||
transmittable = 0
|
||||
level = 4
|
||||
|
||||
|
||||
/datum/symptom/confusion/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(1, 2, 3, 4)
|
||||
M << "<span class='notice'>[pick("You feel confused.", "You forgot what you were thinking about.")]</span>"
|
||||
else
|
||||
M << "<span class='notice'>You are unable to think straight!</span>"
|
||||
M.confused = min(100, M.confused + 2)
|
||||
|
||||
return
|
||||
37
code/datums/diseases/advance/symptoms/cough.dm
Normal file
37
code/datums/diseases/advance/symptoms/cough.dm
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Coughing
|
||||
|
||||
Noticable.
|
||||
No Resistance.
|
||||
Doesn't increase stage speed.
|
||||
Transmittable.
|
||||
Low Level.
|
||||
|
||||
BONUS
|
||||
Will force the affected mob to drop items!
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/cough
|
||||
|
||||
name = "Cough"
|
||||
stealth = -1
|
||||
resistance = 0
|
||||
stage_speed = 0
|
||||
transmittable = 2
|
||||
level = 1
|
||||
|
||||
/datum/symptom/cough/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(1, 2, 3)
|
||||
M << "<span notice='notice'>[pick("You swallow excess mucus.", "You lightly cough.")]</span>"
|
||||
else
|
||||
M.emote("cough")
|
||||
M.drop_item()
|
||||
return
|
||||
43
code/datums/diseases/advance/symptoms/damage_converter.dm
Normal file
43
code/datums/diseases/advance/symptoms/damage_converter.dm
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Damage Converter
|
||||
|
||||
Little bit hidden.
|
||||
Lowers resistance tremendously.
|
||||
Decreases stage speed tremendously.
|
||||
Reduced transmittablity
|
||||
Intense Level.
|
||||
|
||||
Bonus
|
||||
Slowly converts brute/fire damage to toxin.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/damage_converter // Not the egg
|
||||
|
||||
name = "Toxic Compensation"
|
||||
stealth = 1
|
||||
resistance = -4
|
||||
stage_speed = -4
|
||||
transmittable = -2
|
||||
level = 4
|
||||
|
||||
/datum/symptom/damage_converter/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(5)
|
||||
Convert(M)
|
||||
return
|
||||
|
||||
/datum/symptom/damage_converter/proc/Convert(var/mob/living/M)
|
||||
|
||||
if(M.getFireLoss() < M.getMaxHealth() || M.getBruteLoss() < M.getMaxHealth())
|
||||
var/get_damage = rand(1, 2)
|
||||
M.adjustFireLoss(-get_damage)
|
||||
M.adjustBruteLoss(-get_damage)
|
||||
M.adjustToxLoss(get_damage * 2)
|
||||
return 1
|
||||
37
code/datums/diseases/advance/symptoms/dizzy.dm
Normal file
37
code/datums/diseases/advance/symptoms/dizzy.dm
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Dizziness
|
||||
|
||||
Little bit hidden.
|
||||
Lowers resistance considerably.
|
||||
Decreases stage speed.
|
||||
Reduced transmittability
|
||||
Intense Level.
|
||||
|
||||
Bonus
|
||||
Shakes the affected mob's screen for short periods.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/dizzy // Not the egg
|
||||
|
||||
name = "Dizziness"
|
||||
stealth = 1
|
||||
resistance = -2
|
||||
stage_speed = -3
|
||||
transmittable = -1
|
||||
level = 4
|
||||
|
||||
/datum/symptom/dizzy/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(1, 2, 3, 4)
|
||||
M << "<span class='notice'>[pick("You feel dizzy.", "Your head starts spinning.")]</span>"
|
||||
else
|
||||
M << "<span class='notice'>You are unable to look straight!</span>"
|
||||
M.make_dizzy(5)
|
||||
return
|
||||
34
code/datums/diseases/advance/symptoms/fever.dm
Normal file
34
code/datums/diseases/advance/symptoms/fever.dm
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Fever
|
||||
|
||||
No change to hidden.
|
||||
Increases resistance.
|
||||
Increases stage speed.
|
||||
Little transmittable.
|
||||
Low level.
|
||||
|
||||
Bonus
|
||||
Heats up your body.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/fever
|
||||
|
||||
name = "Fever"
|
||||
stealth = 0
|
||||
resistance = 3
|
||||
stage_speed = 3
|
||||
transmittable = 1
|
||||
level = 2
|
||||
|
||||
/datum/symptom/fever/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
M << "<span class='notice'>[pick("You feel hot.", "You feel like you're burning.")]</span>"
|
||||
M.bodytemperature += 20 * A.stage
|
||||
|
||||
return
|
||||
37
code/datums/diseases/advance/symptoms/hallucigen.dm
Normal file
37
code/datums/diseases/advance/symptoms/hallucigen.dm
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Hallucigen
|
||||
|
||||
Very noticable.
|
||||
Lowers resistance considerably.
|
||||
Decreases stage speed.
|
||||
Reduced transmittable.
|
||||
Critical Level.
|
||||
|
||||
Bonus
|
||||
Makes the affected mob be hallucinated for short periods of time.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/hallucigen
|
||||
|
||||
name = "Hallucigen"
|
||||
stealth = -2
|
||||
resistance = -3
|
||||
stage_speed = -3
|
||||
transmittable = -1
|
||||
level = 5
|
||||
|
||||
/datum/symptom/hallucigen/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(1, 2, 3, 4)
|
||||
M << "<span class='notice'>[pick("You notice someone in the corner of your eye.", "Is that footsteps?.")]</span>"
|
||||
else
|
||||
M.hallucination += 5
|
||||
|
||||
return
|
||||
33
code/datums/diseases/advance/symptoms/headache.dm
Normal file
33
code/datums/diseases/advance/symptoms/headache.dm
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Headache
|
||||
|
||||
Noticable.
|
||||
Highly resistant.
|
||||
Increases stage speed.
|
||||
Not transmittable.
|
||||
Low Level.
|
||||
|
||||
BONUS
|
||||
Displays an annoying message!
|
||||
Should be used for buffing your disease.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/headache
|
||||
|
||||
name = "Headache"
|
||||
stealth = -1
|
||||
resistance = 4
|
||||
stage_speed = 2
|
||||
transmittable = 0
|
||||
level = 1
|
||||
|
||||
/datum/symptom/headache/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
M << "<span class='notice'>[pick("Your head hurts.", "Your head starts pounding.")]</span>"
|
||||
return
|
||||
33
code/datums/diseases/advance/symptoms/itching.dm
Normal file
33
code/datums/diseases/advance/symptoms/itching.dm
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Itching
|
||||
|
||||
Not noticable or unnoticable.
|
||||
Resistant.
|
||||
Increases stage speed.
|
||||
Little transmittable.
|
||||
Low Level.
|
||||
|
||||
BONUS
|
||||
Displays an annoying message!
|
||||
Should be used for buffing your disease.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/itching
|
||||
|
||||
name = "Itching"
|
||||
stealth = 0
|
||||
resistance = 3
|
||||
stage_speed = 3
|
||||
transmittable = 1
|
||||
level = 1
|
||||
|
||||
/datum/symptom/itching/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
M << "<span class='notice'>Your [pick("back", "arm", "leg", "elbow", "head")] itches.</span>"
|
||||
return
|
||||
34
code/datums/diseases/advance/symptoms/shivering.dm
Normal file
34
code/datums/diseases/advance/symptoms/shivering.dm
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Shivering
|
||||
|
||||
No change to hidden.
|
||||
Increases resistance.
|
||||
Increases stage speed.
|
||||
Little transmittable.
|
||||
Low level.
|
||||
|
||||
Bonus
|
||||
Cools down your body.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/shivering
|
||||
|
||||
name = "Shivering"
|
||||
stealth = 0
|
||||
resistance = 2
|
||||
stage_speed = 2
|
||||
transmittable = 1
|
||||
level = 2
|
||||
|
||||
/datum/symptom/shivering/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
M << "<span class='notice'>[pick("You feel cold.", "You start shaking from the cold.")]</span>"
|
||||
M.bodytemperature -= 20 * A.stage
|
||||
|
||||
return
|
||||
38
code/datums/diseases/advance/symptoms/sneeze.dm
Normal file
38
code/datums/diseases/advance/symptoms/sneeze.dm
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Sneezing
|
||||
|
||||
Very Noticable.
|
||||
Increases resistance.
|
||||
Doesn't increase stage speed.
|
||||
Very transmittable.
|
||||
Low Level.
|
||||
|
||||
Bonus
|
||||
Forces a spread type of AIRBORNE
|
||||
with extra range!
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/sneeze
|
||||
|
||||
name = "Sneezing"
|
||||
stealth = -2
|
||||
resistance = 2
|
||||
stage_speed = 0
|
||||
transmittable = 3
|
||||
level = 1
|
||||
|
||||
/datum/symptom/sneeze/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(1, 2, 3)
|
||||
M.emote("sniff")
|
||||
else
|
||||
M.emote("sneeze")
|
||||
A.spread(A.holder, 5, AIRBORNE)
|
||||
return
|
||||
31
code/datums/diseases/advance/symptoms/symptoms.dm
Normal file
31
code/datums/diseases/advance/symptoms/symptoms.dm
Normal file
@@ -0,0 +1,31 @@
|
||||
// Symptoms are the effects that engineered advanced diseases do.
|
||||
|
||||
var/list/list_symptoms = typesof(/datum/symptom) - /datum/symptom
|
||||
var/list/dictionary_symptoms = list()
|
||||
|
||||
var/global/const/SYMPTOM_ACTIVATION_PROB = 3
|
||||
|
||||
/datum/symptom
|
||||
// Buffs/Debuffs the symptom has to the overall engineered disease.
|
||||
var/name = ""
|
||||
var/stealth = 0
|
||||
var/resistance = 0
|
||||
var/stage_speed = 0
|
||||
var/transmittable = 0
|
||||
// The type level of the symptom. Higher is more lethal and harder to generate.
|
||||
var/level = 0
|
||||
// The hash tag for our diseases, we will add it up with our other symptoms to get a unique id! ID MUST BE UNIQUE!!!
|
||||
var/id = ""
|
||||
|
||||
/datum/symptom/New()
|
||||
var/list/S = list_symptoms
|
||||
for(var/i = 1; i <= S.len; i++)
|
||||
if(src.type == S[i])
|
||||
id = "[i]"
|
||||
return
|
||||
CRASH("We couldn't assign an ID!")
|
||||
|
||||
|
||||
/datum/symptom/proc/Activate(var/mob/living/M, var/stage)
|
||||
return
|
||||
|
||||
95
code/datums/diseases/advance/symptoms/vomit.dm
Normal file
95
code/datums/diseases/advance/symptoms/vomit.dm
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Vomiting
|
||||
|
||||
Very Very Noticable.
|
||||
Decreases resistance.
|
||||
Doesn't increase stage speed.
|
||||
Little transmittable.
|
||||
Medium Level.
|
||||
|
||||
Bonus
|
||||
Forces the affected mob to vomit!
|
||||
Meaning your disease can spread via
|
||||
people walking on vomit.
|
||||
Makes the affected mob lose nutrition and
|
||||
heal toxin damage.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/vomit
|
||||
|
||||
name = "Vomiting"
|
||||
stealth = -2
|
||||
resistance = -1
|
||||
stage_speed = 0
|
||||
transmittable = 1
|
||||
level = 3
|
||||
|
||||
/datum/symptom/vomit/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(1, 2, 3, 4)
|
||||
M << "<span class='notice'>[pick("You feel nauseous.", "You feel like you're going to throw up!")]</span>"
|
||||
else
|
||||
Vomit(M)
|
||||
|
||||
return
|
||||
|
||||
/datum/symptom/vomit/proc/Vomit(var/mob/living/M)
|
||||
|
||||
M.Stun(5)
|
||||
M.visible_message("<B>[M]</B> vomits on the floor!")
|
||||
|
||||
M.nutrition -= 20
|
||||
M.adjustToxLoss(-3)
|
||||
|
||||
var/turf/pos = get_turf(M)
|
||||
pos.add_vomit_floor(M)
|
||||
playsound(pos, 'sound/effects/splat.ogg', 50, 1)
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Vomiting Blood
|
||||
|
||||
Very Very Noticable.
|
||||
Decreases resistance.
|
||||
Decreases stage speed.
|
||||
Little transmittable.
|
||||
Intense level.
|
||||
|
||||
Bonus
|
||||
Forces the affected mob to vomit blood!
|
||||
Meaning your disease can spread via
|
||||
people walking on the blood.
|
||||
Makes the affected mob lose health.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/vomit/blood
|
||||
|
||||
name = "Blood Vomiting"
|
||||
stealth = -2
|
||||
resistance = -1
|
||||
stage_speed = -1
|
||||
transmittable = 1
|
||||
level = 4
|
||||
|
||||
/datum/symptom/vomit/blood/Vomit(var/mob/living/M)
|
||||
|
||||
M.Stun(5)
|
||||
M.visible_message("<B>[M]</B> vomits on the floor!")
|
||||
|
||||
// They lose blood and health.
|
||||
var/brute_dam = M.getBruteLoss()
|
||||
if(brute_dam >= 50)
|
||||
M.adjustBruteLoss(3)
|
||||
|
||||
var/turf/pos = get_turf(M)
|
||||
pos.add_blood_floor(M)
|
||||
playsound(pos, 'sound/effects/splat.ogg', 50, 1)
|
||||
119
code/datums/diseases/advance/symptoms/weight.dm
Normal file
119
code/datums/diseases/advance/symptoms/weight.dm
Normal file
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Weight Gain
|
||||
|
||||
Very Very Noticable.
|
||||
Decreases resistance.
|
||||
Decreases stage speed.
|
||||
Reduced transmittable.
|
||||
Intense Level.
|
||||
|
||||
Bonus
|
||||
Increases the weight gain of the mob,
|
||||
forcing it to eventually turn fat.
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/weight_gain
|
||||
|
||||
name = "Weight Gain"
|
||||
stealth = -3
|
||||
resistance = -3
|
||||
stage_speed = -2
|
||||
transmittable = -2
|
||||
level = 4
|
||||
|
||||
/datum/symptom/weight_gain/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(1, 2, 3, 4)
|
||||
M << "<span class='notice'>[pick("You feel blubbery.", "You feel full.")]</span>"
|
||||
else
|
||||
M.overeatduration = min(M.overeatduration + 100, 600)
|
||||
M.nutrition = min(M.nutrition + 100, 500)
|
||||
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Weight Loss
|
||||
|
||||
Very Very Noticable.
|
||||
Decreases resistance.
|
||||
Decreases stage speed.
|
||||
Reduced Transmittable.
|
||||
High level.
|
||||
|
||||
Bonus
|
||||
Decreases the weight of the mob,
|
||||
forcing it to be skinny.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/weight_loss
|
||||
|
||||
name = "Weight Loss"
|
||||
stealth = -3
|
||||
resistance = -2
|
||||
stage_speed = -2
|
||||
transmittable = -2
|
||||
level = 3
|
||||
|
||||
/datum/symptom/weight_loss/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(1, 2, 3, 4)
|
||||
M << "<span class='notice'>[pick("You feel hungry.", "You crave for food.")]</span>"
|
||||
else
|
||||
M << "<span class='notice'>Your stomach rumbles.</span>"
|
||||
M.overeatduration = max(M.overeatduration - 100, 0)
|
||||
M.nutrition = max(M.nutrition - 100, 0)
|
||||
|
||||
return
|
||||
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Weight Even
|
||||
|
||||
Very Noticable.
|
||||
Decreases resistance.
|
||||
Decreases stage speed.
|
||||
Reduced transmittable.
|
||||
High level.
|
||||
|
||||
Bonus
|
||||
Causes the weight of the mob to
|
||||
be even, meaning eating isn't
|
||||
required anymore.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/weight_even
|
||||
|
||||
name = "Weight Even"
|
||||
stealth = -3
|
||||
resistance = -2
|
||||
stage_speed = -2
|
||||
transmittable = -2
|
||||
level = 4
|
||||
|
||||
/datum/symptom/weight_loss/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(5)
|
||||
M.overeatduration = 0
|
||||
M.nutrition = 400
|
||||
|
||||
return
|
||||
@@ -34,10 +34,11 @@
|
||||
spread_type = SPECIAL
|
||||
cure = "Unknown"
|
||||
cure_id = list("lexorin","toxin","gargleblaster")
|
||||
cure_chance = 20
|
||||
cure_chance = 50
|
||||
affected_species = list("Human", "Monkey")
|
||||
permeability_mod = 15//likely to infect
|
||||
can_carry = 0
|
||||
stage_prob = 3
|
||||
var/gibbed = 0
|
||||
stage_minimum_age = 300
|
||||
|
||||
@@ -74,12 +75,23 @@
|
||||
if(prob(50))
|
||||
if(gibbed != 0) return 0
|
||||
var/list/candidates = get_alien_candidates()
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc)
|
||||
if(candidates.len)
|
||||
new_xeno.key = pick(candidates)
|
||||
else
|
||||
new_xeno.key = affected_mob.key
|
||||
var/picked = null
|
||||
|
||||
// To stop clientless larva, we will check that our host has a client
|
||||
// if we find no ghosts to become the alien. If the host has a client
|
||||
// he will become the alien but if he doesn't then we will set the stage
|
||||
// to 2, so we don't do a process heavy check everytime.
|
||||
|
||||
if(candidates.len)
|
||||
picked = pick(candidates)
|
||||
else if(affected_mob.client)
|
||||
picked = affected_mob.key
|
||||
else
|
||||
stage = 2 // Let's try again later.
|
||||
return
|
||||
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc)
|
||||
new_xeno.key = picked
|
||||
new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100) //To get the player's attention
|
||||
affected_mob.gib()
|
||||
src.cure(0)
|
||||
|
||||
@@ -46,10 +46,23 @@ var/global/datum/getrev/revdata = new("config/svndir.txt")
|
||||
|
||||
if(svndirpath && fexists(svndirpath) && fexists("[svndirpath]/entries") && isfile(file("[svndirpath]/entries")))
|
||||
var/list/filelist = file2list("[svndirpath]/entries")
|
||||
if(filelist.len < 4)
|
||||
return abort()
|
||||
revision = filelist[4]
|
||||
commiter = filelist[12]
|
||||
var/s_archive = "" //Stores the previous line so the revision owner can be assigned.
|
||||
|
||||
//This thing doesn't count blank lines, so doing filelist[4] isn't working.
|
||||
for(var/s in filelist)
|
||||
if(!commiter)
|
||||
if(s == "has-props")//The line before this is the committer.
|
||||
commiter = s_archive
|
||||
if(!revision)
|
||||
var/n = text2num(s)
|
||||
if(isnum(n))
|
||||
if(n > 5000 && n < 99999) //Do you think we'll still be up and running at r100000? :) ~Errorage
|
||||
revision = s
|
||||
if(revision && commiter)
|
||||
break
|
||||
s_archive = s
|
||||
if(!revision)
|
||||
abort()
|
||||
diary << "Revision info loaded succesfully"
|
||||
return
|
||||
return abort()
|
||||
|
||||
@@ -161,6 +161,7 @@
|
||||
if(istype(teleatom, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite
|
||||
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
|
||||
return 0
|
||||
|
||||
if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/disk/nuclear)))
|
||||
if(istype(teleatom, /mob/living))
|
||||
var/mob/living/MM = teleatom
|
||||
@@ -168,6 +169,17 @@
|
||||
else
|
||||
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
|
||||
return 0
|
||||
if(destination.z > 7)
|
||||
|
||||
if(destination.z == 2) //centcomm z-level
|
||||
if(istype(teleatom, /obj/mecha))
|
||||
var/obj/mecha/MM = teleatom
|
||||
MM.occupant << "\red <B>The mech would not survive the jump to a location so far away!</B>"
|
||||
return 0
|
||||
if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)))
|
||||
teleatom.visible_message("\red <B>The Bag of Holding bounces off of the portal!</B>")
|
||||
return 0
|
||||
|
||||
|
||||
if(destination.z > 7) //Away mission z-levels
|
||||
return 0
|
||||
return 1
|
||||
@@ -68,6 +68,7 @@ datum/mind
|
||||
if(current) //remove ourself from our old body's mind variable
|
||||
if(changeling)
|
||||
current.remove_changeling_powers()
|
||||
current.verbs -= /datum/changeling/proc/EvolutionMenu
|
||||
current.mind = null
|
||||
if(new_character.mind) //remove any mind currently in our new body's mind variable
|
||||
new_character.mind.current = null
|
||||
@@ -312,7 +313,7 @@ datum/mind
|
||||
crystals = suplink.uses
|
||||
if (suplink)
|
||||
text += "|<a href='?src=\ref[src];common=takeuplink'>take</a>"
|
||||
if (usr.client.holder.level >= 3)
|
||||
if (usr.client.holder.rights & R_FUN)
|
||||
text += ", <a href='?src=\ref[src];common=crystals'>[crystals]</a> crystals"
|
||||
else
|
||||
text += ", [crystals] crystals"
|
||||
@@ -339,17 +340,7 @@ datum/mind
|
||||
usr << browse(out, "window=edit_memory[src]")
|
||||
|
||||
Topic(href, href_list)
|
||||
if(!usr || !usr.client)
|
||||
return
|
||||
|
||||
if(!usr.client.holder)
|
||||
message_admins("\red [key_name(usr)] tried to access [current]'s mind without authorization.")
|
||||
log_admin("[key_name(usr)] tried to access [current]'s mind without authorization.")
|
||||
return
|
||||
|
||||
if (!(usr.client.holder.rank in list("Trial Admin", "Badmin", "Game Admin", "Game Master")))
|
||||
alert("You cannot perform this action. You must be of a higher administrative rank!")
|
||||
return
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
if (href_list["role_edit"])
|
||||
var/new_role = input("Select new role", "Assigned role", assigned_role) as null|anything in get_all_jobs()
|
||||
@@ -761,7 +752,7 @@ datum/mind
|
||||
return
|
||||
switch(href_list["monkey"])
|
||||
if("healthy")
|
||||
if (usr.client.holder.level >= 3)
|
||||
if (usr.client.holder.rights & R_ADMIN)
|
||||
var/mob/living/carbon/human/H = current
|
||||
var/mob/living/carbon/monkey/M = current
|
||||
if (istype(H))
|
||||
@@ -776,7 +767,7 @@ datum/mind
|
||||
D.cure(0)
|
||||
sleep(0) //because deleting of virus is done through spawn(0)
|
||||
if("infected")
|
||||
if (usr.client.holder.level >= 3)
|
||||
if (usr.client.holder.rights & R_ADMIN)
|
||||
var/mob/living/carbon/human/H = current
|
||||
var/mob/living/carbon/monkey/M = current
|
||||
if (istype(H))
|
||||
@@ -880,7 +871,7 @@ datum/mind
|
||||
take_uplink()
|
||||
memory = null//Remove any memory they may have had.
|
||||
if("crystals")
|
||||
if (usr.client.holder.level >= 3)
|
||||
if (usr.client.holder.rights & R_FUN)
|
||||
var/obj/item/device/uplink/hidden/suplink = find_syndicate_uplink()
|
||||
var/crystals
|
||||
if (suplink)
|
||||
|
||||
@@ -64,6 +64,11 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
usr << "Not when you're incapacitated."
|
||||
return 0
|
||||
|
||||
if(ishuman(usr) || ismonkey(usr))
|
||||
if(istype(usr.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
usr << "Mmmf mrrfff!"
|
||||
return 0
|
||||
|
||||
if(clothes_req) //clothes check
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
usr << "You aren't a human, Why are you trying to cast a human spell, silly non-human? Casting human spells is for humans."
|
||||
@@ -96,7 +101,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
if(prob(50))//Auto-mute? Fuck that noise
|
||||
usr.say(invocation)
|
||||
else
|
||||
usr.say(dd_replacetext(invocation," ","`"))
|
||||
usr.say(replacetext(invocation," ","`"))
|
||||
if(usr.gender==MALE)
|
||||
playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
|
||||
else
|
||||
@@ -105,7 +110,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
if(prob(50))
|
||||
usr.whisper(invocation)
|
||||
else
|
||||
usr.whisper(dd_replacetext(invocation," ","`"))
|
||||
usr.whisper(replacetext(invocation," ","`"))
|
||||
|
||||
/obj/effect/proc_holder/spell/New()
|
||||
..()
|
||||
|
||||
@@ -29,16 +29,21 @@
|
||||
var/spawn_place = pick(targets)
|
||||
if(summon_ignore_prev_spawn_points)
|
||||
targets -= spawn_place
|
||||
var/atom/summoned_object = new summoned_object_type(spawn_place)
|
||||
if(ispath(summoned_object_type,/turf))
|
||||
var/turf/O = spawn_place
|
||||
var/turf/N = summoned_object_type
|
||||
O.ChangeTurf(N)
|
||||
else
|
||||
var/atom/summoned_object = new summoned_object_type(spawn_place)
|
||||
|
||||
for(var/varName in newVars)
|
||||
if(varName in summoned_object.vars)
|
||||
summoned_object.vars[varName] = newVars[varName]
|
||||
for(var/varName in newVars)
|
||||
if(varName in summoned_object.vars)
|
||||
summoned_object.vars[varName] = newVars[varName]
|
||||
|
||||
if(summon_lifespan)
|
||||
spawn(summon_lifespan)
|
||||
if(summoned_object)
|
||||
del(summoned_object)
|
||||
if(summon_lifespan)
|
||||
spawn(summon_lifespan)
|
||||
if(summoned_object)
|
||||
del(summoned_object)
|
||||
else
|
||||
switch(charge_type)
|
||||
if("recharge")
|
||||
|
||||
@@ -73,26 +73,5 @@
|
||||
S.update_solar_exposure()
|
||||
|
||||
|
||||
//returns the north-zero clockwise angle in degrees, given a direction
|
||||
|
||||
/proc/dir2angle(var/D)
|
||||
switch(D)
|
||||
if(1)
|
||||
return 0
|
||||
if(2)
|
||||
return 180
|
||||
if(4)
|
||||
return 90
|
||||
if(8)
|
||||
return 270
|
||||
if(5)
|
||||
return 45
|
||||
if(6)
|
||||
return 135
|
||||
if(9)
|
||||
return 315
|
||||
if(10)
|
||||
return 225
|
||||
else
|
||||
return null
|
||||
|
||||
|
||||
@@ -202,6 +202,13 @@
|
||||
containertype = /obj/structure/largecrate/mule
|
||||
containername = "MULEbot Crate"
|
||||
|
||||
/datum/supply_packs/lisa
|
||||
name = "Corgi Crate"
|
||||
contains = list()
|
||||
cost = 50
|
||||
containertype = /obj/structure/largecrate/lisa
|
||||
containername = "Corgi Crate"
|
||||
|
||||
/datum/supply_packs/hydroponics // -- Skie
|
||||
name = "Hydroponics Supply Crate"
|
||||
contains = list(/obj/item/weapon/reagent_containers/spray/plantbgone,
|
||||
|
||||
@@ -39,6 +39,10 @@
|
||||
anchored = 1.0
|
||||
unacidable = 1
|
||||
|
||||
/*
|
||||
* This item is completely unused, but removing it will break something in R&D and Radio code causing PDA and Ninja code to fail on compile
|
||||
*/
|
||||
|
||||
/obj/effect/datacore
|
||||
name = "datacore"
|
||||
var/medical[] = list()
|
||||
@@ -148,8 +152,8 @@
|
||||
|
||||
|
||||
dat += "</table>"
|
||||
dat = dd_replacetext(dat, "\n", "") // so it can be placed on paper correctly
|
||||
dat = dd_replacetext(dat, "\t", "")
|
||||
dat = replacetext(dat, "\n", "") // so it can be placed on paper correctly
|
||||
dat = replacetext(dat, "\t", "")
|
||||
return dat
|
||||
|
||||
/obj/item/device/infra_sensor
|
||||
@@ -161,6 +165,10 @@
|
||||
item_state = "electronic"
|
||||
m_amt = 150
|
||||
origin_tech = "magnets=2"
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/obj/effect/laser
|
||||
|
||||
@@ -10,6 +10,23 @@
|
||||
/obj/item/toy/prize
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "ripleytoy"
|
||||
var/cooldown = 0
|
||||
|
||||
//all credit to skasi for toy mech fun ideas
|
||||
/obj/item/toy/prize/attack_self(mob/user as mob)
|
||||
if(cooldown < world.time - 8)
|
||||
user << "<span class='notice'>You play with [src].</span>"
|
||||
playsound(user, 'sound/mecha/mechstep.ogg', 20, 1)
|
||||
cooldown = world.time
|
||||
|
||||
/obj/item/toy/prize/attack_hand(mob/user as mob)
|
||||
if(loc == user)
|
||||
if(cooldown < world.time - 8)
|
||||
user << "<span class='notice'>You play with [src].</span>"
|
||||
playsound(user, 'sound/mecha/mechturn.ogg', 20, 1)
|
||||
cooldown = world.time
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/toy/prize/ripley
|
||||
name = "toy ripley"
|
||||
@@ -485,4 +502,17 @@
|
||||
item_state = "balloon"
|
||||
else
|
||||
icon_state = "waterballoon-e"
|
||||
item_state = "balloon-empty"
|
||||
item_state = "balloon-empty"
|
||||
|
||||
/obj/item/toy/katana
|
||||
name = "replica katana"
|
||||
desc = "Woefully underpowered in D20."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "katana"
|
||||
item_state = "katana"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BELT | SLOT_BACK
|
||||
force = 5
|
||||
throwforce = 5
|
||||
w_class = 3
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced")
|
||||
@@ -25,7 +25,7 @@
|
||||
var/vend_reply //Thank you for shopping!
|
||||
var/last_reply = 0
|
||||
var/last_slogan = 0 //When did we last pitch?
|
||||
var/slogan_delay = 600 //How long until we can pitch again?
|
||||
var/slogan_delay = 6000 //How long until we can pitch again?
|
||||
var/icon_vend //Icon_state when vending!
|
||||
var/icon_deny //Icon_state when vending!
|
||||
//var/emagged = 0 //Ignores if somebody doesn't have card access to that machine.
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
/obj/item/weapon
|
||||
name = "weapon"
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
@@ -37,14 +35,17 @@
|
||||
m_amt = 1000
|
||||
origin_tech = "materials=2"
|
||||
attack_verb = list("shoved", "bashed")
|
||||
var/cooldown = 0 //shield bash cooldown. based on world.time
|
||||
|
||||
IsShield()
|
||||
return 1
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/melee/baton))
|
||||
user.visible_message("<span class='warning'>[user] bashes their [src] with [W]!</span>")
|
||||
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
|
||||
if(cooldown < world.time - 25)
|
||||
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
|
||||
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
|
||||
cooldown = world.time
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -83,9 +84,6 @@
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
|
||||
|
||||
log_admin("ATTACK: [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
|
||||
msg_admin_attack("ATTACK: [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") //BS12 EDIT ALG
|
||||
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
|
||||
@@ -306,7 +304,7 @@
|
||||
/obj/item/weapon/spacecash/attack_self(var/mob/user)
|
||||
interact(user)
|
||||
|
||||
/obj/item/weapon/spacecash/proc/interact(var/mob/user)
|
||||
/obj/item/weapon/spacecash/interact(var/mob/user)
|
||||
|
||||
user.machine = src
|
||||
|
||||
@@ -1713,23 +1711,6 @@
|
||||
var/cigarcount = 6
|
||||
flags = ONBELT | TABLEPASS */
|
||||
|
||||
|
||||
/obj/item/weapon/mousetrap
|
||||
name = "mousetrap"
|
||||
desc = "A handy little spring-loaded trap for catching pesty rodents."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "mousetrap"
|
||||
item_state = "mousetrap"
|
||||
w_class = 1
|
||||
force = null
|
||||
throwforce = null
|
||||
var/armed = 0
|
||||
origin_tech = "combat=1"
|
||||
|
||||
/obj/item/weapon/mousetrap/armed
|
||||
icon_state = "mousetraparmed"
|
||||
armed = 1
|
||||
|
||||
/obj/item/weapon/pai_cable
|
||||
desc = "A flexible coated cable with a universal jack on one end."
|
||||
name = "data cable"
|
||||
|
||||
@@ -39,37 +39,6 @@ var/DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is
|
||||
*/
|
||||
|
||||
DBConnection
|
||||
New(dbi_handler,username,password_handler,cursor_handler)
|
||||
src.dbi = dbi_handler
|
||||
src.user = username
|
||||
src.password = password_handler
|
||||
src.default_cursor = cursor_handler
|
||||
_db_con = _dm_db_new_con()
|
||||
proc
|
||||
Connect(dbi_handler=src.dbi,user_handler=src.user,password_handler=src.password,cursor_handler)
|
||||
if(!sqllogging)
|
||||
return 0
|
||||
if(!src) return 0
|
||||
cursor_handler = src.default_cursor
|
||||
if(!cursor_handler) cursor_handler = Default_Cursor
|
||||
return _dm_db_connect(_db_con,dbi_handler,user_handler,password_handler,cursor_handler,null)
|
||||
|
||||
Disconnect() return _dm_db_close(_db_con)
|
||||
|
||||
IsConnected()
|
||||
if(!sqllogging) return 0
|
||||
var/success = _dm_db_is_connected(_db_con)
|
||||
return success
|
||||
|
||||
Quote(str) return _dm_db_quote(_db_con,str)
|
||||
|
||||
ErrorMsg() return _dm_db_error_msg(_db_con)
|
||||
SelectDB(database_name,dbi)
|
||||
if(IsConnected()) Disconnect()
|
||||
//return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[DB_SERVER]:[DB_PORT]"]",user,password)
|
||||
return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[sqladdress]:[sqlport]"]",user,password)
|
||||
NewQuery(sql_query,cursor_handler=src.default_cursor) return new/DBQuery(sql_query,src,cursor_handler)
|
||||
|
||||
var/_db_con // This variable contains a reference to the actual database connection.
|
||||
var/dbi // This variable is a string containing the DBI MySQL requires.
|
||||
var/user // This variable contains the username data.
|
||||
@@ -79,61 +48,47 @@ DBConnection
|
||||
var/server = ""
|
||||
var/port = 3306
|
||||
|
||||
DBConnection/New(dbi_handler,username,password_handler,cursor_handler)
|
||||
src.dbi = dbi_handler
|
||||
src.user = username
|
||||
src.password = password_handler
|
||||
src.default_cursor = cursor_handler
|
||||
_db_con = _dm_db_new_con()
|
||||
|
||||
DBConnection/proc/Connect(dbi_handler=src.dbi,user_handler=src.user,password_handler=src.password,cursor_handler)
|
||||
if(!sqllogging)
|
||||
return 0
|
||||
if(!src) return 0
|
||||
cursor_handler = src.default_cursor
|
||||
if(!cursor_handler) cursor_handler = Default_Cursor
|
||||
return _dm_db_connect(_db_con,dbi_handler,user_handler,password_handler,cursor_handler,null)
|
||||
|
||||
DBConnection/proc/Disconnect() return _dm_db_close(_db_con)
|
||||
|
||||
DBConnection/proc/IsConnected()
|
||||
if(!sqllogging) return 0
|
||||
var/success = _dm_db_is_connected(_db_con)
|
||||
return success
|
||||
|
||||
DBConnection/proc/Quote(str) return _dm_db_quote(_db_con,str)
|
||||
|
||||
DBConnection/proc/ErrorMsg() return _dm_db_error_msg(_db_con)
|
||||
DBConnection/proc/SelectDB(database_name,dbi)
|
||||
if(IsConnected()) Disconnect()
|
||||
//return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[DB_SERVER]:[DB_PORT]"]",user,password)
|
||||
return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[sqladdress]:[sqlport]"]",user,password)
|
||||
DBConnection/proc/NewQuery(sql_query,cursor_handler=src.default_cursor) return new/DBQuery(sql_query,src,cursor_handler)
|
||||
|
||||
|
||||
DBQuery/New(sql_query,DBConnection/connection_handler,cursor_handler)
|
||||
if(sql_query) src.sql = sql_query
|
||||
if(connection_handler) src.db_connection = connection_handler
|
||||
if(cursor_handler) src.default_cursor = cursor_handler
|
||||
_db_query = _dm_db_new_query()
|
||||
return ..()
|
||||
|
||||
|
||||
DBQuery
|
||||
New(sql_query,DBConnection/connection_handler,cursor_handler)
|
||||
if(sql_query) src.sql = sql_query
|
||||
if(connection_handler) src.db_connection = connection_handler
|
||||
if(cursor_handler) src.default_cursor = cursor_handler
|
||||
_db_query = _dm_db_new_query()
|
||||
return ..()
|
||||
|
||||
proc
|
||||
|
||||
Connect(DBConnection/connection_handler) src.db_connection = connection_handler
|
||||
|
||||
Execute(sql_query=src.sql,cursor_handler=default_cursor)
|
||||
Close()
|
||||
return _dm_db_execute(_db_query,sql_query,db_connection._db_con,cursor_handler,null)
|
||||
|
||||
NextRow() return _dm_db_next_row(_db_query,item,conversions)
|
||||
|
||||
RowsAffected() return _dm_db_rows_affected(_db_query)
|
||||
|
||||
RowCount() return _dm_db_row_count(_db_query)
|
||||
|
||||
ErrorMsg() return _dm_db_error_msg(_db_query)
|
||||
|
||||
Columns()
|
||||
if(!columns)
|
||||
columns = _dm_db_columns(_db_query,/DBColumn)
|
||||
return columns
|
||||
|
||||
GetRowData()
|
||||
var/list/columns = Columns()
|
||||
var/list/results
|
||||
if(columns.len)
|
||||
results = list()
|
||||
for(var/C in columns)
|
||||
results+=C
|
||||
var/DBColumn/cur_col = columns[C]
|
||||
results[C] = src.item[(cur_col.position+1)]
|
||||
return results
|
||||
|
||||
Close()
|
||||
item.len = 0
|
||||
columns = null
|
||||
conversions = null
|
||||
return _dm_db_close(_db_query)
|
||||
|
||||
Quote(str)
|
||||
return db_connection.Quote(str)
|
||||
|
||||
SetConversion(column,conversion)
|
||||
if(istext(column)) column = columns.Find(column)
|
||||
if(!conversions) conversions = new/list(column)
|
||||
else if(conversions.len < column) conversions.len = column
|
||||
conversions[column] = conversion
|
||||
|
||||
var/sql // The sql query being executed.
|
||||
var/default_cursor
|
||||
var/list/columns //list of DB Columns populated by Columns()
|
||||
@@ -143,6 +98,52 @@ DBQuery
|
||||
var/DBConnection/db_connection
|
||||
var/_db_query
|
||||
|
||||
DBQuery/proc/Connect(DBConnection/connection_handler) src.db_connection = connection_handler
|
||||
|
||||
DBQuery/proc/Execute(sql_query=src.sql,cursor_handler=default_cursor)
|
||||
Close()
|
||||
return _dm_db_execute(_db_query,sql_query,db_connection._db_con,cursor_handler,null)
|
||||
|
||||
DBQuery/proc/NextRow() return _dm_db_next_row(_db_query,item,conversions)
|
||||
|
||||
DBQuery/proc/RowsAffected() return _dm_db_rows_affected(_db_query)
|
||||
|
||||
DBQuery/proc/RowCount() return _dm_db_row_count(_db_query)
|
||||
|
||||
DBQuery/proc/ErrorMsg() return _dm_db_error_msg(_db_query)
|
||||
|
||||
DBQuery/proc/Columns()
|
||||
if(!columns)
|
||||
columns = _dm_db_columns(_db_query,/DBColumn)
|
||||
return columns
|
||||
|
||||
DBQuery/proc/GetRowData()
|
||||
var/list/columns = Columns()
|
||||
var/list/results
|
||||
if(columns.len)
|
||||
results = list()
|
||||
for(var/C in columns)
|
||||
results+=C
|
||||
var/DBColumn/cur_col = columns[C]
|
||||
results[C] = src.item[(cur_col.position+1)]
|
||||
return results
|
||||
|
||||
DBQuery/proc/Close()
|
||||
item.len = 0
|
||||
columns = null
|
||||
conversions = null
|
||||
return _dm_db_close(_db_query)
|
||||
|
||||
DBQuery/proc/Quote(str)
|
||||
return db_connection.Quote(str)
|
||||
|
||||
DBQuery/proc/SetConversion(column,conversion)
|
||||
if(istext(column)) column = columns.Find(column)
|
||||
if(!conversions) conversions = new/list(column)
|
||||
else if(conversions.len < column) conversions.len = column
|
||||
conversions[column] = conversion
|
||||
|
||||
|
||||
DBColumn
|
||||
var/name
|
||||
var/table
|
||||
@@ -152,32 +153,32 @@ DBColumn
|
||||
var/length
|
||||
var/max_length
|
||||
|
||||
New(name_handler,table_handler,position_handler,type_handler,flag_handler,length_handler,max_length_handler)
|
||||
src.name = name_handler
|
||||
src.table = table_handler
|
||||
src.position = position_handler
|
||||
src.sql_type = type_handler
|
||||
src.flags = flag_handler
|
||||
src.length = length_handler
|
||||
src.max_length = max_length_handler
|
||||
return ..()
|
||||
DBColumn/New(name_handler,table_handler,position_handler,type_handler,flag_handler,length_handler,max_length_handler)
|
||||
src.name = name_handler
|
||||
src.table = table_handler
|
||||
src.position = position_handler
|
||||
src.sql_type = type_handler
|
||||
src.flags = flag_handler
|
||||
src.length = length_handler
|
||||
src.max_length = max_length_handler
|
||||
return ..()
|
||||
|
||||
proc
|
||||
SqlTypeName(type_handler=src.sql_type)
|
||||
switch(type_handler)
|
||||
if(TINYINT) return "TINYINT"
|
||||
if(SMALLINT) return "SMALLINT"
|
||||
if(MEDIUMINT) return "MEDIUMINT"
|
||||
if(INTEGER) return "INTEGER"
|
||||
if(BIGINT) return "BIGINT"
|
||||
if(FLOAT) return "FLOAT"
|
||||
if(DOUBLE) return "DOUBLE"
|
||||
if(DATE) return "DATE"
|
||||
if(DATETIME) return "DATETIME"
|
||||
if(TIMESTAMP) return "TIMESTAMP"
|
||||
if(TIME) return "TIME"
|
||||
if(STRING) return "STRING"
|
||||
if(BLOB) return "BLOB"
|
||||
|
||||
DBColumn/proc/SqlTypeName(type_handler=src.sql_type)
|
||||
switch(type_handler)
|
||||
if(TINYINT) return "TINYINT"
|
||||
if(SMALLINT) return "SMALLINT"
|
||||
if(MEDIUMINT) return "MEDIUMINT"
|
||||
if(INTEGER) return "INTEGER"
|
||||
if(BIGINT) return "BIGINT"
|
||||
if(FLOAT) return "FLOAT"
|
||||
if(DOUBLE) return "DOUBLE"
|
||||
if(DATE) return "DATE"
|
||||
if(DATETIME) return "DATETIME"
|
||||
if(TIMESTAMP) return "TIMESTAMP"
|
||||
if(TIME) return "TIME"
|
||||
if(STRING) return "STRING"
|
||||
if(BLOB) return "BLOB"
|
||||
|
||||
|
||||
#undef Default_Cursor
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
//*******************************
|
||||
//
|
||||
// Forum SQL Account Activation
|
||||
//
|
||||
//*******************************
|
||||
//
|
||||
// This module allows players to associate their BYOND keys with a specific forum username on the /tg/station forums.
|
||||
// Its original intent is to disable posting for any non-associated forum accounts, and only allow players who've activated
|
||||
// their account in-game to be able to post, hopefully reducing the spam the forum receives dramatically.
|
||||
//
|
||||
// This effect, of course, is not achieved entirely within BYOND. Some configuration on the forum-side is required as well.
|
||||
// Targetted for phpBB3, not tested with earlier versions.
|
||||
//
|
||||
//
|
||||
// Requires Dantom.DB library ( http://www.byond.com/developer/Dantom/DB )
|
||||
//
|
||||
// Written by TLE for /tg/station13
|
||||
|
||||
|
||||
/proc/associate_key_with_forum(var/accname as text, var/playerkey as text)
|
||||
var/DBConnection/dbcon = new()
|
||||
var/uid
|
||||
|
||||
// TODO: Replace local vars with global var references
|
||||
var/TG13user = forumsqllogin
|
||||
var/TG13pass = forumsqlpass
|
||||
var/TG13db = forumsqldb
|
||||
var/TG13address = forumsqladdress
|
||||
var/TG13port = forumsqlport
|
||||
|
||||
dbcon.Connect("dbi:mysql:[TG13db]:[TG13address]:[TG13port]","[TG13user]","[TG13pass]")
|
||||
if(!dbcon.IsConnected())
|
||||
src << "<font color=red><b>Server Connection Error</b> : Unable to open a connection with the forum database.</font>"
|
||||
src << "<i>Potential causes for this problem: Incorrect login information, incorrect server connection information, the forum server is down or not responding to requests, your firewall is blocking outgoing SQL requests.</i>"
|
||||
return
|
||||
|
||||
// Sanitize inputs to avoid SQL injection attacks
|
||||
accname = sanitizeSQL(accname)
|
||||
playerkey = sanitizeSQL(playerkey)
|
||||
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT user_id FROM [forumsqldb].phpbb_users WHERE username = '[accname]'")
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
uid = query.item[1] // Find and save the account's user_id
|
||||
if(!uid)
|
||||
src << "Forum account not found!"
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
|
||||
query = dbcon.NewQuery("SELECT pf_byondkey FROM [forumsqldb].phpbb_profile_fields_data WHERE user_id = '[uid]'")
|
||||
if(!query.Execute())
|
||||
src << "Unable to verify whether account is already associated with a BYOND key or not. This error shouldn't occur, please contact an administrator."
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
if(query.RowCount() > 0)
|
||||
query.NextRow()
|
||||
var/currentholder = query.item[1]
|
||||
src << "Forum account already has a BYOND key associated with it. The current BYOND key associated with the account is \"[currentholder]\"."
|
||||
src << "If this is not a key you own and you feel that someone has wrongfully authenticated your forum account please contact an administrator to have your account returned to you."
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
|
||||
query = dbcon.NewQuery("SELECT * FROM [forumsqldb].phpbb_user_group WHERE user_id = '[uid]' AND group_id = '[forum_authenticated_group]'")
|
||||
if(!query.Execute())
|
||||
src << "Unable to verify whether account is already part of the authenticated group or not. This error should not occur, please contact an administrator."
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
if(query.RowCount() > 0)
|
||||
src << "Forum account already belongs to the authenticated group. If this is your account and you did not authenticate it please contact an administrator to have your account returned to you."
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
|
||||
query = dbcon.NewQuery("INSERT INTO [forumsqldb].phpbb_profile_fields_data (user_id, pf_byondkey) VALUES ('[uid]', '[playerkey]')") // Remember which key is associated with the account
|
||||
if(!query.Execute())
|
||||
src << "Unable to associate key with account. Authentication failed."
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
|
||||
query = dbcon.NewQuery("UPDATE [forumsqldb].phpbb_user_group SET group_id = '[forum_authenticated_group]' WHERE user_id = '[uid]' AND group_id = '[forum_activated_group]'") // Replace 'registered_name Users' group with 'Activated Users'
|
||||
if(!query.Execute())
|
||||
src << "Unable to move account into authenticated group. This error shouldn't occur, contact an administrator for help. Authentication failed."
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
|
||||
query = dbcon.NewQuery("UPDATE [forumsqldb].phpbb_users SET group_id = '[forum_authenticated_group]' WHERE user_id = '[uid]'") // Change 'default group' the the authenticated group. Not doing so was causing many authenticated accounts to retain their unauthenticated permissions, despite being succesfully authenticated.
|
||||
if(!query.Execute())
|
||||
src << "Unable to modify default group for account. This error should never occur, contact an administrator for help. Authentication failed."
|
||||
else
|
||||
src << "Authentication succeeded. You may now start posting on the <a href=http://nanotrasen.com/phpBB3/>tgstation forums</a>."
|
||||
dbcon.Disconnect()
|
||||
|
||||
|
||||
// This actually opens up a bunch of security holes to the forum DB. Given that it's not used much in the first place,
|
||||
// I'm going to keep this commented out until we're sure everything's secure. -- TLE
|
||||
/*
|
||||
/client/verb/activate_forum_account(var/a as text)
|
||||
set name = "Activate Forum Account"
|
||||
set category = "Special Verbs"
|
||||
set desc = "Associate a tgstation forum account with your BYOND key to enable posting."
|
||||
associate_key_with_forum(a, src.key)
|
||||
*/
|
||||
@@ -5,34 +5,30 @@ proc/sql_poll_players()
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client)
|
||||
playercount += 1
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
log_game("SQL ERROR during player polling. Failed to connect.")
|
||||
else
|
||||
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
|
||||
var/DBQuery/query = dbcon.NewQuery("INSERT INTO population (playercount, time) VALUES ([playercount], '[sqltime]')")
|
||||
var/DBQuery/query = dbcon_old.NewQuery("INSERT INTO population (playercount, time) VALUES ([playercount], '[sqltime]')")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during player polling. Error : \[[err]\]\n")
|
||||
dbcon.Disconnect()
|
||||
|
||||
|
||||
proc/sql_poll_admins()
|
||||
if(!sqllogging)
|
||||
return
|
||||
var/admincount = admins.len
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
log_game("SQL ERROR during admin polling. Failed to connect.")
|
||||
else
|
||||
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
|
||||
var/DBQuery/query = dbcon.NewQuery("INSERT INTO population (admincount, time) VALUES ([admincount], '[sqltime]')")
|
||||
var/DBQuery/query = dbcon_old.NewQuery("INSERT INTO population (admincount, time) VALUES ([admincount], '[sqltime]')")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during admin polling. Error : \[[err]\]\n")
|
||||
dbcon.Disconnect()
|
||||
|
||||
proc/sql_report_round_start()
|
||||
// TODO
|
||||
@@ -68,8 +64,7 @@ proc/sql_report_death(var/mob/living/carbon/human/H)
|
||||
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
|
||||
var/coord = "[H.x], [H.y], [H.z]"
|
||||
//world << "INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.bruteloss], [H.getFireLoss()], [H.brainloss], [H.getOxyLoss()])"
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
log_game("SQL ERROR during death reporting. Failed to connect.")
|
||||
else
|
||||
@@ -77,7 +72,6 @@ proc/sql_report_death(var/mob/living/carbon/human/H)
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
||||
dbcon.Disconnect()
|
||||
|
||||
|
||||
proc/sql_report_cyborg_death(var/mob/living/silicon/robot/H)
|
||||
@@ -105,8 +99,7 @@ proc/sql_report_cyborg_death(var/mob/living/silicon/robot/H)
|
||||
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
|
||||
var/coord = "[H.x], [H.y], [H.z]"
|
||||
//world << "INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.bruteloss], [H.getFireLoss()], [H.brainloss], [H.getOxyLoss()])"
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
log_game("SQL ERROR during death reporting. Failed to connect.")
|
||||
else
|
||||
@@ -114,7 +107,6 @@ proc/sql_report_cyborg_death(var/mob/living/silicon/robot/H)
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
||||
dbcon.Disconnect()
|
||||
|
||||
|
||||
proc/statistic_cycle()
|
||||
@@ -139,8 +131,7 @@ proc/sql_commit_feedback()
|
||||
log_game("Round ended without any feedback being generated. No feedback was sent to the database.")
|
||||
return
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
log_game("SQL ERROR during feedback reporting. Failed to connect.")
|
||||
else
|
||||
@@ -168,28 +159,4 @@ proc/sql_commit_feedback()
|
||||
var/DBQuery/query = dbcon.NewQuery("INSERT INTO erro_feedback (id, roundid, time, variable, value) VALUES (null, [newroundid], Now(), '[variable]', '[value]')")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
||||
|
||||
dbcon.Disconnect()
|
||||
|
||||
|
||||
proc/debug_sql_commit_feedback()
|
||||
if(!blackbox)
|
||||
world << "Round ended without a blackbox recorder. No feedback was sent to the database."
|
||||
return
|
||||
|
||||
//content is a list of lists. Each item in the list is a list with two fields, a variable name and a value. Items MUST only have these two values.
|
||||
var/list/datum/feedback_variable/content = blackbox.get_round_feedback()
|
||||
|
||||
if(!content)
|
||||
world << "Round ended without any feedback being generated. No feedback was sent to the database."
|
||||
return
|
||||
|
||||
for(var/datum/feedback_variable/item in content)
|
||||
var/variable = item.get_variable()
|
||||
var/value = item.get_value()
|
||||
|
||||
world << "INSERT INTO erro_feedback (id, roundid, time, variable, value) VALUES (null, ABC, Now(), '[variable]', '[value]')"
|
||||
|
||||
|
||||
world << "end"
|
||||
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
||||
@@ -967,6 +967,17 @@ proc/process_ghost_teleport_locs()
|
||||
icon_state = "medbay"
|
||||
music = 'sound/ambience/signal.ogg'
|
||||
|
||||
//Medbay is a large area, these additional areas help level out APC load.
|
||||
/area/medical/medbay2
|
||||
name = "Medbay"
|
||||
icon_state = "medbay2"
|
||||
music = 'sound/ambience/signal.ogg'
|
||||
|
||||
/area/medical/medbay3
|
||||
name = "Medbay"
|
||||
icon_state = "medbay3"
|
||||
music = 'sound/ambience/signal.ogg'
|
||||
|
||||
/area/medical/patients_rooms
|
||||
name = "\improper Patient's Rooms"
|
||||
icon_state = "patients"
|
||||
@@ -1008,9 +1019,13 @@ proc/process_ghost_teleport_locs()
|
||||
icon_state = "exam_room"
|
||||
|
||||
/area/medical/genetics
|
||||
name = "Genetics"
|
||||
name = "Genetics Lab"
|
||||
icon_state = "genetics"
|
||||
|
||||
/area/medical/genetics_cloning
|
||||
name = "Cloning Lab"
|
||||
icon_state = "cloning"
|
||||
|
||||
/area/medical/sleeper
|
||||
name = "\improper Medical Sleeper Room"
|
||||
icon_state = "exam_room"
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
M.hitby(src)
|
||||
|
||||
log_attack("<font color='red'>[hit_atom] ([M.ckey]) was hit by [src] thrown by ([src.fingerprintslast])</font>")
|
||||
log_admin("ATTACK: [hit_atom] ([M.ckey]) was hit by [src] thrown by ([src.fingerprintslast])")
|
||||
msg_admin_attack("ATTACK: [hit_atom] ([M.ckey]) was hit by [src] thrown by ([src.fingerprintslast])")
|
||||
|
||||
else if(isobj(hit_atom))
|
||||
var/obj/O = hit_atom
|
||||
@@ -511,7 +509,7 @@ its easier to just keep the beam vertical.
|
||||
|
||||
// Only adds blood on the floor -- Skie
|
||||
/atom/proc/add_blood_floor(mob/living/carbon/M as mob)
|
||||
if( istype(M, /mob/living/carbon/monkey) )
|
||||
if( istype(M, /mob/living/carbon/monkey) || istype(M, /mob/living/carbon/human))
|
||||
if( istype(src, /turf/simulated) )
|
||||
var/turf/simulated/source1 = src
|
||||
var/obj/effect/decal/cleanable/blood/this = new /obj/effect/decal/cleanable/blood(source1)
|
||||
@@ -534,11 +532,7 @@ its easier to just keep the beam vertical.
|
||||
else if( istype(M, /mob/living/silicon/robot ))
|
||||
if( istype(src, /turf/simulated) )
|
||||
var/turf/simulated/source2 = src
|
||||
var/obj/effect/decal/cleanable/oil/this = new /obj/effect/decal/cleanable/oil(source2)
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
var/datum/disease/newDisease = new D.type
|
||||
this.viruses += newDisease
|
||||
newDisease.holder = this
|
||||
new /obj/effect/decal/cleanable/oil(source2)
|
||||
|
||||
/atom/proc/clean_prints()
|
||||
if(istype(fingerprints, /list))
|
||||
@@ -1233,12 +1227,10 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
// ------- YOU ARE CLICKING ON AN OBJECT THAT'S INACCESSIBLE TO YOU AND IS NOT YOUR HUD -------
|
||||
if((LASER in usr:mutations) && usr:a_intent == "hurt" && world.time >= usr.next_move)
|
||||
// ------- YOU HAVE THE LASER MUTATION, YOUR INTENT SET TO HURT AND IT'S BEEN MORE THAN A DECISECOND SINCE YOU LAS TATTACKED -------
|
||||
var/turf/oloc
|
||||
|
||||
var/turf/T = get_turf(usr)
|
||||
var/turf/U = get_turf(src)
|
||||
if(istype(src, /turf)) oloc = src
|
||||
else
|
||||
oloc = loc
|
||||
|
||||
|
||||
if(istype(usr, /mob/living/carbon/human))
|
||||
usr:nutrition -= rand(1,5)
|
||||
@@ -1251,7 +1243,7 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
|
||||
A.firer = usr
|
||||
A.def_zone = usr:get_organ_target()
|
||||
A.original = oloc
|
||||
A.original = src
|
||||
A.current = T
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
|
||||
@@ -351,6 +351,8 @@
|
||||
if(!changeling) return
|
||||
|
||||
var/mob/living/carbon/C = usr
|
||||
if(!C.stat && alert("Are we sure we wish to fake our death?",,"Yes","No") == "No")//Confirmation for living changelings if they want to fake their death
|
||||
return
|
||||
C << "<span class='notice'>We will attempt to regenerate our form.</span>"
|
||||
|
||||
C.status_flags |= FAKEDEATH //play dead
|
||||
@@ -526,10 +528,10 @@ var/list/datum/dna/hivemind_bank = list()
|
||||
|
||||
/mob/proc/changeling_hivedownload()
|
||||
set category = "Changeling"
|
||||
set name = "Hive Absorb (40)"
|
||||
set name = "Hive Absorb (20)"
|
||||
set desc = "Allows you to absorb DNA that is being channeled in the airwaves."
|
||||
|
||||
var/datum/changeling/changeling = changeling_power(40,1)
|
||||
var/datum/changeling/changeling = changeling_power(20,1)
|
||||
if(!changeling) return
|
||||
|
||||
var/list/names = list()
|
||||
@@ -547,7 +549,7 @@ var/list/datum/dna/hivemind_bank = list()
|
||||
if(!chosen_dna)
|
||||
return
|
||||
|
||||
changeling.chem_charges -= 40
|
||||
changeling.chem_charges -= 20
|
||||
changeling.absorbed_dna += chosen_dna
|
||||
usr << "<span class='notice'>We absorb the DNA of [S] from the air.</span>"
|
||||
feedback_add_details("changeling_powers","HD")
|
||||
|
||||
@@ -463,9 +463,6 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
|
||||
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) used [name] on [M.name] ([M.ckey])</font>")
|
||||
|
||||
log_admin("ATTACK: [user.name] ([user.ckey]) used [name] on [M.name] ([M.ckey])")
|
||||
msg_admin_attack("ATTACK: [user.name] ([user.ckey]) used [name] on [M.name] ([M.ckey])") //BS12 EDIT ALG
|
||||
|
||||
if(istype(M,/mob/dead))
|
||||
M.invisibility = 0
|
||||
user.visible_message( \
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
for(var/obj/O in orange(1,src))
|
||||
del(O)
|
||||
for(var/turf/simulated/ST in orange(1,src))
|
||||
ST.ReplaceWithSpace()
|
||||
ST.ChangeTurf(/turf/space)
|
||||
|
||||
sleep(6)
|
||||
grav(10, 4, 10, 0 )
|
||||
@@ -84,5 +84,5 @@
|
||||
//Destroying the turf
|
||||
if( T && istype(T,/turf/simulated) && prob(turf_removal_chance) )
|
||||
var/turf/simulated/ST = T
|
||||
ST.ReplaceWithSpace()
|
||||
ST.ChangeTurf(/turf/space)
|
||||
return
|
||||
@@ -118,13 +118,9 @@ var/global/Holiday = null
|
||||
set name = ".Set Holiday"
|
||||
set category = "Fun"
|
||||
set desc = "Force-set the Holiday variable to make the game think it's a certain day."
|
||||
|
||||
if( !holder || !(holder.rank in list("Game Master","Game Admin")) )
|
||||
src << "<font color='red'>Error: Set_Holiday: You hold insufficient rank to perform this action.</font>"
|
||||
return
|
||||
if(!check_rights(R_SERVER)) return
|
||||
|
||||
if(!T) return
|
||||
|
||||
Holiday = T
|
||||
//get a new station name
|
||||
station_name = null
|
||||
|
||||
@@ -93,7 +93,15 @@ When I already created about 4 new objectives, this doesn't seem terribly import
|
||||
/var/global/toggle_space_ninja = 1//If ninjas can spawn or not.
|
||||
/var/global/sent_ninja_to_station = 0//If a ninja is already on the station.
|
||||
|
||||
/proc/space_ninja_arrival()
|
||||
var/ninja_selection_id = 1
|
||||
var/ninja_selection_active = 0
|
||||
var/ninja_confirmed_selection = 0
|
||||
|
||||
/proc/space_ninja_arrival(var/assign_key = null, var/assign_mission = null)
|
||||
|
||||
if(ninja_selection_active)
|
||||
usr << "\red Ninja selection already in progress. Please wait until it ends."
|
||||
return
|
||||
|
||||
var/datum/game_mode/current_mode = ticker.mode
|
||||
var/datum/mind/current_mind
|
||||
@@ -134,191 +142,242 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp
|
||||
//Here we pick a location and spawn the ninja.
|
||||
var/list/spawn_list = list()
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(L.name == "carpspawn")
|
||||
//todo:: add ninjaspawn landmarks to map
|
||||
if(L.name == "ninjaspawn")
|
||||
spawn_list.Add(L)
|
||||
|
||||
if(!spawn_list.len)
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(L.name == "carpspawn")
|
||||
spawn_list.Add(L)
|
||||
|
||||
var/list/candidates = list() //list of candidate keys
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.client && !G.client.holder && ((G.client.inactivity/10)/60) <= 5)
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
candidates += G.key
|
||||
if(!candidates.len) return
|
||||
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
|
||||
var/ninja_key = null
|
||||
|
||||
if(assign_key)
|
||||
ninja_key = assign_key
|
||||
else
|
||||
|
||||
var/list/candidates = list() //list of candidate keys
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.client && !G.client.holder && ((G.client.inactivity/10)/60) <= 5)
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
candidates += G.key
|
||||
if(!candidates.len) return
|
||||
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
|
||||
|
||||
ninja_key = pick(candidates)
|
||||
|
||||
|
||||
//The ninja will be created on the right spawn point or at late join.
|
||||
var/mob/living/carbon/human/new_ninja = create_space_ninja(pick(spawn_list.len ? spawn_list : latejoin ))
|
||||
new_ninja.key = pick(candidates)
|
||||
new_ninja.wear_suit:randomize_param()//Give them a random set of suit parameters.
|
||||
new_ninja.internal = new_ninja.s_store //So the poor ninja has something to breath when they spawn in spess.
|
||||
new_ninja.internals.icon_state = "internal1"
|
||||
var/mob/candidate_mob
|
||||
for(var/mob/M in player_list)
|
||||
if((M.key == ninja_key || M.ckey == ninja_key) && M.client)
|
||||
candidate_mob = M
|
||||
break
|
||||
|
||||
//Now for the rest of the stuff.
|
||||
if(!candidate_mob)
|
||||
usr << "\red The randomly chosen mob was not found in the second check."
|
||||
return
|
||||
|
||||
var/datum/mind/ninja_mind = new_ninja.mind//For easier reference.
|
||||
var/mission_set = 0//To determine if we need to do further processing.
|
||||
//Xenos and deathsquads take precedence over everything else.
|
||||
ninja_selection_active = 1
|
||||
ninja_selection_id++
|
||||
var/this_selection_id = ninja_selection_id
|
||||
|
||||
//Unless the xenos are hiding in a locker somewhere, this'll find em.
|
||||
for(var/mob/living/carbon/alien/humanoid/xeno in player_list)
|
||||
if(istype(xeno))
|
||||
xeno_list += xeno
|
||||
spawn(1)
|
||||
if(alert(candidate_mob, "You have been selected to play as a space ninja. Would you like to play as this role? (You have 30 seconds to accept - You will spawn in 30 seconds if you accept)",,"Yes","No")!="Yes")
|
||||
usr << "\red The selected candidate for space ninja declined."
|
||||
return
|
||||
|
||||
if(xeno_list.len>3)//If there are more than three humanoid xenos on the station, time to get dangerous.
|
||||
//Here we want the ninja to murder all the queens. The other aliens don't really matter.
|
||||
var/xeno_queen_list[] = list()
|
||||
for(var/mob/living/carbon/alien/humanoid/queen/xeno_queen in xeno_list)
|
||||
if(xeno_queen.mind&&xeno_queen.stat!=2)
|
||||
xeno_queen_list += xeno_queen
|
||||
if(xeno_queen_list.len&&side=="face")//If there are queen about and the probability is 50.
|
||||
for(var/mob/living/carbon/alien/humanoid/queen/xeno_queen in xeno_queen_list)
|
||||
var/datum/objective/assassinate/ninja_objective = new
|
||||
//We'll do some manual overrides to properly set it up.
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.target = xeno_queen.mind
|
||||
ninja_objective.explanation_text = "Kill \the [xeno_queen]."
|
||||
ninja_mind.objectives += ninja_objective
|
||||
mission_set = 1
|
||||
ninja_confirmed_selection = this_selection_id
|
||||
|
||||
if(sent_strike_team&&side=="heel"&&antagonist_list.len)//If a strike team was sent, murder them all like a champ.
|
||||
for(current_mind in antagonist_list)//Search and destroy. Since we already have an antagonist list, they should appear there.
|
||||
if(current_mind && current_mind.special_role=="Death Commando")
|
||||
commando_list += current_mind
|
||||
if(commando_list.len)//If there are living commandos still in play.
|
||||
for(var/mob/living/carbon/human/commando in commando_list)
|
||||
var/datum/objective/assassinate/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.find_target_by_role(commando.mind.special_role,1)
|
||||
ninja_mind.objectives += ninja_objective
|
||||
mission_set = 1
|
||||
/*
|
||||
If there are no antogonists left it could mean one of two things:
|
||||
A) The round is about to end. No harm in spawning the ninja here.
|
||||
B) The round is still going and ghosts are probably rioting for something to happen.
|
||||
In either case, it's a good idea to spawn the ninja with a semi-random set of objectives.
|
||||
*/
|
||||
if(!mission_set)//If mission was not set.
|
||||
spawn(300)
|
||||
if(!ninja_selection_active || (this_selection_id != ninja_selection_id ))
|
||||
ninja_selection_active = 0
|
||||
candidate_mob << "\red Sorry, you were too late. You only had 30 seconds to accept."
|
||||
return
|
||||
|
||||
var/current_minds[]//List being looked on in the following code.
|
||||
var/side_list = side=="face" ? 2 : 1//For logic gating.
|
||||
var/hostile_targets[] = list()//The guys actually picked for the assassination or whatever.
|
||||
var/friendly_targets[] = list()//The guys the ninja must protect.
|
||||
if(ninja_confirmed_selection != ninja_selection_id)
|
||||
ninja_selection_active = 0
|
||||
usr << "\red The ninja did not accept the role in time."
|
||||
return
|
||||
|
||||
for(var/i=2,i>0,i--)//Two lists.
|
||||
current_minds = i==2 ? antagonist_list : protagonist_list//Which list are we looking at?
|
||||
for(var/t=3,(current_minds.len&&t>0),t--)//While the list is not empty and targets remain. Also, 3 targets is good.
|
||||
current_mind = pick(current_minds)//Pick a random person.
|
||||
/*I'm creating a logic gate here based on the ninja affiliation that compares the list being
|
||||
looked at to the affiliation. Affiliation is just a number used to compare. Meaning comes from the logic involved.
|
||||
If the list being looked at is equal to the ninja's affiliation, add the mind to hostiles.
|
||||
If not, add the mind to friendlies. Since it can't be both, it will be added only to one or the other.*/
|
||||
hostile_targets += i==side_list ? current_mind : null//Adding null doesn't add anything.
|
||||
friendly_targets += i!=side_list ? current_mind : null
|
||||
current_minds -= current_mind//Remove the mind so it's not picked again.
|
||||
ninja_selection_active = 0
|
||||
|
||||
var/objective_list[] = list(1,2,3,4,5,6)//To remove later.
|
||||
for(var/i=rand(1,3),i>0,i--)//Want to get a few random objectives. Currently up to 3.
|
||||
if(!hostile_targets.len)//Remove appropriate choices from switch list if the target lists are empty.
|
||||
objective_list -= 1
|
||||
objective_list -= 4
|
||||
if(!friendly_targets.len)
|
||||
objective_list -= 3
|
||||
switch(pick(objective_list))
|
||||
if(1)//kill
|
||||
current_mind = pick(hostile_targets)
|
||||
//The ninja will be created on the right spawn point or at late join.
|
||||
var/mob/living/carbon/human/new_ninja = create_space_ninja(pick(spawn_list.len ? spawn_list : latejoin ))
|
||||
new_ninja.key = ninja_key
|
||||
new_ninja.wear_suit:randomize_param()//Give them a random set of suit parameters.
|
||||
new_ninja.internal = new_ninja.s_store //So the poor ninja has something to breath when they spawn in spess.
|
||||
new_ninja.internals.icon_state = "internal1"
|
||||
|
||||
if(current_mind)
|
||||
//Now for the rest of the stuff.
|
||||
|
||||
var/datum/mind/ninja_mind = new_ninja.mind//For easier reference.
|
||||
var/mission_set = 0//To determine if we need to do further processing.
|
||||
//Xenos and deathsquads take precedence over everything else.
|
||||
|
||||
//Unless the xenos are hiding in a locker somewhere, this'll find em.
|
||||
for(var/mob/living/carbon/alien/humanoid/xeno in player_list)
|
||||
if(istype(xeno))
|
||||
xeno_list += xeno
|
||||
|
||||
if(assign_mission)
|
||||
new_ninja.mind.store_memory("<B>Mission:</B> \red [assign_mission].<br>")
|
||||
new_ninja << "\blue \nYou are an elite mercenary assassin of the Spider Clan, [new_ninja.real_name]. The dreaded \red <B>SPACE NINJA</B>!\blue You have a variety of abilities at your disposal, thanks to your nano-enhanced cyber armor. Remember your training! \nYour current mission is: \red <B>[assign_mission]</B>"
|
||||
else
|
||||
if(xeno_list.len>3)//If there are more than three humanoid xenos on the station, time to get dangerous.
|
||||
//Here we want the ninja to murder all the queens. The other aliens don't really matter.
|
||||
var/xeno_queen_list[] = list()
|
||||
for(var/mob/living/carbon/alien/humanoid/queen/xeno_queen in xeno_list)
|
||||
if(xeno_queen.mind&&xeno_queen.stat!=2)
|
||||
xeno_queen_list += xeno_queen
|
||||
if(xeno_queen_list.len&&side=="face")//If there are queen about and the probability is 50.
|
||||
for(var/mob/living/carbon/alien/humanoid/queen/xeno_queen in xeno_queen_list)
|
||||
var/datum/objective/assassinate/ninja_objective = new
|
||||
//We'll do some manual overrides to properly set it up.
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.target = xeno_queen.mind
|
||||
ninja_objective.explanation_text = "Kill \the [xeno_queen]."
|
||||
ninja_mind.objectives += ninja_objective
|
||||
mission_set = 1
|
||||
|
||||
if(sent_strike_team&&side=="heel"&&antagonist_list.len)//If a strike team was sent, murder them all like a champ.
|
||||
for(current_mind in antagonist_list)//Search and destroy. Since we already have an antagonist list, they should appear there.
|
||||
if(current_mind && current_mind.special_role=="Death Commando")
|
||||
commando_list += current_mind
|
||||
if(commando_list.len)//If there are living commandos still in play.
|
||||
for(var/mob/living/carbon/human/commando in commando_list)
|
||||
var/datum/objective/assassinate/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0))//If they have a special role, use that instead to find em.
|
||||
ninja_objective.find_target_by_role(commando.mind.special_role,1)
|
||||
ninja_mind.objectives += ninja_objective
|
||||
mission_set = 1
|
||||
/*
|
||||
If there are no antogonists left it could mean one of two things:
|
||||
A) The round is about to end. No harm in spawning the ninja here.
|
||||
B) The round is still going and ghosts are probably rioting for something to happen.
|
||||
In either case, it's a good idea to spawn the ninja with a semi-random set of objectives.
|
||||
*/
|
||||
if(!mission_set)//If mission was not set.
|
||||
|
||||
else
|
||||
i++
|
||||
var/current_minds[]//List being looked on in the following code.
|
||||
var/side_list = side=="face" ? 2 : 1//For logic gating.
|
||||
var/hostile_targets[] = list()//The guys actually picked for the assassination or whatever.
|
||||
var/friendly_targets[] = list()//The guys the ninja must protect.
|
||||
|
||||
hostile_targets -= current_mind//Remove them from the list.
|
||||
if(2)//Steal
|
||||
var/datum/objective/steal/ninja_objective = new
|
||||
var/target_item = pick(ninja_objective.possible_items_special)
|
||||
ninja_objective.set_target(target_item)
|
||||
ninja_mind.objectives += ninja_objective
|
||||
for(var/i=2,i>0,i--)//Two lists.
|
||||
current_minds = i==2 ? antagonist_list : protagonist_list//Which list are we looking at?
|
||||
for(var/t=3,(current_minds.len&&t>0),t--)//While the list is not empty and targets remain. Also, 3 targets is good.
|
||||
current_mind = pick(current_minds)//Pick a random person.
|
||||
/*I'm creating a logic gate here based on the ninja affiliation that compares the list being
|
||||
looked at to the affiliation. Affiliation is just a number used to compare. Meaning comes from the logic involved.
|
||||
If the list being looked at is equal to the ninja's affiliation, add the mind to hostiles.
|
||||
If not, add the mind to friendlies. Since it can't be both, it will be added only to one or the other.*/
|
||||
hostile_targets += i==side_list ? current_mind : null//Adding null doesn't add anything.
|
||||
friendly_targets += i!=side_list ? current_mind : null
|
||||
current_minds -= current_mind//Remove the mind so it's not picked again.
|
||||
|
||||
objective_list -= 2
|
||||
if(3)//Protect. Keeping people alive can be pretty difficult.
|
||||
current_mind = pick(friendly_targets)
|
||||
var/objective_list[] = list(1,2,3,4,5,6)//To remove later.
|
||||
for(var/i=rand(1,3),i>0,i--)//Want to get a few random objectives. Currently up to 3.
|
||||
if(!hostile_targets.len)//Remove appropriate choices from switch list if the target lists are empty.
|
||||
objective_list -= 1
|
||||
objective_list -= 4
|
||||
if(!friendly_targets.len)
|
||||
objective_list -= 3
|
||||
switch(pick(objective_list))
|
||||
if(1)//kill
|
||||
current_mind = pick(hostile_targets)
|
||||
|
||||
if(current_mind)
|
||||
if(current_mind)
|
||||
var/datum/objective/assassinate/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0))//If they have a special role, use that instead to find em.
|
||||
ninja_mind.objectives += ninja_objective
|
||||
|
||||
var/datum/objective/protect/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0))
|
||||
ninja_mind.objectives += ninja_objective
|
||||
else
|
||||
i++
|
||||
|
||||
else
|
||||
i++
|
||||
hostile_targets -= current_mind//Remove them from the list.
|
||||
if(2)//Steal
|
||||
var/datum/objective/steal/ninja_objective = new
|
||||
var/target_item = pick(ninja_objective.possible_items_special)
|
||||
ninja_objective.set_target(target_item)
|
||||
ninja_mind.objectives += ninja_objective
|
||||
|
||||
friendly_targets -= current_mind
|
||||
if(4)//Debrain
|
||||
current_mind = pick(hostile_targets)
|
||||
objective_list -= 2
|
||||
if(3)//Protect. Keeping people alive can be pretty difficult.
|
||||
current_mind = pick(friendly_targets)
|
||||
|
||||
if(current_mind)
|
||||
if(current_mind)
|
||||
|
||||
var/datum/objective/debrain/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0))
|
||||
ninja_mind.objectives += ninja_objective
|
||||
var/datum/objective/protect/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0))
|
||||
ninja_mind.objectives += ninja_objective
|
||||
|
||||
else
|
||||
i++
|
||||
else
|
||||
i++
|
||||
|
||||
hostile_targets -= current_mind//Remove them from the list.
|
||||
if(5)//Download research
|
||||
var/datum/objective/download/ninja_objective = new
|
||||
ninja_objective.gen_amount_goal()
|
||||
ninja_mind.objectives += ninja_objective
|
||||
friendly_targets -= current_mind
|
||||
if(4)//Debrain
|
||||
current_mind = pick(hostile_targets)
|
||||
|
||||
objective_list -= 5
|
||||
if(6)//Capture
|
||||
var/datum/objective/capture/ninja_objective = new
|
||||
ninja_objective.gen_amount_goal()
|
||||
ninja_mind.objectives += ninja_objective
|
||||
if(current_mind)
|
||||
|
||||
objective_list -= 6
|
||||
var/datum/objective/debrain/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0))
|
||||
ninja_mind.objectives += ninja_objective
|
||||
|
||||
if(ninja_mind.objectives.len)//If they got some objectives out of that.
|
||||
mission_set = 1
|
||||
else
|
||||
i++
|
||||
|
||||
if(!ninja_mind.objectives.len||!mission_set)//If they somehow did not get an objective at this point, time to destroy the station.
|
||||
var/nuke_code
|
||||
var/temp_code
|
||||
for(var/obj/machinery/nuclearbomb/N in world)
|
||||
temp_code = text2num(N.r_code)
|
||||
if(temp_code)//if it's actually a number. It won't convert any non-numericals.
|
||||
nuke_code = N.r_code
|
||||
break
|
||||
if(nuke_code)//If there is a nuke device in world and we got the code.
|
||||
var/datum/objective/nuclear/ninja_objective = new//Fun.
|
||||
hostile_targets -= current_mind//Remove them from the list.
|
||||
if(5)//Download research
|
||||
var/datum/objective/download/ninja_objective = new
|
||||
ninja_objective.gen_amount_goal()
|
||||
ninja_mind.objectives += ninja_objective
|
||||
|
||||
objective_list -= 5
|
||||
if(6)//Capture
|
||||
var/datum/objective/capture/ninja_objective = new
|
||||
ninja_objective.gen_amount_goal()
|
||||
ninja_mind.objectives += ninja_objective
|
||||
|
||||
objective_list -= 6
|
||||
|
||||
if(ninja_mind.objectives.len)//If they got some objectives out of that.
|
||||
mission_set = 1
|
||||
|
||||
if(!ninja_mind.objectives.len||!mission_set)//If they somehow did not get an objective at this point, time to destroy the station.
|
||||
var/nuke_code
|
||||
var/temp_code
|
||||
for(var/obj/machinery/nuclearbomb/N in world)
|
||||
temp_code = text2num(N.r_code)
|
||||
if(temp_code)//if it's actually a number. It won't convert any non-numericals.
|
||||
nuke_code = N.r_code
|
||||
break
|
||||
if(nuke_code)//If there is a nuke device in world and we got the code.
|
||||
var/datum/objective/nuclear/ninja_objective = new//Fun.
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.explanation_text = "Destroy the station with a nuclear device. The code is [nuke_code]." //Let them know what the code is.
|
||||
|
||||
//Finally add a survival objective since it's usually broad enough for any round type.
|
||||
var/datum/objective/survive/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.explanation_text = "Destroy the station with a nuclear device. The code is [nuke_code]." //Let them know what the code is.
|
||||
ninja_mind.objectives += ninja_objective
|
||||
|
||||
//Finally add a survival objective since it's usually broad enough for any round type.
|
||||
var/datum/objective/survive/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_mind.objectives += ninja_objective
|
||||
var/directive = generate_ninja_directive(side)
|
||||
new_ninja << "\blue \nYou are an elite mercenary assassin of the Spider Clan, [new_ninja.real_name]. The dreaded \red <B>SPACE NINJA</B>!\blue You have a variety of abilities at your disposal, thanks to your nano-enhanced cyber armor. Remember your training (initialize your suit by right clicking on it)! \nYour current directive is: \red <B>[directive]</B>"
|
||||
new_ninja.mind.store_memory("<B>Directive:</B> \red [directive]<br>")
|
||||
|
||||
var/directive = generate_ninja_directive(side)
|
||||
new_ninja << "\blue \nYou are an elite mercenary assassin of the Spider Clan, [new_ninja.real_name]. The dreaded \red <B>SPACE NINJA</B>!\blue You have a variety of abilities at your disposal, thanks to your nano-enhanced cyber armor. Remember your training (initialize your suit by right clicking on it)! \nYour current directive is: \red <B>[directive]</B>"
|
||||
new_ninja.mind.store_memory("<B>Directive:</B> \red [directive]<br>")
|
||||
var/obj_count = 1
|
||||
new_ninja << "\blue Your current objectives:"
|
||||
for(var/datum/objective/objective in ninja_mind.objectives)
|
||||
new_ninja << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
|
||||
obj_count++
|
||||
|
||||
var/obj_count = 1
|
||||
new_ninja << "\blue Your current objectives:"
|
||||
for(var/datum/objective/objective in ninja_mind.objectives)
|
||||
new_ninja << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
|
||||
obj_count++
|
||||
|
||||
sent_ninja_to_station = 1//And we're done.
|
||||
return new_ninja//Return the ninja in case we need to reference them later.
|
||||
sent_ninja_to_station = 1//And we're done.
|
||||
return new_ninja//Return the ninja in case we need to reference them later.
|
||||
|
||||
/*
|
||||
This proc will give the ninja a directive to follow. They are not obligated to do so but it's a fun roleplay reminder.
|
||||
@@ -411,43 +470,14 @@ As such, it's hard-coded for now. No reason for it not to be, really.
|
||||
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
|
||||
return
|
||||
|
||||
var/list/spawn_list = list()
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if (L.name == "carpspawn")
|
||||
spawn_list.Add(L)
|
||||
|
||||
|
||||
var/input = ckey(input("Pick character to spawn as the Space Ninja", "Key", ""))
|
||||
if(!input)
|
||||
return
|
||||
|
||||
var/mob/dead/observer/G
|
||||
for(var/mob/dead/observer/G_find in player_list)
|
||||
if(G_find.ckey == input)
|
||||
G = G_find
|
||||
break
|
||||
space_ninja_arrival(input, mission)
|
||||
|
||||
if(!G)//If a ghost was not found.
|
||||
alert("There is no active key like that in the game or the person is not currently a ghost. Aborting command.")
|
||||
return
|
||||
|
||||
var/admin_name = src
|
||||
var/mob/living/carbon/human/new_ninja = create_space_ninja(pick(spawn_list.len ? spawn_list : latejoin ))
|
||||
new_ninja.wear_suit:randomize_param()
|
||||
|
||||
new_ninja.key = G.key
|
||||
new_ninja.mind.store_memory("<B>Mission:</B> \red [mission].<br>")
|
||||
|
||||
new_ninja.internal = new_ninja.s_store //So the poor ninja has something to breath when they spawn in spess.
|
||||
new_ninja.internals.icon_state = "internal1"
|
||||
spawn(0)//Parallel process. Will speed things up a bit.
|
||||
new_ninja.wear_suit:ninitialize(10,new_ninja)//If you're wondering why I'm passing the argument to the proc when the default should suffice,
|
||||
//I'm also wondering that same thing. This makes sure it does not run time error though.
|
||||
|
||||
new_ninja << "\blue \nYou are an elite mercenary assassin of the Spider Clan, [new_ninja.real_name]. The dreaded \red <B>SPACE NINJA</B>!\blue You have a variety of abilities at your disposal, thanks to your nano-enhanced cyber armor. Remember your training! \nYour current mission is: \red <B>[mission]</B>"
|
||||
|
||||
message_admins("\blue [admin_name] has spawned [new_ninja.key] as a Space Ninja. Hide yo children! \nTheir <b>mission</b> is: [mission]", 1)
|
||||
log_admin("[admin_name] used Spawn Space Ninja.")
|
||||
message_admins("\blue [key] has spawned [input] as a Space Ninja.\nTheir <b>mission</b> is: [mission]", 1)
|
||||
log_admin("[key] used Spawn Space Ninja.")
|
||||
|
||||
return
|
||||
|
||||
@@ -500,7 +530,6 @@ As such, it's hard-coded for now. No reason for it not to be, really.
|
||||
equip_to_slot_or_del(new /obj/item/weapon/plastique(src), slot_r_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/plastique(src), slot_l_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen(src), slot_s_store)
|
||||
resistances += "alien_embryo"
|
||||
return 1
|
||||
|
||||
//=======//HELPER PROCS//=======//
|
||||
|
||||
@@ -97,6 +97,9 @@ Whitespace:Seperator;
|
||||
///post_setup()
|
||||
///Everyone should now be on the station and have their normal gear. This is the place to give the special roles extra things
|
||||
/datum/game_mode/proc/post_setup()
|
||||
spawn (ROUNDSTART_LOGOUT_REPORT_TIME)
|
||||
display_roundstart_logout_report()
|
||||
|
||||
feedback_set_details("round_start","[time2text(world.realtime)]")
|
||||
if(ticker && ticker.mode)
|
||||
feedback_set_details("game_mode","[ticker.mode]")
|
||||
@@ -359,3 +362,59 @@ Whitespace:Seperator;
|
||||
if(player.mind && (player.mind.assigned_role in command_positions))
|
||||
heads += player.mind
|
||||
return heads
|
||||
|
||||
//////////////////////////
|
||||
//Reports player logouts//
|
||||
//////////////////////////
|
||||
proc/display_roundstart_logout_report()
|
||||
var/msg = "\blue <b>Roundstart logout report\n\n"
|
||||
for(var/mob/living/L in mob_list)
|
||||
|
||||
if(L.ckey)
|
||||
var/found = 0
|
||||
for(var/client/C in clients)
|
||||
if(C.ckey == L.ckey)
|
||||
found = 1
|
||||
break
|
||||
if(!found)
|
||||
msg += "<b>[L.name]</b> ([L.ckey]), the [L.job] (<font color='#ffcc00'><b>Disconnected</b></font>)\n"
|
||||
|
||||
|
||||
if(L.ckey && L.client)
|
||||
if(L.client.inactivity >= (ROUNDSTART_LOGOUT_REPORT_TIME / 2)) //Connected, but inactive (alt+tabbed or something)
|
||||
msg += "<b>[L.name]</b> ([L.ckey]), the [L.job] (<font color='#ffcc00'><b>Connected, Inactive</b></font>)\n"
|
||||
continue //AFK client
|
||||
if(L.stat)
|
||||
if(L.suiciding) //Suicider
|
||||
msg += "<b>[L.name]</b> ([L.ckey]), the [L.job] (<font color='red'><b>Suicide</b></font>)\n"
|
||||
continue //Disconnected client
|
||||
if(L.stat == UNCONSCIOUS)
|
||||
msg += "<b>[L.name]</b> ([L.ckey]), the [L.job] (Dying)\n"
|
||||
continue //Unconscious
|
||||
if(L.stat == DEAD)
|
||||
msg += "<b>[L.name]</b> ([L.ckey]), the [L.job] (Dead)\n"
|
||||
continue //Dead
|
||||
|
||||
continue //Happy connected client
|
||||
for(var/mob/dead/observer/D in mob_list)
|
||||
if(D.mind && (D.mind.original == L || D.mind.current == L))
|
||||
if(L.stat == DEAD)
|
||||
if(L.suiciding) //Suicider
|
||||
msg += "<b>[L.name]</b> ([ckey(D.mind.key)]), the [L.job] (<font color='red'><b>Suicide</b></font>)\n"
|
||||
continue //Disconnected client
|
||||
else
|
||||
msg += "<b>[L.name]</b> ([ckey(D.mind.key)]), the [L.job] (Dead)\n"
|
||||
continue //Dead mob, ghost abandoned
|
||||
else
|
||||
if(D.can_reenter_corpse)
|
||||
msg += "<b>[L.name]</b> ([ckey(D.mind.key)]), the [L.job] (<font color='red'><b>This shouldn't appear.</b></font>)\n"
|
||||
continue //Lolwhat
|
||||
else
|
||||
msg += "<b>[L.name]</b> ([ckey(D.mind.key)]), the [L.job] (<font color='red'><b>Ghosted</b></font>)\n"
|
||||
continue //Ghosted while alive
|
||||
|
||||
|
||||
|
||||
for(var/mob/M in mob_list)
|
||||
if(M.client && M.client.holder)
|
||||
M << msg
|
||||
|
||||
@@ -254,7 +254,9 @@ var/global/datum/controller/gameticker/ticker
|
||||
flick("station_explode_fade_red", cinematic)
|
||||
world << sound('sound/effects/explosionfar.ogg')
|
||||
cinematic.icon_state = "summary_selfdes"
|
||||
|
||||
for(var/mob/living/M in living_mob_list)
|
||||
if(M.loc.z == 1)
|
||||
M.death()//No mercy
|
||||
//If its actually the end of the round, wait for it to end.
|
||||
//Otherwise if its a verb it will continue on afterwards.
|
||||
sleep(300)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
/mob/proc/rightandwrong()
|
||||
usr << "<B>You summoned guns!</B>"
|
||||
message_admins("[key_name_admin(usr, 1)] summoned guns!")
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
if(H.stat == 2 || !(H.client)) continue
|
||||
@@ -16,7 +17,7 @@
|
||||
for(var/datum/objective/OBJ in H.mind.objectives)
|
||||
H << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
|
||||
obj_count++
|
||||
var/randomize = pick("taser","egun","laser","revolver","smg","nuclear","deagle","gyrojet","pulse","silenced","cannon","shotgun","mateba","uzi","crossbow")
|
||||
var/randomize = pick("taser","egun","laser","revolver","smg","nuclear","deagle","gyrojet","pulse","silenced","cannon","shotgun","mateba","uzi","crossbow","saw")
|
||||
switch (randomize)
|
||||
if("taser")
|
||||
new /obj/item/weapon/gun/energy/taser(get_turf(H))
|
||||
@@ -48,3 +49,5 @@
|
||||
new /obj/item/weapon/gun/projectile/automatic/mini_uzi(get_turf(H))
|
||||
if("crossbow")
|
||||
new /obj/item/weapon/gun/energy/crossbow(get_turf(H))
|
||||
if("saw")
|
||||
new /obj/item/weapon/gun/projectile/automatic/l6_saw(get_turf(H))
|
||||
@@ -23,9 +23,6 @@
|
||||
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) used the [src.name] to capture the soul of [M.name] ([M.ckey])</font>")
|
||||
|
||||
log_admin("ATTACK: [user.name] ([user.ckey]) used the [src.name] to capture the soul of [M.name] ([M.ckey])")
|
||||
msg_admin_attack("ATTACK: [user.name] ([user.ckey]) used the [src.name] to capture the soul of [M.name] ([M.ckey])") //BS12 EDIT ALG
|
||||
|
||||
transfer_soul("VICTIM", M, user)
|
||||
return
|
||||
|
||||
|
||||
@@ -180,7 +180,10 @@
|
||||
if("Station Engineer")
|
||||
return list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
|
||||
if("Assistant")
|
||||
return list()
|
||||
if(config.assistant_maint)
|
||||
return list(access_maint_tunnels)
|
||||
else
|
||||
return list()
|
||||
if("Chaplain")
|
||||
return list(access_morgue, access_chapel_office, access_crematorium)
|
||||
if("Detective")
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
supervisors = "Nanotrasen officials and Space law"
|
||||
selection_color = "#ccccff"
|
||||
idtype = /obj/item/weapon/card/id/gold
|
||||
req_admin_notify = 1
|
||||
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
@@ -48,6 +49,7 @@
|
||||
supervisors = "the captain"
|
||||
selection_color = "#ddddff"
|
||||
idtype = /obj/item/weapon/card/id/silver
|
||||
req_admin_notify = 1
|
||||
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
supervisors = "the captain"
|
||||
selection_color = "#ffeeaa"
|
||||
idtype = /obj/item/weapon/card/id/silver
|
||||
req_admin_notify = 1
|
||||
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
|
||||
@@ -31,5 +31,8 @@
|
||||
//List of alternate titles, if any
|
||||
var/list/alt_titles
|
||||
|
||||
//If this is set to 1, a text is printed to the player when jobs are assigned, telling him that he should let admins know that he has to disconnect.
|
||||
var/req_admin_notify
|
||||
|
||||
/datum/job/proc/equip(var/mob/living/carbon/human/H)
|
||||
return 1
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
supervisors = "the captain"
|
||||
selection_color = "#ffddf0"
|
||||
idtype = /obj/item/weapon/card/id/silver
|
||||
req_admin_notify = 1
|
||||
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
supervisors = "the captain"
|
||||
selection_color = "#ffddff"
|
||||
idtype = /obj/item/weapon/card/id/silver
|
||||
req_admin_notify = 1
|
||||
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
supervisors = "the captain"
|
||||
selection_color = "#ffdddd"
|
||||
idtype = /obj/item/weapon/card/id/silver
|
||||
req_admin_notify = 1
|
||||
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
spawn_positions = 1
|
||||
selection_color = "#ccffcc"
|
||||
supervisors = "your laws"
|
||||
req_admin_notify = 1
|
||||
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
|
||||
@@ -344,6 +344,9 @@ var/global/datum/controller/occupations/job_master
|
||||
|
||||
H << "<B>You are the [rank].</B>"
|
||||
H << "<b>As the [rank] you answer directly to [job.supervisors]. Special circumstances may change this.</b>"
|
||||
if(job.req_admin_notify)
|
||||
H << "<b>You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins via adminhelp.</b>"
|
||||
spawnId(H,rank)
|
||||
|
||||
if(H.mind.assigned_role == rank && H.mind.role_alt_title)
|
||||
spawnId(H, rank, H.mind.role_alt_title)
|
||||
|
||||
@@ -23,14 +23,31 @@
|
||||
if(V!=usr)
|
||||
V.show_message("[H] looks as if a wall is in front of them.", 3, "", 2)
|
||||
usr << "You form a wall in front of yourself."
|
||||
var/obj/effect/forcefield/F = new /obj/effect/forcefield(locate(usr.x,usr.y,usr.z))
|
||||
F.icon_state = "empty"
|
||||
F.name = "invisible wall"
|
||||
F.desc = "You have a bad feeling about this."
|
||||
spawn (300)
|
||||
del (F)
|
||||
new /obj/effect/forcefield/mime(locate(usr.x,usr.y,usr.z))
|
||||
return
|
||||
|
||||
///////////Mimewalls///////////
|
||||
|
||||
/obj/effect/forcefield/mime
|
||||
icon_state = "empty"
|
||||
name = "invisible wall"
|
||||
desc = "You have a bad feeling about this."
|
||||
var/timeleft = 300
|
||||
var/last_process = 0
|
||||
|
||||
/obj/effect/forcefield/mime/New()
|
||||
..()
|
||||
last_process = world.time
|
||||
processing_objects.Add(src)
|
||||
|
||||
/obj/effect/forcefield/mime/process()
|
||||
timeleft -= (world.time - last_process)
|
||||
if(timeleft <= 0)
|
||||
processing_objects.Remove(src)
|
||||
del(src)
|
||||
|
||||
///////////////////////////////
|
||||
|
||||
/client/proc/mimespeak()
|
||||
set category = "Mime"
|
||||
set name = "Speech"
|
||||
|
||||
@@ -20,11 +20,10 @@ proc/load_alienwhitelist()
|
||||
else
|
||||
alien_whitelist = text2list(text, "\n")
|
||||
|
||||
//todo: admin aliens
|
||||
/proc/is_alien_whitelisted(mob/M, var/species)
|
||||
if(!alien_whitelist)
|
||||
return 0
|
||||
if((M.client) && (M.client.holder) && (M.client.holder.level) && (M.client.holder.level >= 5))
|
||||
return 1
|
||||
if(M && species)
|
||||
for (var/s in alien_whitelist)
|
||||
if(findtext(s,"[M.ckey] - [species]"))
|
||||
|
||||
@@ -199,6 +199,9 @@
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/attack_hand(var/mob/user as mob)
|
||||
return src.interact(user)
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/interact(var/mob/user as mob)
|
||||
if (src.destroyed)
|
||||
return
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ var/global/list/autolathe_recipes = list( \
|
||||
new /obj/item/ammo_magazine/c38(), \
|
||||
new /obj/item/device/taperecorder(), \
|
||||
new /obj/item/device/assembly/igniter(), \
|
||||
new /obj/item/device/infra_sensor(), \
|
||||
new /obj/item/device/assembly/signaler(), \
|
||||
new /obj/item/device/radio/headset(), \
|
||||
new /obj/item/device/radio(), \
|
||||
@@ -103,20 +102,6 @@ var/global/list/autolathe_recipes_hidden = list( \
|
||||
user << browse("<HTML><HEAD><TITLE>Autolathe Control Panel</TITLE></HEAD><BODY><TT>[dat]</TT></BODY></HTML>", "window=autolathe_regular")
|
||||
onclose(user, "autolathe_regular")
|
||||
|
||||
interact(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
if (src.shocked)
|
||||
src.shock(user,50)
|
||||
if (src.opened)
|
||||
wires_win(user,50)
|
||||
return
|
||||
if (src.disabled)
|
||||
user << "\red You press the button, but nothing happens."
|
||||
return
|
||||
regular_win(user)
|
||||
return
|
||||
|
||||
shock(mob/user, prb)
|
||||
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
|
||||
return 0
|
||||
@@ -130,6 +115,20 @@ var/global/list/autolathe_recipes_hidden = list( \
|
||||
else
|
||||
return 0
|
||||
|
||||
interact(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
if (src.shocked)
|
||||
src.shock(user,50)
|
||||
if (src.opened)
|
||||
wires_win(user,50)
|
||||
return
|
||||
if (src.disabled)
|
||||
user << "\red You press the button, but nothing happens."
|
||||
return
|
||||
regular_win(user)
|
||||
return
|
||||
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if (stat)
|
||||
return 1
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/biogenerator/proc/interact(mob/user as mob)
|
||||
/obj/machinery/biogenerator/interact(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.set_machine(src)
|
||||
|
||||
@@ -149,10 +149,7 @@
|
||||
|
||||
|
||||
/obj/machinery/bot/attack_ai(mob/user as mob)
|
||||
if (src.on)
|
||||
turn_off()
|
||||
else
|
||||
turn_on()
|
||||
src.attack_hand(user)
|
||||
|
||||
/******************************************************************/
|
||||
// Navigation procs
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
usr.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/bot/cleanbot/proc/interact(mob/user as mob)
|
||||
/obj/machinery/bot/cleanbot/interact(mob/user as mob)
|
||||
var/dat
|
||||
dat += text({"
|
||||
<TT><B>Automatic Station Cleaner v1.0</B></TT><BR><BR>
|
||||
@@ -87,7 +87,7 @@ Status: []<BR>
|
||||
Behaviour controls are [src.locked ? "locked" : "unlocked"]<BR>
|
||||
Maintenance panel is [src.open ? "opened" : "closed"]"},
|
||||
text("<A href='?src=\ref[src];operation=start'>[src.on ? "On" : "Off"]</A>"))
|
||||
if(!src.locked)
|
||||
if(!src.locked || issilicon(user))
|
||||
dat += text({"<BR>Cleans Blood: []<BR>"}, text("<A href='?src=\ref[src];operation=blood'>[src.blood ? "Yes" : "No"]</A>"))
|
||||
dat += text({"<BR>Patrol station: []<BR>"}, text("<A href='?src=\ref[src];operation=patrol'>[src.should_patrol ? "Yes" : "No"]</A>"))
|
||||
// dat += text({"<BR>Beacon frequency: []<BR>"}, text("<A href='?src=\ref[src];operation=freq'>[src.beacon_freq]</A>"))
|
||||
@@ -170,7 +170,6 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
|
||||
visible_message("[src] makes an excited beeping booping sound!")
|
||||
|
||||
if(src.screwloose && prob(5))
|
||||
visible_message("[src] leaks a drop of water. How strange.")
|
||||
if(istype(loc,/turf/simulated))
|
||||
var/turf/simulated/T = src.loc
|
||||
if(T.wet < 1)
|
||||
@@ -350,7 +349,7 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
|
||||
del(src)
|
||||
|
||||
else if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name)
|
||||
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
|
||||
@@ -124,7 +124,7 @@ Maintenance panel panel is [src.open ? "opened" : "closed"]"},
|
||||
|
||||
"<A href='?src=\ref[src];power=1'>[src.on ? "On" : "Off"]</A>" )
|
||||
|
||||
if(!src.locked)
|
||||
if(!src.locked || issilicon(user))
|
||||
if(!lasercolor)
|
||||
dat += text({"<BR>
|
||||
Check for Weapon Authorization: []<BR>
|
||||
@@ -889,7 +889,7 @@ Auto Patrol: []"},
|
||||
..()
|
||||
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name)
|
||||
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
|
||||
if(!t) return
|
||||
if(!in_range(src, usr) && src.loc != usr) return
|
||||
created_name = t
|
||||
|
||||
@@ -75,14 +75,14 @@
|
||||
usr.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/bot/floorbot/proc/interact(mob/user as mob)
|
||||
/obj/machinery/bot/floorbot/interact(mob/user as mob)
|
||||
var/dat
|
||||
dat += "<TT><B>Automatic Station Floor Repairer v1.0</B></TT><BR><BR>"
|
||||
dat += "Status: <A href='?src=\ref[src];operation=start'>[src.on ? "On" : "Off"]</A><BR>"
|
||||
dat += "Maintenance panel panel is [src.open ? "opened" : "closed"]<BR>"
|
||||
dat += "Tiles left: [src.amount]<BR>"
|
||||
dat += "Behvaiour controls are [src.locked ? "locked" : "unlocked"]<BR>"
|
||||
if(!src.locked)
|
||||
if(!src.locked || issilicon(user))
|
||||
dat += "Improves floors: <A href='?src=\ref[src];operation=improve'>[src.improvefloors ? "Yes" : "No"]</A><BR>"
|
||||
dat += "Finds tiles: <A href='?src=\ref[src];operation=tiles'>[src.eattiles ? "Yes" : "No"]</A><BR>"
|
||||
dat += "Make singles pieces of metal into tiles when empty: <A href='?src=\ref[src];operation=make'>[src.maketiles ? "Yes" : "No"]</A><BR>"
|
||||
@@ -419,7 +419,7 @@
|
||||
del(src)
|
||||
|
||||
else if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name)
|
||||
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
else
|
||||
dat += "None Loaded"
|
||||
dat += "<br>Behaviour controls are [src.locked ? "locked" : "unlocked"]<hr>"
|
||||
if(!src.locked)
|
||||
if(!src.locked || issilicon(user))
|
||||
dat += "<TT>Healing Threshold: "
|
||||
dat += "<a href='?src=\ref[src];adj_threshold=-10'>--</a> "
|
||||
dat += "<a href='?src=\ref[src];adj_threshold=-5'>-</a> "
|
||||
@@ -150,7 +150,7 @@
|
||||
else
|
||||
turn_on()
|
||||
|
||||
else if((href_list["adj_threshold"]) && (!src.locked))
|
||||
else if((href_list["adj_threshold"]) && (!src.locked || issilicon(usr)))
|
||||
var/adjust_num = text2num(href_list["adj_threshold"])
|
||||
src.heal_threshold += adjust_num
|
||||
if(src.heal_threshold < 5)
|
||||
@@ -158,7 +158,7 @@
|
||||
if(src.heal_threshold > 75)
|
||||
src.heal_threshold = 75
|
||||
|
||||
else if((href_list["adj_inject"]) && (!src.locked))
|
||||
else if((href_list["adj_inject"]) && (!src.locked || issilicon(usr)))
|
||||
var/adjust_num = text2num(href_list["adj_inject"])
|
||||
src.injection_amount += adjust_num
|
||||
if(src.injection_amount < 5)
|
||||
@@ -166,7 +166,7 @@
|
||||
if(src.injection_amount > 15)
|
||||
src.injection_amount = 15
|
||||
|
||||
else if((href_list["use_beaker"]) && (!src.locked))
|
||||
else if((href_list["use_beaker"]) && (!src.locked || issilicon(usr)))
|
||||
src.use_beaker = !src.use_beaker
|
||||
else if((href_list["toggle_inject"]) && (!src.locked))
|
||||
src.always_inject = !src.always_inject
|
||||
@@ -175,7 +175,7 @@
|
||||
src.reagent_glass.loc = get_turf(src)
|
||||
src.reagent_glass = null
|
||||
|
||||
else if ((href_list["togglevoice"]) && (!src.locked))
|
||||
else if ((href_list["togglevoice"]) && (!src.locked || issilicon(usr)))
|
||||
src.shut_up = !src.shut_up
|
||||
|
||||
src.updateUsrDialog()
|
||||
@@ -530,26 +530,8 @@
|
||||
|
||||
/obj/item/weapon/firstaid_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if((istype(W, /obj/item/device/healthanalyzer)) && (!src.build_step))
|
||||
src.build_step++
|
||||
user << "You add the health sensor to [src]!"
|
||||
src.name = "First aid/robot arm/health analyzer assembly"
|
||||
src.overlays += image('aibots.dmi', "na_scanner")
|
||||
del(W)
|
||||
|
||||
else if((isprox(W)) && (src.build_step == 1))
|
||||
src.build_step++
|
||||
user << "You complete the Medibot! Beep boop."
|
||||
var/obj/machinery/bot/medbot/S = new /obj/machinery/bot/medbot
|
||||
S.skin = src.skin
|
||||
S.loc = get_turf(src)
|
||||
S.name = src.created_name
|
||||
del(W)
|
||||
del(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = input(user, "Enter new robot name", src.name, src.created_name) as text
|
||||
t = copytext(sanitize(t), 1, MAX_NAME_LEN)
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
user.set_machine(src)
|
||||
interact(user, 0)
|
||||
|
||||
/obj/machinery/bot/mulebot/proc/interact(var/mob/user, var/ai=0)
|
||||
/obj/machinery/bot/mulebot/interact(var/mob/user, var/ai=0)
|
||||
var/dat
|
||||
dat += "<TT><B>Multiple Utility Load Effector Mk. III</B></TT><BR><BR>"
|
||||
dat += "ID: [suffix]<BR>"
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
usr.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/bot/secbot/proc/interact(mob/user as mob)
|
||||
/obj/machinery/bot/secbot/interact(mob/user as mob)
|
||||
var/dat
|
||||
|
||||
dat += text({"
|
||||
@@ -113,7 +113,7 @@ Maintenance panel panel is [src.open ? "opened" : "closed"]"},
|
||||
|
||||
"<A href='?src=\ref[src];power=1'>[src.on ? "On" : "Off"]</A>" )
|
||||
|
||||
if(!src.locked)
|
||||
if(!src.locked || issilicon(user))
|
||||
dat += text({"<BR>
|
||||
Check for Weapon Authorization: []<BR>
|
||||
Check Security Records: []<BR>
|
||||
@@ -752,7 +752,7 @@ Auto Patrol: []"},
|
||||
del(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name)
|
||||
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
|
||||
if(!t)
|
||||
return
|
||||
if(!in_range(src, usr) && src.loc != usr)
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
src.interact(usr)
|
||||
|
||||
/obj/machinery/camera/proc/interact(mob/living/user as mob)
|
||||
/obj/machinery/camera/interact(mob/living/user as mob)
|
||||
if(!panel_open)
|
||||
return
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
interact(user)
|
||||
|
||||
|
||||
/obj/machinery/computer/operating/proc/interact(mob/user)
|
||||
/obj/machinery/computer/operating/interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.unset_machine()
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
name_part1 = pick("the Automatic ", "Farmer ", "Lord ", "Professor ", "the Cuban ", "the Evil ", "the Dread King ", "the Space ", "Lord ", "the Great ", "Duke ", "General ")
|
||||
name_part2 = pick("Melonoid", "Murdertron", "Sorcerer", "Ruin", "Jeff", "Ectoplasm", "Crushulon", "Uhangoid", "Vhakoid", "Peteoid", "Metroid", "Griefer", "ERPer", "Lizard Man", "Unicorn")
|
||||
|
||||
src.enemy_name = dd_replacetext((name_part1 + name_part2), "the ", "")
|
||||
src.enemy_name = replacetext((name_part1 + name_part2), "the ", "")
|
||||
src.name = (name_action + name_part1 + name_part2)
|
||||
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
var/jobs_all = ""
|
||||
var/list/alljobs = (istype(src,/obj/machinery/computer/card/centcom)? get_all_centcom_jobs() : get_all_jobs()) + "Custom"
|
||||
for(var/job in alljobs)
|
||||
jobs_all += "<a href='?src=\ref[src];choice=assign;assign_target=[job]'>[dd_replacetext(job, " ", " ")]</a> " //make sure there isn't a line break in the middle of a job
|
||||
jobs_all += "<a href='?src=\ref[src];choice=assign;assign_target=[job]'>[replacetext(job, " ", " ")]</a> " //make sure there isn't a line break in the middle of a job
|
||||
|
||||
|
||||
var/body
|
||||
@@ -138,9 +138,9 @@
|
||||
accesses += "<h5>Central Command:</h5>"
|
||||
for(var/A in get_all_centcom_access())
|
||||
if(A in modify.access)
|
||||
accesses += "<a href='?src=\ref[src];choice=access;access_target=[A];allowed=0'><font color=\"red\">[dd_replacetext(get_centcom_access_desc(A), " ", " ")]</font></a> "
|
||||
accesses += "<a href='?src=\ref[src];choice=access;access_target=[A];allowed=0'><font color=\"red\">[replacetext(get_centcom_access_desc(A), " ", " ")]</font></a> "
|
||||
else
|
||||
accesses += "<a href='?src=\ref[src];choice=access;access_target=[A];allowed=1'>[dd_replacetext(get_centcom_access_desc(A), " ", " ")]</a> "
|
||||
accesses += "<a href='?src=\ref[src];choice=access;access_target=[A];allowed=1'>[replacetext(get_centcom_access_desc(A), " ", " ")]</a> "
|
||||
else
|
||||
accesses += "<div align='center'><b>Access</b></div>"
|
||||
accesses += "<table style='width:100%'>"
|
||||
@@ -152,9 +152,9 @@
|
||||
accesses += "<td style='width:14%' valign='top'>"
|
||||
for(var/A in get_region_accesses(i))
|
||||
if(A in modify.access)
|
||||
accesses += "<a href='?src=\ref[src];choice=access;access_target=[A];allowed=0'><font color=\"red\">[dd_replacetext(get_access_desc(A), " ", " ")]</font></a> "
|
||||
accesses += "<a href='?src=\ref[src];choice=access;access_target=[A];allowed=0'><font color=\"red\">[replacetext(get_access_desc(A), " ", " ")]</font></a> "
|
||||
else
|
||||
accesses += "<a href='?src=\ref[src];choice=access;access_target=[A];allowed=1'>[dd_replacetext(get_access_desc(A), " ", " ")]</a> "
|
||||
accesses += "<a href='?src=\ref[src];choice=access;access_target=[A];allowed=1'>[replacetext(get_access_desc(A), " ", " ")]</a> "
|
||||
accesses += "<br>"
|
||||
accesses += "</td>"
|
||||
accesses += "</tr></table>"
|
||||
|
||||
@@ -53,66 +53,66 @@
|
||||
return
|
||||
|
||||
|
||||
proc
|
||||
interact(mob/user)
|
||||
if( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if(!istype(user, /mob/living/silicon))
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=powcomp")
|
||||
return
|
||||
user.set_machine(src)
|
||||
src.scan()
|
||||
var/t = "<TT><B>Crew Monitoring</B><HR>"
|
||||
t += "<BR><A href='?src=\ref[src];update=1'>Refresh</A> "
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
t += "<table><tr><td width='40%'>Name</td><td width='20%'>Vitals</td><td width='40%'>Position</td></tr>"
|
||||
var/list/logs = list()
|
||||
for(var/obj/item/clothing/under/C in src.tracked)
|
||||
var/log = ""
|
||||
if((C) && (C.has_sensor) && (C.loc) && (C.loc.z == 1) && C.sensor_mode)
|
||||
if(istype(C.loc, /mob/living/carbon/human))
|
||||
interact(mob/user)
|
||||
if( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if(!istype(user, /mob/living/silicon))
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=powcomp")
|
||||
return
|
||||
user.set_machine(src)
|
||||
src.scan()
|
||||
var/t = "<TT><B>Crew Monitoring</B><HR>"
|
||||
t += "<BR><A href='?src=\ref[src];update=1'>Refresh</A> "
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
t += "<table><tr><td width='40%'>Name</td><td width='20%'>Vitals</td><td width='40%'>Position</td></tr>"
|
||||
var/list/logs = list()
|
||||
for(var/obj/item/clothing/under/C in src.tracked)
|
||||
var/log = ""
|
||||
var/turf/pos = get_turf(C)
|
||||
if((C) && (C.has_sensor) && (pos) && (pos.z == src.z) && C.sensor_mode)
|
||||
if(istype(C.loc, /mob/living/carbon/human))
|
||||
|
||||
var/mob/living/carbon/human/H = C.loc
|
||||
var/mob/living/carbon/human/H = C.loc
|
||||
|
||||
var/dam1 = round(H.getOxyLoss(),1)
|
||||
var/dam2 = round(H.getToxLoss(),1)
|
||||
var/dam3 = round(H.getFireLoss(),1)
|
||||
var/dam4 = round(H.getBruteLoss(),1)
|
||||
var/dam1 = round(H.getOxyLoss(),1)
|
||||
var/dam2 = round(H.getToxLoss(),1)
|
||||
var/dam3 = round(H.getFireLoss(),1)
|
||||
var/dam4 = round(H.getBruteLoss(),1)
|
||||
|
||||
var/life_status = "[H.stat > 1 ? "<font color=red>Deceased</font>" : "Living"]"
|
||||
var/damage_report = "(<font color='blue'>[dam1]</font>/<font color='green'>[dam2]</font>/<font color='orange'>[dam3]</font>/<font color='red'>[dam4]</font>)"
|
||||
var/life_status = "[H.stat > 1 ? "<font color=red>Deceased</font>" : "Living"]"
|
||||
var/damage_report = "(<font color='blue'>[dam1]</font>/<font color='green'>[dam2]</font>/<font color='orange'>[dam3]</font>/<font color='red'>[dam4]</font>)"
|
||||
|
||||
if(H.wear_id)
|
||||
log += "<tr><td width='40%'>[H.wear_id.name]</td>"
|
||||
else
|
||||
log += "<tr><td width='40%'>Unknown:</td>"
|
||||
if(H.wear_id)
|
||||
log += "<tr><td width='40%'>[H.wear_id.name]</td>"
|
||||
else
|
||||
log += "<tr><td width='40%'>Unknown</td>"
|
||||
|
||||
switch(C.sensor_mode)
|
||||
if(1)
|
||||
log += "<td width='15%'>[life_status]</td><td width='40%'>Not Available</td></tr>"
|
||||
if(2)
|
||||
log += "<td width='20%'>[life_status] [damage_report]</td><td width='40%'>Not Available</td></tr>"
|
||||
if(3)
|
||||
var/area/player_area = get_area(H)
|
||||
log += "<td width='20%'>[life_status] [damage_report]</td><td width='40%'>[player_area.name] ([H.x], [H.y])</td></tr>"
|
||||
logs += log
|
||||
logs = sortList(logs)
|
||||
for(var/log in logs)
|
||||
t += log
|
||||
t += "</table>"
|
||||
t += "</FONT></PRE></TT>"
|
||||
user << browse(t, "window=crewcomp;size=900x600")
|
||||
onclose(user, "crewcomp")
|
||||
switch(C.sensor_mode)
|
||||
if(1)
|
||||
log += "<td width='15%'>[life_status]</td><td width='40%'>Not Available</td></tr>"
|
||||
if(2)
|
||||
log += "<td width='20%'>[life_status] [damage_report]</td><td width='40%'>Not Available</td></tr>"
|
||||
if(3)
|
||||
var/area/player_area = get_area(H)
|
||||
log += "<td width='20%'>[life_status] [damage_report]</td><td width='40%'>[player_area.name] ([pos.x], [pos.y])</td></tr>"
|
||||
logs += log
|
||||
logs = sortList(logs)
|
||||
for(var/log in logs)
|
||||
t += log
|
||||
t += "</table>"
|
||||
t += "</FONT></PRE></TT>"
|
||||
user << browse(t, "window=crewcomp;size=900x600")
|
||||
onclose(user, "crewcomp")
|
||||
|
||||
|
||||
scan()
|
||||
for(var/obj/item/clothing/under/C in world)
|
||||
if((C.has_sensor) && (istype(C.loc, /mob/living/carbon/human)))
|
||||
var/check = 0
|
||||
for(var/O in src.tracked)
|
||||
if(O == C)
|
||||
check = 1
|
||||
break
|
||||
if(!check)
|
||||
src.tracked.Add(C)
|
||||
return 1
|
||||
proc/scan()
|
||||
for(var/obj/item/clothing/under/C in world)
|
||||
if((C.has_sensor) && (istype(C.loc, /mob/living/carbon/human)))
|
||||
var/check = 0
|
||||
for(var/O in src.tracked)
|
||||
if(O == C)
|
||||
check = 1
|
||||
break
|
||||
if(!check)
|
||||
src.tracked.Add(C)
|
||||
return 1
|
||||
@@ -68,7 +68,7 @@
|
||||
src.attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/machinery/power/monitor/proc/interact(mob/user)
|
||||
/obj/machinery/power/monitor/interact(mob/user)
|
||||
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
return
|
||||
|
||||
|
||||
proc/interact(mob/user)
|
||||
interact(mob/user)
|
||||
usr.set_machine(src)
|
||||
var/dat = "<HEAD><TITLE>Current Station Alerts</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
|
||||
dat += "<A HREF='?src=\ref[user];mach_close=alerts'>Close</A><br><br>"
|
||||
|
||||
@@ -296,11 +296,10 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
|
||||
spawn (0) target_tile.hotspot_expose(temperature, 400)
|
||||
for(var/obj/structure/falsewall/plasma/F in range(3,src))//Hackish as fuck, but until temperature_expose works, there is nothing I can do -Sieve
|
||||
var/turf/T = get_turf(F)
|
||||
T.ReplaceWithMineralWall("plasma")
|
||||
T.ChangeTurf(/turf/simulated/wall/mineral/plasma/)
|
||||
del (F)
|
||||
for(var/turf/simulated/wall/mineral/W in range(3,src))
|
||||
if(mineral == "plasma")
|
||||
W.ignite((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame
|
||||
for(var/turf/simulated/wall/mineral/plasma/W in range(3,src))
|
||||
W.ignite((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame
|
||||
for(var/obj/machinery/door/airlock/plasma/D in range(3,src))
|
||||
D.ignite(temperature/4)
|
||||
new/obj/structure/door_assembly/door_assembly_0( src.loc )
|
||||
|
||||
@@ -157,9 +157,6 @@
|
||||
user.attack_log += "\[[time_stamp()]\] Gibbed <b>[src.occupant]/[src.occupant.ckey]</b>"
|
||||
log_attack("\[[time_stamp()]\] <b>[user]/[user.ckey]</b> gibbed <b>[src.occupant]/[src.occupant.ckey]</b>")
|
||||
|
||||
log_admin("ATTACK: [user]/[user.ckey]</b> gibbed <b>[src.occupant]/[src.occupant.ckey]")
|
||||
msg_admin_attack("ATTACK: [user]/[user.ckey]</b> gibbed <b>[src.occupant]/[src.occupant.ckey]") //BS12 EDIT ALG
|
||||
|
||||
src.occupant.death(1)
|
||||
src.occupant.ghostize()
|
||||
del(src.occupant)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/juicer/proc/interact(mob/user as mob) // The microwave Menu
|
||||
/obj/machinery/juicer/interact(mob/user as mob) // The microwave Menu
|
||||
var/is_chamber_empty = 0
|
||||
var/is_beaker_ready = 0
|
||||
var/processing_chamber = ""
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
* Microwave Menu
|
||||
********************/
|
||||
|
||||
/obj/machinery/microwave/proc/interact(mob/user as mob) // The microwave Menu
|
||||
/obj/machinery/microwave/interact(mob/user as mob) // The microwave Menu
|
||||
var/dat = ""
|
||||
if(src.broken > 0)
|
||||
dat = {"<TT>Bzzzzttttt</TT>"}
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
for(var/datum/disease/D in O.viruses)
|
||||
if(D.spread_type != SPECIAL)
|
||||
B.data["viruses"] = new D.type(0)
|
||||
B.data["viruses"] = new D.type(0, D)
|
||||
|
||||
B.data["blood_DNA"] = copytext(O.dna.unique_enzymes,1,0)
|
||||
if(O.resistances&&O.resistances.len)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user