mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-15 12:42:50 +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/voice"
|
||||||
#define FILE_DIR "sound/weapons"
|
#define FILE_DIR "sound/weapons"
|
||||||
// END_FILE_DIR
|
// END_FILE_DIR
|
||||||
|
|
||||||
// BEGIN_PREFERENCES
|
// BEGIN_PREFERENCES
|
||||||
// END_PREFERENCES
|
// END_PREFERENCES
|
||||||
|
|
||||||
@@ -138,6 +137,22 @@
|
|||||||
#include "code\datums\diseases\robotic_transformation.dm"
|
#include "code\datums\diseases\robotic_transformation.dm"
|
||||||
#include "code\datums\diseases\wizarditis.dm"
|
#include "code\datums\diseases\wizarditis.dm"
|
||||||
#include "code\datums\diseases\xeno_transformation.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\construction_datum.dm"
|
||||||
#include "code\datums\helper_datums\events.dm"
|
#include "code\datums\helper_datums\events.dm"
|
||||||
#include "code\datums\helper_datums\getrev.dm"
|
#include "code\datums\helper_datums\getrev.dm"
|
||||||
@@ -173,7 +188,6 @@
|
|||||||
#include "code\defines\procs\captain_announce.dm"
|
#include "code\defines\procs\captain_announce.dm"
|
||||||
#include "code\defines\procs\command_alert.dm"
|
#include "code\defines\procs\command_alert.dm"
|
||||||
#include "code\defines\procs\dbcore.dm"
|
#include "code\defines\procs\dbcore.dm"
|
||||||
#include "code\defines\procs\forum_activation.dm"
|
|
||||||
#include "code\defines\procs\statistics.dm"
|
#include "code\defines\procs\statistics.dm"
|
||||||
#include "code\game\asteroid.dm"
|
#include "code\game\asteroid.dm"
|
||||||
#include "code\game\atoms.dm"
|
#include "code\game\atoms.dm"
|
||||||
@@ -402,7 +416,6 @@
|
|||||||
#include "code\game\mecha\equipment\weapons\weapons.dm"
|
#include "code\game\mecha\equipment\weapons\weapons.dm"
|
||||||
#include "code\game\mecha\medical\medical.dm"
|
#include "code\game\mecha\medical\medical.dm"
|
||||||
#include "code\game\mecha\medical\odysseus.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\ripley.dm"
|
||||||
#include "code\game\mecha\working\working.dm"
|
#include "code\game\mecha\working\working.dm"
|
||||||
#include "code\game\objects\empulse.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\kitchen.dm"
|
||||||
#include "code\game\objects\items\weapons\manuals.dm"
|
#include "code\game\objects\items\weapons\manuals.dm"
|
||||||
#include "code\game\objects\items\weapons\mop.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\paint.dm"
|
||||||
#include "code\game\objects\items\weapons\paiwire.dm"
|
#include "code\game\objects\items\weapons\paiwire.dm"
|
||||||
#include "code\game\objects\items\weapons\photography.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\bed.dm"
|
||||||
#include "code\game\objects\structures\stool_bed_chair_nest\chairs.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\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\simulated.dm"
|
||||||
#include "code\game\turfs\turf.dm"
|
#include "code\game\turfs\turf.dm"
|
||||||
#include "code\game\turfs\unsimulated.dm"
|
#include "code\game\turfs\unsimulated.dm"
|
||||||
@@ -638,6 +649,7 @@
|
|||||||
#include "code\modules\admin\admin.dm"
|
#include "code\modules\admin\admin.dm"
|
||||||
#include "code\modules\admin\admin_investigate.dm"
|
#include "code\modules\admin\admin_investigate.dm"
|
||||||
#include "code\modules\admin\admin_memo.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\admin_verbs.dm"
|
||||||
#include "code\modules\admin\banjob.dm"
|
#include "code\modules\admin\banjob.dm"
|
||||||
#include "code\modules\admin\create_mob.dm"
|
#include "code\modules\admin\create_mob.dm"
|
||||||
@@ -650,9 +662,9 @@
|
|||||||
#include "code\modules\admin\newbanjob.dm"
|
#include "code\modules\admin\newbanjob.dm"
|
||||||
#include "code\modules\admin\player_notes.dm"
|
#include "code\modules\admin\player_notes.dm"
|
||||||
#include "code\modules\admin\player_panel.dm"
|
#include "code\modules\admin\player_panel.dm"
|
||||||
|
#include "code\modules\admin\topic.dm"
|
||||||
#include "code\modules\admin\ToRban.dm"
|
#include "code\modules\admin\ToRban.dm"
|
||||||
#include "code\modules\admin\DB ban\functions.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\permissionverbs\permissionedit.dm"
|
||||||
#include "code\modules\admin\verbs\adminhelp.dm"
|
#include "code\modules\admin\verbs\adminhelp.dm"
|
||||||
#include "code\modules\admin\verbs\adminjump.dm"
|
#include "code\modules\admin\verbs\adminjump.dm"
|
||||||
@@ -685,6 +697,7 @@
|
|||||||
#include "code\modules\assembly\holder.dm"
|
#include "code\modules\assembly\holder.dm"
|
||||||
#include "code\modules\assembly\igniter.dm"
|
#include "code\modules\assembly\igniter.dm"
|
||||||
#include "code\modules\assembly\infrared.dm"
|
#include "code\modules\assembly\infrared.dm"
|
||||||
|
#include "code\modules\assembly\mousetrap.dm"
|
||||||
#include "code\modules\assembly\proximity.dm"
|
#include "code\modules\assembly\proximity.dm"
|
||||||
#include "code\modules\assembly\shock_kit.dm"
|
#include "code\modules\assembly\shock_kit.dm"
|
||||||
#include "code\modules\assembly\signaler.dm"
|
#include "code\modules\assembly\signaler.dm"
|
||||||
|
|||||||
@@ -152,7 +152,7 @@
|
|||||||
else
|
else
|
||||||
chance_of_deletion = 100
|
chance_of_deletion = 100
|
||||||
if(prob(chance_of_deletion))
|
if(prob(chance_of_deletion))
|
||||||
T.ReplaceWithSpace()
|
T.ChangeTurf(/turf/space)
|
||||||
else
|
else
|
||||||
T.to_be_destroyed = 0
|
T.to_be_destroyed = 0
|
||||||
T.max_fire_temperature_sustained = 0
|
T.max_fire_temperature_sustained = 0
|
||||||
|
|||||||
@@ -13,15 +13,6 @@
|
|||||||
spawn(0)
|
spawn(0)
|
||||||
core_generator = locate() in world
|
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)
|
Topic(href, href_list)
|
||||||
..()
|
..()
|
||||||
if( href_list["shutdown"] )
|
if( href_list["shutdown"] )
|
||||||
@@ -52,7 +43,6 @@
|
|||||||
if(updating)
|
if(updating)
|
||||||
src.updateDialog()
|
src.updateDialog()
|
||||||
|
|
||||||
proc
|
|
||||||
interact(mob/user)
|
interact(mob/user)
|
||||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||||
if (!istype(user, /mob/living/silicon))
|
if (!istype(user, /mob/living/silicon))
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ var/const/max_assembly_amount = 300
|
|||||||
F.loc = src.loc
|
F.loc = src.loc
|
||||||
return
|
return
|
||||||
|
|
||||||
proc
|
|
||||||
interact(mob/user)
|
interact(mob/user)
|
||||||
/*if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
/*if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||||
if (!istype(user, /mob/living/silicon))
|
if (!istype(user, /mob/living/silicon))
|
||||||
|
|||||||
@@ -121,7 +121,6 @@
|
|||||||
..()
|
..()
|
||||||
src.updateDialog()
|
src.updateDialog()
|
||||||
|
|
||||||
proc
|
|
||||||
interact(mob/user)
|
interact(mob/user)
|
||||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||||
if (!istype(user, /mob/living/silicon))
|
if (!istype(user, /mob/living/silicon))
|
||||||
|
|||||||
@@ -97,7 +97,6 @@
|
|||||||
return*/
|
return*/
|
||||||
interact(user)
|
interact(user)
|
||||||
|
|
||||||
proc
|
|
||||||
interact(mob/user)
|
interact(mob/user)
|
||||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||||
if (!istype(user, /mob/living/silicon))
|
if (!istype(user, /mob/living/silicon))
|
||||||
|
|||||||
@@ -163,16 +163,6 @@
|
|||||||
pixel_x = -pixel_x
|
pixel_x = -pixel_x
|
||||||
pixel_y = -pixel_y
|
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)
|
interact(mob/user)
|
||||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||||
if (!istype(user, /mob/living/silicon))
|
if (!istype(user, /mob/living/silicon))
|
||||||
|
|||||||
@@ -7,20 +7,6 @@
|
|||||||
New()
|
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)
|
Topic(href, href_list)
|
||||||
..()
|
..()
|
||||||
if( href_list["close"] )
|
if( href_list["close"] )
|
||||||
@@ -37,7 +23,6 @@
|
|||||||
if(updating)
|
if(updating)
|
||||||
src.updateDialog()
|
src.updateDialog()
|
||||||
|
|
||||||
proc
|
|
||||||
interact(mob/user)
|
interact(mob/user)
|
||||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||||
if (!istype(user, /mob/living/silicon))
|
if (!istype(user, /mob/living/silicon))
|
||||||
|
|||||||
@@ -14,20 +14,10 @@
|
|||||||
if(las.id == src.id)
|
if(las.id == src.id)
|
||||||
lasers += las
|
lasers += las
|
||||||
|
|
||||||
attack_hand(mob/user)
|
|
||||||
add_fingerprint(user)
|
|
||||||
if(stat & (BROKEN|NOPOWER))
|
|
||||||
return
|
|
||||||
interact(user)
|
|
||||||
|
|
||||||
attack_ai(mob/user)
|
|
||||||
attack_hand(user)
|
|
||||||
|
|
||||||
process()
|
process()
|
||||||
..()
|
..()
|
||||||
updateDialog()
|
updateDialog()
|
||||||
|
|
||||||
proc
|
|
||||||
interact(mob/user)
|
interact(mob/user)
|
||||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||||
if (!istype(user, /mob/living/silicon))
|
if (!istype(user, /mob/living/silicon))
|
||||||
|
|||||||
@@ -119,10 +119,6 @@
|
|||||||
if(M == user) continue
|
if(M == user) continue
|
||||||
M.show_message("\red The [src.name] has been hit with the [W.name] by [user.name]!")
|
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[])
|
/obj/machinery/shield_capacitor/Topic(href, href_list[])
|
||||||
..()
|
..()
|
||||||
if( href_list["close"] )
|
if( href_list["close"] )
|
||||||
@@ -144,7 +140,7 @@
|
|||||||
//
|
//
|
||||||
updateDialog()
|
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 ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||||
if (!istype(user, /mob/living/silicon))
|
if (!istype(user, /mob/living/silicon))
|
||||||
user.machine = null
|
user.machine = null
|
||||||
|
|||||||
@@ -148,11 +148,6 @@
|
|||||||
//
|
//
|
||||||
updateDialog()
|
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)
|
/obj/machinery/shield_gen/attackby(obj/item/W, mob/user)
|
||||||
|
|
||||||
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
|
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
|
||||||
@@ -241,7 +236,7 @@
|
|||||||
//
|
//
|
||||||
updateDialog()
|
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 ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||||
if (!istype(user, /mob/living/silicon))
|
if (!istype(user, /mob/living/silicon))
|
||||||
user.machine = null
|
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)
|
if(!uplink_data)
|
||||||
uplink_data = ticker.mode.uplink_items
|
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
|
ItemList = dd_text2list(src.items, ";") // Parsing the items text string
|
||||||
uses = ticker.mode.uplink_uses
|
uses = ticker.mode.uplink_uses
|
||||||
|
|
||||||
|
|||||||
@@ -149,13 +149,13 @@
|
|||||||
if(objholder in removed_paths)
|
if(objholder in removed_paths)
|
||||||
alert("That path is not allowed.")
|
alert("That path is not allowed.")
|
||||||
objholder = "/obj/structure/closet"
|
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"
|
objholder = "/obj/structure/closet"
|
||||||
if(3)
|
if(3)
|
||||||
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine")
|
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")
|
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
|
return
|
||||||
var/thetype = input(usr,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference")
|
var/thetype = input(usr,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference")
|
||||||
if(!thetype) return
|
if(!thetype) return
|
||||||
@@ -186,28 +186,28 @@
|
|||||||
if(istype(object,/turf) && pa.Find("left") && !pa.Find("alt") && !pa.Find("ctrl") )
|
if(istype(object,/turf) && pa.Find("left") && !pa.Find("alt") && !pa.Find("ctrl") )
|
||||||
if(istype(object,/turf/space))
|
if(istype(object,/turf/space))
|
||||||
var/turf/T = object
|
var/turf/T = object
|
||||||
T.ReplaceWithFloor()
|
T.ChangeTurf(/turf/simulated/floor)
|
||||||
return
|
return
|
||||||
else if(istype(object,/turf/simulated/floor))
|
else if(istype(object,/turf/simulated/floor))
|
||||||
var/turf/T = object
|
var/turf/T = object
|
||||||
T.ReplaceWithWall()
|
T.ChangeTurf(/turf/simulated/wall)
|
||||||
return
|
return
|
||||||
else if(istype(object,/turf/simulated/wall))
|
else if(istype(object,/turf/simulated/wall))
|
||||||
var/turf/T = object
|
var/turf/T = object
|
||||||
T.ReplaceWithRWall()
|
T.ChangeTurf(/turf/simulated/wall/r_wall)
|
||||||
return
|
return
|
||||||
else if(pa.Find("right"))
|
else if(pa.Find("right"))
|
||||||
if(istype(object,/turf/simulated/wall))
|
if(istype(object,/turf/simulated/wall))
|
||||||
var/turf/T = object
|
var/turf/T = object
|
||||||
T.ReplaceWithFloor()
|
T.ChangeTurf(/turf/simulated/floor)
|
||||||
return
|
return
|
||||||
else if(istype(object,/turf/simulated/floor))
|
else if(istype(object,/turf/simulated/floor))
|
||||||
var/turf/T = object
|
var/turf/T = object
|
||||||
T.ReplaceWithSpace()
|
T.ChangeTurf(/turf/space)
|
||||||
return
|
return
|
||||||
else if(istype(object,/turf/simulated/wall/r_wall))
|
else if(istype(object,/turf/simulated/wall/r_wall))
|
||||||
var/turf/T = object
|
var/turf/T = object
|
||||||
T.ReplaceWithWall()
|
T.ChangeTurf(/turf/simulated/wall)
|
||||||
return
|
return
|
||||||
else if(istype(object,/obj))
|
else if(istype(object,/obj))
|
||||||
del(object)
|
del(object)
|
||||||
@@ -235,7 +235,6 @@
|
|||||||
if(pa.Find("left"))
|
if(pa.Find("left"))
|
||||||
var/obj/A = new holder.buildmode.objholder (get_turf(object))
|
var/obj/A = new holder.buildmode.objholder (get_turf(object))
|
||||||
A.dir = holder.builddir.dir
|
A.dir = holder.builddir.dir
|
||||||
blink(A)
|
|
||||||
else if(pa.Find("right"))
|
else if(pa.Find("right"))
|
||||||
if(isobj(object)) del(object)
|
if(isobj(object)) del(object)
|
||||||
|
|
||||||
@@ -244,14 +243,12 @@
|
|||||||
if(object.vars.Find(holder.buildmode.varholder))
|
if(object.vars.Find(holder.buildmode.varholder))
|
||||||
log_admin("[key_name(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]")
|
log_admin("[key_name(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]")
|
||||||
object.vars[holder.buildmode.varholder] = holder.buildmode.valueholder
|
object.vars[holder.buildmode.varholder] = holder.buildmode.valueholder
|
||||||
blink(object)
|
|
||||||
else
|
else
|
||||||
usr << "\red [initial(object.name)] does not have a var called '[holder.buildmode.varholder]'"
|
usr << "\red [initial(object.name)] does not have a var called '[holder.buildmode.varholder]'"
|
||||||
if(pa.Find("right"))
|
if(pa.Find("right"))
|
||||||
if(object.vars.Find(holder.buildmode.varholder))
|
if(object.vars.Find(holder.buildmode.varholder))
|
||||||
log_admin("[key_name(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]")
|
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])
|
object.vars[holder.buildmode.varholder] = initial(object.vars[holder.buildmode.varholder])
|
||||||
blink(object)
|
|
||||||
else
|
else
|
||||||
usr << "\red [initial(object.name)] does not have a var called '[holder.buildmode.varholder]'"
|
usr << "\red [initial(object.name)] does not have a var called '[holder.buildmode.varholder]'"
|
||||||
|
|
||||||
@@ -262,8 +259,3 @@
|
|||||||
if(holder.throw_atom)
|
if(holder.throw_atom)
|
||||||
holder.throw_atom.throw_at(object, 10, 1)
|
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"]
|
var/txt = vars["[V]_RANDOM"]
|
||||||
if(findtextEx(txt,"PROB"))
|
if(findtextEx(txt,"PROB"))
|
||||||
txt = text2list(txt,"/")
|
txt = text2list(txt,"/")
|
||||||
txt[1] = dd_replacetext(txt[1],"PROB","")
|
txt[1] = replacetext(txt[1],"PROB","")
|
||||||
var/p = text2num(txt[1])
|
var/p = text2num(txt[1])
|
||||||
var/r = txt[2]
|
var/r = txt[2]
|
||||||
if(prob(p))
|
if(prob(p))
|
||||||
@@ -289,7 +289,7 @@ pl_control
|
|||||||
else
|
else
|
||||||
newvalue = vars[V]
|
newvalue = vars[V]
|
||||||
else if(findtextEx(txt,"PICK"))
|
else if(findtextEx(txt,"PICK"))
|
||||||
txt = dd_replacetext(txt,"PICK","")
|
txt = replacetext(txt,"PICK","")
|
||||||
txt = text2list(txt,",")
|
txt = text2list(txt,",")
|
||||||
newvalue = pick(txt)
|
newvalue = pick(txt)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ var/global/list/landmarks_list = list() //list of all landmarks created
|
|||||||
//////////////////////////
|
//////////////////////////
|
||||||
/////Initial Building/////
|
/////Initial Building/////
|
||||||
//////////////////////////
|
//////////////////////////
|
||||||
//Realistically, these should never be run, but ideally, they should only be run once at round-start
|
|
||||||
|
|
||||||
/proc/make_datum_references_lists()
|
/proc/make_datum_references_lists()
|
||||||
var/list/paths
|
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.
|
// 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)
|
/proc/sanitizeSQL(var/t as text)
|
||||||
var/sanitized_text = dd_replacetext(t, "'", "\\'")
|
var/sanitized_text = replacetext(t, "'", "\\'")
|
||||||
sanitized_text = dd_replacetext(sanitized_text, "\"", "\\\"")
|
sanitized_text = replacetext(sanitized_text, "\"", "\\\"")
|
||||||
return sanitized_text
|
return sanitized_text
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -177,18 +177,33 @@
|
|||||||
/*
|
/*
|
||||||
* Text modification
|
* 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/replacetextEx(text, find, replacement)
|
||||||
/proc/dd_replacetext(text, search_string, replacement_string)
|
var/find_len = length(find)
|
||||||
if(!text || !istext(text) || !search_string || !istext(search_string) || !istext(replacement_string))
|
if(find_len < 1) return text
|
||||||
return null
|
. = ""
|
||||||
var/textList = text2list(text, search_string)
|
var/last_found = 1
|
||||||
return dd_list2text(textList, replacement_string)
|
while(1)
|
||||||
|
var/found = findtextEx(text, find, last_found, 0)
|
||||||
//Search and replace a case sensitive sub-string within a string
|
. += copytext(text, last_found, found)
|
||||||
/proc/dd_replacetext_case(text, search_string, replacement_string)
|
if(found)
|
||||||
var/textList = text2list(text, search_string)
|
. += replacement
|
||||||
return dd_list2text(textList, replacement_string)
|
last_found = found + find_len
|
||||||
|
continue
|
||||||
|
return .
|
||||||
|
|
||||||
//Adds 'u' number of zeros ahead of the text 't'
|
//Adds 'u' number of zeros ahead of the text 't'
|
||||||
/proc/add_zero(t, u)
|
/proc/add_zero(t, u)
|
||||||
|
|||||||
@@ -129,6 +129,8 @@ proc/tg_list2text(list/list, glue=",")
|
|||||||
|
|
||||||
if(last_i <= text_len)
|
if(last_i <= text_len)
|
||||||
. += copytext(text, last_i, 0)
|
. += copytext(text, last_i, 0)
|
||||||
|
else
|
||||||
|
. += text
|
||||||
return .
|
return .
|
||||||
|
|
||||||
//Converts a text string into a list by splitting the string at each seperator found in text (discarding the seperator)
|
//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/text_len = length(text) //length of the input text
|
||||||
var/seperator_len = length(seperator) //length of the seperator text
|
var/seperator_len = length(seperator) //length of the seperator text
|
||||||
|
|
||||||
if(text_len > seperator_len)
|
if(text_len >= seperator_len)
|
||||||
var/i
|
var/i
|
||||||
var/last_i = 1
|
var/last_i = 1
|
||||||
|
|
||||||
@@ -153,6 +155,8 @@ proc/tg_list2text(list/list, glue=",")
|
|||||||
|
|
||||||
if(last_i <= text_len)
|
if(last_i <= text_len)
|
||||||
. += copytext(text, last_i, 0)
|
. += copytext(text, last_i, 0)
|
||||||
|
else
|
||||||
|
. += text
|
||||||
return .
|
return .
|
||||||
|
|
||||||
//Splits the text of a file at seperator and returns them in a list.
|
//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)
|
/proc/angle2dir(var/degree)
|
||||||
degree = ((degree+22.5)%365)
|
degree = ((degree+22.5)%365)
|
||||||
if(degree < 45) return NORTH
|
if(degree < 45) return NORTH
|
||||||
if(degree < 90) return NORTH|EAST
|
if(degree < 90) return NORTHEAST
|
||||||
if(degree < 135) return EAST
|
if(degree < 135) return EAST
|
||||||
if(degree < 180) return SOUTH|EAST
|
if(degree < 180) return SOUTHEAST
|
||||||
if(degree < 225) return SOUTH
|
if(degree < 225) return SOUTH
|
||||||
if(degree < 270) return SOUTH|WEST
|
if(degree < 270) return SOUTHWEST
|
||||||
if(degree < 315) return WEST
|
if(degree < 315) return WEST
|
||||||
return NORTH|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
|
//Returns the angle in english
|
||||||
/proc/angle2text(var/degree)
|
/proc/angle2text(var/degree)
|
||||||
return dir2text(angle2dir(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.density = 1
|
||||||
corner.anchored = 1
|
corner.anchored = 1
|
||||||
corner.icon = X.icon
|
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.tag = "delete me"
|
||||||
corner.name = "wall"
|
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
|
// Reset the shuttle corners
|
||||||
if(O.tag == "delete me")
|
if(O.tag == "delete me")
|
||||||
X.icon = 'icons/turf/shuttle.dmi'
|
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"
|
X.name = "wall"
|
||||||
del(O) // prevents multiple shuttle corners from stacking
|
del(O) // prevents multiple shuttle corners from stacking
|
||||||
continue
|
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
|
fromupdate += ttl
|
||||||
|
|
||||||
else
|
else
|
||||||
T.ReplaceWithSpace()
|
T.ChangeTurf(/turf/space)
|
||||||
|
|
||||||
refined_src -= T
|
refined_src -= T
|
||||||
refined_trg -= B
|
refined_trg -= B
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
var/log_pda = 0 // log pda messages
|
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/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/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_restart = 0 // allow votes to restart
|
||||||
var/allow_vote_mode = 0 // allow votes to change mode
|
var/allow_vote_mode = 0 // allow votes to change mode
|
||||||
var/allow_admin_jump = 1 // allows admin jumping
|
var/allow_admin_jump = 1 // allows admin jumping
|
||||||
@@ -102,7 +103,11 @@
|
|||||||
var/metroid_delay = 0
|
var/metroid_delay = 0
|
||||||
var/animal_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()
|
/datum/configuration/New()
|
||||||
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
|
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
|
||||||
@@ -152,6 +157,9 @@
|
|||||||
if ("admin_legacy_system")
|
if ("admin_legacy_system")
|
||||||
config.admin_legacy_system = 1
|
config.admin_legacy_system = 1
|
||||||
|
|
||||||
|
if ("ban_legacy_system")
|
||||||
|
config.ban_legacy_system = 1
|
||||||
|
|
||||||
if ("log_ooc")
|
if ("log_ooc")
|
||||||
config.log_ooc = 1
|
config.log_ooc = 1
|
||||||
|
|
||||||
@@ -194,6 +202,9 @@
|
|||||||
if ("log_hrefs")
|
if ("log_hrefs")
|
||||||
config.log_hrefs = 1
|
config.log_hrefs = 1
|
||||||
|
|
||||||
|
if("allow_admin_ooccolor")
|
||||||
|
config.allow_admin_ooccolor = 1
|
||||||
|
|
||||||
if ("allow_vote_restart")
|
if ("allow_vote_restart")
|
||||||
config.allow_vote_restart = 1
|
config.allow_vote_restart = 1
|
||||||
|
|
||||||
@@ -354,6 +365,12 @@
|
|||||||
limitalienplayers = 1
|
limitalienplayers = 1
|
||||||
alien_to_human_ratio = text2num(value)
|
alien_to_human_ratio = text2num(value)
|
||||||
|
|
||||||
|
if("assistant_maint")
|
||||||
|
config.assistant_maint = 1
|
||||||
|
|
||||||
|
if("gateway_delay")
|
||||||
|
config.gateway_delay = text2num(value)
|
||||||
|
|
||||||
else
|
else
|
||||||
diary << "Unknown setting in configuration: '[name]'"
|
diary << "Unknown setting in configuration: '[name]'"
|
||||||
|
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ datum/controller/vote
|
|||||||
var/trialmin = 0
|
var/trialmin = 0
|
||||||
if(C.holder)
|
if(C.holder)
|
||||||
admin = 1
|
admin = 1
|
||||||
if (C.holder.level >= 3)
|
if(C.holder.rights & R_ADMIN)
|
||||||
trialmin = 1
|
trialmin = 1
|
||||||
voting |= C
|
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'><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 += {"
|
body += {"
|
||||||
<br><font size='1'>
|
<br><font size='1'>
|
||||||
BRUTE:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=\ref["brute"]'>[M.getBruteLoss()]</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=\ref["fire"]'>[M.getFireLoss()]</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=\ref["toxin"]'>[M.getToxLoss()]</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=\ref["oxygen"]'>[M.getOxyLoss()]</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=\ref["clone"]'>[M.getCloneLoss()]</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=\ref["brain"]'>[M.getBrainLoss()]</a>
|
BRAIN:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=brain'>[M.getBrainLoss()]</a>
|
||||||
</font>
|
</font>
|
||||||
|
|
||||||
|
|
||||||
@@ -407,9 +407,13 @@ client
|
|||||||
|
|
||||||
//~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records).
|
//~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"])
|
var/mob/M = locate(href_list["rename"])
|
||||||
if(!istype(M)) return
|
if(!istype(M))
|
||||||
if(!admin_rank_check(src.holder.level, 3)) return
|
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)
|
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
|
if( !new_name || !M ) return
|
||||||
|
|
||||||
@@ -417,431 +421,370 @@ client
|
|||||||
M.fully_replace_character_name(M.real_name,new_name)
|
M.fully_replace_character_name(M.real_name,new_name)
|
||||||
href_list["datumrefresh"] = href_list["rename"]
|
href_list["datumrefresh"] = href_list["rename"]
|
||||||
|
|
||||||
else if (href_list["varnameedit"])
|
else if(href_list["varnameedit"] && href_list["datumedit"])
|
||||||
if(!href_list["datumedit"] || !href_list["varnameedit"])
|
if(!check_rights(0)) return
|
||||||
usr << "Varedit error: Not all information has been sent. Contact a coder."
|
|
||||||
|
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
|
return
|
||||||
var/DAT = locate(href_list["datumedit"])
|
|
||||||
if(!DAT)
|
modify_variables(D, href_list["varnameedit"], 1)
|
||||||
usr << "Item not found"
|
|
||||||
return
|
else if(href_list["varnamechange"] && href_list["datumchange"])
|
||||||
if(!istype(DAT,/datum) && !istype(DAT,/client))
|
if(!check_rights(0)) return
|
||||||
usr << "Can't edit an item of this type. Type must be /datum or /client, so anything except simple variables."
|
|
||||||
return
|
var/D = locate(href_list["datumchange"])
|
||||||
modify_variables(DAT, href_list["varnameedit"], 1)
|
if(!istype(D,/datum) && !istype(D,/client))
|
||||||
else if (href_list["varnamechange"])
|
usr << "This can only be used on instances of types /client or /datum"
|
||||||
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
|
return
|
||||||
|
|
||||||
|
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"])
|
var/atom/A = locate(href_list["datummass"])
|
||||||
if(!A)
|
if(!istype(A))
|
||||||
usr << "Item not found"
|
usr << "This can only be used on instances of type /atom"
|
||||||
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
|
return
|
||||||
|
|
||||||
cmd_mass_modify_object_variables(A, href_list["varnamemass"])
|
cmd_mass_modify_object_variables(A, href_list["varnamemass"])
|
||||||
|
|
||||||
else if(href_list["mob_player_panel"])
|
else if(href_list["mob_player_panel"])
|
||||||
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
|
return
|
||||||
var/mob/MOB = locate(href_list["mob_player_panel"])
|
|
||||||
if(!MOB)
|
src.holder.show_player_panel(M)
|
||||||
return
|
|
||||||
if(!ismob(MOB))
|
|
||||||
return
|
|
||||||
if(!src.holder)
|
|
||||||
return
|
|
||||||
src.holder.show_player_panel(MOB)
|
|
||||||
href_list["datumrefresh"] = href_list["mob_player_panel"]
|
href_list["datumrefresh"] = href_list["mob_player_panel"]
|
||||||
|
|
||||||
else if(href_list["give_spell"])
|
else if(href_list["give_spell"])
|
||||||
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
|
return
|
||||||
var/mob/MOB = locate(href_list["give_spell"])
|
|
||||||
if(!MOB)
|
src.give_spell(M)
|
||||||
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"]
|
href_list["datumrefresh"] = href_list["give_spell"]
|
||||||
|
|
||||||
else if(href_list["give_disease"])
|
else if(href_list["give_disease"])
|
||||||
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
|
return
|
||||||
var/mob/MOB = locate(href_list["give_disease"])
|
|
||||||
if(!MOB)
|
src.give_disease(M)
|
||||||
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"]
|
href_list["datumrefresh"] = href_list["give_spell"]
|
||||||
|
|
||||||
else if(href_list["ninja"])
|
else if(href_list["ninja"])
|
||||||
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
|
return
|
||||||
var/mob/MOB = locate(href_list["ninja"])
|
|
||||||
if(!MOB)
|
src.cmd_admin_ninjafy(M)
|
||||||
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"]
|
href_list["datumrefresh"] = href_list["ninja"]
|
||||||
|
|
||||||
else if(href_list["godmode"])
|
else if(href_list["godmode"])
|
||||||
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
|
return
|
||||||
var/mob/MOB = locate(href_list["godmode"])
|
|
||||||
if(!MOB)
|
src.cmd_admin_godmode(M)
|
||||||
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"]
|
href_list["datumrefresh"] = href_list["godmode"]
|
||||||
|
|
||||||
else if(href_list["gib"])
|
else if(href_list["gib"])
|
||||||
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
|
return
|
||||||
var/mob/MOB = locate(href_list["gib"])
|
|
||||||
if(!MOB)
|
src.cmd_admin_gib(M)
|
||||||
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["build_mode"])
|
else if(href_list["build_mode"])
|
||||||
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
|
return
|
||||||
var/mob/MOB = locate(href_list["build_mode"])
|
|
||||||
if(!MOB)
|
togglebuildmode(M)
|
||||||
return
|
|
||||||
if(!ismob(MOB))
|
|
||||||
return
|
|
||||||
if(!src.holder)
|
|
||||||
return
|
|
||||||
if(!admin_rank_check(src.holder.level, 3)) return
|
|
||||||
togglebuildmode(MOB)
|
|
||||||
href_list["datumrefresh"] = href_list["build_mode"]
|
href_list["datumrefresh"] = href_list["build_mode"]
|
||||||
|
|
||||||
else if(href_list["drop_everything"])
|
else if(href_list["drop_everything"])
|
||||||
if(!href_list["drop_everything"])
|
if(!check_rights(0)) return
|
||||||
return
|
|
||||||
var/mob/MOB = locate(href_list["drop_everything"])
|
var/mob/M = locate(href_list["drop_everything"])
|
||||||
if(!MOB)
|
if(!istype(M))
|
||||||
return
|
usr << "This can only be used on instances of type /mob"
|
||||||
if(!ismob(MOB))
|
|
||||||
return
|
|
||||||
if(!src.holder)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if(usr.client)
|
if(usr.client)
|
||||||
if(!admin_rank_check(src.holder.level, 3)) return
|
usr.client.cmd_admin_drop_everything(M)
|
||||||
usr.client.cmd_admin_drop_everything(MOB)
|
|
||||||
|
|
||||||
else if(href_list["direct_control"])
|
else if(href_list["direct_control"])
|
||||||
if(!href_list["direct_control"])
|
if(!check_rights(0)) return
|
||||||
return
|
|
||||||
var/mob/MOB = locate(href_list["direct_control"])
|
var/mob/M = locate(href_list["direct_control"])
|
||||||
if(!MOB)
|
if(!istype(M))
|
||||||
return
|
usr << "This can only be used on instances of type /mob"
|
||||||
if(!ismob(MOB))
|
|
||||||
return
|
|
||||||
if(!src.holder)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if(usr.client)
|
if(usr.client)
|
||||||
if(!admin_rank_check(src.holder.level, 3)) return
|
usr.client.cmd_assume_direct_control(M)
|
||||||
usr.client.cmd_assume_direct_control(MOB)
|
|
||||||
|
|
||||||
else if(href_list["make_skeleton"])
|
else if(href_list["make_skeleton"])
|
||||||
if(!href_list["make_skeleton"])
|
if(!check_rights(0)) return
|
||||||
return
|
|
||||||
var/mob/MOB = locate(href_list["make_skeleton"])
|
var/mob/living/carbon/human/H = locate(href_list["make_skeleton"])
|
||||||
if(!MOB)
|
if(!istype(H))
|
||||||
return
|
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||||
if(!ismob(MOB))
|
|
||||||
return
|
|
||||||
if(!src.holder)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if(ishuman(MOB))
|
H.makeSkeleton()
|
||||||
if(!admin_rank_check(src.holder.level, 3)) return
|
href_list["datumrefresh"] = href_list["make_skeleton"]
|
||||||
var/mob/living/carbon/human/HUMANMOB = MOB
|
|
||||||
HUMANMOB.makeSkeleton()
|
|
||||||
|
|
||||||
else if(href_list["delall"])
|
else if(href_list["delall"])
|
||||||
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
|
return
|
||||||
var/atom/A = locate(href_list["delall"])
|
|
||||||
if(!admin_rank_check(src.holder.level, 3)) return
|
var/action_type = alert("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
|
||||||
if(!A)
|
if(action_type == "Cancel" || !action_type)
|
||||||
return
|
return
|
||||||
if(!isobj(A))
|
|
||||||
usr << "This can only be used on objects (of type /obj)"
|
if(alert("Are you really sure you want to delete all objects of type [O.type]?",,"Yes","No") != "Yes")
|
||||||
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")
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
|
if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
|
||||||
return
|
return
|
||||||
var/a_type = A.type
|
|
||||||
if(action_type == "Strict type")
|
var/O_type = O.type
|
||||||
|
switch(action_type)
|
||||||
|
if("Strict type")
|
||||||
var/i = 0
|
var/i = 0
|
||||||
for(var/obj/O in world)
|
for(var/obj/Obj in world)
|
||||||
if(O.type == a_type)
|
if(Obj.type == O_type)
|
||||||
i++
|
i++
|
||||||
del(O)
|
del(Obj)
|
||||||
if(!i)
|
if(!i)
|
||||||
usr << "No objects of this type exist"
|
usr << "No objects of this type exist"
|
||||||
return
|
return
|
||||||
log_admin("[key_name(usr)] deleted all objects of scrict type [a_type] ([i] objects deleted) ")
|
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 scrict type [a_type] ([i] objects deleted) ", 1)
|
message_admins("\blue [key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ", 1)
|
||||||
else if(action_type == "Type and subtypes")
|
if("Type and subtypes")
|
||||||
var/i = 0
|
var/i = 0
|
||||||
for(var/obj/O in world)
|
for(var/obj/Obj in world)
|
||||||
if(istype(O,a_type))
|
if(istype(Obj,O_type))
|
||||||
i++
|
i++
|
||||||
del(O)
|
del(Obj)
|
||||||
if(!i)
|
if(!i)
|
||||||
usr << "No objects of this type exist"
|
usr << "No objects of this type exist"
|
||||||
return
|
return
|
||||||
log_admin("[key_name(usr)] deleted all objects of scrict type with subtypes [a_type] ([i] objects deleted) ")
|
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 with subtypes [a_type] ([i] objects deleted) ", 1)
|
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"])
|
else if(href_list["explode"])
|
||||||
if(!href_list["explode"])
|
if(!check_rights(0)) return
|
||||||
return
|
|
||||||
var/atom/A = locate(href_list["explode"])
|
var/atom/A = locate(href_list["explode"])
|
||||||
if(!A)
|
|
||||||
return
|
|
||||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||||
|
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||||
return
|
return
|
||||||
if(!admin_rank_check(src.holder.level, 3)) return
|
|
||||||
src.cmd_admin_explosion(A)
|
src.cmd_admin_explosion(A)
|
||||||
href_list["datumrefresh"] = href_list["explode"]
|
href_list["datumrefresh"] = href_list["explode"]
|
||||||
|
|
||||||
else if(href_list["emp"])
|
else if(href_list["emp"])
|
||||||
if(!href_list["emp"])
|
if(!check_rights(0)) return
|
||||||
return
|
|
||||||
var/atom/A = locate(href_list["emp"])
|
var/atom/A = locate(href_list["emp"])
|
||||||
if(!A)
|
|
||||||
return
|
|
||||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||||
|
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||||
return
|
return
|
||||||
if(!admin_rank_check(src.holder.level, 3)) return
|
|
||||||
src.cmd_admin_emp(A)
|
src.cmd_admin_emp(A)
|
||||||
href_list["datumrefresh"] = href_list["emp"]
|
href_list["datumrefresh"] = href_list["emp"]
|
||||||
|
|
||||||
else if(href_list["mark_object"])
|
else if(href_list["mark_object"])
|
||||||
if(!href_list["mark_object"])
|
if(!check_rights(0)) return
|
||||||
return
|
|
||||||
var/datum/D = locate(href_list["mark_object"])
|
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
|
return
|
||||||
if(!src.holder)
|
|
||||||
return
|
|
||||||
if(!admin_rank_check(src.holder.level, 3)) return
|
|
||||||
src.holder.marked_datum = D
|
src.holder.marked_datum = D
|
||||||
href_list["datumrefresh"] = href_list["mark_object"]
|
href_list["datumrefresh"] = href_list["mark_object"]
|
||||||
|
|
||||||
else if(href_list["rotatedatum"])
|
else if(href_list["rotatedatum"])
|
||||||
if(!admin_rank_check(src.holder.level, 3)) return
|
if(!check_rights(0)) return
|
||||||
if(!href_list["rotatedir"])
|
|
||||||
return
|
|
||||||
var/atom/A = locate(href_list["rotatedatum"])
|
var/atom/A = locate(href_list["rotatedatum"])
|
||||||
if(!A)
|
if(!istype(A))
|
||||||
return
|
usr << "This can only be done to instances of type /atom"
|
||||||
if(!istype(A,/atom))
|
|
||||||
usr << "This can only be done to objects of type /atom"
|
|
||||||
return
|
|
||||||
if(!src.holder)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
switch(href_list["rotatedir"])
|
switch(href_list["rotatedir"])
|
||||||
if("right")
|
if("right") A.dir = turn(A.dir, -45)
|
||||||
A.dir = turn(A.dir, -45)
|
if("left") A.dir = turn(A.dir, 45)
|
||||||
if("left")
|
|
||||||
A.dir = turn(A.dir, 45)
|
|
||||||
href_list["datumrefresh"] = href_list["rotatedatum"]
|
href_list["datumrefresh"] = href_list["rotatedatum"]
|
||||||
|
|
||||||
else if(href_list["makemonkey"])
|
else if(href_list["makemonkey"])
|
||||||
var/mob/M = locate(href_list["makemonkey"])
|
if(!check_rights(0)) return
|
||||||
if(!M)
|
|
||||||
|
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
|
return
|
||||||
if(!admin_rank_check(src.holder.level, 3)) return
|
|
||||||
if(!ishuman(M))
|
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||||
usr << "This can only be done to objects of type /mob/living/carbon/human"
|
if(!H)
|
||||||
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)
|
|
||||||
usr << "Mob doesn't exist anymore"
|
usr << "Mob doesn't exist anymore"
|
||||||
return
|
return
|
||||||
holder.Topic(href, list("monkeyone"=href_list["makemonkey"]))
|
holder.Topic(href, list("monkeyone"=href_list["makemonkey"]))
|
||||||
|
|
||||||
else if(href_list["makerobot"])
|
else if(href_list["makerobot"])
|
||||||
var/mob/M = locate(href_list["makerobot"])
|
if(!check_rights(0)) return
|
||||||
if(!M)
|
|
||||||
|
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
|
return
|
||||||
if(!admin_rank_check(src.holder.level, 3)) return
|
|
||||||
if(!ishuman(M))
|
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||||
usr << "This can only be done to objects of type /mob/living/carbon/human"
|
if(!H)
|
||||||
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)
|
|
||||||
usr << "Mob doesn't exist anymore"
|
usr << "Mob doesn't exist anymore"
|
||||||
return
|
return
|
||||||
holder.Topic(href, list("makerobot"=href_list["makerobot"]))
|
holder.Topic(href, list("makerobot"=href_list["makerobot"]))
|
||||||
|
|
||||||
else if(href_list["makealien"])
|
else if(href_list["makealien"])
|
||||||
var/mob/M = locate(href_list["makealien"])
|
if(!check_rights(0)) return
|
||||||
if(!M)
|
|
||||||
|
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
|
return
|
||||||
if(!admin_rank_check(src.holder.level, 3)) return
|
|
||||||
if(!ishuman(M))
|
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||||
usr << "This can only be done to objects of type /mob/living/carbon/human"
|
if(!H)
|
||||||
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)
|
|
||||||
usr << "Mob doesn't exist anymore"
|
usr << "Mob doesn't exist anymore"
|
||||||
return
|
return
|
||||||
holder.Topic(href, list("makealien"=href_list["makealien"]))
|
holder.Topic(href, list("makealien"=href_list["makealien"]))
|
||||||
|
|
||||||
else if(href_list["makemetroid"])
|
else if(href_list["makemetroid"])
|
||||||
var/mob/M = locate(href_list["makemetroid"])
|
if(!check_rights(0)) return
|
||||||
if(!M)
|
|
||||||
|
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
|
return
|
||||||
if(!admin_rank_check(src.holder.level, 3)) return
|
|
||||||
if(!ishuman(M))
|
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||||
usr << "This can only be done to objects of type /mob/living/carbon/human"
|
if(!H)
|
||||||
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)
|
|
||||||
usr << "Mob doesn't exist anymore"
|
usr << "Mob doesn't exist anymore"
|
||||||
return
|
return
|
||||||
holder.Topic(href, list("makemetroid"=href_list["makemetroid"]))
|
holder.Topic(href, list("makemetroid"=href_list["makemetroid"]))
|
||||||
|
|
||||||
else if(href_list["makeai"])
|
else if(href_list["makeai"])
|
||||||
var/mob/M = locate(href_list["makeai"])
|
if(!check_rights(0)) return
|
||||||
if(!M)
|
|
||||||
|
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
|
return
|
||||||
if(!admin_rank_check(src.holder.level, 3)) return
|
|
||||||
if(!ishuman(M))
|
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||||
usr << "This can only be done to objects of type /mob/living/carbon/human"
|
if(!H)
|
||||||
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)
|
|
||||||
usr << "Mob doesn't exist anymore"
|
usr << "Mob doesn't exist anymore"
|
||||||
return
|
return
|
||||||
holder.Topic(href, list("makeai"=href_list["makeai"]))
|
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"])
|
var/mob/living/carbon/human/H = locate(href_list["setmutantrace"])
|
||||||
if(!admin_rank_check(src.holder.level, 3)) return
|
|
||||||
if(!istype(H))
|
if(!istype(H))
|
||||||
usr << "This can only be done to objects of type /mob/living/carbon/human"
|
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||||
return
|
|
||||||
if(!src.holder)
|
|
||||||
usr << "You are not an administrator."
|
|
||||||
return
|
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
|
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)
|
switch(new_mutantrace)
|
||||||
if(null) return
|
if(null) return
|
||||||
if("NONE") new_mutantrace = ""
|
if("NONE") new_mutantrace = ""
|
||||||
if(!H || !istype(H))
|
if(!H)
|
||||||
usr << "Mob doesn't exist anymore"
|
usr << "Mob doesn't exist anymore"
|
||||||
return
|
return
|
||||||
if(H.dna)
|
if(H.dna)
|
||||||
H.dna.mutantrace = new_mutantrace
|
H.dna.mutantrace = new_mutantrace
|
||||||
H.update_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"])
|
var/mob/M = locate(href_list["regenerateicons"])
|
||||||
if(!admin_rank_check(src.holder.level, 3)) return
|
if(!ismob(M))
|
||||||
if(!istype(M))
|
usr << "This can only be done to instances of type /mob"
|
||||||
usr << "This can only be done to objects of type /mob"
|
|
||||||
return
|
|
||||||
if(!src.holder)
|
|
||||||
usr << "You are not an administrator."
|
|
||||||
return
|
return
|
||||||
M.regenerate_icons()
|
M.regenerate_icons()
|
||||||
|
|
||||||
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
|
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
|
||||||
var/mob/M = locate(href_list["mobToDamage"])
|
if(!check_rights(0)) return
|
||||||
var/Text = locate(href_list["adjustDamage"])
|
|
||||||
|
|
||||||
if(!isliving(M)) return
|
var/mob/living/L = locate(href_list["mobToDamage"])
|
||||||
var/mob/living/L = M
|
if(!istype(L)) return
|
||||||
|
|
||||||
if(!admin_rank_check(src.holder.level, 3)) 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
|
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)
|
if(!L)
|
||||||
else if(Text == "fire")
|
usr << "Mob doesn't exist anymore"
|
||||||
L.adjustFireLoss(amount)
|
return
|
||||||
else if(Text == "toxin")
|
|
||||||
L.adjustToxLoss(amount)
|
switch(Text)
|
||||||
else if(Text == "oxygen")
|
if("brute") L.adjustBruteLoss(amount)
|
||||||
L.adjustOxyLoss(amount)
|
if("fire") L.adjustFireLoss(amount)
|
||||||
else if(Text == "brain")
|
if("toxin") L.adjustToxLoss(amount)
|
||||||
L.adjustBrainLoss(amount)
|
if("oxygen")L.adjustOxyLoss(amount)
|
||||||
else if(Text == "clone")
|
if("brain") L.adjustBrainLoss(amount)
|
||||||
L.adjustCloneLoss(amount)
|
if("clone") L.adjustCloneLoss(amount)
|
||||||
else
|
else
|
||||||
usr << "You caused an error. DEBUG: Text:[Text] Mob:[M]"
|
usr << "You caused an error. DEBUG: Text:[Text] Mob:[L]"
|
||||||
return
|
return
|
||||||
|
|
||||||
if(amount != 0)
|
if(amount != 0)
|
||||||
log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [M] ")
|
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 [M] ", 1)
|
message_admins("\blue [key_name(usr)] dealt [amount] amount of [Text] damage to [L] ", 1)
|
||||||
href_list["datumrefresh"] = href_list["mobToDamage"]
|
href_list["datumrefresh"] = href_list["mobToDamage"]
|
||||||
else
|
else
|
||||||
. = 0
|
. = 0
|
||||||
|
|
||||||
if(href_list["datumrefresh"])
|
if(href_list["datumrefresh"])
|
||||||
var/datum/DAT = locate(href_list["datumrefresh"])
|
var/datum/DAT = locate(href_list["datumrefresh"])
|
||||||
if(!DAT)
|
|
||||||
return
|
|
||||||
if(!istype(DAT, /datum))
|
if(!istype(DAT, /datum))
|
||||||
return
|
return
|
||||||
src.debug_variables(DAT)
|
src.debug_variables(DAT)
|
||||||
. = 1
|
. = 1
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#define NON_CONTAGIOUS -1
|
#define SPECIAL -1
|
||||||
#define SPECIAL 0
|
#define NON_CONTAGIOUS 0
|
||||||
#define CONTACT_GENERAL 1
|
#define BLOOD 1
|
||||||
#define CONTACT_HANDS 2
|
#define CONTACT_FEET 2
|
||||||
#define CONTACT_FEET 3
|
#define CONTACT_HANDS 3
|
||||||
#define AIRBORNE 4
|
#define CONTACT_GENERAL 4
|
||||||
#define BLOOD 5
|
#define AIRBORNE 5
|
||||||
|
|
||||||
#define SCANNER 1
|
#define SCANNER 1
|
||||||
#define PANDEMIC 2
|
#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_list = null // allows for multiple possible cure combinations
|
||||||
var/cure_chance = 8//chance for the cure to do its job
|
var/cure_chance = 8//chance for the cure to do its job
|
||||||
var/spread = null //spread type description
|
var/spread = null //spread type description
|
||||||
|
var/initial_spread = null
|
||||||
var/spread_type = AIRBORNE
|
var/spread_type = AIRBORNE
|
||||||
var/contagious_period = 0//the disease stage when it can be spread
|
var/contagious_period = 0//the disease stage when it can be spread
|
||||||
var/list/affected_species = list()
|
var/list/affected_species = list()
|
||||||
@@ -60,7 +61,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
|||||||
//world << "[affected_mob] is carrier"
|
//world << "[affected_mob] is carrier"
|
||||||
return
|
return
|
||||||
|
|
||||||
spread = (cure_present?"Remissive":initial(spread))
|
spread = (cure_present?"Remissive":initial_spread)
|
||||||
|
|
||||||
if(stage > max_stages)
|
if(stage > max_stages)
|
||||||
stage = max_stages
|
stage = max_stages
|
||||||
@@ -96,10 +97,15 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
|||||||
return result
|
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]"
|
//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
|
return
|
||||||
|
|
||||||
if(stage < contagious_period) //the disease is not contagious at this stage
|
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
|
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)
|
if(how_spread != AIRBORNE && how_spread != SPECIAL)
|
||||||
check_range = 0 // everything else, like infect-on-contact things, only infect things on top of it
|
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
|
if(isturf(source.loc))
|
||||||
M.contract_disease(src)
|
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
|
return
|
||||||
|
|
||||||
|
|
||||||
/datum/disease/proc/process()
|
/datum/disease/proc/process()
|
||||||
if(!holder) return
|
if(!holder)
|
||||||
|
active_diseases -= src
|
||||||
|
return
|
||||||
if(prob(65))
|
if(prob(65))
|
||||||
spread(holder)
|
spread(holder)
|
||||||
|
|
||||||
if(affected_mob)
|
if(affected_mob)
|
||||||
for(var/datum/disease/D in affected_mob.viruses)
|
for(var/datum/disease/D in affected_mob.viruses)
|
||||||
if(D != src)
|
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
|
del(D) // if there are somehow two viruses of the same kind in the system, delete the other one
|
||||||
|
|
||||||
if(holder == affected_mob)
|
if(holder == affected_mob)
|
||||||
@@ -161,10 +173,19 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
|||||||
return
|
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()
|
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.
|
if(process) // Viruses in list are considered active.
|
||||||
active_diseases += src
|
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()
|
/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
|
spread_type = SPECIAL
|
||||||
cure = "Unknown"
|
cure = "Unknown"
|
||||||
cure_id = list("lexorin","toxin","gargleblaster")
|
cure_id = list("lexorin","toxin","gargleblaster")
|
||||||
cure_chance = 20
|
cure_chance = 50
|
||||||
affected_species = list("Human", "Monkey")
|
affected_species = list("Human", "Monkey")
|
||||||
permeability_mod = 15//likely to infect
|
permeability_mod = 15//likely to infect
|
||||||
can_carry = 0
|
can_carry = 0
|
||||||
|
stage_prob = 3
|
||||||
var/gibbed = 0
|
var/gibbed = 0
|
||||||
stage_minimum_age = 300
|
stage_minimum_age = 300
|
||||||
|
|
||||||
@@ -74,12 +75,23 @@
|
|||||||
if(prob(50))
|
if(prob(50))
|
||||||
if(gibbed != 0) return 0
|
if(gibbed != 0) return 0
|
||||||
var/list/candidates = get_alien_candidates()
|
var/list/candidates = get_alien_candidates()
|
||||||
var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc)
|
var/picked = null
|
||||||
if(candidates.len)
|
|
||||||
new_xeno.key = pick(candidates)
|
|
||||||
else
|
|
||||||
new_xeno.key = affected_mob.key
|
|
||||||
|
|
||||||
|
// 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
|
new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100) //To get the player's attention
|
||||||
affected_mob.gib()
|
affected_mob.gib()
|
||||||
src.cure(0)
|
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")))
|
if(svndirpath && fexists(svndirpath) && fexists("[svndirpath]/entries") && isfile(file("[svndirpath]/entries")))
|
||||||
var/list/filelist = file2list("[svndirpath]/entries")
|
var/list/filelist = file2list("[svndirpath]/entries")
|
||||||
if(filelist.len < 4)
|
var/s_archive = "" //Stores the previous line so the revision owner can be assigned.
|
||||||
return abort()
|
|
||||||
revision = filelist[4]
|
//This thing doesn't count blank lines, so doing filelist[4] isn't working.
|
||||||
commiter = filelist[12]
|
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"
|
diary << "Revision info loaded succesfully"
|
||||||
return
|
return
|
||||||
return abort()
|
return abort()
|
||||||
|
|||||||
@@ -161,6 +161,7 @@
|
|||||||
if(istype(teleatom, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite
|
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>")
|
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/disk/nuclear)))
|
if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/disk/nuclear)))
|
||||||
if(istype(teleatom, /mob/living))
|
if(istype(teleatom, /mob/living))
|
||||||
var/mob/living/MM = teleatom
|
var/mob/living/MM = teleatom
|
||||||
@@ -168,6 +169,17 @@
|
|||||||
else
|
else
|
||||||
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
|
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
|
||||||
return 0
|
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 0
|
||||||
return 1
|
return 1
|
||||||
@@ -68,6 +68,7 @@ datum/mind
|
|||||||
if(current) //remove ourself from our old body's mind variable
|
if(current) //remove ourself from our old body's mind variable
|
||||||
if(changeling)
|
if(changeling)
|
||||||
current.remove_changeling_powers()
|
current.remove_changeling_powers()
|
||||||
|
current.verbs -= /datum/changeling/proc/EvolutionMenu
|
||||||
current.mind = null
|
current.mind = null
|
||||||
if(new_character.mind) //remove any mind currently in our new body's mind variable
|
if(new_character.mind) //remove any mind currently in our new body's mind variable
|
||||||
new_character.mind.current = null
|
new_character.mind.current = null
|
||||||
@@ -312,7 +313,7 @@ datum/mind
|
|||||||
crystals = suplink.uses
|
crystals = suplink.uses
|
||||||
if (suplink)
|
if (suplink)
|
||||||
text += "|<a href='?src=\ref[src];common=takeuplink'>take</a>"
|
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"
|
text += ", <a href='?src=\ref[src];common=crystals'>[crystals]</a> crystals"
|
||||||
else
|
else
|
||||||
text += ", [crystals] crystals"
|
text += ", [crystals] crystals"
|
||||||
@@ -339,17 +340,7 @@ datum/mind
|
|||||||
usr << browse(out, "window=edit_memory[src]")
|
usr << browse(out, "window=edit_memory[src]")
|
||||||
|
|
||||||
Topic(href, href_list)
|
Topic(href, href_list)
|
||||||
if(!usr || !usr.client)
|
if(!check_rights(R_ADMIN)) return
|
||||||
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 (href_list["role_edit"])
|
if (href_list["role_edit"])
|
||||||
var/new_role = input("Select new role", "Assigned role", assigned_role) as null|anything in get_all_jobs()
|
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
|
return
|
||||||
switch(href_list["monkey"])
|
switch(href_list["monkey"])
|
||||||
if("healthy")
|
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/human/H = current
|
||||||
var/mob/living/carbon/monkey/M = current
|
var/mob/living/carbon/monkey/M = current
|
||||||
if (istype(H))
|
if (istype(H))
|
||||||
@@ -776,7 +767,7 @@ datum/mind
|
|||||||
D.cure(0)
|
D.cure(0)
|
||||||
sleep(0) //because deleting of virus is done through spawn(0)
|
sleep(0) //because deleting of virus is done through spawn(0)
|
||||||
if("infected")
|
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/human/H = current
|
||||||
var/mob/living/carbon/monkey/M = current
|
var/mob/living/carbon/monkey/M = current
|
||||||
if (istype(H))
|
if (istype(H))
|
||||||
@@ -880,7 +871,7 @@ datum/mind
|
|||||||
take_uplink()
|
take_uplink()
|
||||||
memory = null//Remove any memory they may have had.
|
memory = null//Remove any memory they may have had.
|
||||||
if("crystals")
|
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/obj/item/device/uplink/hidden/suplink = find_syndicate_uplink()
|
||||||
var/crystals
|
var/crystals
|
||||||
if (suplink)
|
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."
|
usr << "Not when you're incapacitated."
|
||||||
return 0
|
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(clothes_req) //clothes check
|
||||||
if(!istype(usr, /mob/living/carbon/human))
|
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."
|
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
|
if(prob(50))//Auto-mute? Fuck that noise
|
||||||
usr.say(invocation)
|
usr.say(invocation)
|
||||||
else
|
else
|
||||||
usr.say(dd_replacetext(invocation," ","`"))
|
usr.say(replacetext(invocation," ","`"))
|
||||||
if(usr.gender==MALE)
|
if(usr.gender==MALE)
|
||||||
playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
|
playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
|
||||||
else
|
else
|
||||||
@@ -105,7 +110,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
|||||||
if(prob(50))
|
if(prob(50))
|
||||||
usr.whisper(invocation)
|
usr.whisper(invocation)
|
||||||
else
|
else
|
||||||
usr.whisper(dd_replacetext(invocation," ","`"))
|
usr.whisper(replacetext(invocation," ","`"))
|
||||||
|
|
||||||
/obj/effect/proc_holder/spell/New()
|
/obj/effect/proc_holder/spell/New()
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -29,6 +29,11 @@
|
|||||||
var/spawn_place = pick(targets)
|
var/spawn_place = pick(targets)
|
||||||
if(summon_ignore_prev_spawn_points)
|
if(summon_ignore_prev_spawn_points)
|
||||||
targets -= spawn_place
|
targets -= 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)
|
var/atom/summoned_object = new summoned_object_type(spawn_place)
|
||||||
|
|
||||||
for(var/varName in newVars)
|
for(var/varName in newVars)
|
||||||
|
|||||||
@@ -73,26 +73,5 @@
|
|||||||
S.update_solar_exposure()
|
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
|
containertype = /obj/structure/largecrate/mule
|
||||||
containername = "MULEbot Crate"
|
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
|
/datum/supply_packs/hydroponics // -- Skie
|
||||||
name = "Hydroponics Supply Crate"
|
name = "Hydroponics Supply Crate"
|
||||||
contains = list(/obj/item/weapon/reagent_containers/spray/plantbgone,
|
contains = list(/obj/item/weapon/reagent_containers/spray/plantbgone,
|
||||||
|
|||||||
@@ -39,6 +39,10 @@
|
|||||||
anchored = 1.0
|
anchored = 1.0
|
||||||
unacidable = 1
|
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
|
/obj/effect/datacore
|
||||||
name = "datacore"
|
name = "datacore"
|
||||||
var/medical[] = list()
|
var/medical[] = list()
|
||||||
@@ -148,8 +152,8 @@
|
|||||||
|
|
||||||
|
|
||||||
dat += "</table>"
|
dat += "</table>"
|
||||||
dat = dd_replacetext(dat, "\n", "") // so it can be placed on paper correctly
|
dat = replacetext(dat, "\n", "") // so it can be placed on paper correctly
|
||||||
dat = dd_replacetext(dat, "\t", "")
|
dat = replacetext(dat, "\t", "")
|
||||||
return dat
|
return dat
|
||||||
|
|
||||||
/obj/item/device/infra_sensor
|
/obj/item/device/infra_sensor
|
||||||
@@ -161,6 +165,10 @@
|
|||||||
item_state = "electronic"
|
item_state = "electronic"
|
||||||
m_amt = 150
|
m_amt = 150
|
||||||
origin_tech = "magnets=2"
|
origin_tech = "magnets=2"
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/effect/laser
|
/obj/effect/laser
|
||||||
|
|||||||
@@ -10,6 +10,23 @@
|
|||||||
/obj/item/toy/prize
|
/obj/item/toy/prize
|
||||||
icon = 'icons/obj/toy.dmi'
|
icon = 'icons/obj/toy.dmi'
|
||||||
icon_state = "ripleytoy"
|
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
|
/obj/item/toy/prize/ripley
|
||||||
name = "toy ripley"
|
name = "toy ripley"
|
||||||
@@ -486,3 +503,16 @@
|
|||||||
else
|
else
|
||||||
icon_state = "waterballoon-e"
|
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/vend_reply //Thank you for shopping!
|
||||||
var/last_reply = 0
|
var/last_reply = 0
|
||||||
var/last_slogan = 0 //When did we last pitch?
|
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_vend //Icon_state when vending!
|
||||||
var/icon_deny //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.
|
//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
|
/obj/item/weapon
|
||||||
name = "weapon"
|
name = "weapon"
|
||||||
icon = 'icons/obj/weapons.dmi'
|
icon = 'icons/obj/weapons.dmi'
|
||||||
@@ -37,14 +35,17 @@
|
|||||||
m_amt = 1000
|
m_amt = 1000
|
||||||
origin_tech = "materials=2"
|
origin_tech = "materials=2"
|
||||||
attack_verb = list("shoved", "bashed")
|
attack_verb = list("shoved", "bashed")
|
||||||
|
var/cooldown = 0 //shield bash cooldown. based on world.time
|
||||||
|
|
||||||
IsShield()
|
IsShield()
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if(istype(W, /obj/item/weapon/melee/baton))
|
if(istype(W, /obj/item/weapon/melee/baton))
|
||||||
user.visible_message("<span class='warning'>[user] bashes their [src] with [W]!</span>")
|
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)
|
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
|
||||||
|
cooldown = world.time
|
||||||
else
|
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>")
|
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>")
|
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>")
|
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")
|
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)
|
/obj/item/weapon/spacecash/attack_self(var/mob/user)
|
||||||
interact(user)
|
interact(user)
|
||||||
|
|
||||||
/obj/item/weapon/spacecash/proc/interact(var/mob/user)
|
/obj/item/weapon/spacecash/interact(var/mob/user)
|
||||||
|
|
||||||
user.machine = src
|
user.machine = src
|
||||||
|
|
||||||
@@ -1713,23 +1711,6 @@
|
|||||||
var/cigarcount = 6
|
var/cigarcount = 6
|
||||||
flags = ONBELT | TABLEPASS */
|
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
|
/obj/item/weapon/pai_cable
|
||||||
desc = "A flexible coated cable with a universal jack on one end."
|
desc = "A flexible coated cable with a universal jack on one end."
|
||||||
name = "data cable"
|
name = "data cable"
|
||||||
|
|||||||
@@ -39,37 +39,6 @@ var/DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
DBConnection
|
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/_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/dbi // This variable is a string containing the DBI MySQL requires.
|
||||||
var/user // This variable contains the username data.
|
var/user // This variable contains the username data.
|
||||||
@@ -79,36 +48,76 @@ DBConnection
|
|||||||
var/server = ""
|
var/server = ""
|
||||||
var/port = 3306
|
var/port = 3306
|
||||||
|
|
||||||
DBQuery
|
DBConnection/New(dbi_handler,username,password_handler,cursor_handler)
|
||||||
New(sql_query,DBConnection/connection_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(sql_query) src.sql = sql_query
|
||||||
if(connection_handler) src.db_connection = connection_handler
|
if(connection_handler) src.db_connection = connection_handler
|
||||||
if(cursor_handler) src.default_cursor = cursor_handler
|
if(cursor_handler) src.default_cursor = cursor_handler
|
||||||
_db_query = _dm_db_new_query()
|
_db_query = _dm_db_new_query()
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
proc
|
|
||||||
|
|
||||||
Connect(DBConnection/connection_handler) src.db_connection = connection_handler
|
DBQuery
|
||||||
|
var/sql // The sql query being executed.
|
||||||
|
var/default_cursor
|
||||||
|
var/list/columns //list of DB Columns populated by Columns()
|
||||||
|
var/list/conversions
|
||||||
|
var/list/item[0] //list of data values populated by NextRow()
|
||||||
|
|
||||||
Execute(sql_query=src.sql,cursor_handler=default_cursor)
|
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()
|
Close()
|
||||||
return _dm_db_execute(_db_query,sql_query,db_connection._db_con,cursor_handler,null)
|
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)
|
DBQuery/proc/NextRow() return _dm_db_next_row(_db_query,item,conversions)
|
||||||
|
|
||||||
RowsAffected() return _dm_db_rows_affected(_db_query)
|
DBQuery/proc/RowsAffected() return _dm_db_rows_affected(_db_query)
|
||||||
|
|
||||||
RowCount() return _dm_db_row_count(_db_query)
|
DBQuery/proc/RowCount() return _dm_db_row_count(_db_query)
|
||||||
|
|
||||||
ErrorMsg() return _dm_db_error_msg(_db_query)
|
DBQuery/proc/ErrorMsg() return _dm_db_error_msg(_db_query)
|
||||||
|
|
||||||
Columns()
|
DBQuery/proc/Columns()
|
||||||
if(!columns)
|
if(!columns)
|
||||||
columns = _dm_db_columns(_db_query,/DBColumn)
|
columns = _dm_db_columns(_db_query,/DBColumn)
|
||||||
return columns
|
return columns
|
||||||
|
|
||||||
GetRowData()
|
DBQuery/proc/GetRowData()
|
||||||
var/list/columns = Columns()
|
var/list/columns = Columns()
|
||||||
var/list/results
|
var/list/results
|
||||||
if(columns.len)
|
if(columns.len)
|
||||||
@@ -119,29 +128,21 @@ DBQuery
|
|||||||
results[C] = src.item[(cur_col.position+1)]
|
results[C] = src.item[(cur_col.position+1)]
|
||||||
return results
|
return results
|
||||||
|
|
||||||
Close()
|
DBQuery/proc/Close()
|
||||||
item.len = 0
|
item.len = 0
|
||||||
columns = null
|
columns = null
|
||||||
conversions = null
|
conversions = null
|
||||||
return _dm_db_close(_db_query)
|
return _dm_db_close(_db_query)
|
||||||
|
|
||||||
Quote(str)
|
DBQuery/proc/Quote(str)
|
||||||
return db_connection.Quote(str)
|
return db_connection.Quote(str)
|
||||||
|
|
||||||
SetConversion(column,conversion)
|
DBQuery/proc/SetConversion(column,conversion)
|
||||||
if(istext(column)) column = columns.Find(column)
|
if(istext(column)) column = columns.Find(column)
|
||||||
if(!conversions) conversions = new/list(column)
|
if(!conversions) conversions = new/list(column)
|
||||||
else if(conversions.len < column) conversions.len = column
|
else if(conversions.len < column) conversions.len = column
|
||||||
conversions[column] = conversion
|
conversions[column] = conversion
|
||||||
|
|
||||||
var/sql // The sql query being executed.
|
|
||||||
var/default_cursor
|
|
||||||
var/list/columns //list of DB Columns populated by Columns()
|
|
||||||
var/list/conversions
|
|
||||||
var/list/item[0] //list of data values populated by NextRow()
|
|
||||||
|
|
||||||
var/DBConnection/db_connection
|
|
||||||
var/_db_query
|
|
||||||
|
|
||||||
DBColumn
|
DBColumn
|
||||||
var/name
|
var/name
|
||||||
@@ -152,7 +153,7 @@ DBColumn
|
|||||||
var/length
|
var/length
|
||||||
var/max_length
|
var/max_length
|
||||||
|
|
||||||
New(name_handler,table_handler,position_handler,type_handler,flag_handler,length_handler,max_length_handler)
|
DBColumn/New(name_handler,table_handler,position_handler,type_handler,flag_handler,length_handler,max_length_handler)
|
||||||
src.name = name_handler
|
src.name = name_handler
|
||||||
src.table = table_handler
|
src.table = table_handler
|
||||||
src.position = position_handler
|
src.position = position_handler
|
||||||
@@ -162,8 +163,8 @@ DBColumn
|
|||||||
src.max_length = max_length_handler
|
src.max_length = max_length_handler
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
proc
|
|
||||||
SqlTypeName(type_handler=src.sql_type)
|
DBColumn/proc/SqlTypeName(type_handler=src.sql_type)
|
||||||
switch(type_handler)
|
switch(type_handler)
|
||||||
if(TINYINT) return "TINYINT"
|
if(TINYINT) return "TINYINT"
|
||||||
if(SMALLINT) return "SMALLINT"
|
if(SMALLINT) return "SMALLINT"
|
||||||
|
|||||||
@@ -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)
|
for(var/mob/M in player_list)
|
||||||
if(M.client)
|
if(M.client)
|
||||||
playercount += 1
|
playercount += 1
|
||||||
var/DBConnection/dbcon = new()
|
establish_db_connection()
|
||||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
|
||||||
if(!dbcon.IsConnected())
|
if(!dbcon.IsConnected())
|
||||||
log_game("SQL ERROR during player polling. Failed to connect.")
|
log_game("SQL ERROR during player polling. Failed to connect.")
|
||||||
else
|
else
|
||||||
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
|
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())
|
if(!query.Execute())
|
||||||
var/err = query.ErrorMsg()
|
var/err = query.ErrorMsg()
|
||||||
log_game("SQL ERROR during player polling. Error : \[[err]\]\n")
|
log_game("SQL ERROR during player polling. Error : \[[err]\]\n")
|
||||||
dbcon.Disconnect()
|
|
||||||
|
|
||||||
|
|
||||||
proc/sql_poll_admins()
|
proc/sql_poll_admins()
|
||||||
if(!sqllogging)
|
if(!sqllogging)
|
||||||
return
|
return
|
||||||
var/admincount = admins.len
|
var/admincount = admins.len
|
||||||
var/DBConnection/dbcon = new()
|
establish_db_connection()
|
||||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
|
||||||
if(!dbcon.IsConnected())
|
if(!dbcon.IsConnected())
|
||||||
log_game("SQL ERROR during admin polling. Failed to connect.")
|
log_game("SQL ERROR during admin polling. Failed to connect.")
|
||||||
else
|
else
|
||||||
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
|
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())
|
if(!query.Execute())
|
||||||
var/err = query.ErrorMsg()
|
var/err = query.ErrorMsg()
|
||||||
log_game("SQL ERROR during admin polling. Error : \[[err]\]\n")
|
log_game("SQL ERROR during admin polling. Error : \[[err]\]\n")
|
||||||
dbcon.Disconnect()
|
|
||||||
|
|
||||||
proc/sql_report_round_start()
|
proc/sql_report_round_start()
|
||||||
// TODO
|
// 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/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
|
||||||
var/coord = "[H.x], [H.y], [H.z]"
|
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()])"
|
//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()
|
establish_db_connection()
|
||||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
|
||||||
if(!dbcon.IsConnected())
|
if(!dbcon.IsConnected())
|
||||||
log_game("SQL ERROR during death reporting. Failed to connect.")
|
log_game("SQL ERROR during death reporting. Failed to connect.")
|
||||||
else
|
else
|
||||||
@@ -77,7 +72,6 @@ proc/sql_report_death(var/mob/living/carbon/human/H)
|
|||||||
if(!query.Execute())
|
if(!query.Execute())
|
||||||
var/err = query.ErrorMsg()
|
var/err = query.ErrorMsg()
|
||||||
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
||||||
dbcon.Disconnect()
|
|
||||||
|
|
||||||
|
|
||||||
proc/sql_report_cyborg_death(var/mob/living/silicon/robot/H)
|
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/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
|
||||||
var/coord = "[H.x], [H.y], [H.z]"
|
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()])"
|
//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()
|
establish_db_connection()
|
||||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
|
||||||
if(!dbcon.IsConnected())
|
if(!dbcon.IsConnected())
|
||||||
log_game("SQL ERROR during death reporting. Failed to connect.")
|
log_game("SQL ERROR during death reporting. Failed to connect.")
|
||||||
else
|
else
|
||||||
@@ -114,7 +107,6 @@ proc/sql_report_cyborg_death(var/mob/living/silicon/robot/H)
|
|||||||
if(!query.Execute())
|
if(!query.Execute())
|
||||||
var/err = query.ErrorMsg()
|
var/err = query.ErrorMsg()
|
||||||
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
||||||
dbcon.Disconnect()
|
|
||||||
|
|
||||||
|
|
||||||
proc/statistic_cycle()
|
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.")
|
log_game("Round ended without any feedback being generated. No feedback was sent to the database.")
|
||||||
return
|
return
|
||||||
|
|
||||||
var/DBConnection/dbcon = new()
|
establish_db_connection()
|
||||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
|
||||||
if(!dbcon.IsConnected())
|
if(!dbcon.IsConnected())
|
||||||
log_game("SQL ERROR during feedback reporting. Failed to connect.")
|
log_game("SQL ERROR during feedback reporting. Failed to connect.")
|
||||||
else
|
else
|
||||||
@@ -169,27 +160,3 @@ proc/sql_commit_feedback()
|
|||||||
if(!query.Execute())
|
if(!query.Execute())
|
||||||
var/err = query.ErrorMsg()
|
var/err = query.ErrorMsg()
|
||||||
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
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"
|
|
||||||
@@ -967,6 +967,17 @@ proc/process_ghost_teleport_locs()
|
|||||||
icon_state = "medbay"
|
icon_state = "medbay"
|
||||||
music = 'sound/ambience/signal.ogg'
|
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
|
/area/medical/patients_rooms
|
||||||
name = "\improper Patient's Rooms"
|
name = "\improper Patient's Rooms"
|
||||||
icon_state = "patients"
|
icon_state = "patients"
|
||||||
@@ -1008,9 +1019,13 @@ proc/process_ghost_teleport_locs()
|
|||||||
icon_state = "exam_room"
|
icon_state = "exam_room"
|
||||||
|
|
||||||
/area/medical/genetics
|
/area/medical/genetics
|
||||||
name = "Genetics"
|
name = "Genetics Lab"
|
||||||
icon_state = "genetics"
|
icon_state = "genetics"
|
||||||
|
|
||||||
|
/area/medical/genetics_cloning
|
||||||
|
name = "Cloning Lab"
|
||||||
|
icon_state = "cloning"
|
||||||
|
|
||||||
/area/medical/sleeper
|
/area/medical/sleeper
|
||||||
name = "\improper Medical Sleeper Room"
|
name = "\improper Medical Sleeper Room"
|
||||||
icon_state = "exam_room"
|
icon_state = "exam_room"
|
||||||
|
|||||||
@@ -27,8 +27,6 @@
|
|||||||
M.hitby(src)
|
M.hitby(src)
|
||||||
|
|
||||||
log_attack("<font color='red'>[hit_atom] ([M.ckey]) was hit by [src] thrown by ([src.fingerprintslast])</font>")
|
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))
|
else if(isobj(hit_atom))
|
||||||
var/obj/O = 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
|
// Only adds blood on the floor -- Skie
|
||||||
/atom/proc/add_blood_floor(mob/living/carbon/M as mob)
|
/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) )
|
if( istype(src, /turf/simulated) )
|
||||||
var/turf/simulated/source1 = src
|
var/turf/simulated/source1 = src
|
||||||
var/obj/effect/decal/cleanable/blood/this = new /obj/effect/decal/cleanable/blood(source1)
|
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 ))
|
else if( istype(M, /mob/living/silicon/robot ))
|
||||||
if( istype(src, /turf/simulated) )
|
if( istype(src, /turf/simulated) )
|
||||||
var/turf/simulated/source2 = src
|
var/turf/simulated/source2 = src
|
||||||
var/obj/effect/decal/cleanable/oil/this = new /obj/effect/decal/cleanable/oil(source2)
|
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
|
|
||||||
|
|
||||||
/atom/proc/clean_prints()
|
/atom/proc/clean_prints()
|
||||||
if(istype(fingerprints, /list))
|
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 -------
|
// ------- 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)
|
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 -------
|
// ------- 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/T = get_turf(usr)
|
||||||
var/turf/U = get_turf(src)
|
var/turf/U = get_turf(src)
|
||||||
if(istype(src, /turf)) oloc = src
|
|
||||||
else
|
|
||||||
oloc = loc
|
|
||||||
|
|
||||||
if(istype(usr, /mob/living/carbon/human))
|
if(istype(usr, /mob/living/carbon/human))
|
||||||
usr:nutrition -= rand(1,5)
|
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.firer = usr
|
||||||
A.def_zone = usr:get_organ_target()
|
A.def_zone = usr:get_organ_target()
|
||||||
A.original = oloc
|
A.original = src
|
||||||
A.current = T
|
A.current = T
|
||||||
A.yo = U.y - T.y
|
A.yo = U.y - T.y
|
||||||
A.xo = U.x - T.x
|
A.xo = U.x - T.x
|
||||||
|
|||||||
@@ -351,6 +351,8 @@
|
|||||||
if(!changeling) return
|
if(!changeling) return
|
||||||
|
|
||||||
var/mob/living/carbon/C = usr
|
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 << "<span class='notice'>We will attempt to regenerate our form.</span>"
|
||||||
|
|
||||||
C.status_flags |= FAKEDEATH //play dead
|
C.status_flags |= FAKEDEATH //play dead
|
||||||
@@ -526,10 +528,10 @@ var/list/datum/dna/hivemind_bank = list()
|
|||||||
|
|
||||||
/mob/proc/changeling_hivedownload()
|
/mob/proc/changeling_hivedownload()
|
||||||
set category = "Changeling"
|
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."
|
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
|
if(!changeling) return
|
||||||
|
|
||||||
var/list/names = list()
|
var/list/names = list()
|
||||||
@@ -547,7 +549,7 @@ var/list/datum/dna/hivemind_bank = list()
|
|||||||
if(!chosen_dna)
|
if(!chosen_dna)
|
||||||
return
|
return
|
||||||
|
|
||||||
changeling.chem_charges -= 40
|
changeling.chem_charges -= 20
|
||||||
changeling.absorbed_dna += chosen_dna
|
changeling.absorbed_dna += chosen_dna
|
||||||
usr << "<span class='notice'>We absorb the DNA of [S] from the air.</span>"
|
usr << "<span class='notice'>We absorb the DNA of [S] from the air.</span>"
|
||||||
feedback_add_details("changeling_powers","HD")
|
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_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))
|
if(istype(M,/mob/dead))
|
||||||
M.invisibility = 0
|
M.invisibility = 0
|
||||||
user.visible_message( \
|
user.visible_message( \
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
for(var/obj/O in orange(1,src))
|
for(var/obj/O in orange(1,src))
|
||||||
del(O)
|
del(O)
|
||||||
for(var/turf/simulated/ST in orange(1,src))
|
for(var/turf/simulated/ST in orange(1,src))
|
||||||
ST.ReplaceWithSpace()
|
ST.ChangeTurf(/turf/space)
|
||||||
|
|
||||||
sleep(6)
|
sleep(6)
|
||||||
grav(10, 4, 10, 0 )
|
grav(10, 4, 10, 0 )
|
||||||
@@ -84,5 +84,5 @@
|
|||||||
//Destroying the turf
|
//Destroying the turf
|
||||||
if( T && istype(T,/turf/simulated) && prob(turf_removal_chance) )
|
if( T && istype(T,/turf/simulated) && prob(turf_removal_chance) )
|
||||||
var/turf/simulated/ST = T
|
var/turf/simulated/ST = T
|
||||||
ST.ReplaceWithSpace()
|
ST.ChangeTurf(/turf/space)
|
||||||
return
|
return
|
||||||
@@ -118,13 +118,9 @@ var/global/Holiday = null
|
|||||||
set name = ".Set Holiday"
|
set name = ".Set Holiday"
|
||||||
set category = "Fun"
|
set category = "Fun"
|
||||||
set desc = "Force-set the Holiday variable to make the game think it's a certain day."
|
set desc = "Force-set the Holiday variable to make the game think it's a certain day."
|
||||||
|
if(!check_rights(R_SERVER)) return
|
||||||
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(!T) return
|
if(!T) return
|
||||||
|
|
||||||
Holiday = T
|
Holiday = T
|
||||||
//get a new station name
|
//get a new station name
|
||||||
station_name = null
|
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/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.
|
/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/game_mode/current_mode = ticker.mode
|
||||||
var/datum/mind/current_mind
|
var/datum/mind/current_mind
|
||||||
@@ -133,10 +141,21 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp
|
|||||||
|
|
||||||
//Here we pick a location and spawn the ninja.
|
//Here we pick a location and spawn the ninja.
|
||||||
var/list/spawn_list = list()
|
var/list/spawn_list = list()
|
||||||
|
for(var/obj/effect/landmark/L in landmarks_list)
|
||||||
|
//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)
|
for(var/obj/effect/landmark/L in landmarks_list)
|
||||||
if(L.name == "carpspawn")
|
if(L.name == "carpspawn")
|
||||||
spawn_list.Add(L)
|
spawn_list.Add(L)
|
||||||
|
|
||||||
|
var/ninja_key = null
|
||||||
|
|
||||||
|
if(assign_key)
|
||||||
|
ninja_key = assign_key
|
||||||
|
else
|
||||||
|
|
||||||
var/list/candidates = list() //list of candidate keys
|
var/list/candidates = list() //list of candidate keys
|
||||||
for(var/mob/dead/observer/G in player_list)
|
for(var/mob/dead/observer/G in player_list)
|
||||||
@@ -146,10 +165,46 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp
|
|||||||
if(!candidates.len) return
|
if(!candidates.len) return
|
||||||
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
|
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
|
||||||
|
|
||||||
|
ninja_key = pick(candidates)
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
if(!candidate_mob)
|
||||||
|
usr << "\red The randomly chosen mob was not found in the second check."
|
||||||
|
return
|
||||||
|
|
||||||
|
ninja_selection_active = 1
|
||||||
|
ninja_selection_id++
|
||||||
|
var/this_selection_id = ninja_selection_id
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
ninja_confirmed_selection = this_selection_id
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
if(ninja_confirmed_selection != ninja_selection_id)
|
||||||
|
ninja_selection_active = 0
|
||||||
|
usr << "\red The ninja did not accept the role in time."
|
||||||
|
return
|
||||||
|
|
||||||
|
ninja_selection_active = 0
|
||||||
|
|
||||||
//The ninja will be created on the right spawn point or at late join.
|
//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 ))
|
var/mob/living/carbon/human/new_ninja = create_space_ninja(pick(spawn_list.len ? spawn_list : latejoin ))
|
||||||
new_ninja.key = pick(candidates)
|
new_ninja.key = ninja_key
|
||||||
new_ninja.wear_suit:randomize_param()//Give them a random set of suit parameters.
|
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.internal = new_ninja.s_store //So the poor ninja has something to breath when they spawn in spess.
|
||||||
new_ninja.internals.icon_state = "internal1"
|
new_ninja.internals.icon_state = "internal1"
|
||||||
@@ -165,6 +220,10 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp
|
|||||||
if(istype(xeno))
|
if(istype(xeno))
|
||||||
xeno_list += 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.
|
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.
|
//Here we want the ninja to murder all the queens. The other aliens don't really matter.
|
||||||
var/xeno_queen_list[] = list()
|
var/xeno_queen_list[] = list()
|
||||||
@@ -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")
|
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
|
||||||
return
|
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", ""))
|
var/input = ckey(input("Pick character to spawn as the Space Ninja", "Key", ""))
|
||||||
if(!input)
|
if(!input)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/mob/dead/observer/G
|
space_ninja_arrival(input, mission)
|
||||||
for(var/mob/dead/observer/G_find in player_list)
|
|
||||||
if(G_find.ckey == input)
|
|
||||||
G = G_find
|
|
||||||
break
|
|
||||||
|
|
||||||
if(!G)//If a ghost was not found.
|
message_admins("\blue [key] has spawned [input] as a Space Ninja.\nTheir <b>mission</b> is: [mission]", 1)
|
||||||
alert("There is no active key like that in the game or the person is not currently a ghost. Aborting command.")
|
log_admin("[key] used Spawn Space Ninja.")
|
||||||
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.")
|
|
||||||
|
|
||||||
return
|
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_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/plastique(src), slot_l_store)
|
||||||
equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen(src), slot_s_store)
|
equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen(src), slot_s_store)
|
||||||
resistances += "alien_embryo"
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
//=======//HELPER PROCS//=======//
|
//=======//HELPER PROCS//=======//
|
||||||
|
|||||||
@@ -97,6 +97,9 @@ Whitespace:Seperator;
|
|||||||
///post_setup()
|
///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
|
///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()
|
/datum/game_mode/proc/post_setup()
|
||||||
|
spawn (ROUNDSTART_LOGOUT_REPORT_TIME)
|
||||||
|
display_roundstart_logout_report()
|
||||||
|
|
||||||
feedback_set_details("round_start","[time2text(world.realtime)]")
|
feedback_set_details("round_start","[time2text(world.realtime)]")
|
||||||
if(ticker && ticker.mode)
|
if(ticker && ticker.mode)
|
||||||
feedback_set_details("game_mode","[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))
|
if(player.mind && (player.mind.assigned_role in command_positions))
|
||||||
heads += player.mind
|
heads += player.mind
|
||||||
return heads
|
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)
|
flick("station_explode_fade_red", cinematic)
|
||||||
world << sound('sound/effects/explosionfar.ogg')
|
world << sound('sound/effects/explosionfar.ogg')
|
||||||
cinematic.icon_state = "summary_selfdes"
|
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.
|
//If its actually the end of the round, wait for it to end.
|
||||||
//Otherwise if its a verb it will continue on afterwards.
|
//Otherwise if its a verb it will continue on afterwards.
|
||||||
sleep(300)
|
sleep(300)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/mob/proc/rightandwrong()
|
/mob/proc/rightandwrong()
|
||||||
|
usr << "<B>You summoned guns!</B>"
|
||||||
message_admins("[key_name_admin(usr, 1)] summoned guns!")
|
message_admins("[key_name_admin(usr, 1)] summoned guns!")
|
||||||
for(var/mob/living/carbon/human/H in player_list)
|
for(var/mob/living/carbon/human/H in player_list)
|
||||||
if(H.stat == 2 || !(H.client)) continue
|
if(H.stat == 2 || !(H.client)) continue
|
||||||
@@ -16,7 +17,7 @@
|
|||||||
for(var/datum/objective/OBJ in H.mind.objectives)
|
for(var/datum/objective/OBJ in H.mind.objectives)
|
||||||
H << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
|
H << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
|
||||||
obj_count++
|
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)
|
switch (randomize)
|
||||||
if("taser")
|
if("taser")
|
||||||
new /obj/item/weapon/gun/energy/taser(get_turf(H))
|
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))
|
new /obj/item/weapon/gun/projectile/automatic/mini_uzi(get_turf(H))
|
||||||
if("crossbow")
|
if("crossbow")
|
||||||
new /obj/item/weapon/gun/energy/crossbow(get_turf(H))
|
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_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)
|
transfer_soul("VICTIM", M, user)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -180,6 +180,9 @@
|
|||||||
if("Station Engineer")
|
if("Station Engineer")
|
||||||
return list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
|
return list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
|
||||||
if("Assistant")
|
if("Assistant")
|
||||||
|
if(config.assistant_maint)
|
||||||
|
return list(access_maint_tunnels)
|
||||||
|
else
|
||||||
return list()
|
return list()
|
||||||
if("Chaplain")
|
if("Chaplain")
|
||||||
return list(access_morgue, access_chapel_office, access_crematorium)
|
return list(access_morgue, access_chapel_office, access_crematorium)
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
supervisors = "Nanotrasen officials and Space law"
|
supervisors = "Nanotrasen officials and Space law"
|
||||||
selection_color = "#ccccff"
|
selection_color = "#ccccff"
|
||||||
idtype = /obj/item/weapon/card/id/gold
|
idtype = /obj/item/weapon/card/id/gold
|
||||||
|
req_admin_notify = 1
|
||||||
|
|
||||||
|
|
||||||
equip(var/mob/living/carbon/human/H)
|
equip(var/mob/living/carbon/human/H)
|
||||||
@@ -48,6 +49,7 @@
|
|||||||
supervisors = "the captain"
|
supervisors = "the captain"
|
||||||
selection_color = "#ddddff"
|
selection_color = "#ddddff"
|
||||||
idtype = /obj/item/weapon/card/id/silver
|
idtype = /obj/item/weapon/card/id/silver
|
||||||
|
req_admin_notify = 1
|
||||||
|
|
||||||
|
|
||||||
equip(var/mob/living/carbon/human/H)
|
equip(var/mob/living/carbon/human/H)
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
supervisors = "the captain"
|
supervisors = "the captain"
|
||||||
selection_color = "#ffeeaa"
|
selection_color = "#ffeeaa"
|
||||||
idtype = /obj/item/weapon/card/id/silver
|
idtype = /obj/item/weapon/card/id/silver
|
||||||
|
req_admin_notify = 1
|
||||||
|
|
||||||
|
|
||||||
equip(var/mob/living/carbon/human/H)
|
equip(var/mob/living/carbon/human/H)
|
||||||
|
|||||||
@@ -31,5 +31,8 @@
|
|||||||
//List of alternate titles, if any
|
//List of alternate titles, if any
|
||||||
var/list/alt_titles
|
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)
|
/datum/job/proc/equip(var/mob/living/carbon/human/H)
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
supervisors = "the captain"
|
supervisors = "the captain"
|
||||||
selection_color = "#ffddf0"
|
selection_color = "#ffddf0"
|
||||||
idtype = /obj/item/weapon/card/id/silver
|
idtype = /obj/item/weapon/card/id/silver
|
||||||
|
req_admin_notify = 1
|
||||||
|
|
||||||
|
|
||||||
equip(var/mob/living/carbon/human/H)
|
equip(var/mob/living/carbon/human/H)
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
supervisors = "the captain"
|
supervisors = "the captain"
|
||||||
selection_color = "#ffddff"
|
selection_color = "#ffddff"
|
||||||
idtype = /obj/item/weapon/card/id/silver
|
idtype = /obj/item/weapon/card/id/silver
|
||||||
|
req_admin_notify = 1
|
||||||
|
|
||||||
|
|
||||||
equip(var/mob/living/carbon/human/H)
|
equip(var/mob/living/carbon/human/H)
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
supervisors = "the captain"
|
supervisors = "the captain"
|
||||||
selection_color = "#ffdddd"
|
selection_color = "#ffdddd"
|
||||||
idtype = /obj/item/weapon/card/id/silver
|
idtype = /obj/item/weapon/card/id/silver
|
||||||
|
req_admin_notify = 1
|
||||||
|
|
||||||
|
|
||||||
equip(var/mob/living/carbon/human/H)
|
equip(var/mob/living/carbon/human/H)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
spawn_positions = 1
|
spawn_positions = 1
|
||||||
selection_color = "#ccffcc"
|
selection_color = "#ccffcc"
|
||||||
supervisors = "your laws"
|
supervisors = "your laws"
|
||||||
|
req_admin_notify = 1
|
||||||
|
|
||||||
|
|
||||||
equip(var/mob/living/carbon/human/H)
|
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>You are the [rank].</B>"
|
||||||
H << "<b>As the [rank] you answer directly to [job.supervisors]. Special circumstances may change this.</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)
|
if(H.mind.assigned_role == rank && H.mind.role_alt_title)
|
||||||
spawnId(H, rank, H.mind.role_alt_title)
|
spawnId(H, rank, H.mind.role_alt_title)
|
||||||
|
|||||||
@@ -23,14 +23,31 @@
|
|||||||
if(V!=usr)
|
if(V!=usr)
|
||||||
V.show_message("[H] looks as if a wall is in front of them.", 3, "", 2)
|
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."
|
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))
|
new /obj/effect/forcefield/mime(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)
|
|
||||||
return
|
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()
|
/client/proc/mimespeak()
|
||||||
set category = "Mime"
|
set category = "Mime"
|
||||||
set name = "Speech"
|
set name = "Speech"
|
||||||
|
|||||||
@@ -20,11 +20,10 @@ proc/load_alienwhitelist()
|
|||||||
else
|
else
|
||||||
alien_whitelist = text2list(text, "\n")
|
alien_whitelist = text2list(text, "\n")
|
||||||
|
|
||||||
|
//todo: admin aliens
|
||||||
/proc/is_alien_whitelisted(mob/M, var/species)
|
/proc/is_alien_whitelisted(mob/M, var/species)
|
||||||
if(!alien_whitelist)
|
if(!alien_whitelist)
|
||||||
return 0
|
return 0
|
||||||
if((M.client) && (M.client.holder) && (M.client.holder.level) && (M.client.holder.level >= 5))
|
|
||||||
return 1
|
|
||||||
if(M && species)
|
if(M && species)
|
||||||
for (var/s in alien_whitelist)
|
for (var/s in alien_whitelist)
|
||||||
if(findtext(s,"[M.ckey] - [species]"))
|
if(findtext(s,"[M.ckey] - [species]"))
|
||||||
|
|||||||
@@ -199,6 +199,9 @@
|
|||||||
return src.attack_hand(user)
|
return src.attack_hand(user)
|
||||||
|
|
||||||
/obj/machinery/portable_atmospherics/canister/attack_hand(var/mob/user as mob)
|
/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)
|
if (src.destroyed)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ var/global/list/autolathe_recipes = list( \
|
|||||||
new /obj/item/ammo_magazine/c38(), \
|
new /obj/item/ammo_magazine/c38(), \
|
||||||
new /obj/item/device/taperecorder(), \
|
new /obj/item/device/taperecorder(), \
|
||||||
new /obj/item/device/assembly/igniter(), \
|
new /obj/item/device/assembly/igniter(), \
|
||||||
new /obj/item/device/infra_sensor(), \
|
|
||||||
new /obj/item/device/assembly/signaler(), \
|
new /obj/item/device/assembly/signaler(), \
|
||||||
new /obj/item/device/radio/headset(), \
|
new /obj/item/device/radio/headset(), \
|
||||||
new /obj/item/device/radio(), \
|
new /obj/item/device/radio(), \
|
||||||
@@ -103,6 +102,19 @@ 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")
|
user << browse("<HTML><HEAD><TITLE>Autolathe Control Panel</TITLE></HEAD><BODY><TT>[dat]</TT></BODY></HTML>", "window=autolathe_regular")
|
||||||
onclose(user, "autolathe_regular")
|
onclose(user, "autolathe_regular")
|
||||||
|
|
||||||
|
shock(mob/user, prb)
|
||||||
|
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
|
||||||
|
return 0
|
||||||
|
if(!prob(prb))
|
||||||
|
return 0
|
||||||
|
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||||
|
s.set_up(5, 1, src)
|
||||||
|
s.start()
|
||||||
|
if (electrocute_mob(user, get_area(src), src, 0.7))
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
|
||||||
interact(mob/user as mob)
|
interact(mob/user as mob)
|
||||||
if(..())
|
if(..())
|
||||||
return
|
return
|
||||||
@@ -117,19 +129,6 @@ var/global/list/autolathe_recipes_hidden = list( \
|
|||||||
regular_win(user)
|
regular_win(user)
|
||||||
return
|
return
|
||||||
|
|
||||||
shock(mob/user, prb)
|
|
||||||
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
|
|
||||||
return 0
|
|
||||||
if(!prob(prb))
|
|
||||||
return 0
|
|
||||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
|
||||||
s.set_up(5, 1, src)
|
|
||||||
s.start()
|
|
||||||
if (electrocute_mob(user, get_area(src), src, 0.7))
|
|
||||||
return 1
|
|
||||||
else
|
|
||||||
return 0
|
|
||||||
|
|
||||||
attackby(var/obj/item/O as obj, var/mob/user as mob)
|
attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||||
if (stat)
|
if (stat)
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/biogenerator/proc/interact(mob/user as mob)
|
/obj/machinery/biogenerator/interact(mob/user as mob)
|
||||||
if(stat & BROKEN)
|
if(stat & BROKEN)
|
||||||
return
|
return
|
||||||
user.set_machine(src)
|
user.set_machine(src)
|
||||||
|
|||||||
@@ -149,10 +149,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/machinery/bot/attack_ai(mob/user as mob)
|
/obj/machinery/bot/attack_ai(mob/user as mob)
|
||||||
if (src.on)
|
src.attack_hand(user)
|
||||||
turn_off()
|
|
||||||
else
|
|
||||||
turn_on()
|
|
||||||
|
|
||||||
/******************************************************************/
|
/******************************************************************/
|
||||||
// Navigation procs
|
// Navigation procs
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
usr.set_machine(src)
|
usr.set_machine(src)
|
||||||
interact(user)
|
interact(user)
|
||||||
|
|
||||||
/obj/machinery/bot/cleanbot/proc/interact(mob/user as mob)
|
/obj/machinery/bot/cleanbot/interact(mob/user as mob)
|
||||||
var/dat
|
var/dat
|
||||||
dat += text({"
|
dat += text({"
|
||||||
<TT><B>Automatic Station Cleaner v1.0</B></TT><BR><BR>
|
<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>
|
Behaviour controls are [src.locked ? "locked" : "unlocked"]<BR>
|
||||||
Maintenance panel is [src.open ? "opened" : "closed"]"},
|
Maintenance panel is [src.open ? "opened" : "closed"]"},
|
||||||
text("<A href='?src=\ref[src];operation=start'>[src.on ? "On" : "Off"]</A>"))
|
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>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>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>"))
|
// 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!")
|
visible_message("[src] makes an excited beeping booping sound!")
|
||||||
|
|
||||||
if(src.screwloose && prob(5))
|
if(src.screwloose && prob(5))
|
||||||
visible_message("[src] leaks a drop of water. How strange.")
|
|
||||||
if(istype(loc,/turf/simulated))
|
if(istype(loc,/turf/simulated))
|
||||||
var/turf/simulated/T = src.loc
|
var/turf/simulated/T = src.loc
|
||||||
if(T.wet < 1)
|
if(T.wet < 1)
|
||||||
@@ -350,7 +349,7 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
|
|||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
else if (istype(W, /obj/item/weapon/pen))
|
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)
|
if (!t)
|
||||||
return
|
return
|
||||||
if (!in_range(src, usr) && src.loc != usr)
|
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>" )
|
"<A href='?src=\ref[src];power=1'>[src.on ? "On" : "Off"]</A>" )
|
||||||
|
|
||||||
if(!src.locked)
|
if(!src.locked || issilicon(user))
|
||||||
if(!lasercolor)
|
if(!lasercolor)
|
||||||
dat += text({"<BR>
|
dat += text({"<BR>
|
||||||
Check for Weapon Authorization: []<BR>
|
Check for Weapon Authorization: []<BR>
|
||||||
@@ -889,7 +889,7 @@ Auto Patrol: []"},
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
if(istype(W, /obj/item/weapon/pen))
|
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(!t) return
|
||||||
if(!in_range(src, usr) && src.loc != usr) return
|
if(!in_range(src, usr) && src.loc != usr) return
|
||||||
created_name = t
|
created_name = t
|
||||||
|
|||||||
@@ -75,14 +75,14 @@
|
|||||||
usr.set_machine(src)
|
usr.set_machine(src)
|
||||||
interact(user)
|
interact(user)
|
||||||
|
|
||||||
/obj/machinery/bot/floorbot/proc/interact(mob/user as mob)
|
/obj/machinery/bot/floorbot/interact(mob/user as mob)
|
||||||
var/dat
|
var/dat
|
||||||
dat += "<TT><B>Automatic Station Floor Repairer v1.0</B></TT><BR><BR>"
|
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 += "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 += "Maintenance panel panel is [src.open ? "opened" : "closed"]<BR>"
|
||||||
dat += "Tiles left: [src.amount]<BR>"
|
dat += "Tiles left: [src.amount]<BR>"
|
||||||
dat += "Behvaiour controls are [src.locked ? "locked" : "unlocked"]<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 += "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 += "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>"
|
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)
|
del(src)
|
||||||
|
|
||||||
else if (istype(W, /obj/item/weapon/pen))
|
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)
|
if (!t)
|
||||||
return
|
return
|
||||||
if (!in_range(src, usr) && src.loc != usr)
|
if (!in_range(src, usr) && src.loc != usr)
|
||||||
|
|||||||
@@ -112,7 +112,7 @@
|
|||||||
else
|
else
|
||||||
dat += "None Loaded"
|
dat += "None Loaded"
|
||||||
dat += "<br>Behaviour controls are [src.locked ? "locked" : "unlocked"]<hr>"
|
dat += "<br>Behaviour controls are [src.locked ? "locked" : "unlocked"]<hr>"
|
||||||
if(!src.locked)
|
if(!src.locked || issilicon(user))
|
||||||
dat += "<TT>Healing Threshold: "
|
dat += "<TT>Healing Threshold: "
|
||||||
dat += "<a href='?src=\ref[src];adj_threshold=-10'>--</a> "
|
dat += "<a href='?src=\ref[src];adj_threshold=-10'>--</a> "
|
||||||
dat += "<a href='?src=\ref[src];adj_threshold=-5'>-</a> "
|
dat += "<a href='?src=\ref[src];adj_threshold=-5'>-</a> "
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
else
|
else
|
||||||
turn_on()
|
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"])
|
var/adjust_num = text2num(href_list["adj_threshold"])
|
||||||
src.heal_threshold += adjust_num
|
src.heal_threshold += adjust_num
|
||||||
if(src.heal_threshold < 5)
|
if(src.heal_threshold < 5)
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
if(src.heal_threshold > 75)
|
if(src.heal_threshold > 75)
|
||||||
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"])
|
var/adjust_num = text2num(href_list["adj_inject"])
|
||||||
src.injection_amount += adjust_num
|
src.injection_amount += adjust_num
|
||||||
if(src.injection_amount < 5)
|
if(src.injection_amount < 5)
|
||||||
@@ -166,7 +166,7 @@
|
|||||||
if(src.injection_amount > 15)
|
if(src.injection_amount > 15)
|
||||||
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
|
src.use_beaker = !src.use_beaker
|
||||||
else if((href_list["toggle_inject"]) && (!src.locked))
|
else if((href_list["toggle_inject"]) && (!src.locked))
|
||||||
src.always_inject = !src.always_inject
|
src.always_inject = !src.always_inject
|
||||||
@@ -175,7 +175,7 @@
|
|||||||
src.reagent_glass.loc = get_turf(src)
|
src.reagent_glass.loc = get_turf(src)
|
||||||
src.reagent_glass = null
|
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.shut_up = !src.shut_up
|
||||||
|
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
@@ -530,26 +530,8 @@
|
|||||||
|
|
||||||
/obj/item/weapon/firstaid_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/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))
|
if(istype(W, /obj/item/weapon/pen))
|
||||||
src.build_step++
|
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
|
||||||
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 (!t)
|
if (!t)
|
||||||
return
|
return
|
||||||
if (!in_range(src, usr) && src.loc != usr)
|
if (!in_range(src, usr) && src.loc != usr)
|
||||||
|
|||||||
@@ -202,7 +202,7 @@
|
|||||||
user.set_machine(src)
|
user.set_machine(src)
|
||||||
interact(user, 0)
|
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
|
var/dat
|
||||||
dat += "<TT><B>Multiple Utility Load Effector Mk. III</B></TT><BR><BR>"
|
dat += "<TT><B>Multiple Utility Load Effector Mk. III</B></TT><BR><BR>"
|
||||||
dat += "ID: [suffix]<BR>"
|
dat += "ID: [suffix]<BR>"
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
usr.set_machine(src)
|
usr.set_machine(src)
|
||||||
interact(user)
|
interact(user)
|
||||||
|
|
||||||
/obj/machinery/bot/secbot/proc/interact(mob/user as mob)
|
/obj/machinery/bot/secbot/interact(mob/user as mob)
|
||||||
var/dat
|
var/dat
|
||||||
|
|
||||||
dat += text({"
|
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>" )
|
"<A href='?src=\ref[src];power=1'>[src.on ? "On" : "Off"]</A>" )
|
||||||
|
|
||||||
if(!src.locked)
|
if(!src.locked || issilicon(user))
|
||||||
dat += text({"<BR>
|
dat += text({"<BR>
|
||||||
Check for Weapon Authorization: []<BR>
|
Check for Weapon Authorization: []<BR>
|
||||||
Check Security Records: []<BR>
|
Check Security Records: []<BR>
|
||||||
@@ -752,7 +752,7 @@ Auto Patrol: []"},
|
|||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
else if(istype(W, /obj/item/weapon/pen))
|
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)
|
if(!t)
|
||||||
return
|
return
|
||||||
if(!in_range(src, usr) && src.loc != usr)
|
if(!in_range(src, usr) && src.loc != usr)
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
|
|
||||||
src.interact(usr)
|
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)
|
if(!panel_open)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
interact(user)
|
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 ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||||
if (!istype(user, /mob/living/silicon))
|
if (!istype(user, /mob/living/silicon))
|
||||||
user.unset_machine()
|
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_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")
|
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)
|
src.name = (name_action + name_part1 + name_part2)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
var/jobs_all = ""
|
var/jobs_all = ""
|
||||||
var/list/alljobs = (istype(src,/obj/machinery/computer/card/centcom)? get_all_centcom_jobs() : get_all_jobs()) + "Custom"
|
var/list/alljobs = (istype(src,/obj/machinery/computer/card/centcom)? get_all_centcom_jobs() : get_all_jobs()) + "Custom"
|
||||||
for(var/job in alljobs)
|
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
|
var/body
|
||||||
@@ -138,9 +138,9 @@
|
|||||||
accesses += "<h5>Central Command:</h5>"
|
accesses += "<h5>Central Command:</h5>"
|
||||||
for(var/A in get_all_centcom_access())
|
for(var/A in get_all_centcom_access())
|
||||||
if(A in modify.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
|
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
|
else
|
||||||
accesses += "<div align='center'><b>Access</b></div>"
|
accesses += "<div align='center'><b>Access</b></div>"
|
||||||
accesses += "<table style='width:100%'>"
|
accesses += "<table style='width:100%'>"
|
||||||
@@ -152,9 +152,9 @@
|
|||||||
accesses += "<td style='width:14%' valign='top'>"
|
accesses += "<td style='width:14%' valign='top'>"
|
||||||
for(var/A in get_region_accesses(i))
|
for(var/A in get_region_accesses(i))
|
||||||
if(A in modify.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_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
|
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 += "<br>"
|
||||||
accesses += "</td>"
|
accesses += "</td>"
|
||||||
accesses += "</tr></table>"
|
accesses += "</tr></table>"
|
||||||
|
|||||||
@@ -53,7 +53,6 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
proc
|
|
||||||
interact(mob/user)
|
interact(mob/user)
|
||||||
if( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
if( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||||
if(!istype(user, /mob/living/silicon))
|
if(!istype(user, /mob/living/silicon))
|
||||||
@@ -69,7 +68,8 @@
|
|||||||
var/list/logs = list()
|
var/list/logs = list()
|
||||||
for(var/obj/item/clothing/under/C in src.tracked)
|
for(var/obj/item/clothing/under/C in src.tracked)
|
||||||
var/log = ""
|
var/log = ""
|
||||||
if((C) && (C.has_sensor) && (C.loc) && (C.loc.z == 1) && C.sensor_mode)
|
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))
|
if(istype(C.loc, /mob/living/carbon/human))
|
||||||
|
|
||||||
var/mob/living/carbon/human/H = C.loc
|
var/mob/living/carbon/human/H = C.loc
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
if(H.wear_id)
|
if(H.wear_id)
|
||||||
log += "<tr><td width='40%'>[H.wear_id.name]</td>"
|
log += "<tr><td width='40%'>[H.wear_id.name]</td>"
|
||||||
else
|
else
|
||||||
log += "<tr><td width='40%'>Unknown:</td>"
|
log += "<tr><td width='40%'>Unknown</td>"
|
||||||
|
|
||||||
switch(C.sensor_mode)
|
switch(C.sensor_mode)
|
||||||
if(1)
|
if(1)
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
log += "<td width='20%'>[life_status] [damage_report]</td><td width='40%'>Not Available</td></tr>"
|
log += "<td width='20%'>[life_status] [damage_report]</td><td width='40%'>Not Available</td></tr>"
|
||||||
if(3)
|
if(3)
|
||||||
var/area/player_area = get_area(H)
|
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>"
|
log += "<td width='20%'>[life_status] [damage_report]</td><td width='40%'>[player_area.name] ([pos.x], [pos.y])</td></tr>"
|
||||||
logs += log
|
logs += log
|
||||||
logs = sortList(logs)
|
logs = sortList(logs)
|
||||||
for(var/log in logs)
|
for(var/log in logs)
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
onclose(user, "crewcomp")
|
onclose(user, "crewcomp")
|
||||||
|
|
||||||
|
|
||||||
scan()
|
proc/scan()
|
||||||
for(var/obj/item/clothing/under/C in world)
|
for(var/obj/item/clothing/under/C in world)
|
||||||
if((C.has_sensor) && (istype(C.loc, /mob/living/carbon/human)))
|
if((C.has_sensor) && (istype(C.loc, /mob/living/carbon/human)))
|
||||||
var/check = 0
|
var/check = 0
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
src.attack_hand(user)
|
src.attack_hand(user)
|
||||||
return
|
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 ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||||
if (!istype(user, /mob/living/silicon))
|
if (!istype(user, /mob/living/silicon))
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
proc/interact(mob/user)
|
interact(mob/user)
|
||||||
usr.set_machine(src)
|
usr.set_machine(src)
|
||||||
var/dat = "<HEAD><TITLE>Current Station Alerts</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
|
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>"
|
dat += "<A HREF='?src=\ref[user];mach_close=alerts'>Close</A><br><br>"
|
||||||
|
|||||||
@@ -296,10 +296,9 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
|
|||||||
spawn (0) target_tile.hotspot_expose(temperature, 400)
|
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
|
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)
|
var/turf/T = get_turf(F)
|
||||||
T.ReplaceWithMineralWall("plasma")
|
T.ChangeTurf(/turf/simulated/wall/mineral/plasma/)
|
||||||
del (F)
|
del (F)
|
||||||
for(var/turf/simulated/wall/mineral/W in range(3,src))
|
for(var/turf/simulated/wall/mineral/plasma/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
|
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))
|
for(var/obj/machinery/door/airlock/plasma/D in range(3,src))
|
||||||
D.ignite(temperature/4)
|
D.ignite(temperature/4)
|
||||||
|
|||||||
@@ -157,9 +157,6 @@
|
|||||||
user.attack_log += "\[[time_stamp()]\] Gibbed <b>[src.occupant]/[src.occupant.ckey]</b>"
|
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_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.death(1)
|
||||||
src.occupant.ghostize()
|
src.occupant.ghostize()
|
||||||
del(src.occupant)
|
del(src.occupant)
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
user.set_machine(src)
|
user.set_machine(src)
|
||||||
interact(user)
|
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_chamber_empty = 0
|
||||||
var/is_beaker_ready = 0
|
var/is_beaker_ready = 0
|
||||||
var/processing_chamber = ""
|
var/processing_chamber = ""
|
||||||
|
|||||||
@@ -146,7 +146,7 @@
|
|||||||
* Microwave Menu
|
* 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 = ""
|
var/dat = ""
|
||||||
if(src.broken > 0)
|
if(src.broken > 0)
|
||||||
dat = {"<TT>Bzzzzttttt</TT>"}
|
dat = {"<TT>Bzzzzttttt</TT>"}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
|
|
||||||
for(var/datum/disease/D in O.viruses)
|
for(var/datum/disease/D in O.viruses)
|
||||||
if(D.spread_type != SPECIAL)
|
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)
|
B.data["blood_DNA"] = copytext(O.dna.unique_enzymes,1,0)
|
||||||
if(O.resistances&&O.resistances.len)
|
if(O.resistances&&O.resistances.len)
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
* SmartFridge Menu
|
* SmartFridge Menu
|
||||||
********************/
|
********************/
|
||||||
|
|
||||||
/obj/machinery/smartfridge/proc/interact(mob/user as mob)
|
/obj/machinery/smartfridge/interact(mob/user as mob)
|
||||||
if(!src.ispowered)
|
if(!src.ispowered)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@
|
|||||||
attack_hand(var/mob/user)
|
attack_hand(var/mob/user)
|
||||||
interact(user, 0)
|
interact(user, 0)
|
||||||
|
|
||||||
proc/interact(var/mob/user, var/ai = 0)
|
interact(var/mob/user, var/ai = 0)
|
||||||
var/turf/T = loc
|
var/turf/T = loc
|
||||||
if(T.intact)
|
if(T.intact)
|
||||||
return // prevent intraction when T-scanner revealed
|
return // prevent intraction when T-scanner revealed
|
||||||
|
|||||||
@@ -549,7 +549,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
//////////////Contaiment Field START
|
//////////////Containment Field START
|
||||||
/obj/machinery/shieldwall
|
/obj/machinery/shieldwall
|
||||||
name = "Shield"
|
name = "Shield"
|
||||||
desc = "An energy shield."
|
desc = "An energy shield."
|
||||||
@@ -578,6 +578,7 @@
|
|||||||
/obj/machinery/shieldwall/attack_hand(mob/user as mob)
|
/obj/machinery/shieldwall/attack_hand(mob/user as mob)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/shieldwall/process()
|
/obj/machinery/shieldwall/process()
|
||||||
if(needs_power)
|
if(needs_power)
|
||||||
if(isnull(gen_primary)||isnull(gen_secondary))
|
if(isnull(gen_primary)||isnull(gen_secondary))
|
||||||
@@ -606,6 +607,32 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/obj/machinery/shieldwall/ex_act(severity)
|
||||||
|
if(needs_power)
|
||||||
|
var/obj/machinery/shieldwallgen/G
|
||||||
|
switch(severity)
|
||||||
|
if(1.0) //big boom
|
||||||
|
if(prob(50))
|
||||||
|
G = gen_primary
|
||||||
|
else
|
||||||
|
G = gen_secondary
|
||||||
|
G.storedpower -= 200
|
||||||
|
|
||||||
|
if(2.0) //medium boom
|
||||||
|
if(prob(50))
|
||||||
|
G = gen_primary
|
||||||
|
else
|
||||||
|
G = gen_secondary
|
||||||
|
G.storedpower -= 50
|
||||||
|
|
||||||
|
if(3.0) //lil boom
|
||||||
|
if(prob(50))
|
||||||
|
G = gen_primary
|
||||||
|
else
|
||||||
|
G = gen_secondary
|
||||||
|
G.storedpower -= 20
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/shieldwall/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/machinery/shieldwall/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||||
if(air_group || (height==0)) return 1
|
if(air_group || (height==0)) return 1
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user