mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 02:57:48 +01:00
Merge branch 'incremental_tg' r5514 (11/1/2013) into bs12_with_tgport
Conflicts: baystation12.dme code/ATMOSPHERICS/components/unary/vent_pump.dm code/ATMOSPHERICS/components/unary/vent_scrubber.dm code/__HELPERS/game.dm code/controllers/shuttle_controller.dm code/datums/datumvars.dm code/datums/supplypacks.dm code/defines/obj/storage.dm code/defines/obj/vending.dm code/defines/obj/weapon.dm code/defines/procs/command_alert.dm code/game/area/Space Station 13 areas.dm code/game/atoms.dm code/game/gamemodes/changeling/modularchangling.dm code/game/gamemodes/cult/runes.dm code/game/gamemodes/events.dm code/game/gamemodes/events/dust.dm code/game/gamemodes/events/miniblob.dm code/game/gamemodes/events/ninja_equipment.dm code/game/gamemodes/factions.dm code/game/gamemodes/game_mode.dm code/game/gamemodes/gameticker.dm code/game/jobs/access.dm code/game/jobs/job/assistant.dm code/game/jobs/job/captain.dm code/game/jobs/job/civilian.dm code/game/jobs/job/engineering.dm code/game/jobs/job/medical.dm code/game/jobs/job/science.dm code/game/jobs/job/security.dm code/game/jobs/job_controller.dm code/game/machinery/alarm.dm code/game/machinery/atmo_control.dm code/game/machinery/atmoalter/area_atmos_computer.dm code/game/machinery/bots/medbot.dm code/game/machinery/computer/HolodeckControl.dm code/game/machinery/computer/ai_core.dm code/game/machinery/computer/atmos_alert.dm code/game/machinery/computer/card.dm code/game/machinery/computer/cloning.dm code/game/machinery/computer/computer.dm code/game/machinery/computer/message.dm code/game/machinery/computer/pod.dm code/game/machinery/computer/prisoner.dm code/game/machinery/computer/syndicate_shuttle.dm code/game/machinery/constructable_frame.dm code/game/machinery/doors/door.dm code/game/machinery/doors/firedoor.dm code/game/machinery/newscaster.dm code/game/machinery/recharger.dm code/game/machinery/spaceheater.dm code/game/machinery/telecomms/broadcaster.dm code/game/machinery/telecomms/logbrowser.dm code/game/machinery/telecomms/machine_interactions.dm code/game/machinery/teleporter.dm code/game/machinery/wishgranter.dm code/game/mecha/mech_fabricator.dm code/game/mecha/working/ripley.dm code/game/objects/items.dm code/game/objects/items/blueprints.dm code/game/objects/items/devices/flashlight.dm code/game/objects/items/devices/radio/encryptionkey.dm code/game/objects/items/devices/uplinks.dm code/game/objects/items/stacks/medical.dm code/game/objects/items/weapons/cards_ids.dm code/game/objects/items/weapons/gift_wrappaper.dm code/game/objects/items/weapons/hydroponics.dm code/game/objects/items/weapons/manuals.dm code/game/objects/items/weapons/secstorage/secstorage.dm code/game/objects/items/weapons/storage/backpack.dm code/game/objects/items/weapons/storage/firstaid.dm code/game/objects/items/weapons/storage/kit.dm code/game/objects/items/weapons/storage/storage.dm code/game/objects/items/weapons/storage/toolbox.dm code/game/objects/items/weapons/storage/uplink_kits.dm code/game/objects/items/weapons/stunbaton.dm code/game/objects/items/weapons/surgery_tools.dm code/game/objects/items/weapons/tools.dm code/game/objects/structures/crates_lockers/closets/secure/cargo.dm code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm code/game/objects/structures/crates_lockers/closets/secure/scientist.dm code/game/objects/structures/crates_lockers/closets/secure/security.dm code/game/objects/structures/electricchair.dm code/game/objects/structures/extinguisher.dm code/game/objects/structures/watercloset.dm code/game/objects/weapons.dm code/game/turfs/turf.dm code/game/vehicles/airtight/airtight.dm code/game/vehicles/vehicle.dm code/global.dm code/modules/DetectiveWork/evidence.dm code/modules/admin/IsBanned.dm code/modules/admin/player_panel.dm code/modules/admin/verbs/diagnostics.dm code/modules/admin/verbs/getlogs.dm code/modules/client/preferences.dm code/modules/clothing/masks/miscellaneous.dm code/modules/clothing/spacesuits/rig.dm code/modules/clothing/suits/miscellaneous.dm code/modules/critters/critter_defenses.dm code/modules/detectivework/scanner.dm code/modules/flufftext/Hallucination.dm code/modules/food/recipes_microwave.dm code/modules/mining/mine_items.dm code/modules/mining/mine_turfs.dm code/modules/mining/satchel_ore_boxdm.dm code/modules/mob/dead/observer/observer.dm code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm code/modules/mob/living/carbon/alien/special/facehugger.dm code/modules/mob/living/carbon/carbon.dm code/modules/mob/living/carbon/carbon_defines.dm code/modules/mob/living/carbon/human/human.dm code/modules/mob/living/carbon/human/human_attackhand.dm code/modules/mob/living/carbon/human/life.dm code/modules/mob/living/carbon/human/say.dm code/modules/mob/living/carbon/human/update_icons.dm code/modules/mob/living/carbon/metroid/metroid.dm code/modules/mob/living/living.dm code/modules/mob/living/silicon/ai/life.dm code/modules/mob/living/silicon/robot/robot.dm code/modules/mob/mob_cleanup.dm code/modules/mob/mob_defines.dm code/modules/mob/mob_transformation_simple.dm code/modules/paperwork/clipboard.dm code/modules/paperwork/folders.dm code/modules/paperwork/paper.dm code/modules/paperwork/paperbin.dm code/modules/paperwork/pen.dm code/modules/power/cable.dm code/modules/projectiles/guns/energy/special.dm code/modules/projectiles/guns/projectile/revolver.dm code/modules/projectiles/projectile/change.dm code/modules/projectiles/projectile/special.dm code/modules/reagents/Chemistry-Reagents.dm code/modules/reagents/reagent_containers/glass.dm code/modules/reagents/reagent_containers/hypospray.dm code/modules/recycling/sortingmachinery.dm code/modules/research/designs.dm config/config.txt html/changelog.html icons/mob/head.dmi icons/mob/hud.dmi icons/mob/items_lefthand.dmi icons/mob/items_righthand.dmi icons/mob/mask.dmi icons/mob/suit.dmi icons/mob/ties.dmi icons/mob/uniform.dmi icons/obj/clothing/hats.dmi icons/obj/clothing/masks.dmi icons/obj/clothing/suits.dmi icons/obj/clothing/ties.dmi icons/obj/grenade.dmi icons/obj/projectiles.dmi Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
var/obj/item/I = contents[1]
|
||||
user.visible_message("[user] takes [I] out of [src]", "You take [I] out of [src].",\
|
||||
"You hear someone rustle around in a plastic bag, and remove something.")
|
||||
overlays = null //remove the overlays
|
||||
overlays.Cut() //remove the overlays
|
||||
user.put_in_hands(I)
|
||||
w_class = 1
|
||||
icon_state = "evidenceobj"
|
||||
|
||||
@@ -1,173 +1,166 @@
|
||||
//CONTAINS: Detective's Scanner
|
||||
|
||||
// TODO: Split everything into easy to manage procs.
|
||||
|
||||
/obj/item/device/detective_scanner
|
||||
name = "Scanner"
|
||||
desc = "Used to scan objects for DNA and fingerprints."
|
||||
name = "scanner"
|
||||
desc = "Used to scan objects for DNA and fingerprints. Can print a report of the findings."
|
||||
icon_state = "forensic1"
|
||||
var/amount = 20.0
|
||||
var/list/stored = list()
|
||||
w_class = 3.0
|
||||
item_state = "electronic"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
slot_flags = SLOT_BELT
|
||||
var/scanning = 0
|
||||
var/list/log = list()
|
||||
|
||||
attackby(obj/item/weapon/f_card/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/f_card))
|
||||
if (W.fingerprints)
|
||||
return
|
||||
if (src.amount == 20)
|
||||
return
|
||||
if (W.amount + src.amount > 20)
|
||||
src.amount = 20
|
||||
W.amount = W.amount + src.amount - 20
|
||||
else
|
||||
src.amount += W.amount
|
||||
//W = null
|
||||
del(W)
|
||||
add_fingerprint(user)
|
||||
if (W)
|
||||
W.add_fingerprint(user)
|
||||
/obj/item/device/detective_scanner/attack_self(var/mob/user)
|
||||
if(log.len && !scanning)
|
||||
scanning = 1
|
||||
user << "<span class='notice'>Printing report, please wait...</span>"
|
||||
|
||||
spawn(100)
|
||||
|
||||
// Create our paper
|
||||
var/obj/item/weapon/paper/P = new(get_turf(src))
|
||||
P.name = "paper- 'Scanner Report'"
|
||||
P.info = "<center><font size='6'><B>Scanner Report</B></font></center><HR><BR>"
|
||||
P.info += dd_list2text(log, "<BR>")
|
||||
P.info += "<HR><B>Notes:</B><BR>"
|
||||
P.info_links = P.info
|
||||
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.put_in_hands(P)
|
||||
M << "<span class='notice'>Report printed. Log cleared.<span>"
|
||||
|
||||
// Clear the logs
|
||||
log = list()
|
||||
scanning = 0
|
||||
else
|
||||
user << "<span class='notice'>The scanner has no logs or is in use.</span>"
|
||||
|
||||
/obj/item/device/detective_scanner/attack(mob/living/M as mob, mob/user as mob)
|
||||
scan(M, user)
|
||||
|
||||
|
||||
/obj/item/device/detective_scanner/afterattack(atom/A as obj|turf|area, mob/user as mob)
|
||||
|
||||
if(!in_range(A,user))
|
||||
return
|
||||
|
||||
attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
if (!ishuman(M))
|
||||
user << "\red [M] is not human and cannot have the fingerprints."
|
||||
return 0
|
||||
if (( !( istype(M.dna, /datum/dna) ) || M.gloves) )
|
||||
user << "\blue No fingerprints found on [M]"
|
||||
return 0
|
||||
else
|
||||
if (src.amount < 1)
|
||||
user << text("\blue Fingerprints scanned on [M]. Need more cards to print.")
|
||||
else
|
||||
src.amount--
|
||||
var/obj/item/weapon/f_card/F = new /obj/item/weapon/f_card( user.loc )
|
||||
F.amount = 1
|
||||
F.add_fingerprint(M)
|
||||
F.icon_state = "fingerprint1"
|
||||
F.name = text("FPrintC- '[M.name]'")
|
||||
|
||||
user << "\blue Done printing."
|
||||
user << "\blue [M]'s Fingerprints: [md5(M.dna.uni_identity)]"
|
||||
if ( !M.blood_DNA || !M.blood_DNA.len )
|
||||
user << "\blue No blood found on [M]"
|
||||
if(M.blood_DNA)
|
||||
del(M.blood_DNA)
|
||||
else
|
||||
user << "\blue Blood found on [M]. Analysing..."
|
||||
spawn(15)
|
||||
for(var/blood in M.blood_DNA)
|
||||
user << "\blue Blood type: [M.blood_DNA[blood]]\nDNA: [blood]"
|
||||
if(!isturf(A) && !isobj(A))
|
||||
return
|
||||
|
||||
afterattack(atom/A as obj|turf|area, mob/user as mob)
|
||||
if(!in_range(A,user))
|
||||
return
|
||||
if(loc != user)
|
||||
return
|
||||
if(istype(A,/obj/machinery/computer/forensic_scanning)) //breaks shit.
|
||||
return
|
||||
if(istype(A,/obj/item/weapon/f_card))
|
||||
user << "The scanner displays on the screen: \"ERROR 43: Object on Excluded Object List.\""
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
//Special case for blood splaters.
|
||||
if (istype(A, /obj/effect/decal/cleanable/blood) || istype(A, /obj/effect/rune))
|
||||
if(!isnull(A.blood_DNA))
|
||||
for(var/blood in A.blood_DNA)
|
||||
user << "\blue Blood type: [A.blood_DNA[blood]]\nDNA: [blood]"
|
||||
return
|
||||
|
||||
//General
|
||||
if ((!A.fingerprints || !A.fingerprints.len) && !A.suit_fibers && !A.blood_DNA)
|
||||
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.gender == MALE ? "him" : "her"] humming[prob(70) ? " gently." : "."]" ,\
|
||||
"\blue Unable to locate any fingerprints, materials, fibers, or blood on [A]!",\
|
||||
"You hear a faint hum of electrical equipment.")
|
||||
return 0
|
||||
|
||||
if(add_data(A))
|
||||
user << "\blue Object already in internal memory. Consolidating data..."
|
||||
return
|
||||
|
||||
|
||||
//PRINTS
|
||||
if(!A.fingerprints || !A.fingerprints.len)
|
||||
if(A.fingerprints)
|
||||
del(A.fingerprints)
|
||||
else
|
||||
user << "\blue Isolated [A.fingerprints.len] fingerprints: Data Stored: Scan with Hi-Res Forensic Scanner to retrieve."
|
||||
var/list/complete_prints = list()
|
||||
for(var/i in A.fingerprints)
|
||||
var/print = A.fingerprints[i]
|
||||
if(stringpercent(print) <= FINGERPRINT_COMPLETE)
|
||||
complete_prints += print
|
||||
if(complete_prints.len < 1)
|
||||
user << "\blue No intact prints found"
|
||||
else
|
||||
user << "\blue Found [complete_prints.len] intact prints"
|
||||
for(var/i in complete_prints)
|
||||
user << "\blue [i]"
|
||||
|
||||
//FIBERS
|
||||
if(A.suit_fibers)
|
||||
user << "\blue Fibers/Materials Data Stored: Scan with Hi-Res Forensic Scanner to retrieve."
|
||||
|
||||
//Blood
|
||||
if (A.blood_DNA)
|
||||
user << "\blue Blood found on [A]. Analysing..."
|
||||
spawn(15)
|
||||
for(var/blood in A.blood_DNA)
|
||||
user << "Blood type: \red [A.blood_DNA[blood]] \t \black DNA: \red [blood]"
|
||||
if(prob(80) || !A.fingerprints)
|
||||
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.gender == MALE ? "him" : "her"] humming[prob(70) ? " gently." : "."]" ,\
|
||||
"You finish scanning \the [A].",\
|
||||
"You hear a faint hum of electrical equipment.")
|
||||
return 0
|
||||
else
|
||||
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.gender == MALE ? "him" : "her"] humming[prob(70) ? " gently." : "."]\n[user.gender == MALE ? "He" : "She"] seems to perk up slightly at the readout." ,\
|
||||
"The results of the scan pique your interest.",\
|
||||
"You hear a faint hum of electrical equipment, and someone making a thoughtful noise.")
|
||||
return 0
|
||||
if(loc != user)
|
||||
return
|
||||
scan(A, user)
|
||||
|
||||
proc/add_data(atom/A as mob|obj|turf|area)
|
||||
//I love associative lists.
|
||||
var/list/data_entry = stored["\ref [A]"]
|
||||
if(islist(data_entry)) //Yay, it was already stored!
|
||||
//Merge the fingerprints.
|
||||
var/list/data_prints = data_entry[1]
|
||||
for(var/print in A.fingerprints)
|
||||
var/merged_print = data_prints[print]
|
||||
if(!merged_print)
|
||||
data_prints[print] = A.fingerprints[print]
|
||||
else
|
||||
data_prints[print] = stringmerge(data_prints[print],A.fingerprints[print])
|
||||
/obj/item/device/detective_scanner/proc/scan(var/atom/A, var/mob/user)
|
||||
|
||||
if(!scanning)
|
||||
scanning = 1
|
||||
|
||||
user.visible_message("\The [user] scans \the [A] with \the [src], the air around [user.gender == MALE ? "him" : "her"] humming[prob(70) ? " gently." : "."]")
|
||||
user << "<span class='notice'>You scan [A]. The scanner is analysing the results...</span>"
|
||||
|
||||
|
||||
// GATHER INFORMATION
|
||||
|
||||
//Make our lists
|
||||
var/list/fingerprints = list()
|
||||
var/list/blood = list()
|
||||
var/list/fibers = list()
|
||||
var/list/reagents = list()
|
||||
|
||||
var/target_name = A.name
|
||||
|
||||
// Start gathering
|
||||
|
||||
if(ishuman(A))
|
||||
|
||||
var/mob/living/carbon/human/H = A
|
||||
if (istype(H.dna, /datum/dna) && !H.gloves)
|
||||
fingerprints += md5(H.dna.uni_identity)
|
||||
|
||||
if(H.blood_DNA && H.blood_DNA.len)
|
||||
blood = H.blood_DNA.Copy()
|
||||
else
|
||||
|
||||
if(A.fingerprints && A.fingerprints.len)
|
||||
fingerprints = A.fingerprints.Copy()
|
||||
|
||||
//Now the fibers
|
||||
var/list/fibers = data_entry[2]
|
||||
if(!fibers)
|
||||
fibers = list()
|
||||
if(A.suit_fibers && A.suit_fibers.len)
|
||||
for(var/j = 1, j <= A.suit_fibers.len, j++) //Fibers~~~
|
||||
if(!fibers.Find(A.suit_fibers[j])) //It isn't! Add!
|
||||
fibers += A.suit_fibers[j]
|
||||
var/list/blood = data_entry[3]
|
||||
if(!blood)
|
||||
blood = list()
|
||||
if(A.blood_DNA && A.blood_DNA.len)
|
||||
for(var/main_blood in A.blood_DNA)
|
||||
if(!blood[main_blood])
|
||||
blood[main_blood] = A.blood_DNA[blood]
|
||||
return 1
|
||||
var/list/sum_list[4] //Pack it back up!
|
||||
sum_list[1] = A.fingerprints ? A.fingerprints.Copy() : null
|
||||
sum_list[2] = A.suit_fibers ? A.suit_fibers.Copy() : null
|
||||
sum_list[3] = A.blood_DNA ? A.blood_DNA.Copy() : null
|
||||
sum_list[4] = "\The [A] in \the [get_area(A)]"
|
||||
stored["\ref [A]"] = sum_list
|
||||
return 0
|
||||
blood = A.blood_DNA.Copy()
|
||||
|
||||
if(A.reagents && A.reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in A.reagents.reagent_list)
|
||||
reagents[R.name] = R.volume
|
||||
|
||||
if(A.suit_fibers && A.suit_fibers.len)
|
||||
fibers = A.suit_fibers.Copy()
|
||||
|
||||
// We gathered everything. Create a fork and slowly display the results to the holder of the scanner.
|
||||
|
||||
spawn(0)
|
||||
|
||||
var/found_something = 0
|
||||
add_log("<B>[get_timestamp()] - [target_name]</B>", 0)
|
||||
|
||||
// Fingerprints
|
||||
if(fingerprints && fingerprints.len)
|
||||
sleep(30)
|
||||
add_log("<span class='info'><B>Prints:</B></span>")
|
||||
for(var/finger in fingerprints)
|
||||
add_log("[finger]")
|
||||
found_something = 1
|
||||
|
||||
// Blood
|
||||
if (blood && blood.len)
|
||||
sleep(30)
|
||||
add_log("<span class='info'><B>Blood:</B></span>")
|
||||
found_something = 1
|
||||
for(var/B in blood)
|
||||
add_log("Type: <font color='red'>[blood[B]]</font> DNA: <font color='red'>[B]</font>")
|
||||
|
||||
//Fibers
|
||||
if(fibers && fibers.len)
|
||||
sleep(30)
|
||||
add_log("<span class='info'><B>Fibers:</B></span>")
|
||||
for(var/fiber in fibers)
|
||||
add_log("[fiber]")
|
||||
found_something = 1
|
||||
|
||||
//Reagents
|
||||
if(reagents && reagents.len)
|
||||
sleep(30)
|
||||
add_log("<span class='info'><B>Reagents:</B></span>")
|
||||
for(var/R in reagents)
|
||||
add_log("Reagent: <font color='red'>[R]</font> Volume: <font color='red'>[reagents[R]]</font>")
|
||||
found_something = 1
|
||||
|
||||
// Get a new user
|
||||
var/mob/holder = null
|
||||
if(ismob(src.loc))
|
||||
holder = src.loc
|
||||
|
||||
if(!found_something)
|
||||
add_log("<I># No forensic traces found #</I>", 0) // Don't display this to the holder user
|
||||
if(holder)
|
||||
holder << "<span class='notice'>Unable to locate any fingerprints, materials, fibers, or blood on [target_name]!</span>"
|
||||
else
|
||||
if(holder)
|
||||
holder << "<span class='notice'>You finish scanning \the [target_name].</span>"
|
||||
|
||||
add_log("---------------------------------------------------------", 0)
|
||||
scanning = 0
|
||||
return
|
||||
|
||||
/obj/item/device/detective_scanner/proc/add_log(var/msg, var/broadcast = 1)
|
||||
if(scanning)
|
||||
if(broadcast && ismob(loc))
|
||||
var/mob/M = loc
|
||||
M << msg
|
||||
log += " [msg]"
|
||||
else
|
||||
CRASH("[src] \ref[src] is adding a log when it was never put in scanning mode!")
|
||||
|
||||
/obj/item/device/detective_scanner/proc/get_timestamp()
|
||||
return time2text(world.time + 432000, "hh:mm:ss")
|
||||
@@ -47,8 +47,9 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
|
||||
if(query.NextRow())
|
||||
validckey = 1
|
||||
if(!validckey)
|
||||
message_admins("<font color='red'>[key_name_admin(usr)] attempted to ban [ckey], but [ckey] has not been seen yet. Please only ban actual players.</font>",1)
|
||||
return
|
||||
if(!banned_mob || (banned_mob && !IsGuestKey(banned_mob.key)))
|
||||
message_admins("<font color='red'>[key_name_admin(usr)] attempted to ban [ckey], but [ckey] has not been seen yet. Please only ban actual players.</font>",1)
|
||||
return
|
||||
|
||||
var/a_ckey
|
||||
var/a_computerid
|
||||
@@ -286,6 +287,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
|
||||
output += "<option value='[BANTYPE_PERMA]'>PERMABAN</option>"
|
||||
output += "<option value='[BANTYPE_TEMP]'>TEMPBAN</option>"
|
||||
output += "<option value='[BANTYPE_JOB_PERMA]'>JOB PERMABAN</option>"
|
||||
output += "<option value='[BANTYPE_JOB_TEMP]'>JOB TEMPBAN</option>"
|
||||
output += "</select></td>"
|
||||
output += "<td><b>Ckey:</b> <input type='text' name='dbbanaddckey'></td></tr>"
|
||||
output += "<tr><td><b>Duration:</b> <input type='text' name='dbbaddduration'></td>"
|
||||
@@ -293,6 +295,10 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
|
||||
output += "<option value=''>--</option>"
|
||||
for(var/j in get_all_jobs())
|
||||
output += "<option value='[j]'>[j]</option>"
|
||||
for(var/j in nonhuman_positions)
|
||||
output += "<option value='[j]'>[j]</option>"
|
||||
for(var/j in list("traitor","changeling","operative","revolutionary","cultist","wizard"))
|
||||
output += "<option value='[j]'>[j]</option>"
|
||||
output += "</select></td></tr></table>"
|
||||
output += "<b>Reason:<br></b><textarea name='dbbanreason' cols='50'></textarea><br>"
|
||||
output += "<input type='submit' value='Add ban'>"
|
||||
@@ -367,6 +373,8 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
|
||||
typedesc = "<b>TEMPBAN</b><br><font size='2'>([duration] minutes [(unbanned) ? "" : "(<a href=\"byond://?src=\ref[src];dbbanedit=duration;dbbanid=[banid]\">Edit</a>))"]<br>Expires [expiration]</font>"
|
||||
if("JOB_PERMABAN")
|
||||
typedesc = "<b>JOBBAN</b><br><font size='2'>([job])"
|
||||
if("JOB_TEMPBAN")
|
||||
typedesc = "<b>TEMP JOBBAN</b><br><font size='2'>([job])<br>([duration] minutes<br>Expires [expiration]"
|
||||
|
||||
output += "<tr bgcolor='[dcolor]'>"
|
||||
output += "<td align='center'>[typedesc]</td>"
|
||||
|
||||
@@ -3,22 +3,23 @@ world/IsBanned(key,address,computer_id)
|
||||
if(ckey(key) in admin_datums)
|
||||
return ..()
|
||||
|
||||
//Guest Checking
|
||||
if(!guests_allowed && IsGuestKey(key))
|
||||
log_access("Failed Login: [key] - Guests not allowed")
|
||||
message_admins("\blue Failed Login: [key] - Guests not allowed")
|
||||
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
|
||||
|
||||
//check if the IP address is a known TOR node
|
||||
if(config && config.ToRban && ToRban_isbanned(address))
|
||||
log_access("Failed Login: [src] - Banned: ToR")
|
||||
message_admins("\blue Failed Login: [src] - Banned: ToR")
|
||||
//ban their computer_id and ckey for posterity
|
||||
AddBan(ckey(key), computer_id, "Use of ToR", "Automated Ban", 0, 0)
|
||||
return list("reason"="Using ToR", "desc"="\nReason: The network you are using to connect has been banned.\nIf you believe this is a mistake, please request help at [config.banappeals]")
|
||||
|
||||
|
||||
if(config.ban_legacy_system)
|
||||
|
||||
//Guest Checking
|
||||
if( !guests_allowed && IsGuestKey(key) )
|
||||
log_access("Failed Login: [key] - Guests not allowed")
|
||||
message_admins("\blue Failed Login: [key] - Guests not allowed")
|
||||
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
|
||||
|
||||
//check if the IP address is a known TOR node
|
||||
if( config && config.ToRban && ToRban_isbanned(address) )
|
||||
log_access("Failed Login: [src] - Banned: ToR")
|
||||
message_admins("\blue Failed Login: [src] - Banned: ToR")
|
||||
//ban their computer_id and ckey for posterity
|
||||
AddBan(ckey(key), computer_id, "Use of ToR", "Automated Ban", 0, 0)
|
||||
return list("reason"="Using ToR", "desc"="\nReason: The network you are using to connect has been banned.\nIf you believe this is a mistake, please request help at [config.banappeals]")
|
||||
|
||||
//Ban Checking
|
||||
. = CheckBan( ckey(key), computer_id, address )
|
||||
if(.)
|
||||
@@ -37,7 +38,20 @@ world/IsBanned(key,address,computer_id)
|
||||
diary << "Ban database connection failure. Key [ckeytext] not checked"
|
||||
return
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_Ban WHERE (ckey = '[ckeytext]' OR ip = '[address]' OR computerid = '[computer_id]') AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
var/failedcid = 1
|
||||
var/failedip = 1
|
||||
|
||||
var/ipquery = ""
|
||||
var/cidquery = ""
|
||||
if(address)
|
||||
failedip = 0
|
||||
ipquery = " OR ip = '[address]' "
|
||||
|
||||
if(computer_id)
|
||||
failedcid = 0
|
||||
cidquery = " OR computerid = '[computer_id]' "
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_Ban WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
|
||||
query.Execute()
|
||||
|
||||
@@ -60,4 +74,8 @@ world/IsBanned(key,address,computer_id)
|
||||
|
||||
return list("reason"="[bantype]", "desc"="[desc]")
|
||||
|
||||
return ..() //default pager ban stuff
|
||||
if (failedcid)
|
||||
message_admins("[key] has logged in with a blank computer id in the ban check.")
|
||||
if (failedip)
|
||||
message_admins("[key] has logged in with a blank ip in the ban check.")
|
||||
return ..() //default pager ban stuff
|
||||
|
||||
@@ -75,7 +75,8 @@ var/global/floorIsLava = 0
|
||||
|
||||
body += "<br><br>"
|
||||
body += "<A href='?src=\ref[src];jumpto=\ref[M]'><b>Jump to</b></A> | "
|
||||
body += "<A href='?src=\ref[src];getmob=\ref[M]'>Get</A>"
|
||||
body += "<A href='?src=\ref[src];getmob=\ref[M]'>Get</A> | "
|
||||
body += "<A href='?src=\ref[src];sendmob=\ref[M]'>Send To</A>"
|
||||
|
||||
body += "<br><br>"
|
||||
body += "<A href='?src=\ref[src];traitor=\ref[M]'>Traitor panel</A> | "
|
||||
@@ -107,7 +108,7 @@ var/global/floorIsLava = 0
|
||||
body += "<A href='?src=\ref[src];makeai=\ref[M]'>Make AI</A> | "
|
||||
body += "<A href='?src=\ref[src];makerobot=\ref[M]'>Make Robot</A> | "
|
||||
body += "<A href='?src=\ref[src];makealien=\ref[M]'>Make Alien</A> | "
|
||||
body += "<A href='?src=\ref[src];makemetroid=\ref[M]'>Make Metroid</A> "
|
||||
body += "<A href='?src=\ref[src];makeslime=\ref[M]'>Make slime</A> "
|
||||
|
||||
//Simple Animals
|
||||
if(isanimal(M))
|
||||
@@ -124,8 +125,8 @@ var/global/floorIsLava = 0
|
||||
body += "<A href='?src=\ref[src];simplemake=sentinel;mob=\ref[M]'>Sentinel</A>, "
|
||||
body += "<A href='?src=\ref[src];simplemake=larva;mob=\ref[M]'>Larva</A> \] "
|
||||
body += "<A href='?src=\ref[src];simplemake=human;mob=\ref[M]'>Human</A> "
|
||||
body += "\[ Metroid: <A href='?src=\ref[src];simplemake=metroid;mob=\ref[M]'>Baby</A>, "
|
||||
body += "<A href='?src=\ref[src];simplemake=adultmetroid;mob=\ref[M]'>Adult</A> \] "
|
||||
body += "\[ slime: <A href='?src=\ref[src];simplemake=slime;mob=\ref[M]'>Baby</A>, "
|
||||
body += "<A href='?src=\ref[src];simplemake=adultslime;mob=\ref[M]'>Adult</A> \] "
|
||||
body += "<A href='?src=\ref[src];simplemake=monkey;mob=\ref[M]'>Monkey</A> | "
|
||||
body += "<A href='?src=\ref[src];simplemake=robot;mob=\ref[M]'>Cyborg</A> | "
|
||||
body += "<A href='?src=\ref[src];simplemake=cat;mob=\ref[M]'>Cat</A> | "
|
||||
@@ -354,8 +355,14 @@ var/global/floorIsLava = 0
|
||||
if( isemptylist(src.admincaster_feed_channel.messages) )
|
||||
dat+="<I>No feed messages found in channel...</I><BR>"
|
||||
else
|
||||
var/i = 0
|
||||
for(var/datum/feed_message/MESSAGE in src.admincaster_feed_channel.messages)
|
||||
dat+="-[MESSAGE.body] <BR><FONT SIZE=1>\[Story by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR><BR>"
|
||||
i++
|
||||
dat+="-[MESSAGE.body] <BR>"
|
||||
if(MESSAGE.img)
|
||||
usr << browse_rsc(MESSAGE.img, "tmp_photo[i].png")
|
||||
dat+="<img src='tmp_photo[i].png' width = '180'><BR><BR>"
|
||||
dat+="<FONT SIZE=1>\[Story by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR>"
|
||||
dat+="<BR><HR><A href='?src=\ref[src];ac_refresh=1'>Refresh</A>"
|
||||
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[1]'>Back</A>"
|
||||
if(10)
|
||||
@@ -443,6 +450,12 @@ var/global/floorIsLava = 0
|
||||
dat+="<B><FONT COLOR ='maroon'>-- STATIONWIDE WANTED ISSUE --</B></FONT><BR><FONT SIZE=2>\[Submitted by: <FONT COLOR='green'>[news_network.wanted_issue.backup_author]</FONT>\]</FONT><HR>"
|
||||
dat+="<B>Criminal</B>: [news_network.wanted_issue.author]<BR>"
|
||||
dat+="<B>Description</B>: [news_network.wanted_issue.body]<BR>"
|
||||
dat+="<B>Photo:</B>: "
|
||||
if(news_network.wanted_issue.img)
|
||||
usr << browse_rsc(news_network.wanted_issue.img, "tmp_photow.png")
|
||||
dat+="<BR><img src='tmp_photow.png' width = '180'>"
|
||||
else
|
||||
dat+="None"
|
||||
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[0]'>Back</A><BR>"
|
||||
if(19)
|
||||
dat+="<FONT COLOR='green'>Wanted issue for [src.admincaster_feed_message.author] successfully edited.</FONT><BR><BR>"
|
||||
@@ -555,6 +568,7 @@ var/global/floorIsLava = 0
|
||||
<A href='?src=\ref[src];secretsfun=retardify'>Make all players retarded</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=fakeguns'>Make all items look like guns</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=schoolgirl'>Japanese Animes Mode</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=eagles'>Egalitarian Station Mode</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=moveadminshuttle'>Move Administration Shuttle</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=moveferry'>Move Ferry</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=movealienship'>Move Alien Dinghy</A><BR>
|
||||
@@ -905,7 +919,7 @@ var/global/floorIsLava = 0
|
||||
feedback_add_details("admin_verb","SA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/datum/admins/proc/show_traitor_panel(var/mob/M in sortmobs())
|
||||
/datum/admins/proc/show_traitor_panel(var/mob/M in mob_list)
|
||||
set category = "Admin"
|
||||
set desc = "Edit mobs's memory and role"
|
||||
set name = "Show Traitor Panel"
|
||||
|
||||
@@ -24,7 +24,7 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/player_panel, /*shows an interface for all players, with links to various panels (old style)*/
|
||||
/client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/
|
||||
/client/proc/invisimin, /*allows our mob to go invisible/visible*/
|
||||
/datum/admins/proc/show_traitor_panel, /*interface which shows a mob's mind*/
|
||||
// /datum/admins/proc/show_traitor_panel, /*interface which shows a mob's mind*/ -Removed due to rare practical use. Moved to debug verbs ~Errorage
|
||||
/datum/admins/proc/toggleenter, /*toggles whether people can join the current game*/
|
||||
/datum/admins/proc/toggleguests, /*toggles whether guests can join the current game*/
|
||||
/datum/admins/proc/announce, /*priority announce something to all clients.*/
|
||||
@@ -40,11 +40,12 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/cmd_admin_check_contents, /*displays the contents of an instance*/
|
||||
/datum/admins/proc/access_news_network, /*allows access of newscasters*/
|
||||
/client/proc/giveruntimelog, /*allows us to give access to runtime logs to somebody*/
|
||||
/client/proc/getruntimelog, /*allows us to access runtime logs to somebody*/
|
||||
/client/proc/getserverlog, /*allows us to fetch server logs (diary) for other days*/
|
||||
/client/proc/jumptocoord, /*we ghost and jump to a coordinate*/
|
||||
/client/proc/Getmob, /*teleports a mob to our location*/
|
||||
/client/proc/Getkey, /*teleports a mob with a certain ckey to our location*/
|
||||
/client/proc/sendmob, /*sends a mob somewhere*/
|
||||
// /client/proc/sendmob, /*sends a mob somewhere*/ -Removed due to it needing two sorting procs to work, which were executed every time an admin right-clicked. ~Errorage
|
||||
/client/proc/Jump,
|
||||
/client/proc/jumptokey, /*allows us to jump to the location of a mob with a certain ckey*/
|
||||
/client/proc/jumptomob, /*allows us to jump to a specific mob*/
|
||||
@@ -79,7 +80,8 @@ var/list/admin_verbs_fun = list(
|
||||
/client/proc/cmd_admin_add_freeform_ai_law,
|
||||
/client/proc/cmd_admin_add_random_ai_law,
|
||||
/client/proc/make_sound,
|
||||
/client/proc/toggle_random_events
|
||||
/client/proc/toggle_random_events,
|
||||
/client/proc/set_ooc
|
||||
)
|
||||
var/list/admin_verbs_spawn = list(
|
||||
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
|
||||
@@ -130,12 +132,12 @@ var/list/admin_verbs_permissions = list(
|
||||
/client/proc/edit_admin_permissions
|
||||
)
|
||||
var/list/admin_verbs_rejuv = list(
|
||||
/client/proc/cmd_admin_rejuvenate,
|
||||
/client/proc/respawn_character
|
||||
)
|
||||
|
||||
//verbs which can be hidden - needs work
|
||||
var/list/admin_verbs_hideable = list(
|
||||
/client/proc/set_ooc,
|
||||
/client/proc/deadmin_self,
|
||||
/client/proc/deadchat,
|
||||
/client/proc/toggleprayers,
|
||||
@@ -152,8 +154,6 @@ var/list/admin_verbs_hideable = list(
|
||||
/client/proc/cmd_admin_subtle_message,
|
||||
/client/proc/cmd_admin_check_contents,
|
||||
/datum/admins/proc/access_news_network,
|
||||
/client/proc/giveruntimelog,
|
||||
/client/proc/getserverlog,
|
||||
/client/proc/admin_call_shuttle,
|
||||
/client/proc/admin_cancel_shuttle,
|
||||
/client/proc/cmd_admin_direct_narrate,
|
||||
|
||||
@@ -16,15 +16,16 @@ var/jobban_keylist[0] //to store the keys & ranks
|
||||
//returns a reason if M is banned from rank, returns 0 otherwise
|
||||
/proc/jobban_isbanned(mob/M, rank)
|
||||
if(M && rank)
|
||||
/*
|
||||
if(_jobban_isbanned(M, rank)) return "Reason Unspecified" //for old jobban
|
||||
if (guest_jobbans(rank))
|
||||
if(config.guest_jobban && IsGuestKey(M.key))
|
||||
return "Guest Job-ban"
|
||||
if(config.usewhitelist && !check_whitelist(M))
|
||||
return "Whitelisted Job"
|
||||
|
||||
*/
|
||||
for (var/s in jobban_keylist)
|
||||
if( findtext(s,"[M.ckey] - [rank]") )
|
||||
if( findtext(s,"[M.ckey] - [rank]") == 1 )
|
||||
var/startpos = findtext(s, "## ")+3
|
||||
if(startpos && startpos<length(s))
|
||||
var/text = copytext(s, startpos, 0)
|
||||
@@ -65,6 +66,7 @@ DEBUG
|
||||
jobban_loadbanfile()
|
||||
return
|
||||
|
||||
//Job permabans
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, job FROM erro_ban WHERE bantype = 'JOB_PERMABAN' AND isnull(unbanned)")
|
||||
query.Execute()
|
||||
|
||||
@@ -74,6 +76,16 @@ DEBUG
|
||||
|
||||
jobban_keylist.Add("[ckey] - [job]")
|
||||
|
||||
//Job tempbans
|
||||
var/DBQuery/query1 = dbcon.NewQuery("SELECT ckey, job FROM erro_ban WHERE bantype = 'JOB_TEMPBAN' AND isnull(unbanned) AND expiration_time > Now()")
|
||||
query1.Execute()
|
||||
|
||||
while(query1.NextRow())
|
||||
var/ckey = query1.item[1]
|
||||
var/job = query1.item[2]
|
||||
|
||||
jobban_keylist.Add("[ckey] - [job]")
|
||||
|
||||
/proc/jobban_savebanfile()
|
||||
var/savefile/S=new("data/job_full.ban")
|
||||
S["keys[0]"] << jobban_keylist
|
||||
|
||||
@@ -229,8 +229,8 @@
|
||||
if(iscarbon(M)) //Carbon stuff
|
||||
if(ishuman(M))
|
||||
M_job = M.job
|
||||
else if(ismetroid(M))
|
||||
M_job = "Metroid"
|
||||
else if(isslime(M))
|
||||
M_job = "slime"
|
||||
else if(ismonkey(M))
|
||||
M_job = "Monkey"
|
||||
else if(isalien(M)) //aliens
|
||||
|
||||
+89
-36
@@ -89,6 +89,10 @@
|
||||
usr << "Not enough parameters (Requires ckey, reason and job)"
|
||||
return
|
||||
banduration = null
|
||||
if(BANTYPE_JOB_TEMP)
|
||||
if(!banckey || !banreason || !banjob || !banduration)
|
||||
usr << "Not enough parameters (Requires ckey, reason and job)"
|
||||
return
|
||||
|
||||
var/mob/playermob
|
||||
|
||||
@@ -144,26 +148,32 @@
|
||||
new_rank = input("Please select a rank", "New rank", null, null) as null|anything in list("Game Master","Game Admin", "Trial Admin", "Admin Observer","*New Rank*")
|
||||
|
||||
var/rights = 0
|
||||
if(D)
|
||||
rights = D.rights
|
||||
switch(new_rank)
|
||||
if(null,"") return
|
||||
if("*New Rank*")
|
||||
new_rank = ckeyEx(input("Please input a new rank", "New custom rank", null, null) as null|text)
|
||||
new_rank = input("Please input a new rank", "New custom rank", null, null) as null|text
|
||||
if(config.admin_legacy_system)
|
||||
new_rank = ckeyEx(new_rank)
|
||||
if(!new_rank)
|
||||
usr << "<font color='red'>Error: Topic 'editrights': Invalid rank</font>"
|
||||
return
|
||||
if(admin_ranks.len)
|
||||
if(new_rank in admin_ranks)
|
||||
rights |= admin_ranks[new_rank] //we typed a rank which already exists, use its rights
|
||||
else
|
||||
admin_ranks[new_rank] = 0 //add the new rank to admin_ranks
|
||||
if(config.admin_legacy_system)
|
||||
if(admin_ranks.len)
|
||||
if(new_rank in admin_ranks)
|
||||
rights = admin_ranks[new_rank] //we typed a rank which already exists, use its rights
|
||||
else
|
||||
admin_ranks[new_rank] = 0 //add the new rank to admin_ranks
|
||||
else
|
||||
new_rank = ckeyEx(new_rank)
|
||||
rights |= admin_ranks[new_rank] //we input an existing rank, use its rights
|
||||
if(config.admin_legacy_system)
|
||||
new_rank = ckeyEx(new_rank)
|
||||
rights = admin_ranks[new_rank] //we input an existing rank, use its rights
|
||||
|
||||
if(D)
|
||||
D.disassociate() //remove adminverbs and unlink from client
|
||||
D.rank = new_rank //update the rank
|
||||
D.rights = rights //update the rights based on admin_ranks (default: 0)
|
||||
D.disassociate() //remove adminverbs and unlink from client
|
||||
D.rank = new_rank //update the rank
|
||||
D.rights = rights //update the rights based on admin_ranks (default: 0)
|
||||
else
|
||||
D = new /datum/admins(new_rank, rights, adm_ckey)
|
||||
|
||||
@@ -262,8 +272,8 @@
|
||||
if("sentinel") M.change_mob_type( /mob/living/carbon/alien/humanoid/sentinel , null, null, delmob )
|
||||
if("larva") M.change_mob_type( /mob/living/carbon/alien/larva , null, null, delmob )
|
||||
if("human") M.change_mob_type( /mob/living/carbon/human , null, null, delmob )
|
||||
if("metroid") M.change_mob_type( /mob/living/carbon/metroid , null, null, delmob )
|
||||
if("adultmetroid") M.change_mob_type( /mob/living/carbon/metroid/adult , null, null, delmob )
|
||||
if("slime") M.change_mob_type( /mob/living/carbon/slime , null, null, delmob )
|
||||
if("adultslime") M.change_mob_type( /mob/living/carbon/slime/adult , null, null, delmob )
|
||||
if("monkey") M.change_mob_type( /mob/living/carbon/monkey , null, null, delmob )
|
||||
if("robot") M.change_mob_type( /mob/living/silicon/robot , null, null, delmob )
|
||||
if("cat") M.change_mob_type( /mob/living/simple_animal/cat , null, null, delmob )
|
||||
@@ -671,25 +681,59 @@
|
||||
|
||||
//Banning comes first
|
||||
if(notbannedlist.len) //at least 1 unbanned job exists in joblist so we have stuff to ban.
|
||||
var/reason = input(usr,"Reason?","Please State Reason","") as text|null
|
||||
if(reason)
|
||||
var/msg
|
||||
for(var/job in notbannedlist)
|
||||
ban_unban_log_save("[key_name(usr)] jobbanned [key_name(M)] from [job]. reason: [reason]")
|
||||
log_admin("[key_name(usr)] banned [key_name(M)] from [job]")
|
||||
feedback_inc("ban_job",1)
|
||||
DB_ban_record(BANTYPE_JOB_PERMA, M, -1, reason, job)
|
||||
feedback_add_details("ban_job","- [job]")
|
||||
jobban_fullban(M, job, "[reason]; By [usr.ckey] on [time2text(world.realtime)]")
|
||||
if(!msg) msg = job
|
||||
else msg += ", [job]"
|
||||
notes_add(M.ckey, "Banned from [msg] - [reason]")
|
||||
message_admins("\blue [key_name_admin(usr)] banned [key_name_admin(M)] from [msg]", 1)
|
||||
M << "\red<BIG><B>You have been jobbanned by [usr.client.ckey] from: [msg].</B></BIG>"
|
||||
M << "\red <B>The reason is: [reason]</B>"
|
||||
M << "\red Jobban can be lifted only upon request."
|
||||
href_list["jobban2"] = 1 // lets it fall through and refresh
|
||||
return 1
|
||||
switch(alert("Temporary Ban?",,"Yes","No", "Cancel"))
|
||||
if("Yes")
|
||||
if(config.ban_legacy_system)
|
||||
usr << "\red Your server is using the legacy banning system, which does not support temporary job bans. Consider upgrading. Aborting ban."
|
||||
return
|
||||
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
|
||||
if(!mins)
|
||||
return
|
||||
var/reason = input(usr,"Reason?","Please State Reason","") as text|null
|
||||
if(!reason)
|
||||
return
|
||||
|
||||
var/msg
|
||||
for(var/job in notbannedlist)
|
||||
ban_unban_log_save("[key_name(usr)] temp-jobbanned [key_name(M)] from [job] for [mins] minutes. reason: [reason]")
|
||||
log_admin("[key_name(usr)] temp-jobbanned [key_name(M)] from [job] for [mins] minutes")
|
||||
feedback_inc("ban_job_tmp",1)
|
||||
DB_ban_record(BANTYPE_JOB_TEMP, M, mins, reason, job)
|
||||
feedback_add_details("ban_job_tmp","- [job]")
|
||||
jobban_fullban(M, job, "[reason]; By [usr.ckey] on [time2text(world.realtime)]") //Legacy banning does not support temporary jobbans.
|
||||
if(!msg)
|
||||
msg = job
|
||||
else
|
||||
msg += ", [job]"
|
||||
notes_add(M.ckey, "Banned from [msg] - [reason]")
|
||||
message_admins("\blue [key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes", 1)
|
||||
M << "\red<BIG><B>You have been jobbanned by [usr.client.ckey] from: [msg].</B></BIG>"
|
||||
M << "\red <B>The reason is: [reason]</B>"
|
||||
M << "\red This jobban will be lifted in [mins] minutes."
|
||||
href_list["jobban2"] = 1 // lets it fall through and refresh
|
||||
return 1
|
||||
if("No")
|
||||
var/reason = input(usr,"Reason?","Please State Reason","") as text|null
|
||||
if(reason)
|
||||
var/msg
|
||||
for(var/job in notbannedlist)
|
||||
ban_unban_log_save("[key_name(usr)] perma-jobbanned [key_name(M)] from [job]. reason: [reason]")
|
||||
log_admin("[key_name(usr)] perma-banned [key_name(M)] from [job]")
|
||||
feedback_inc("ban_job",1)
|
||||
DB_ban_record(BANTYPE_JOB_PERMA, M, -1, reason, job)
|
||||
feedback_add_details("ban_job","- [job]")
|
||||
jobban_fullban(M, job, "[reason]; By [usr.ckey] on [time2text(world.realtime)]")
|
||||
if(!msg) msg = job
|
||||
else msg += ", [job]"
|
||||
notes_add(M.ckey, "Banned from [msg] - [reason]")
|
||||
message_admins("\blue [key_name_admin(usr)] banned [key_name_admin(M)] from [msg]", 1)
|
||||
M << "\red<BIG><B>You have been jobbanned by [usr.client.ckey] from: [msg].</B></BIG>"
|
||||
M << "\red <B>The reason is: [reason]</B>"
|
||||
M << "\red Jobban can be lifted only upon request."
|
||||
href_list["jobban2"] = 1 // lets it fall through and refresh
|
||||
return 1
|
||||
if("Cancel")
|
||||
return
|
||||
|
||||
//Unbanning joblist
|
||||
//all jobs in joblist are banned already OR we didn't give a reason (implying they shouldn't be banned)
|
||||
@@ -1137,15 +1181,15 @@
|
||||
|
||||
usr.client.cmd_admin_alienize(H)
|
||||
|
||||
else if(href_list["makemetroid"])
|
||||
else if(href_list["makeslime"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makemetroid"])
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeslime"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_metroidize(H)
|
||||
usr.client.cmd_admin_slimeize(H)
|
||||
|
||||
else if(href_list["makerobot"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
@@ -2033,7 +2077,7 @@
|
||||
if(F.z == 1)
|
||||
F.name = initial(F.name)
|
||||
F.desc = initial(F.desc)
|
||||
F.overlays = null
|
||||
F.overlays.Cut()
|
||||
F.lava = 0
|
||||
F.update_icon()
|
||||
floorIsLava = 0
|
||||
@@ -2078,6 +2122,15 @@
|
||||
W.color = "schoolgirl"
|
||||
message_admins("[key_name_admin(usr)] activated Japanese Animes mode")
|
||||
world << sound('sound/AI/animes.ogg')
|
||||
if("eagles")//SCRAW
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","EgL")
|
||||
for(var/obj/machinery/door/airlock/W in world)
|
||||
if(W.z == 1 && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
|
||||
W.req_access = list()
|
||||
message_admins("[key_name_admin(usr)] activated Egalitarian Station mode")
|
||||
command_alert("Centcomm airlock control override activated. Please take this time to get acquainted with your coworkers.")
|
||||
world << sound('sound/AI/commandreport.ogg')
|
||||
if("dorf")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","DF")
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
keys += M.client
|
||||
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
|
||||
if(!selection)
|
||||
src << "No keys found."
|
||||
return
|
||||
var/mob/M = selection:mob
|
||||
log_admin("[key_name(usr)] jumped to [key_name(M)]")
|
||||
@@ -95,7 +96,7 @@
|
||||
else
|
||||
alert("Admin jumping disabled")
|
||||
|
||||
/client/proc/Getmob(var/mob/M in sortmobs())
|
||||
/client/proc/Getmob(var/mob/M in mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Get Mob"
|
||||
set desc = "Mob to teleport"
|
||||
@@ -138,17 +139,19 @@
|
||||
else
|
||||
alert("Admin jumping disabled")
|
||||
|
||||
/client/proc/sendmob(var/mob/M in sortmobs(), var/area/A in return_sorted_areas())
|
||||
/client/proc/sendmob(var/mob/M in sortmobs())
|
||||
set category = "Admin"
|
||||
set name = "Send Mob"
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
if(config.allow_admin_jump)
|
||||
M.loc = pick(get_area_turfs(A))
|
||||
feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
var/area/A = input(usr, "Pick an area.", "Pick an area") in return_sorted_areas()
|
||||
if(A)
|
||||
if(config.allow_admin_jump)
|
||||
M.loc = pick(get_area_turfs(A))
|
||||
feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
log_admin("[key_name(usr)] teleported [key_name(M)] to [A]")
|
||||
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)] to [A]", 1)
|
||||
else
|
||||
alert("Admin jumping disabled")
|
||||
log_admin("[key_name(usr)] teleported [key_name(M)] to [A]")
|
||||
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)] to [A]", 1)
|
||||
else
|
||||
alert("Admin jumping disabled")
|
||||
@@ -230,20 +230,20 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
/client/proc/cmd_admin_metroidize(var/mob/M in mob_list)
|
||||
/client/proc/cmd_admin_slimeize(var/mob/M in mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Make Metroid"
|
||||
set name = "Make slime"
|
||||
|
||||
if(!ticker)
|
||||
alert("Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
log_admin("[key_name(src)] has metroidized [M.key].")
|
||||
log_admin("[key_name(src)] has slimeized [M.key].")
|
||||
spawn(10)
|
||||
M:Metroidize()
|
||||
M:slimeize()
|
||||
feedback_add_details("admin_verb","MKMET") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] made [key_name(M)] into a metroid.")
|
||||
message_admins("\blue [key_name_admin(usr)] made [key_name(M)] into a metroid.", 1)
|
||||
log_admin("[key_name(usr)] made [key_name(M)] into a slime.")
|
||||
message_admins("\blue [key_name_admin(usr)] made [key_name(M)] into a slime.", 1)
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
@@ -709,7 +709,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword(M), slot_l_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/cloaking_device(M), slot_r_store)
|
||||
|
||||
var/obj/item/weapon/secstorage/sbriefcase/sec_briefcase = new(M)
|
||||
var/obj/item/weapon/storage/secure/briefcase/sec_briefcase = new(M)
|
||||
for(var/obj/item/briefcase_item in sec_briefcase)
|
||||
del(briefcase_item)
|
||||
for(var/i=3, i>0, i--)
|
||||
@@ -880,7 +880,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
for(var/obj/machinery/emitter/E in world)
|
||||
for(var/obj/machinery/power/emitter/E in world)
|
||||
if(E.anchored)
|
||||
E.active = 1
|
||||
|
||||
|
||||
@@ -182,4 +182,26 @@
|
||||
else
|
||||
usr << "Local airgroup is unsimulated!"
|
||||
feedback_add_details("admin_verb","KLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
*/
|
||||
|
||||
/client/proc/print_jobban_old()
|
||||
set name = "Print Jobban Log"
|
||||
set desc = "This spams all the active jobban entries for the current round to standard output."
|
||||
set category = "Debug"
|
||||
|
||||
usr << "<b>Jobbans active in this round.</b>"
|
||||
for(var/t in jobban_keylist)
|
||||
usr << "[t]"
|
||||
|
||||
/client/proc/print_jobban_old_filter()
|
||||
set name = "Search Jobban Log"
|
||||
set desc = "This searches all the active jobban entries for the current round and outputs the results to standard output."
|
||||
set category = "Debug"
|
||||
|
||||
var/filter = input("Contains what?","Filter") as text|null
|
||||
if(!filter)
|
||||
return
|
||||
|
||||
usr << "<b>Jobbans active in this round.</b>"
|
||||
for(var/t in jobban_keylist)
|
||||
if(findtext(t, filter))
|
||||
usr << "[t]"
|
||||
|
||||
@@ -13,14 +13,6 @@
|
||||
codebase for the entire /TG/station commuity a TONNE easier :3 Thanks for your help!
|
||||
*/
|
||||
|
||||
#define FTPDELAY 600 //600 tick delay to discourage spam
|
||||
/*
|
||||
These procs have failsafes built in to prevent spamming of file requests. As such it can only be used once every
|
||||
[FTPDELAY] ticks. This can be changed by modifying FTPDELAY's value above.
|
||||
|
||||
PLEASE USE RESPONSIBLY, only download from the server if the log isn't already available elsewhere!
|
||||
Bandwidth is expensive and lags are lame. Some log files canr each sizes of 4MB!
|
||||
*/
|
||||
|
||||
//This proc allows Game Masters to grant a client access to the .getruntimelog verb
|
||||
//Permissions expire at the end of each round.
|
||||
@@ -32,11 +24,12 @@
|
||||
set category = null
|
||||
|
||||
if( !src.holder )
|
||||
src << "<font color='red'>Only Game Masters may use this command.</font>"
|
||||
if(!src.holder)
|
||||
src << "<font color='red'>Only Admins may use this command.</font>"
|
||||
return
|
||||
|
||||
var/client/target = input(src,"Choose somebody to grant access to the server's runtime logs (permissions expire at the end of each round):","Grant Permissions",null) as null|anything in clients
|
||||
if( !target || !istype(target,/client) )
|
||||
if(!istype(target,/client))
|
||||
src << "<font color='red'>Error: giveruntimelog(): Client not found.</font>"
|
||||
return
|
||||
|
||||
@@ -44,6 +37,7 @@
|
||||
target << "<font color='red'>You have been granted access to runtime logs. Please use them responsibly or risk being banned.</font>"
|
||||
return
|
||||
|
||||
|
||||
//This proc allows download of runtime logs saved within the data/logs/ folder by dreamdeamon.
|
||||
//It works similarly to show-server-log.
|
||||
/client/proc/getruntimelog()
|
||||
@@ -51,57 +45,36 @@
|
||||
set desc = "Retrieve any session logfiles saved by dreamdeamon."
|
||||
set category = null
|
||||
|
||||
var/time_to_wait = fileaccess_timer - world.time
|
||||
if(time_to_wait > 0)
|
||||
src << "<font color='red'>Error: getruntimelog(): spam prevention. Please wait [round(time_to_wait/10)] seconds.</font>"
|
||||
return
|
||||
fileaccess_timer = world.time + FTPDELAY
|
||||
|
||||
var/path = "data/logs/runtime/"
|
||||
|
||||
var/list/path_list = flist(path)
|
||||
var/choice = input(src,"Choose a runtime-log to download:","Download",null) as null|anything in path_list
|
||||
if(!choice) return
|
||||
|
||||
path += "[choice]"
|
||||
if(!fexists(path))
|
||||
src << "<font color='red'>Error: getruntimelog(): Files not found/Invalid file([path]).</font>"
|
||||
var/path = browse_files("data/logs/runtime/")
|
||||
if(!path)
|
||||
return
|
||||
|
||||
message_admins("[src] accessed runtime log: [path]")
|
||||
if(file_spam_check())
|
||||
return
|
||||
|
||||
message_admins("[key_name_admin(src)] accessed file: [path]")
|
||||
src << run( file(path) )
|
||||
src << "Attempting to send file, this may take a fair few minutes if the file is very large."
|
||||
return
|
||||
|
||||
|
||||
//This proc allows download of past server logs saved within the data/logs/ folder.
|
||||
//It works similarly to show-server-log.
|
||||
/client/proc/getserverlog()
|
||||
set name = ".getserverlog"
|
||||
set desc = "Like 'Show Server Log' but it fetches old logs if there are any."
|
||||
set desc = "Fetch logfiles from data/logs"
|
||||
set category = null
|
||||
|
||||
var/time_to_wait = fileaccess_timer - world.time
|
||||
if(time_to_wait > 0)
|
||||
src << "<font color='red'>Error: getserverlog(): spam prevention. Please wait [round(time_to_wait/10)] seconds.</font>"
|
||||
var/path = browse_files("data/logs/")
|
||||
if(!path)
|
||||
return
|
||||
fileaccess_timer = world.time + FTPDELAY
|
||||
|
||||
var/path = "data/logs/"
|
||||
for(var/i=0, i<4, i++) //only bother searching up to 4 sub-directories. If we don't find it by then: give up.
|
||||
var/list/path_list = flist(path)
|
||||
if(path_list.len) path_list -= "runtime/"
|
||||
else break
|
||||
if(file_spam_check())
|
||||
return
|
||||
|
||||
var/choice = input(src,"Choose a directory to access:","Download",null) as null|anything in path_list
|
||||
if(!choice) return
|
||||
|
||||
path += "[choice]"
|
||||
|
||||
if( text2ascii(choice,length(choice)) != 47 ) //not a directory, finish up
|
||||
if(!fexists(path))
|
||||
src << "<font color='red'>Error: getserverlog(): File not found/Invalid file([path]).</font>"
|
||||
return
|
||||
src << run( file(path) )
|
||||
return
|
||||
message_admins("[key_name_admin(src)] accessed file: [path]")
|
||||
src << run( file(path) )
|
||||
src << "Attempting to send file, this may take a fair few minutes if the file is very large."
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -148,6 +148,10 @@ var/intercom_range_display_status = 0
|
||||
src.verbs += /client/proc/kaboom
|
||||
src.verbs += /client/proc/splash
|
||||
src.verbs += /client/proc/cmd_admin_areatest
|
||||
src.verbs += /client/proc/cmd_admin_rejuvenate
|
||||
src.verbs += /datum/admins/proc/show_traitor_panel
|
||||
src.verbs += /client/proc/print_jobban_old
|
||||
src.verbs += /client/proc/print_jobban_old_filter
|
||||
//src.verbs += /client/proc/cmd_admin_rejuvenate
|
||||
|
||||
feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -144,7 +144,7 @@ var/global/sent_strike_team = 0
|
||||
|
||||
equip_to_slot_or_del(new /obj/item/ammo_magazine/a357(src), slot_in_backpack)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/regular(src), slot_in_backpack)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/storage/flashbang_kit(src), slot_in_backpack)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/storage/box/flashbangs(src), slot_in_backpack)
|
||||
equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_in_backpack)
|
||||
if (!leader_selected)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/plastique(src), slot_in_backpack)
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(a_left)
|
||||
overlays += "[a_left.icon_state]_left"
|
||||
for(var/O in a_left.attached_overlays)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
|
||||
update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
attached_overlays = list()
|
||||
if(on)
|
||||
overlays += "infrared_on"
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
|
||||
update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
attached_overlays = list()
|
||||
if(timing)
|
||||
overlays += "prox_timing"
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
|
||||
update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
attached_overlays = list()
|
||||
if(timing)
|
||||
overlays += "timer_timing"
|
||||
|
||||
@@ -58,10 +58,19 @@
|
||||
if(src.corpseid == 1)
|
||||
var/obj/item/weapon/card/id/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
var/datum/job/jobdatum
|
||||
for(var/jobtype in typesof(/datum/job))
|
||||
var/datum/job/J = new jobtype
|
||||
if(J.title == corpseidaccess)
|
||||
jobdatum = J
|
||||
break
|
||||
if(src.corpseidicon)
|
||||
W.icon_state = corpseidicon
|
||||
if(src.corpseidaccess)
|
||||
W.access = get_access(corpseidaccess)
|
||||
if(jobdatum)
|
||||
W.access = jobdatum.get_access()
|
||||
else
|
||||
W.access = list()
|
||||
if(corpseidjob)
|
||||
W.assignment = corpseidjob
|
||||
W.registered_name = M.real_name
|
||||
@@ -178,7 +187,7 @@
|
||||
corpseidaccess = "Scientist"
|
||||
|
||||
/obj/effect/landmark/corpse/miner
|
||||
corpseradio = /obj/item/device/radio/headset/headset_mine
|
||||
corpseradio = /obj/item/device/radio/headset/headset_cargo
|
||||
corpseuniform = /obj/item/clothing/under/rank/miner
|
||||
corpsegloves = /obj/item/clothing/gloves/black
|
||||
corpseback = /obj/item/weapon/storage/backpack/industrial
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/exile
|
||||
name = "Exile Implants"
|
||||
req_access = list(access_heads)
|
||||
req_access = list(access_hos)
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
@@ -120,6 +120,7 @@ obj/machinery/gateway/centerstation/process()
|
||||
if(!awaygate) return
|
||||
if(awaygate.calibrated)
|
||||
M.loc = get_step(awaygate.loc, SOUTH)
|
||||
M.dir = SOUTH
|
||||
return
|
||||
else
|
||||
var/obj/effect/landmark/dest = pick(awaydestinations)
|
||||
@@ -230,6 +231,6 @@ obj/machinery/gateway/centerstation/process()
|
||||
user << "\black The gate is already calibrated, there is no work for you to do here."
|
||||
return
|
||||
else
|
||||
user << "\blue <b>Recalibration successful!</b>: \black This gates systems have been fine tuned, travel to this gate will now be on target."
|
||||
user << "\blue <b>Recalibration successful!</b>: \black This gate's systems have been fine tuned. Travel to this gate will now be on target."
|
||||
calibrated = 1
|
||||
return
|
||||
@@ -357,8 +357,8 @@ datum/preferences
|
||||
|
||||
user << browse(dat, "window=preferences;size=560x580")
|
||||
|
||||
proc/SetChoices(mob/user, limit = 17, list/splitJobs = list("Chief Engineer"), width = 600, height = 550)
|
||||
if(!job_master) return
|
||||
proc/SetChoices(mob/user, limit = 17, list/splitJobs = list("Chief Engineer"), width = 550, height = 550)
|
||||
if(!job_master) return
|
||||
|
||||
//limit - The amount of jobs allowed per column. Defaults to 17 to make it look nice.
|
||||
//splitJobs - Allows you split the table by job. You can make different tables for each department by including their heads. Defaults to CE to make it look nice.
|
||||
@@ -369,7 +369,7 @@ datum/preferences
|
||||
var/HTML = "<body>"
|
||||
HTML += "<tt><center>"
|
||||
HTML += "<b>Choose occupation chances</b><br>Unavailable occupations are in red.<br><br>"
|
||||
HTML += "<a align='center' href='?_src_=prefs;preference=job;task=close'>\[Done\]</a><br><br>" // Easier to press up here.
|
||||
HTML += "<center><a href='?_src_=prefs;preference=job;task=close'>\[Done\]</a></center><br>" // Easier to press up here.
|
||||
HTML += "<table width='100%' cellpadding='1' cellspacing='0'><tr><td width='20%'>" // Table within a table for alignment, also allows you to easily add more colomns.
|
||||
HTML += "<table width='100%' cellpadding='1' cellspacing='0'>"
|
||||
var/index = -1
|
||||
@@ -431,8 +431,8 @@ datum/preferences
|
||||
|
||||
HTML += "</center></table>"
|
||||
|
||||
HTML += "<center><br><u><a href='?_src_=prefs;preference=job;task=random'><font color=[userandomjob ? "green>Get random job if preferences unavailable" : "red>Be assistant if preference unavailable"]</font></a></u></center>"
|
||||
|
||||
HTML += "<center><br><u><a href='?_src_=prefs;preference=job;task=random'><font color=[userandomjob ? "green>Get random job if preferences unavailable" : "red>Be assistant if preference unavailable"]</font></a></u></center><br>"
|
||||
HTML += "<center><a href='?_src_=prefs;preference=job;task=reset'>\[Reset\]</a></center>"
|
||||
HTML += "</tt>"
|
||||
|
||||
user << browse(null, "window=preferences")
|
||||
@@ -526,6 +526,20 @@ datum/preferences
|
||||
SetChoices(user)
|
||||
return 1
|
||||
|
||||
proc/ResetJobs()
|
||||
job_civilian_high = 0
|
||||
job_civilian_med = 0
|
||||
job_civilian_low = 0
|
||||
|
||||
job_medsci_high = 0
|
||||
job_medsci_med = 0
|
||||
job_medsci_low = 0
|
||||
|
||||
job_engsec_high = 0
|
||||
job_engsec_med = 0
|
||||
job_engsec_low = 0
|
||||
|
||||
|
||||
proc/GetJobDepartment(var/datum/job/job, var/level)
|
||||
if(!job || !level) return 0
|
||||
switch(job.department_flag)
|
||||
@@ -613,6 +627,9 @@ datum/preferences
|
||||
if("close")
|
||||
user << browse(null, "window=mob_occupation")
|
||||
ShowChoices(user)
|
||||
if("reset")
|
||||
ResetJobs()
|
||||
SetChoices(user)
|
||||
if("random")
|
||||
userandomjob = !userandomjob
|
||||
SetChoices(user)
|
||||
@@ -723,24 +740,7 @@ datum/preferences
|
||||
/*if("skin_style")
|
||||
h_style = random_skin_style(gender)*/
|
||||
if("all")
|
||||
gender = pick(MALE,FEMALE)
|
||||
real_name = random_name(gender)
|
||||
age = rand(AGE_MIN,AGE_MAX)
|
||||
underwear = rand(1,12)
|
||||
backbag = rand(1,4)
|
||||
r_hair = rand(0,255)
|
||||
g_hair = rand(0,255)
|
||||
b_hair = rand(0,255)
|
||||
r_facial = r_hair
|
||||
g_facial = g_hair
|
||||
b_facial = b_hair
|
||||
r_eyes = rand(0,255)
|
||||
g_eyes = rand(0,255)
|
||||
b_eyes = rand(0,255)
|
||||
h_style = random_hair_style(gender)
|
||||
f_style = random_facial_hair_style(gender)
|
||||
s_tone = random_skin_tone()
|
||||
|
||||
randomize_appearance_for() //no params needed
|
||||
if("input")
|
||||
switch(href_list["preference"])
|
||||
if("name")
|
||||
|
||||
@@ -55,6 +55,15 @@ BLIND // can't see anything
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/clothing/gloves/emp_act(severity)
|
||||
if(cell)
|
||||
cell.charge -= 1000 / severity
|
||||
if (cell.charge < 0)
|
||||
cell.charge = 0
|
||||
if(cell.reliability != 100 && prob(50/severity))
|
||||
cell.reliability -= 10 / severity
|
||||
..()
|
||||
|
||||
|
||||
//Head
|
||||
/obj/item/clothing/head
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/obj/item/clothing/glasses/hud
|
||||
name = "HUD"
|
||||
desc = "A heads-up display that provides important info in (almost) real time."
|
||||
@@ -54,15 +52,15 @@
|
||||
if(!D.hidden[SCANNER])
|
||||
foundVirus++
|
||||
if(!C) continue
|
||||
C.images += image(tempHud,patient,"hud[RoundHealth(patient.health)]")
|
||||
C.images += image(tempHud, patient, "hud[RoundHealth(patient.health)]")
|
||||
if(patient.stat == 2)
|
||||
C.images += image(tempHud,patient,"huddead")
|
||||
C.images += image(tempHud, patient, "huddead")
|
||||
else if(patient.status_flags & XENO_HOST)
|
||||
C.images += image(tempHud,patient,"hudxeno")
|
||||
C.images += image(tempHud, patient, "hudxeno")
|
||||
else if(foundVirus)
|
||||
C.images += image(tempHud,patient,"hudill")
|
||||
C.images += image(tempHud, patient, "hudill")
|
||||
else
|
||||
C.images += image(tempHud,patient,"hudhealthy")
|
||||
C.images += image(tempHud, patient, "hudhealthy")
|
||||
|
||||
|
||||
/obj/item/clothing/glasses/hud/security
|
||||
@@ -87,28 +85,34 @@
|
||||
if(!C) continue
|
||||
var/perpname = "wot"
|
||||
if(perp.wear_id)
|
||||
C.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobName())]")
|
||||
if(istype(perp.wear_id,/obj/item/weapon/card/id))
|
||||
perpname = perp.wear_id:registered_name
|
||||
else if(istype(perp.wear_id,/obj/item/device/pda))
|
||||
var/obj/item/device/pda/tempPda = perp.wear_id
|
||||
perpname = tempPda.owner
|
||||
var/obj/item/weapon/card/id/I = perp.wear_id.GetID()
|
||||
if(I)
|
||||
C.images += image(tempHud, perp, "hud[ckey(I.GetJobName())]")
|
||||
perpname = I.registered_name
|
||||
else
|
||||
perpname = perp.name
|
||||
C.images += image(tempHud,perp,"hudunknown")
|
||||
C.images += image(tempHud, perp, "hudunknown")
|
||||
|
||||
for (var/datum/data/record/E in data_core.general)
|
||||
if (E.fields["name"] == perpname)
|
||||
for(var/datum/data/record/E in data_core.general)
|
||||
if(E.fields["name"] == perpname)
|
||||
for (var/datum/data/record/R in data_core.security)
|
||||
if ((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
|
||||
C.images += image(tempHud,perp,"hudwanted")
|
||||
if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
|
||||
C.images += image(tempHud, perp, "hudwanted")
|
||||
break
|
||||
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated"))
|
||||
C.images += image(tempHud,perp,"hudprisoner")
|
||||
C.images += image(tempHud, perp, "hudprisoner")
|
||||
break
|
||||
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Parolled"))
|
||||
C.images += image(tempHud, perp, "hudparolled")
|
||||
break
|
||||
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Released"))
|
||||
C.images += image(tempHud, perp, "hudreleased")
|
||||
break
|
||||
for(var/obj/item/weapon/implant/I in perp)
|
||||
if(I.implanted)
|
||||
if(istype(I,/obj/item/weapon/implant/tracking))
|
||||
C.images += image(tempHud,perp,"hud_imp_tracking")
|
||||
C.images += image(tempHud, perp, "hud_imp_tracking")
|
||||
if(istype(I,/obj/item/weapon/implant/loyalty))
|
||||
C.images += image(tempHud,perp,"hud_imp_loyal")
|
||||
C.images += image(tempHud, perp, "hud_imp_loyal")
|
||||
if(istype(I,/obj/item/weapon/implant/chem))
|
||||
C.images += image(tempHud, perp, "hud_imp_chem")
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
var/obj/item/weapon/cable_coil/C = W
|
||||
if(!wired)
|
||||
if(C.amount >= 2)
|
||||
C.amount -= 2
|
||||
C.use(2)
|
||||
wired = 1
|
||||
siemens_coefficient = 1
|
||||
user << "<span class='notice'>You wrap some wires around [src].</span>"
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
/obj/item/clothing/gloves/update_icon()
|
||||
..()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(wired)
|
||||
overlays += "gloves_wire"
|
||||
if(cell)
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
desc = "It smells faintly of plasma"
|
||||
icon_state = "petehat"
|
||||
|
||||
/obj/item/clothing/head/collectable/metroid
|
||||
name = "collectable metroid cap!"
|
||||
/obj/item/clothing/head/collectable/slime
|
||||
name = "collectable slime cap!"
|
||||
desc = "It just latches right in place!"
|
||||
icon_state = "metroid"
|
||||
icon_state = "slime"
|
||||
|
||||
/obj/item/clothing/head/collectable/xenom
|
||||
name = "collectable xenomorph helmet!"
|
||||
|
||||
@@ -204,9 +204,24 @@
|
||||
item_state = "witch"
|
||||
flags = FPRINT | TABLEPASS | BLOCKHAIR
|
||||
|
||||
/obj/item/clothing/head/chicken
|
||||
name = "chicken suit head"
|
||||
desc = "Bkaw!"
|
||||
icon_state = "chickenhead"
|
||||
item_state = "chickensuit"
|
||||
flags = FPRINT | TABLEPASS | BLOCKHAIR
|
||||
|
||||
/obj/item/clothing/head/bearpelt
|
||||
name = "bear pelt hat"
|
||||
desc = "Fuzzy."
|
||||
icon_state = "bearpelt"
|
||||
item_state = "bearpelt"
|
||||
flags = FPRINT | TABLEPASS | BLOCKHAIR
|
||||
|
||||
/obj/item/clothing/head/xenos
|
||||
name = "xenos helmet"
|
||||
icon_state = "xenos"
|
||||
item_state = "xenos_helm"
|
||||
desc = "A helmet made out of chitinous alien hide."
|
||||
flags = FPRINT | TABLEPASS | BLOCKHAIR
|
||||
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
name = "welding helmet"
|
||||
desc = "A head-mounted face cover designed to protect the wearer completely from space-arc eye."
|
||||
icon_state = "welding"
|
||||
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | HEADCOVERSMOUTH
|
||||
flags = (FPRINT | TABLEPASS | HEADCOVERSEYES | HEADCOVERSMOUTH)
|
||||
item_state = "welding"
|
||||
m_amt = 3000
|
||||
g_amt = 1000
|
||||
var/up = 0
|
||||
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
|
||||
flags_inv = (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
|
||||
icon_action_button = "action_welding"
|
||||
|
||||
/obj/item/clothing/head/welding/attack_self()
|
||||
@@ -36,13 +36,13 @@
|
||||
if(usr.canmove && !usr.stat && !usr.restrained())
|
||||
if(src.up)
|
||||
src.up = !src.up
|
||||
src.flags |= HEADCOVERSEYES | HEADCOVERSMOUTH
|
||||
flags_inv |= HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
|
||||
src.flags |= (HEADCOVERSEYES | HEADCOVERSMOUTH)
|
||||
flags_inv |= (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
|
||||
icon_state = initial(icon_state)
|
||||
usr << "You flip the [src] down to protect your eyes."
|
||||
else
|
||||
src.up = !src.up
|
||||
src.flags &= ~HEADCOVERSEYES | HEADCOVERSMOUTH
|
||||
src.flags &= ~(HEADCOVERSEYES | HEADCOVERSMOUTH)
|
||||
flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
|
||||
icon_state = "[initial(icon_state)]up"
|
||||
usr << "You push the [src] up out of your face."
|
||||
|
||||
@@ -34,4 +34,5 @@
|
||||
desc = "A close-fitting sterile mask that can be connected to an air supply."
|
||||
name = "medical mask"
|
||||
icon_state = "medical"
|
||||
item_state = "medical"
|
||||
item_state = "medical"
|
||||
permeability_coefficient = 0.01
|
||||
|
||||
@@ -80,4 +80,9 @@
|
||||
/obj/item/clothing/mask/gas/cyborg
|
||||
name = "cyborg visor"
|
||||
desc = "Beep boop"
|
||||
icon_state = "death"
|
||||
icon_state = "death"
|
||||
|
||||
/obj/item/clothing/mask/gas/owl_mask
|
||||
name = "owl mask"
|
||||
desc = "Twoooo!"
|
||||
icon_state = "owl"
|
||||
@@ -24,7 +24,7 @@
|
||||
w_class = 1
|
||||
flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH
|
||||
gas_transfer_coefficient = 0.90
|
||||
permeability_coefficient = 0.05
|
||||
permeability_coefficient = 0.01
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 25, rad = 0)
|
||||
|
||||
/obj/item/clothing/mask/fakemoustache
|
||||
@@ -34,11 +34,6 @@
|
||||
flags = FPRINT|TABLEPASS
|
||||
flags_inv = HIDEFACE
|
||||
|
||||
/obj/item/clothing/mask/owl_mask
|
||||
name = "owl mask"
|
||||
desc = "Twoooo!"
|
||||
icon_state = "owl"
|
||||
|
||||
//scarves (fit in in mask slot)
|
||||
|
||||
/obj/item/clothing/mask/bluescarf
|
||||
@@ -85,3 +80,4 @@
|
||||
flags = FPRINT|TABLEPASS|BLOCKHAIR
|
||||
flags_inv = HIDEFACE
|
||||
w_class = 2
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
/obj/item/clothing/shoes/white
|
||||
name = "white shoes"
|
||||
icon_state = "white"
|
||||
permeability_coefficient = 0.25
|
||||
permeability_coefficient = 0.01
|
||||
color = "white"
|
||||
|
||||
/obj/item/clothing/shoes/rainbow
|
||||
|
||||
@@ -4,48 +4,35 @@
|
||||
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding."
|
||||
icon_state = "rig0-engineering"
|
||||
item_state = "eng_helm"
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 100)
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 60)
|
||||
allowed = list(/obj/item/device/flashlight)
|
||||
brightness_on = 4 //luminosity when on
|
||||
light_on = 0
|
||||
var/brightness_on = 4 //luminosity when on
|
||||
var/on = 0
|
||||
color = "engineering" //Determines used sprites: rig[on]-[color] and rig[on]-[color]2 (lying down sprite)
|
||||
icon_action_button = "action_hardhat"
|
||||
heat_protection = HEAD
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECITON_TEMPERATURE
|
||||
|
||||
attack_self(mob/user)
|
||||
if(!isturf(user.loc))
|
||||
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
|
||||
return
|
||||
light_on = !light_on
|
||||
icon_state = "rig[light_on]-[color]"
|
||||
on = !on
|
||||
icon_state = "rig[on]-[color]"
|
||||
// item_state = "rig[on]-[color]"
|
||||
|
||||
if((light_on) && (user.luminosity < brightness_on))
|
||||
user.SetLuminosity(brightness_on)
|
||||
else
|
||||
user.SetLuminosity(search_light(user, src))
|
||||
if(on) user.SetLuminosity(user.luminosity + brightness_on)
|
||||
else user.SetLuminosity(user.luminosity - brightness_on)
|
||||
|
||||
pickup(mob/user)
|
||||
if(light_on)
|
||||
if (user.luminosity < brightness_on)
|
||||
user.SetLuminosity(brightness_on)
|
||||
// user.UpdateLuminosity() //TODO: Carn
|
||||
if(on)
|
||||
user.SetLuminosity(user.luminosity + brightness_on)
|
||||
// user.UpdateLuminosity()
|
||||
SetLuminosity(0)
|
||||
|
||||
dropped(mob/user)
|
||||
if(light_on)
|
||||
if ((layer <= 3) || (loc != user.loc))
|
||||
user.SetLuminosity(search_light(user, src))
|
||||
SetLuminosity(brightness_on)
|
||||
// user.UpdateLuminosity()
|
||||
|
||||
equipped(mob/user, slot)
|
||||
if(light_on)
|
||||
if (user.luminosity < brightness_on)
|
||||
user.SetLuminosity(brightness_on)
|
||||
// user.UpdateLuminosity() //TODO: Carn
|
||||
SetLuminosity(0)
|
||||
if(on)
|
||||
user.SetLuminosity(user.luminosity - brightness_on)
|
||||
// user.UpdateLuminosity()
|
||||
SetLuminosity(brightness_on)
|
||||
|
||||
/obj/item/clothing/suit/space/rig
|
||||
name = "engineering hardsuit"
|
||||
@@ -53,10 +40,8 @@
|
||||
icon_state = "rig-engineering"
|
||||
item_state = "eng_hardsuit"
|
||||
slowdown = 2
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 100)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/satchel,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECITON_TEMPERATURE
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 60)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
|
||||
|
||||
|
||||
//Chief Engineer's rig
|
||||
@@ -102,22 +87,6 @@
|
||||
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 60)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
|
||||
|
||||
//Security rig
|
||||
/obj/item/clothing/head/helmet/space/rig/security
|
||||
name = "security hardsuit helmet"
|
||||
icon_state = "rig0-security"
|
||||
color = "security"
|
||||
armor = list(melee = 60, bullet = 10, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10)
|
||||
|
||||
/obj/item/clothing/suit/space/rig/security
|
||||
name = "security hardsuit"
|
||||
desc = "A suit specially designed for security to offer minor protection from environmental hazards, and greater protection from human hazards"
|
||||
icon_state = "rig-security"
|
||||
item_state = "rig-security"
|
||||
slowdown = 1
|
||||
armor = list(melee = 60, bullet = 10, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10)
|
||||
allowed = list(/obj/item/weapon/gun/energy/laser, /obj/item/weapon/gun/energy/pulse_rifle, /obj/item/device/flashlight, /obj/item/weapon/tank/emergency_oxygen, /obj/item/weapon/gun/energy/taser, /obj/item/weapon/melee/baton)
|
||||
|
||||
//Wizard Rig
|
||||
/obj/item/clothing/head/helmet/space/rig/wizard
|
||||
name = "gem-encrusted hardsuit helmet"
|
||||
@@ -136,30 +105,9 @@
|
||||
unacidable = 1
|
||||
armor = list(melee = 40, bullet = 20, laser = 20,energy = 20, bomb = 35, bio = 100, rad = 60)
|
||||
allowed = list(/obj/item/weapon/teleportation_scroll,/obj/item/weapon/tank/emergency_oxygen)
|
||||
//Atmos Rig
|
||||
/obj/item/clothing/head/helmet/space/rig/atmos
|
||||
name = "atmospherics pressure suit helmet"
|
||||
icon_state = "rig0-atmos"
|
||||
item_state = "atmos_helm"
|
||||
color = "atmos"
|
||||
flags = STOPSPRESSUREDMAGE
|
||||
armor = list(melee = 40, bullet = 0, laser = 0, energy = 0, bomb = 25, bio = 100, rad = 0)
|
||||
gas_transfer_coefficient = 0
|
||||
permeability_coefficient = 0
|
||||
heat_protection = HEAD
|
||||
max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECITON_TEMPERATURE
|
||||
|
||||
/obj/item/clothing/suit/space/rig/atmos
|
||||
icon_state = "rig-atmos"
|
||||
name = "atmospherics pressure suit"
|
||||
item_state = "atmos_hardsuit"
|
||||
flags = STOPSPRESSUREDMAGE
|
||||
armor = list(melee = 40, bullet = 0, laser = 0, energy = 0, bomb = 25, bio = 100, rad = 0)
|
||||
gas_transfer_coefficient = 0
|
||||
permeability_coefficient = 0
|
||||
slowdown = 1.0
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECITON_TEMPERATURE
|
||||
|
||||
|
||||
//Medical Rig
|
||||
/obj/item/clothing/head/helmet/space/rig/medical
|
||||
name = "medical hardsuit helmet"
|
||||
@@ -171,4 +119,4 @@
|
||||
icon_state = "rig-medical"
|
||||
name = "medical hardsuit"
|
||||
item_state = "medical_hardsuit"
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical)
|
||||
@@ -66,7 +66,7 @@
|
||||
item_state = "det_suit"
|
||||
blood_overlay_type = "coat"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/cigpacket,/obj/item/weapon/lighter,/obj/item/device/detective_scanner,/obj/item/device/taperecorder)
|
||||
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter,/obj/item/device/detective_scanner,/obj/item/device/taperecorder)
|
||||
armor = list(melee = 50, bullet = 10, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0)
|
||||
|
||||
//Forensics
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
item_state = "judge"
|
||||
flags = FPRINT | TABLEPASS
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
allowed = list(/obj/item/weapon/cigpacket,/obj/item/weapon/spacecash)
|
||||
allowed = list(/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/spacecash)
|
||||
flags_inv = HIDEJUMPSUIT
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
desc = "A suit made long ago by the ancient empire KFC."
|
||||
icon_state = "chickensuit"
|
||||
item_state = "chickensuit"
|
||||
body_parts_covered = UPPER_TORSO|ARMS|LOWER_TORSO|LEGS|FEET|HEAD
|
||||
body_parts_covered = UPPER_TORSO|ARMS|LOWER_TORSO|LEGS|FEET
|
||||
flags_inv = HIDESHOES|HIDEJUMPSUIT
|
||||
|
||||
|
||||
@@ -286,4 +286,11 @@
|
||||
name = "green skimpy dress"
|
||||
desc = "A rather skimpy green dress."
|
||||
icon_state = "stripper_g_over"
|
||||
item_state = "stripper_g"
|
||||
item_state = "stripper_g"
|
||||
/obj/item/clothing/suit/xenos
|
||||
name = "xenos suit"
|
||||
desc = "A suit made out of chitinous alien hide."
|
||||
icon_state = "xenos"
|
||||
item_state = "xenos_helm"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS|HANDS
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
|
||||
|
||||
@@ -86,13 +86,12 @@
|
||||
item_state = "dermal"
|
||||
|
||||
//Jensen cosplay gear
|
||||
/obj/item/clothing/under/jensen
|
||||
/obj/item/clothing/under/rank/head_of_security/jensen
|
||||
desc = "You never asked for anything that stylish."
|
||||
name = "head of security's jumpsuit"
|
||||
icon_state = "jensen"
|
||||
item_state = "jensen"
|
||||
color = "jensen"
|
||||
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
|
||||
/obj/item/clothing/suit/armor/hos/jensen
|
||||
name = "armored trenchcoat"
|
||||
|
||||
@@ -130,4 +130,41 @@
|
||||
|
||||
/obj/item/clothing/tie/medal/gold/heroism
|
||||
name = "medal of exceptional heroism"
|
||||
desc = "An extremely rare golden medal awarded only by CentComm. To recieve such a medal is the highest honor and as such, very few exist. This medal is almost never awarded to anybody but commanders."
|
||||
desc = "An extremely rare golden medal awarded only by CentComm. To recieve such a medal is the highest honor and as such, very few exist. This medal is almost never awarded to anybody but commanders."
|
||||
|
||||
//Armbands
|
||||
/obj/item/clothing/tie/armband
|
||||
name = "red armband"
|
||||
desc = "An fancy red armband!"
|
||||
icon_state = "red"
|
||||
color = "red"
|
||||
|
||||
/obj/item/clothing/tie/armband/cargo
|
||||
name = "cargo bay guard armband"
|
||||
desc = "An armband, worn by the station's security forces to display which department they're assigned to. This one is brown."
|
||||
icon_state = "cargo"
|
||||
color = "cargo"
|
||||
|
||||
/obj/item/clothing/tie/armband/engine
|
||||
name = "engineering guard armband"
|
||||
desc = "An armband, worn by the station's security forces to display which department they're assigned to. This one is orange with a reflective strip!"
|
||||
icon_state = "engie"
|
||||
color = "engie"
|
||||
|
||||
/obj/item/clothing/tie/armband/science
|
||||
name = "science guard armband"
|
||||
desc = "An armband, worn by the station's security forces to display which department they're assigned to. This one is purple."
|
||||
icon_state = "rnd"
|
||||
color = "rnd"
|
||||
|
||||
/obj/item/clothing/tie/armband/hydro
|
||||
name = "hydroponics guard armband"
|
||||
desc = "An armband, worn by the station's security forces to display which department they're assigned to. This one is green and blue."
|
||||
icon_state = "hydro"
|
||||
color = "hydro"
|
||||
|
||||
/obj/item/clothing/tie/armband/med
|
||||
name = "medical guard armband"
|
||||
desc = "An armband, worn by the station's security forces to display which department they're assigned to. This one is white."
|
||||
icon_state = "med"
|
||||
color = "med"
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/obj/effect/critter
|
||||
name = "Critter"
|
||||
desc = "Generic critter."
|
||||
icon = 'icons/mob/critter.dmi'
|
||||
icon_state = "basic"
|
||||
layer = 5.0
|
||||
density = 1
|
||||
anchored = 0
|
||||
var/alive = 1
|
||||
var/health = 10
|
||||
var/max_health = 10
|
||||
var/list/access_list = list()//accesses go here
|
||||
//AI things
|
||||
var/task = "thinking"
|
||||
//Attacks at will
|
||||
var/aggressive = 1
|
||||
//Will target an attacker
|
||||
var/defensive = 0
|
||||
//Will randomly move about
|
||||
var/wanderer = 1
|
||||
//Will open doors it bumps ignoring access
|
||||
var/opensdoors = 0
|
||||
//Will randomly travel through vents
|
||||
var/ventcrawl = 0
|
||||
|
||||
//Internal tracking ignore
|
||||
var/frustration = 0
|
||||
var/max_frustration = 8
|
||||
var/attack = 0
|
||||
var/attacking = 0
|
||||
var/steps = 0
|
||||
var/last_found = null
|
||||
var/target = null
|
||||
var/oldtarget_name = null
|
||||
var/target_lastloc = null
|
||||
|
||||
var/thinkspeed = 15
|
||||
var/chasespeed = 4
|
||||
var/wanderspeed = 10
|
||||
//The last guy who attacked it
|
||||
var/attacker = null
|
||||
//Will not attack this thing
|
||||
var/friend = null
|
||||
//How far to look for things dont set this overly high
|
||||
var/seekrange = 7
|
||||
|
||||
//If true will attack these things
|
||||
var/atkcarbon = 1
|
||||
var/atksilicon = 0
|
||||
var/atkcritter = 0
|
||||
//Attacks critters of the same type
|
||||
var/atksame = 0
|
||||
var/atkmech = 0
|
||||
|
||||
//Attacks syndies/traitors (distinguishes via mind)
|
||||
var/atksynd = 1
|
||||
//Attacks things NOT in its obj/req_access list
|
||||
var/atkreq = 0
|
||||
|
||||
//Damage multipliers
|
||||
var/brutevuln = 1
|
||||
var/firevuln = 1
|
||||
//DR
|
||||
var/armor = 0
|
||||
|
||||
//How much damage it does it melee
|
||||
var/melee_damage_lower = 1
|
||||
var/melee_damage_upper = 2
|
||||
//Basic attack message when they move to attack and attack
|
||||
var/angertext = "charges at"
|
||||
var/attacktext = "attacks"
|
||||
var/deathtext = "dies!"
|
||||
|
||||
var/chasestate = null // the icon state to use when attacking or chasing a target
|
||||
var/attackflick = null // the icon state to flick when it attacks
|
||||
var/attack_sound = null // the sound it makes when it attacks!
|
||||
|
||||
var/attack_speed = 25 // delay of attack
|
||||
|
||||
|
||||
proc/AfterAttack(var/mob/living/target)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/* TODO:Go over these and see how/if to add them
|
||||
|
||||
proc/set_attack()
|
||||
state = 1
|
||||
if(path_idle.len) path_idle = new/list()
|
||||
trg_idle = null
|
||||
|
||||
proc/set_idle()
|
||||
state = 2
|
||||
if (path_target.len) path_target = new/list()
|
||||
target = null
|
||||
frustration = 0
|
||||
|
||||
proc/set_null()
|
||||
state = 0
|
||||
if (path_target.len) path_target = new/list()
|
||||
if (path_idle.len) path_idle = new/list()
|
||||
target = null
|
||||
trg_idle = null
|
||||
frustration = 0
|
||||
|
||||
proc/path_idle(var/atom/trg)
|
||||
path_idle = AStar(src.loc, get_turf(trg), /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 250, anicard, null)
|
||||
path_idle = reverselist(path_idle)
|
||||
|
||||
proc/path_attack(var/atom/trg)
|
||||
path_target = AStar(src.loc, trg.loc, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 250, anicard, null)
|
||||
path_target = reverselist(path_target)
|
||||
|
||||
|
||||
//Look these over
|
||||
var/list/path = new/list()
|
||||
var/patience = 35 //The maximum time it'll chase a target.
|
||||
var/list/mob/living/carbon/flee_from = new/list()
|
||||
var/list/path_target = new/list() //The path to the combat target.
|
||||
|
||||
var/turf/trg_idle //It's idle target, the one it's following but not attacking.
|
||||
var/list/path_idle = new/list() //The path to the idle target.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
@@ -1,241 +0,0 @@
|
||||
|
||||
/obj/effect/critter
|
||||
|
||||
New(loc)
|
||||
spawn(0) process()//I really dont like this much but it seems to work well
|
||||
..(loc)
|
||||
|
||||
|
||||
process()
|
||||
set background = 1
|
||||
if (!src.alive) return
|
||||
switch(task)
|
||||
if("thinking")
|
||||
src.attack = 0
|
||||
src.target = null
|
||||
sleep(thinkspeed)
|
||||
walk_to(src,0)
|
||||
if (src.aggressive) seek_target()
|
||||
if (src.wanderer && !src.target) src.task = "wandering"
|
||||
if("chasing")
|
||||
if (src.frustration >= max_frustration)
|
||||
src.target = null
|
||||
src.last_found = world.time
|
||||
src.frustration = 0
|
||||
src.task = "thinking"
|
||||
walk_to(src,0)
|
||||
if (target)
|
||||
if (get_dist(src, src.target) <= 1)
|
||||
var/mob/living/carbon/M = src.target
|
||||
ChaseAttack()
|
||||
src.task = "attacking"
|
||||
if(chasestate)
|
||||
icon_state = chasestate
|
||||
src.anchored = 1
|
||||
src.target_lastloc = M.loc
|
||||
else
|
||||
var/turf/olddist = get_dist(src, src.target)
|
||||
walk_to(src, src.target,1,chasespeed)
|
||||
if ((get_dist(src, src.target)) >= (olddist))
|
||||
src.frustration++
|
||||
else
|
||||
src.frustration = 0
|
||||
sleep(5)
|
||||
else src.task = "thinking"
|
||||
if("attacking")
|
||||
// see if he got away
|
||||
if ((get_dist(src, src.target) > 1) || ((src.target:loc != src.target_lastloc)))
|
||||
src.anchored = 0
|
||||
src.task = "chasing"
|
||||
if(chasestate)
|
||||
icon_state = chasestate
|
||||
else
|
||||
if (get_dist(src, src.target) <= 1)
|
||||
var/mob/living/carbon/M = src.target
|
||||
if(!src.attacking) RunAttack()
|
||||
if(!src.aggressive)
|
||||
src.task = "thinking"
|
||||
src.target = null
|
||||
src.anchored = 0
|
||||
src.last_found = world.time
|
||||
src.frustration = 0
|
||||
src.attacking = 0
|
||||
else
|
||||
if(M!=null)
|
||||
if(ismob(src.target))
|
||||
if(M.health < 0)
|
||||
src.task = "thinking"
|
||||
src.target = null
|
||||
src.anchored = 0
|
||||
src.last_found = world.time
|
||||
src.frustration = 0
|
||||
src.attacking = 0
|
||||
else
|
||||
src.anchored = 0
|
||||
src.attacking = 0
|
||||
src.task = "chasing"
|
||||
if(chasestate)
|
||||
icon_state = chasestate
|
||||
if("wandering")
|
||||
if(chasestate)
|
||||
icon_state = initial(icon_state)
|
||||
patrol_step()
|
||||
sleep(wanderspeed)
|
||||
spawn(8)
|
||||
process()
|
||||
return
|
||||
|
||||
|
||||
proc/patrol_step()
|
||||
var/moveto = locate(src.x + rand(-1,1),src.y + rand(-1, 1),src.z)
|
||||
if (istype(moveto, /turf/simulated/floor) || istype(moveto, /turf/simulated/shuttle/floor) || istype(moveto, /turf/unsimulated/floor)) step_towards(src, moveto)
|
||||
if(src.aggressive) seek_target()
|
||||
steps += 1
|
||||
if (steps == rand(5,20)) src.task = "thinking"
|
||||
|
||||
|
||||
Bump(M as mob|obj)//TODO: Add access levels here
|
||||
spawn(0)
|
||||
if((istype(M, /obj/machinery/door)))
|
||||
if(src.opensdoors)
|
||||
M:open()
|
||||
src.frustration = 0
|
||||
else src.frustration ++
|
||||
if((istype(M, /mob/living/)) && (!src.anchored))
|
||||
src.loc = M:loc
|
||||
src.frustration = 0
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
Bumped(M as mob|obj)
|
||||
spawn(0)
|
||||
var/turf/T = get_turf(src)
|
||||
M:loc = T
|
||||
|
||||
|
||||
proc/seek_target()
|
||||
src.anchored = 0
|
||||
var/T = null
|
||||
for(var/mob/living/C in view(src.seekrange,src))//TODO: mess with this
|
||||
if (src.target)
|
||||
src.task = "chasing"
|
||||
break
|
||||
|
||||
// Ignore syndicates and traitors if specified
|
||||
if(!atksynd && C.mind)
|
||||
var/datum/mind/synd_mind = C.mind
|
||||
if( synd_mind.special_role == "Syndicate" || synd_mind.special_role == "traitor" )
|
||||
continue
|
||||
if((C.name == src.oldtarget_name) && (world.time < src.last_found + 100)) continue
|
||||
if(istype(C, /mob/living/carbon/) && !src.atkcarbon) continue
|
||||
if(istype(C, /mob/living/silicon/) && !src.atksilicon) continue
|
||||
if(atkreq)
|
||||
if(src.allowed(C)) continue
|
||||
if(C.health < 0) continue
|
||||
if(istype(C, /mob/living/carbon/) && src.atkcarbon) src.attack = 1
|
||||
if(istype(C, /mob/living/silicon/) && src.atksilicon) src.attack = 1
|
||||
if(atkreq)
|
||||
if(!src.allowed(C)) src.attack = 1
|
||||
if(src.attack)
|
||||
T = C
|
||||
break
|
||||
|
||||
if(!src.attack)
|
||||
for(var/obj/effect/critter/C in view(src.seekrange,src))
|
||||
if(!src.atkcritter) continue
|
||||
if(C.health <= 0) continue
|
||||
if(src.atkcritter)
|
||||
if((istype(C, src.type) && !src.atksame) || (C == src)) continue
|
||||
src.attack = 1
|
||||
if(src.attack)
|
||||
T = C
|
||||
break
|
||||
|
||||
if(!src.attack)
|
||||
for(var/obj/mecha/C in view(src.seekrange,src))
|
||||
if(!C.occupant) continue
|
||||
|
||||
if(atkreq && C.occupant)
|
||||
if(src.allowed(C.occupant)) continue
|
||||
|
||||
if(!atksynd && C.occupant)
|
||||
if(C.occupant.mind)
|
||||
var/datum/mind/synd_mind = C.occupant.mind
|
||||
if( synd_mind.special_role == "Syndicate" || synd_mind.special_role == "traitor" )
|
||||
continue
|
||||
|
||||
if(!src.atkmech) continue
|
||||
if(C.health <= 0) continue
|
||||
if(src.atkmech) src.attack = 1
|
||||
if(src.attack)
|
||||
T = C
|
||||
break
|
||||
|
||||
if(src.attack)
|
||||
src.target = T
|
||||
src.oldtarget_name = T:name
|
||||
src.task = "chasing"
|
||||
return
|
||||
|
||||
|
||||
proc/ChaseAttack()
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[src]</B> [src.angertext] at [src.target]!", 1)
|
||||
return
|
||||
|
||||
|
||||
proc/RunAttack()
|
||||
src.attacking = 1
|
||||
if(ismob(src.target))
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[src]</B> [src.attacktext] [src.target]!", 1)
|
||||
|
||||
var/damage = rand(melee_damage_lower, melee_damage_upper)
|
||||
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
|
||||
var/datum/organ/external/affecting = H.get_organ(ran_zone(dam_zone))
|
||||
H.apply_damage(damage, BRUTE, affecting, H.run_armor_check(affecting, "melee"))
|
||||
else if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
L.adjustBruteLoss(damage)
|
||||
|
||||
if(attack_sound)
|
||||
playsound(loc, attack_sound, 50, 1, -1)
|
||||
|
||||
AfterAttack(target)
|
||||
|
||||
|
||||
if(isobj(src.target))
|
||||
if(istype(target, /obj/mecha))
|
||||
//src.target:take_damage(rand(melee_damage_lower,melee_damage_upper))
|
||||
src.target:attack_critter(src)
|
||||
else
|
||||
src.target:TakeDamage(rand(melee_damage_lower,melee_damage_upper))
|
||||
spawn(attack_speed)
|
||||
src.attacking = 0
|
||||
return
|
||||
|
||||
|
||||
|
||||
/*TODO: Figure out how to handle special things like this dont really want to give it to every critter
|
||||
/obj/effect/critter/proc/CritterTeleport(var/telerange, var/dospark, var/dosmoke)
|
||||
if (!src.alive) return
|
||||
var/list/randomturfs = new/list()
|
||||
for(var/turf/T in orange(src, telerange))
|
||||
if(istype(T, /turf/space) || T.density) continue
|
||||
randomturfs.Add(T)
|
||||
src.loc = pick(randomturfs)
|
||||
if (dospark)
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
if (dosmoke)
|
||||
var/datum/effect/system/harmless_smoke_spread/smoke = new /datum/effect/system/harmless_smoke_spread()
|
||||
smoke.set_up(10, 0, src.loc)
|
||||
smoke.start()
|
||||
src.task = "thinking"
|
||||
*/
|
||||
@@ -1,135 +0,0 @@
|
||||
/*
|
||||
Contains the procs that control attacking critters
|
||||
*/
|
||||
/obj/effect/critter
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/living/user as mob)
|
||||
..()
|
||||
if(!src.alive)
|
||||
Harvest(W,user)
|
||||
return
|
||||
var/damage = 0
|
||||
switch(W.damtype)
|
||||
if("fire") damage = W.force * firevuln
|
||||
if("brute") damage = W.force * brutevuln
|
||||
TakeDamage(damage)
|
||||
if(src.defensive && alive) Target_Attacker(user)
|
||||
return
|
||||
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if (!src.alive) ..()
|
||||
if (user.a_intent == "hurt")
|
||||
TakeDamage(rand(1,2) * brutevuln)
|
||||
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
if(user.get_species() == "Tajaran")
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[user] has slashed at [src]!</B>", 1)
|
||||
playsound(src.loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[user] has punched [src]!</B>", 1)
|
||||
playsound(src.loc, pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg'), 100, 1)
|
||||
|
||||
else if(istype(user, /mob/living/carbon/alien/humanoid))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[user] has slashed at [src]!</B>", 1)
|
||||
playsound(src.loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
|
||||
|
||||
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[user] has bit [src]!</B>", 1)
|
||||
|
||||
if(src.defensive) Target_Attacker(user)
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\blue [user] touches [src]!", 1)
|
||||
|
||||
|
||||
proc/Target_Attacker(var/target)
|
||||
if(!target) return
|
||||
src.target = target
|
||||
src.oldtarget_name = target:name
|
||||
if(task != "chasing" && task != "attacking")
|
||||
if(angertext && angertext != "")
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <b>[src]</b> [src.angertext] at [target:name]!", 1)
|
||||
src.task = "chasing"
|
||||
return
|
||||
|
||||
|
||||
proc/TakeDamage(var/damage = 0)
|
||||
var/tempdamage = (damage-armor)
|
||||
if(tempdamage > 0)
|
||||
src.health -= tempdamage
|
||||
else
|
||||
src.health--
|
||||
if(src.health <= 0)
|
||||
src.Die()
|
||||
|
||||
|
||||
proc/Die()
|
||||
if (!src.alive) return
|
||||
src.icon_state += "_dead"
|
||||
src.alive = 0
|
||||
src.anchored = 0
|
||||
src.density = 0
|
||||
walk_to(src,0)
|
||||
src.visible_message("<b>[src]</b> [deathtext]")
|
||||
|
||||
|
||||
proc/Harvest(var/obj/item/weapon/W, var/mob/living/user)
|
||||
if((!W) || (!user)) return 0
|
||||
if(src.alive) return 0
|
||||
return 1
|
||||
|
||||
|
||||
bullet_act(var/obj/item/projectile/Proj)
|
||||
TakeDamage(Proj.damage)
|
||||
..()
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
src.Die()
|
||||
return
|
||||
if(2.0)
|
||||
TakeDamage(20)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
emp_act(serverity)
|
||||
switch(serverity)
|
||||
if(1.0)
|
||||
src.Die()
|
||||
return
|
||||
if(2.0)
|
||||
TakeDamage(20)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
meteorhit()
|
||||
src.Die()
|
||||
return
|
||||
|
||||
|
||||
blob_act()
|
||||
if(prob(25))
|
||||
src.Die()
|
||||
return
|
||||
|
||||
attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
TakeDamage(damage)
|
||||
return
|
||||
@@ -1,127 +0,0 @@
|
||||
/obj/effect/critter/creature
|
||||
name = "creature"
|
||||
desc = "A sanity-destroying otherthing."
|
||||
icon_state = "otherthing"
|
||||
health = 80
|
||||
max_health = 80
|
||||
aggressive = 1
|
||||
defensive = 1
|
||||
wanderer = 1
|
||||
opensdoors = 1
|
||||
atkcarbon = 1
|
||||
atksilicon = 1
|
||||
atkcritter = 1
|
||||
atkmech = 1
|
||||
atksame = 1
|
||||
firevuln = 1
|
||||
brutevuln = 1
|
||||
melee_damage_lower = 25
|
||||
melee_damage_upper = 50
|
||||
angertext = "runs"
|
||||
attacktext = "chomps"
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
|
||||
|
||||
/obj/effect/critter/roach
|
||||
name = "cockroach"
|
||||
desc = "An unpleasant insect that lives in filthy places."
|
||||
icon_state = "roach"
|
||||
health = 5
|
||||
max_health = 5
|
||||
aggressive = 0
|
||||
defensive = 1
|
||||
wanderer = 1
|
||||
atkcarbon = 1
|
||||
atksilicon = 0
|
||||
attacktext = "bites"
|
||||
|
||||
Die()
|
||||
..()
|
||||
del(src)
|
||||
|
||||
/obj/effect/critter/spore
|
||||
name = "plasma spore"
|
||||
desc = "A barely intelligent colony of organisms. Very volatile."
|
||||
icon_state = "spore"
|
||||
density = 1
|
||||
health = 1
|
||||
max_health = 1
|
||||
aggressive = 0
|
||||
defensive = 0
|
||||
wanderer = 1
|
||||
atkcarbon = 0
|
||||
atksilicon = 0
|
||||
firevuln = 2
|
||||
brutevuln = 2
|
||||
|
||||
|
||||
/* process()
|
||||
if(prob(50))
|
||||
TakeDamage(1)
|
||||
..()*/
|
||||
|
||||
|
||||
Die()
|
||||
src.visible_message("<b>[src]</b> ruptures and explodes!")
|
||||
src.alive = 0
|
||||
var/turf/T = get_turf(src.loc)
|
||||
if(T)
|
||||
T.hotspot_expose(700,125)
|
||||
explosion(T, -1, -1, 2, 3)
|
||||
del src
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
src.Die()
|
||||
|
||||
|
||||
/obj/effect/critter/blob
|
||||
name = "blob"
|
||||
desc = "Some blob thing."
|
||||
icon_state = "blob"
|
||||
pass_flags = PASSBLOB
|
||||
health = 20
|
||||
max_health = 20
|
||||
aggressive = 1
|
||||
defensive = 0
|
||||
wanderer = 1
|
||||
atkcarbon = 1
|
||||
atksilicon = 1
|
||||
firevuln = 2
|
||||
brutevuln = 0.5
|
||||
melee_damage_lower = 2
|
||||
melee_damage_upper = 8
|
||||
angertext = "charges"
|
||||
attacktext = "hits"
|
||||
attack_sound = 'sound/weapons/genhit1.ogg'
|
||||
var/obj/effect/blob/factory/factory = null
|
||||
|
||||
New(loc, var/obj/effect/blob/factory/linked_node)
|
||||
if(istype(linked_node))
|
||||
factory = linked_node
|
||||
factory.spores += src
|
||||
..(loc)
|
||||
return
|
||||
|
||||
Die()
|
||||
if(factory)
|
||||
factory.spores -= src
|
||||
..()
|
||||
del(src)
|
||||
|
||||
|
||||
|
||||
/obj/effect/critter/lizard
|
||||
name = "Lizard"
|
||||
desc = "A cute tiny lizard."
|
||||
icon_state = "lizard"
|
||||
health = 5
|
||||
max_health = 5
|
||||
aggressive = 0
|
||||
defensive = 1
|
||||
wanderer = 1
|
||||
opensdoors = 0
|
||||
atkcarbon = 1
|
||||
atksilicon = 1
|
||||
attacktext = "bites"
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
//CONTAINS: Detective's Scanner
|
||||
|
||||
// TODO: Split everything into easy to manage procs.
|
||||
|
||||
/obj/item/device/detective_scanner
|
||||
name = "scanner"
|
||||
desc = "Used to scan objects for DNA and fingerprints. Can print a report of the findings."
|
||||
icon_state = "forensic1"
|
||||
w_class = 3.0
|
||||
item_state = "electronic"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
slot_flags = SLOT_BELT
|
||||
var/scanning = 0
|
||||
var/list/log = list()
|
||||
|
||||
/obj/item/device/detective_scanner/attack_self(var/mob/user)
|
||||
if(log.len && !scanning)
|
||||
scanning = 1
|
||||
user << "<span class='notice'>Printing report, please wait...</span>"
|
||||
|
||||
spawn(100)
|
||||
|
||||
// Create our paper
|
||||
var/obj/item/weapon/paper/P = new(get_turf(src))
|
||||
P.name = "paper- 'Scanner Report'"
|
||||
P.info = "<center><font size='6'><B>Scanner Report</B></font></center><HR><BR>"
|
||||
P.info += dd_list2text(log, "<BR>")
|
||||
P.info += "<HR><B>Notes:</B><BR>"
|
||||
P.info_links = P.info
|
||||
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.put_in_hands(P)
|
||||
M << "<span class='notice'>Report printed. Log cleared.<span>"
|
||||
|
||||
// Clear the logs
|
||||
log = list()
|
||||
scanning = 0
|
||||
else
|
||||
user << "<span class='notice'>The scanner has no logs or is in use.</span>"
|
||||
|
||||
/obj/item/device/detective_scanner/attack(mob/living/M as mob, mob/user as mob)
|
||||
scan(M, user)
|
||||
|
||||
|
||||
/obj/item/device/detective_scanner/afterattack(atom/A as obj|turf|area, mob/user as mob)
|
||||
|
||||
if(!in_range(A,user))
|
||||
return
|
||||
if(!isturf(A) && !isobj(A))
|
||||
return
|
||||
if(loc != user)
|
||||
return
|
||||
scan(A, user)
|
||||
|
||||
/obj/item/device/detective_scanner/proc/scan(var/atom/A, var/mob/user)
|
||||
|
||||
if(!scanning)
|
||||
scanning = 1
|
||||
|
||||
user.visible_message("\The [user] scans \the [A] with \the [src], the air around [user.gender == MALE ? "him" : "her"] humming[prob(70) ? " gently." : "."]")
|
||||
user << "<span class='notice'>You scan [A]. The scanner is analysing the results...</span>"
|
||||
|
||||
|
||||
// GATHER INFORMATION
|
||||
|
||||
//Make our lists
|
||||
var/list/fingerprints = list()
|
||||
var/list/blood = list()
|
||||
var/list/fibers = list()
|
||||
var/list/reagents = list()
|
||||
|
||||
var/target_name = A.name
|
||||
|
||||
// Start gathering
|
||||
|
||||
if(ishuman(A))
|
||||
|
||||
var/mob/living/carbon/human/H = A
|
||||
if (istype(H.dna, /datum/dna) && !H.gloves)
|
||||
fingerprints += md5(H.dna.uni_identity)
|
||||
|
||||
if(H.blood_DNA && H.blood_DNA.len)
|
||||
blood = H.blood_DNA.Copy()
|
||||
else
|
||||
|
||||
if(A.fingerprints && A.fingerprints.len)
|
||||
fingerprints = A.fingerprints.Copy()
|
||||
|
||||
if(A.blood_DNA && A.blood_DNA.len)
|
||||
blood = A.blood_DNA.Copy()
|
||||
|
||||
if(A.reagents && A.reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in A.reagents.reagent_list)
|
||||
reagents[R.name] = R.volume
|
||||
|
||||
if(A.suit_fibers && A.suit_fibers.len)
|
||||
fibers = A.suit_fibers.Copy()
|
||||
|
||||
// We gathered everything. Create a fork and slowly display the results to the holder of the scanner.
|
||||
|
||||
spawn(0)
|
||||
|
||||
var/found_something = 0
|
||||
add_log("<B>[get_timestamp()] - [target_name]</B>", 0)
|
||||
|
||||
// Fingerprints
|
||||
if(fingerprints && fingerprints.len)
|
||||
sleep(30)
|
||||
add_log("<span class='info'><B>Prints:</B></span>")
|
||||
for(var/finger in fingerprints)
|
||||
add_log("[finger]")
|
||||
found_something = 1
|
||||
|
||||
// Blood
|
||||
if (blood && blood.len)
|
||||
sleep(30)
|
||||
add_log("<span class='info'><B>Blood:</B></span>")
|
||||
found_something = 1
|
||||
for(var/B in blood)
|
||||
add_log("Type: <font color='red'>[blood[B]]</font> DNA: <font color='red'>[B]</font>")
|
||||
|
||||
//Fibers
|
||||
if(fibers && fibers.len)
|
||||
sleep(30)
|
||||
add_log("<span class='info'><B>Fibers:</B></span>")
|
||||
for(var/fiber in fibers)
|
||||
add_log("[fiber]")
|
||||
found_something = 1
|
||||
|
||||
//Reagents
|
||||
if(reagents && reagents.len)
|
||||
sleep(30)
|
||||
add_log("<span class='info'><B>Reagents:</B></span>")
|
||||
for(var/R in reagents)
|
||||
add_log("Reagent: <font color='red'>[R]</font> Volume: <font color='red'>[reagents[R]]</font>")
|
||||
found_something = 1
|
||||
|
||||
// Get a new user
|
||||
var/mob/holder = null
|
||||
if(ismob(src.loc))
|
||||
holder = src.loc
|
||||
|
||||
if(!found_something)
|
||||
add_log("<I># No forensic traces found #</I>", 0) // Don't display this to the holder user
|
||||
if(holder)
|
||||
holder << "<span class='notice'>Unable to locate any fingerprints, materials, fibers, or blood on [target_name]!</span>"
|
||||
else
|
||||
if(holder)
|
||||
holder << "<span class='notice'>You finish scanning \the [target_name].</span>"
|
||||
|
||||
add_log("---------------------------------------------------------", 0)
|
||||
scanning = 0
|
||||
return
|
||||
|
||||
/obj/item/device/detective_scanner/proc/add_log(var/msg, var/broadcast = 1)
|
||||
if(scanning)
|
||||
if(broadcast && ismob(loc))
|
||||
var/mob/M = loc
|
||||
M << msg
|
||||
log += " [msg]"
|
||||
else
|
||||
CRASH("[src] \ref[src] is adding a log when it was never put in scanning mode!")
|
||||
|
||||
/obj/item/device/detective_scanner/proc/get_timestamp()
|
||||
return time2text(world.time + 432000, "hh:mm:ss")
|
||||
@@ -0,0 +1,32 @@
|
||||
/datum/event/alien_infestation
|
||||
announceWhen = 75
|
||||
endWhen = 75
|
||||
oneShot = 1
|
||||
|
||||
var/spawncount = 1
|
||||
|
||||
/datum/event/alien_infestation/announce()
|
||||
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
|
||||
world << sound('sound/AI/aliens.ogg')
|
||||
|
||||
|
||||
/datum/event/alien_infestation/start()
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
|
||||
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
|
||||
if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology
|
||||
vents += temp_vent
|
||||
|
||||
var/list/candidates = get_alien_candidates()
|
||||
|
||||
if(prob(50)) spawncount++ //sometimes, have two larvae spawn instead of one
|
||||
while((spawncount >= 1) && vents.len && candidates.len)
|
||||
var/obj/vent = pick(vents)
|
||||
var/candidate = pick(candidates)
|
||||
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
|
||||
new_xeno.key = candidate
|
||||
|
||||
candidates -= candidate
|
||||
vents -= vent
|
||||
spawncount--
|
||||
@@ -0,0 +1,25 @@
|
||||
/datum/event/blob
|
||||
announceWhen = 12
|
||||
endWhen = 120
|
||||
|
||||
var/obj/effect/blob/core/Blob
|
||||
|
||||
|
||||
/datum/event/blob/announce()
|
||||
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
|
||||
world << sound('sound/AI/outbreak5.ogg')
|
||||
|
||||
|
||||
/datum/event/blob/start()
|
||||
var/turf/T = pick(blobstart)
|
||||
if(!T) kill()
|
||||
Blob = new /obj/effect/blob/core(T, 200)
|
||||
Blob.Life()
|
||||
Blob.Life()
|
||||
Blob.Life()
|
||||
|
||||
|
||||
/datum/event/blob/tick()
|
||||
if(!Blob) kill()
|
||||
if(IsMultiple(activeFor, 3))
|
||||
Blob.Life()
|
||||
@@ -0,0 +1,14 @@
|
||||
/datum/event/carp_migration
|
||||
announceWhen = 50
|
||||
endWhen = 50
|
||||
oneShot = 1
|
||||
|
||||
|
||||
/datum/event/carp_migration/announce()
|
||||
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
|
||||
|
||||
|
||||
/datum/event/carp_migration/start()
|
||||
for(var/obj/effect/landmark/C in landmarks_list)
|
||||
if(C.name == "carpspawn")
|
||||
new /mob/living/simple_animal/hostile/carp(C.loc)
|
||||
@@ -0,0 +1,17 @@
|
||||
/datum/event/communications_blackout
|
||||
var/silent = 1 //most of the time, we don't want an announcement, so as to allow AIs to fake blackouts.
|
||||
|
||||
/datum/event/communications_blackout/announce()
|
||||
if(!silent)
|
||||
command_alert("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT")
|
||||
|
||||
|
||||
/datum/event/communications_blackout/start()
|
||||
if(prob(25))
|
||||
silent = 0
|
||||
for(var/mob/living/silicon/ai/A in player_list) //AIs are always aware of communication blackouts.
|
||||
A << "<br>"
|
||||
A << "<span class='warning'><b>Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT<b></span>"
|
||||
A << "<br>"
|
||||
for(var/obj/machinery/telecomms/T in telecomms_list)
|
||||
T.emp_act(1)
|
||||
@@ -0,0 +1,44 @@
|
||||
/datum/event/disease_outbreak
|
||||
announceWhen = 15
|
||||
endWhen = 15
|
||||
oneShot = 1
|
||||
|
||||
|
||||
/datum/event/disease_outbreak/announce()
|
||||
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
|
||||
world << sound('sound/AI/outbreak7.ogg')
|
||||
|
||||
/datum/event/disease_outbreak/start()
|
||||
var/virus_type = pick(/datum/disease/dnaspread, /datum/disease/advance/flu, /datum/disease/advance/cold, /datum/disease/brainrot, /datum/disease/magnitis)
|
||||
|
||||
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
|
||||
var/foundAlready = 0 // don't infect someone that already has the virus
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T)
|
||||
continue
|
||||
if(T.z != 1)
|
||||
continue
|
||||
for(var/datum/disease/D in H.viruses)
|
||||
foundAlready = 1
|
||||
if(H.stat == 2 || foundAlready)
|
||||
continue
|
||||
|
||||
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
|
||||
if((!H.dna) || (H.sdisabilities & BLIND)) //A blindness disease would be the worst.
|
||||
continue
|
||||
var/datum/disease/dnaspread/D = new
|
||||
D.strain_data["name"] = H.real_name
|
||||
D.strain_data["UI"] = H.dna.uni_identity
|
||||
D.strain_data["SE"] = H.dna.struc_enzymes
|
||||
D.carrier = 1
|
||||
D.holder = H
|
||||
D.affected_mob = H
|
||||
H.viruses += D
|
||||
break
|
||||
else
|
||||
var/datum/disease/D = new virus_type
|
||||
D.carrier = 1
|
||||
D.holder = H
|
||||
D.affected_mob = H
|
||||
H.viruses += D
|
||||
break
|
||||
@@ -0,0 +1,28 @@
|
||||
/datum/event/electrical_storm
|
||||
var/lightsoutAmount = 1
|
||||
var/lightsoutRange = 25
|
||||
|
||||
|
||||
/datum/event/electrical_storm/announce()
|
||||
command_alert("An electrical storm has been detected in your area, please repair potential electronic overloads.", "Electrical Storm Alert")
|
||||
|
||||
|
||||
/datum/event/electrical_storm/start()
|
||||
var/list/epicentreList = list()
|
||||
|
||||
for(var/i=1, i <= lightsoutAmount, i++)
|
||||
var/list/possibleEpicentres = list()
|
||||
for(var/obj/effect/landmark/newEpicentre in landmarks_list)
|
||||
if(newEpicentre.name == "lightsout" && !(newEpicentre in epicentreList))
|
||||
possibleEpicentres += newEpicentre
|
||||
if(possibleEpicentres.len)
|
||||
epicentreList += pick(possibleEpicentres)
|
||||
else
|
||||
break
|
||||
|
||||
if(!epicentreList.len)
|
||||
return
|
||||
|
||||
for(var/obj/effect/landmark/epicentre in epicentreList)
|
||||
for(var/obj/machinery/power/apc/apc in range(epicentre,lightsoutRange))
|
||||
apc.overload_lighting()
|
||||
@@ -0,0 +1,74 @@
|
||||
/datum/event //NOTE: Times are measured in master controller ticks!
|
||||
var/startWhen = 0 //When in the lifetime to call start().
|
||||
var/announceWhen = 0 //When in the lifetime to call announce().
|
||||
var/endWhen = 0 //When in the lifetime the event should end. Include time for delayed announcements.
|
||||
var/oneShot = 0 //If true, then the event removes itself from the list of potential events on creation.
|
||||
|
||||
var/activeFor = 0 //How long the event has existed. You don't need to change this.
|
||||
|
||||
|
||||
|
||||
|
||||
//Called when the tick is equal to the startWhen variable.
|
||||
//Allows you to announce before starting or vice versa.
|
||||
//Only called once.
|
||||
/datum/event/proc/start()
|
||||
return
|
||||
|
||||
//Called when the tick is equal to the announceWhen variable.
|
||||
//Allows you to start before announcing or vice versa.
|
||||
//Only called once.
|
||||
/datum/event/proc/announce()
|
||||
return
|
||||
|
||||
//Called on or after the tick counter is equal to startWhen.
|
||||
//You can include code related to your event or add your own
|
||||
//time stamped events.
|
||||
//Called more than once.
|
||||
/datum/event/proc/tick()
|
||||
return
|
||||
|
||||
//Called on or after the tick is equal or more than endWhen
|
||||
//You can include code related to the event ending.
|
||||
//Do not place spawn() in here, instead use tick() to check for
|
||||
//the activeFor variable.
|
||||
//For example: if(activeFor == myOwnVariable + 30) doStuff()
|
||||
//Only called once.
|
||||
/datum/event/proc/end()
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
//Do not override this proc, instead use the appropiate procs.
|
||||
//This proc will handle the calls to the appropiate procs.
|
||||
/datum/event/proc/process()
|
||||
if(activeFor == startWhen)
|
||||
start()
|
||||
|
||||
if(activeFor > startWhen)
|
||||
tick()
|
||||
|
||||
if(activeFor == announceWhen)
|
||||
announce()
|
||||
|
||||
if(activeFor >= endWhen)
|
||||
end()
|
||||
kill()
|
||||
|
||||
activeFor++
|
||||
|
||||
|
||||
//Garbage collects the event by removing it from the global events list,
|
||||
//which should be the only place it's referenced.
|
||||
/datum/event/proc/kill()
|
||||
events.Remove(src)
|
||||
|
||||
|
||||
//Adds the event to the global events list, and removes it from the list
|
||||
//of potential events.
|
||||
/datum/event/New()
|
||||
events.Add(src)
|
||||
|
||||
if(oneShot)
|
||||
potentialRandomEvents.Remove(type)
|
||||
@@ -0,0 +1,39 @@
|
||||
var/list/allEvents = typesof(/datum/event) - /datum/event
|
||||
var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event
|
||||
|
||||
var/eventTimeLower = 5000
|
||||
var/eventTimeUpper = 10000
|
||||
|
||||
var/scheduledEvent = null
|
||||
|
||||
|
||||
//Currently unused. Needs an admin panel for messing with events.
|
||||
/proc/addPotentialEvent(var/type)
|
||||
potentialRandomEvents |= type
|
||||
|
||||
/proc/removePotentialEvent(var/type)
|
||||
potentialRandomEvents -= type
|
||||
|
||||
|
||||
/proc/checkEvent()
|
||||
if(!scheduledEvent)
|
||||
scheduledEvent = world.timeofday + rand(eventTimeLower, eventTimeUpper)
|
||||
|
||||
else if(world.timeofday > scheduledEvent)
|
||||
spawnEvent()
|
||||
|
||||
scheduledEvent = null
|
||||
checkEvent()
|
||||
|
||||
|
||||
/proc/spawnEvent()
|
||||
if(!config.allow_random_events)
|
||||
return
|
||||
|
||||
var/Type = pick(potentialRandomEvents)
|
||||
if(!Type)
|
||||
return
|
||||
|
||||
//The event will add itself to the MC's event list
|
||||
//and start working via the constructor.
|
||||
new Type
|
||||
@@ -0,0 +1,12 @@
|
||||
/datum/event/meteor_wave
|
||||
startWhen = 6
|
||||
endWhen = 66
|
||||
|
||||
/datum/event/meteor_wave/announce()
|
||||
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
|
||||
world << sound('sound/AI/meteors.ogg')
|
||||
|
||||
|
||||
/datum/event/meteor_wave/tick()
|
||||
if(IsMultiple(activeFor, 3))
|
||||
spawn_meteors(5)
|
||||
@@ -0,0 +1,46 @@
|
||||
/datum/event/prison_break
|
||||
announceWhen = 50
|
||||
endWhen = 50
|
||||
oneShot = 1
|
||||
|
||||
var/releaseWhen = 25
|
||||
var/list/area/prisonAreas = list()
|
||||
|
||||
|
||||
/datum/event/prison_break/announce()
|
||||
if(prisonAreas && prisonAreas.len > 0)
|
||||
command_alert("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
|
||||
else
|
||||
world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area."
|
||||
|
||||
|
||||
/datum/event/prison_break/start()
|
||||
for(var/area/A in world)
|
||||
if(istype(A, /area/security/prison) || istype(A, /area/security/brig))
|
||||
prisonAreas += A
|
||||
|
||||
if(prisonAreas && prisonAreas.len > 0)
|
||||
for(var/area/A in prisonAreas)
|
||||
for(var/obj/machinery/light/L in A)
|
||||
L.flicker(10)
|
||||
|
||||
|
||||
/datum/event/prison_break/tick()
|
||||
if(activeFor == releaseWhen)
|
||||
if(prisonAreas && prisonAreas.len > 0)
|
||||
for(var/area/A in prisonAreas)
|
||||
for(var/obj/machinery/power/apc/temp_apc in A)
|
||||
temp_apc.overload_lighting()
|
||||
|
||||
for(var/obj/structure/closet/secure_closet/brig/temp_closet in A)
|
||||
temp_closet.locked = 0
|
||||
temp_closet.icon_state = temp_closet.icon_closed
|
||||
|
||||
for(var/obj/machinery/door/airlock/security/temp_airlock in A)
|
||||
temp_airlock.prison_open()
|
||||
|
||||
for(var/obj/machinery/door/airlock/glass_security/temp_glassairlock in A)
|
||||
temp_glassairlock.prison_open()
|
||||
|
||||
for(var/obj/machinery/door_timer/temp_timer in A)
|
||||
temp_timer.releasetime = 1
|
||||
@@ -0,0 +1,37 @@
|
||||
/datum/event/radiation_storm
|
||||
announceWhen = 5
|
||||
endWhen = 5
|
||||
oneShot = 1
|
||||
|
||||
|
||||
/datum/event/radiation_storm/announce()
|
||||
command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert")
|
||||
world << sound('sound/AI/radiation.ogg')
|
||||
|
||||
|
||||
/datum/event/radiation_storm/start()
|
||||
for(var/mob/living/carbon/human/H in living_mob_list)
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T)
|
||||
continue
|
||||
if(T.z != 1)
|
||||
continue
|
||||
if(istype(H,/mob/living/carbon/human))
|
||||
H.apply_effect((rand(15,75)),IRRADIATE,0)
|
||||
if(prob(5))
|
||||
H.apply_effect((rand(90,150)),IRRADIATE,0)
|
||||
if(prob(25))
|
||||
if (prob(75))
|
||||
randmutb(H)
|
||||
domutcheck(H,null,1)
|
||||
else
|
||||
randmutg(H)
|
||||
domutcheck(H,null,1)
|
||||
|
||||
for(var/mob/living/carbon/monkey/M in living_mob_list)
|
||||
var/turf/T = get_turf(M)
|
||||
if(!T)
|
||||
continue
|
||||
if(T.z != 1)
|
||||
continue
|
||||
M.apply_effect((rand(15,75)),IRRADIATE,0)
|
||||
@@ -0,0 +1,5 @@
|
||||
/datum/event/spacevine
|
||||
oneShot = 1
|
||||
|
||||
/datum/event/spacevine/start()
|
||||
spacevine_infestation()
|
||||
@@ -0,0 +1,13 @@
|
||||
/datum/event/spontaneous_appendicitis/start()
|
||||
for(var/mob/living/carbon/human/H in living_mob_list)
|
||||
var/foundAlready = 0 //don't infect someone that already has the virus
|
||||
for(var/datum/disease/D in H.viruses)
|
||||
foundAlready = 1
|
||||
if(H.stat == 2 || foundAlready)
|
||||
continue
|
||||
|
||||
var/datum/disease/D = new /datum/disease/appendicitis
|
||||
D.holder = H
|
||||
D.affected_mob = H
|
||||
H.viruses += D
|
||||
break
|
||||
@@ -332,14 +332,14 @@ proc/check_panel(mob/M)
|
||||
|
||||
var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/item/ammo_magazine/a357,\
|
||||
/obj/item/weapon/gun/energy/crossbow, /obj/item/weapon/melee/energy/sword,\
|
||||
/obj/item/weapon/storage/box/syndicate, /obj/item/weapon/storage/emp_kit,\
|
||||
/obj/item/weapon/storage/box/syndicate, /obj/item/weapon/storage/box/emps,\
|
||||
/obj/item/weapon/cartridge/syndicate, /obj/item/clothing/under/chameleon,\
|
||||
/obj/item/clothing/shoes/syndigaloshes, /obj/item/weapon/card/id/syndicate,\
|
||||
/obj/item/clothing/mask/gas/voice, /obj/item/clothing/glasses/thermal,\
|
||||
/obj/item/device/chameleon, /obj/item/weapon/card/emag,\
|
||||
/obj/item/weapon/storage/toolbox/syndicate, /obj/item/weapon/aiModule,\
|
||||
/obj/item/device/radio/headset/syndicate, /obj/item/weapon/plastique,\
|
||||
/obj/item/device/powersink, /obj/item/weapon/storage/syndie_kit,\
|
||||
/obj/item/device/powersink, /obj/item/weapon/storage/box/syndie_kit,\
|
||||
/obj/item/toy/syndicateballoon, /obj/item/weapon/gun/energy/laser/captain,\
|
||||
/obj/item/weapon/hand_tele, /obj/item/weapon/rcd, /obj/item/weapon/tank/jetpack,\
|
||||
/obj/item/clothing/under/rank/captain, /obj/item/device/aicard,\
|
||||
|
||||
@@ -50,9 +50,9 @@ I said no!
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/donut/jelly
|
||||
|
||||
/datum/recipe/jellydonut/roro
|
||||
reagents = list("rorojelly" = 5, "flour" = 5)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/donut/rorojelly
|
||||
/datum/recipe/jellydonut/slime
|
||||
reagents = list("slimejelly" = 5, "flour" = 5)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/donut/slimejelly
|
||||
|
||||
/datum/recipe/jellydonut/cherry
|
||||
reagents = list("cherryjelly" = 5, "flour" = 5)
|
||||
@@ -775,12 +775,12 @@ I said no!
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/stew
|
||||
|
||||
/datum/recipe/rorotoast
|
||||
reagents = list("rorojelly" = 5)
|
||||
/datum/recipe/slimetoast
|
||||
reagents = list("slimejelly" = 5)
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/roro
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/slime
|
||||
|
||||
/datum/recipe/jelliedtoast
|
||||
reagents = list("cherryjelly" = 5)
|
||||
@@ -902,10 +902,10 @@ I said no!
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/sliceable/applecake
|
||||
|
||||
/datum/recipe/roroburger
|
||||
reagents = list("rorojelly" = 5, "flour" = 15)
|
||||
/datum/recipe/slimeburger
|
||||
reagents = list("slimejelly" = 5, "flour" = 15)
|
||||
items = list()
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/jellyburger/roro
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/jellyburger/slime
|
||||
|
||||
/datum/recipe/jellyburger
|
||||
reagents = list("cherryjelly" = 5, "flour" = 15)
|
||||
@@ -920,13 +920,13 @@ I said no!
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/twobread
|
||||
|
||||
/datum/recipe/rorosandwich
|
||||
reagents = list("rorojelly" = 5)
|
||||
/datum/recipe/slimesandwich
|
||||
reagents = list("slimejelly" = 5)
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/jellysandwich/roro
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/jellysandwich/slime
|
||||
|
||||
/datum/recipe/cherrysandwich
|
||||
reagents = list("cherryjelly" = 5)
|
||||
@@ -989,11 +989,11 @@ I said no!
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/bloodsoup
|
||||
|
||||
|
||||
/datum/recipe/rorosoup
|
||||
reagents = list("water" = 10, "rorojelly" = 5)
|
||||
/datum/recipe/slimesoup
|
||||
reagents = list("water" = 10, "slimejelly" = 5)
|
||||
items = list(
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/rorosoup
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/slimesoup
|
||||
|
||||
/datum/recipe/clownstears
|
||||
reagents = list("water" = 10)
|
||||
@@ -1002,14 +1002,14 @@ I said no!
|
||||
/obj/item/weapon/ore/clown,
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/clownstears
|
||||
|
||||
/datum/recipe/boiledrorocore
|
||||
/*
|
||||
/datum/recipe/boiledslimeextract
|
||||
reagents = list("water" = 5)
|
||||
items = list(
|
||||
/obj/item/metroid_core,
|
||||
/obj/item/slime_core,
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/boiledrorocore
|
||||
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/boiledslimecore
|
||||
*/
|
||||
/datum/recipe/braincake
|
||||
reagents = list("milk" = 5, "flour" = 15)
|
||||
items = list(
|
||||
|
||||
@@ -26,12 +26,12 @@
|
||||
new /obj/item/weapon/storage/backpack/industrial(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_eng(src)
|
||||
new /obj/item/device/radio/headset/headset_mine(src)
|
||||
new /obj/item/device/radio/headset/headset_cargo(src)
|
||||
new /obj/item/clothing/under/rank/miner(src)
|
||||
new /obj/item/clothing/gloves/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/device/analyzer(src)
|
||||
new /obj/item/weapon/storage/satchel(src)
|
||||
new /obj/item/weapon/storage/bag/ore(src)
|
||||
new /obj/item/device/flashlight/lantern(src)
|
||||
new /obj/item/weapon/shovel(src)
|
||||
new /obj/item/weapon/pickaxe(src)
|
||||
@@ -53,11 +53,11 @@ proc/move_mining_shuttle()
|
||||
if (mining_shuttle_location == 1)
|
||||
fromArea = locate(/area/shuttle/mining/outpost)
|
||||
toArea = locate(/area/shuttle/mining/station)
|
||||
|
||||
else
|
||||
fromArea = locate(/area/shuttle/mining/station)
|
||||
toArea = locate(/area/shuttle/mining/outpost)
|
||||
|
||||
|
||||
var/list/dstturfs = list()
|
||||
var/throwy = world.maxy
|
||||
|
||||
@@ -91,6 +91,18 @@ proc/move_mining_shuttle()
|
||||
mining_shuttle_location = 0
|
||||
else
|
||||
mining_shuttle_location = 1
|
||||
|
||||
for(var/mob/M in toArea)
|
||||
if(M.client)
|
||||
spawn(0)
|
||||
if(M.buckled)
|
||||
shake_camera(M, 3, 1) // buckled, not a lot of shaking
|
||||
else
|
||||
shake_camera(M, 10, 1) // unbuckled, HOLY SHIT SHAKE THE ROOM
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(!M.buckled)
|
||||
M.Weaken(3)
|
||||
|
||||
mining_shuttle_moving = 0
|
||||
return
|
||||
|
||||
@@ -104,6 +116,8 @@ proc/move_mining_shuttle()
|
||||
var/location = 0 //0 = station, 1 = mining base
|
||||
|
||||
/obj/machinery/computer/mining_shuttle/attack_hand(user as mob)
|
||||
if(..(user))
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
var/dat
|
||||
dat = text("<center>Mining shuttle:<br> <b><A href='?src=\ref[src];move=[1]'>Send</A></b></center>")
|
||||
@@ -287,3 +301,4 @@ proc/move_mining_shuttle()
|
||||
density = 1
|
||||
icon_opened = "miningcaropen"
|
||||
icon_closed = "miningcar"
|
||||
|
||||
|
||||
@@ -411,8 +411,8 @@ commented out in r5061, I left it because of the shroom thingies
|
||||
user << "\blue You dug a hole."
|
||||
gets_dug()
|
||||
|
||||
if(istype(W,/obj/item/weapon/storage/satchel))
|
||||
var/obj/item/weapon/storage/satchel/S = W
|
||||
if(istype(W,/obj/item/weapon/storage/bag/ore))
|
||||
var/obj/item/weapon/storage/bag/ore/S = W
|
||||
if(S.collection_mode)
|
||||
for(var/obj/item/weapon/ore/O in src.contents)
|
||||
O.attackby(W,user)
|
||||
@@ -437,7 +437,7 @@ commented out in r5061, I left it because of the shroom thingies
|
||||
|
||||
/turf/simulated/floor/plating/airless/asteroid/proc/updateMineralOverlays()
|
||||
|
||||
src.overlays = null
|
||||
src.overlays.Cut()
|
||||
|
||||
if(istype(get_step(src, NORTH), /turf/simulated/mineral))
|
||||
src.overlays += image('icons/turf/walls.dmi', "rock_side_n")
|
||||
@@ -482,11 +482,11 @@ commented out in r5061, I left it because of the shroom thingies
|
||||
if(istype(M,/mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if(istype(R.module, /obj/item/weapon/robot_module/miner))
|
||||
if(istype(R.module_state_1,/obj/item/weapon/storage/satchel))
|
||||
if(istype(R.module_state_1,/obj/item/weapon/storage/bag/ore))
|
||||
src.attackby(R.module_state_1,R)
|
||||
else if(istype(R.module_state_2,/obj/item/weapon/storage/satchel))
|
||||
else if(istype(R.module_state_2,/obj/item/weapon/storage/bag/ore))
|
||||
src.attackby(R.module_state_2,R)
|
||||
else if(istype(R.module_state_3,/obj/item/weapon/storage/satchel))
|
||||
else if(istype(R.module_state_3,/obj/item/weapon/storage/bag/ore))
|
||||
src.attackby(R.module_state_3,R)
|
||||
else
|
||||
return
|
||||
@@ -83,173 +83,3 @@
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/**********************Sheet Snatcher**************************/
|
||||
//Stolen satchel code, making it a box just wouldn't work well for this -Sieve
|
||||
|
||||
/obj/item/weapon/sheetsnatcher
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "sheetsnatcher"
|
||||
name = "Sheet Snatcher"
|
||||
desc = "A patented Nanotrasen storage system designed for any kind of mineral sheet."
|
||||
var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
|
||||
var/capacity = 300; //the number of sheets it can carry.
|
||||
flags = FPRINT | TABLEPASS
|
||||
w_class = 3
|
||||
var/metal = 0//Holder values, to have a count of how much of each type is in the snatcher
|
||||
var/glass = 0
|
||||
var/gold = 0
|
||||
var/silver = 0
|
||||
var/diamond = 0
|
||||
var/plasma = 0
|
||||
var/uranium = 0
|
||||
var/clown = 0
|
||||
var/euranium = 0
|
||||
var/plasteel = 0
|
||||
var/rglass = 0
|
||||
|
||||
/obj/item/weapon/sheetsnatcher/attack_self(mob/user as mob)//Credit goes to carn on this one
|
||||
var/location = get_turf(src) //fetches the turf containing the object. (so stuff spawns on the floor)
|
||||
while(metal)
|
||||
var/obj/item/stack/sheet/metal/S = new (location)
|
||||
var/stacksize = min(metal,50) //maximum stack size is 50!
|
||||
S.amount = stacksize
|
||||
metal -= stacksize
|
||||
while(glass)
|
||||
var/obj/item/stack/sheet/glass/S = new (location)
|
||||
var/stacksize = min(glass,50)
|
||||
S.amount = stacksize
|
||||
glass -= stacksize
|
||||
while(gold)
|
||||
var/obj/item/stack/sheet/mineral/gold/S = new (location)
|
||||
var/stacksize = min(gold,50)
|
||||
S.amount = stacksize
|
||||
gold -= stacksize
|
||||
while(silver)
|
||||
var/obj/item/stack/sheet/mineral/silver/S = new (location)
|
||||
var/stacksize = min(silver,50)
|
||||
S.amount = stacksize
|
||||
silver -= stacksize
|
||||
while(diamond)
|
||||
var/obj/item/stack/sheet/mineral/diamond/S = new (location)
|
||||
var/stacksize = min(diamond,50)
|
||||
S.amount = stacksize
|
||||
diamond -= stacksize
|
||||
while(plasma)
|
||||
var/obj/item/stack/sheet/mineral/plasma/S = new (location)
|
||||
var/stacksize = min(plasma,50)
|
||||
S.amount = stacksize
|
||||
plasma -= stacksize
|
||||
while(uranium)
|
||||
var/obj/item/stack/sheet/mineral/uranium/S = new (location)
|
||||
var/stacksize = min(uranium,50)
|
||||
S.amount = stacksize
|
||||
uranium -= stacksize
|
||||
while(clown)
|
||||
var/obj/item/stack/sheet/mineral/clown/S = new (location)
|
||||
var/stacksize = min(clown,50)
|
||||
S.amount = stacksize
|
||||
clown -= stacksize
|
||||
while(euranium)
|
||||
var/obj/item/stack/sheet/mineral/enruranium/S = new (location)
|
||||
var/stacksize = min(euranium,50)
|
||||
S.amount = stacksize
|
||||
euranium -= stacksize
|
||||
while(plasteel)
|
||||
var/obj/item/stack/sheet/plasteel/S = new (location)
|
||||
var/stacksize = min(plasteel,50)
|
||||
S.amount = stacksize
|
||||
plasteel -= stacksize
|
||||
while(rglass)
|
||||
var/obj/item/stack/sheet/rglass/S = new (location)
|
||||
var/stacksize = min(rglass,50)
|
||||
S.amount = stacksize
|
||||
rglass -= stacksize
|
||||
if(!metal && !glass && !gold && !silver && !diamond && !plasma && !uranium && !clown && !euranium && !plasteel && !rglass)
|
||||
user << "\blue You empty the snatch."
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/sheetsnatcher/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(W, /obj/item/stack/sheet))
|
||||
var/obj/item/stack/sheet/O = W
|
||||
src.add(O,user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/sheetsnatcher/verb/toggle_mode()
|
||||
set name = "Switch Sheet Snatcher Method"
|
||||
set category = "Object"
|
||||
|
||||
mode = !mode
|
||||
switch (mode)
|
||||
if(1)
|
||||
usr << "The snatcher now picks up all sheets on a tile at once."
|
||||
if(0)
|
||||
usr << "The snatcher now picks up one sheet at a time."
|
||||
|
||||
/obj/item/weapon/sheetsnatcher/proc/add(var/obj/item/stack/sheet/S as obj, mob/user as mob)//Handles sheets, adds them to the holder values
|
||||
if((S.name == "Sandstone Bricks") || (S.name == "Wood Planks"))//Does not pick up sandstone or wood, as they are not true sheets
|
||||
return
|
||||
var/current = metal+glass+gold+silver+diamond+plasma+uranium+clown+euranium+plasteel+rglass
|
||||
if(capacity == current)//If it's full, you're done
|
||||
user << "\red The snatcher is full."
|
||||
return
|
||||
if(capacity < current + S.amount)//If the stack will fill it up
|
||||
var/diff = capacity - current
|
||||
switch(S.name)
|
||||
if("metal")
|
||||
metal += diff
|
||||
if("glass")
|
||||
glass += diff
|
||||
if("silver")
|
||||
silver += diff
|
||||
if("gold")
|
||||
gold += diff
|
||||
if("diamond")
|
||||
diamond += diff
|
||||
if("solid plasma")
|
||||
plasma += diff
|
||||
if("uranium")
|
||||
uranium += diff
|
||||
if("bananium")
|
||||
clown += diff
|
||||
if("enriched uranium")
|
||||
euranium += diff
|
||||
if("plasteel")
|
||||
plasteel += diff
|
||||
if("reinforced glass")
|
||||
rglass += diff
|
||||
S.amount -= diff
|
||||
user << "\blue You add the [S.name] to the [name]"
|
||||
else
|
||||
switch(S.name)
|
||||
if("metal")
|
||||
metal += S.amount
|
||||
if("glass")
|
||||
glass += S.amount
|
||||
if("silver")
|
||||
silver += S.amount
|
||||
if("gold")
|
||||
gold += S.amount
|
||||
if("diamond")
|
||||
diamond += S.amount
|
||||
if("solid plasma")
|
||||
plasma += S.amount
|
||||
if("uranium")
|
||||
uranium += S.amount
|
||||
if("bananium")
|
||||
clown += S.amount
|
||||
if("enriched uranium")
|
||||
euranium += S.amount
|
||||
if("plasteel")
|
||||
plasteel += S.amount
|
||||
if("reinforced glass")
|
||||
rglass += S.amount
|
||||
user << "\blue You add the [S.name] to the [name]"
|
||||
del (S)
|
||||
return
|
||||
|
||||
/obj/item/weapon/sheetsnatcher/borg
|
||||
name = "Sheet Snatcher 9000"
|
||||
desc = ""
|
||||
capacity = 500//Borgs get more because >specialization
|
||||
@@ -17,7 +17,7 @@
|
||||
//If you died in the game and are a ghsot - this will remain as null.
|
||||
//Note that this is not a reliable way to determine if admins started as observers, since they change mobs a lot.
|
||||
universal_speak = 1
|
||||
|
||||
var/atom/movable/following = null
|
||||
/mob/dead/observer/New(mob/body)
|
||||
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
@@ -167,6 +167,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
var/list/L = list()
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
L+=T
|
||||
|
||||
if(!L || !L.len)
|
||||
usr << "No area available."
|
||||
|
||||
usr.loc = pick(L)
|
||||
|
||||
/mob/dead/observer/verb/follow()
|
||||
@@ -179,17 +183,22 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
var/input = input("Please, select a mob!", "Haunt", null, null) as null|anything in mobs
|
||||
var/mob/target = mobs[input]
|
||||
if(target && target != usr)
|
||||
following = target
|
||||
spawn(0)
|
||||
var/turf/pos = get_turf(src)
|
||||
while(src.loc == pos)
|
||||
|
||||
var/turf/T = get_turf(target)
|
||||
if(!T)
|
||||
break
|
||||
if(following != target)
|
||||
break
|
||||
if(!client)
|
||||
break
|
||||
src.loc = T
|
||||
pos = src.loc
|
||||
sleep(15)
|
||||
following = null
|
||||
|
||||
|
||||
/mob/dead/observer/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
// l_hand.screen_loc = ui_lhand
|
||||
W.equipped(src,slot_l_hand)
|
||||
if(client) client.screen |= W
|
||||
if(pulling == W) stop_pulling()
|
||||
update_inv_l_hand()
|
||||
return 1
|
||||
return 0
|
||||
@@ -42,6 +43,7 @@
|
||||
// r_hand.screen_loc = ui_rhand
|
||||
W.equipped(src,slot_r_hand)
|
||||
if(client) client.screen |= W
|
||||
if(pulling == W) stop_pulling()
|
||||
update_inv_r_hand()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
var/ghost_name = "Unknown"
|
||||
var/creating_blob = 0
|
||||
faction = "blob"
|
||||
|
||||
|
||||
New()
|
||||
@@ -251,3 +252,7 @@
|
||||
B << "Check your Blob verbs and hit Create Node to build a node."
|
||||
spawn(10)
|
||||
del(G_found)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -185,9 +185,10 @@ Des: Gives the client of the alien an image on each infected mob.
|
||||
----------------------------------------*/
|
||||
/mob/living/carbon/alien/proc/AddInfectionImages()
|
||||
if (client)
|
||||
for (var/mob/living/carbon/C in mob_list)
|
||||
for (var/mob/living/C in mob_list)
|
||||
if(C.status_flags & XENO_HOST)
|
||||
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected")
|
||||
var/obj/item/alien_embryo/A = locate() in C
|
||||
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[A.stage]")
|
||||
client.images += I
|
||||
return
|
||||
|
||||
@@ -199,11 +200,10 @@ Des: Removes all infected images from the alien.
|
||||
/mob/living/carbon/alien/proc/RemoveInfectionImages()
|
||||
if (client)
|
||||
for(var/image/I in client.images)
|
||||
if(I.icon_state == "infected")
|
||||
if(dd_hasprefix_case(I.icon_state, "infected"))
|
||||
del(I)
|
||||
return
|
||||
|
||||
|
||||
#undef HEAT_DAMAGE_LEVEL_1
|
||||
#undef HEAT_DAMAGE_LEVEL_2
|
||||
#undef HEAT_DAMAGE_LEVEL_3
|
||||
|
||||
@@ -142,8 +142,7 @@ Doesn't work on other aliens/AI.*/
|
||||
if(!istype(U, /turf))
|
||||
return
|
||||
|
||||
var/obj/item/projectile/neurotoxin/A = new /obj/item/projectile/neurotoxin(usr.loc)
|
||||
|
||||
var/obj/item/projectile/energy/neurotoxin/A = new /obj/item/projectile/energy/neurotoxin(usr.loc)
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
O.show_message("<B>[src]</B> lets out a waning guttural screech, green blood bubbling from its maw...", 1)
|
||||
update_canmove()
|
||||
if(client) blind.layer = 0
|
||||
update_icons()
|
||||
|
||||
tod = worldtime2text() //weasellos time of death patch
|
||||
if(mind) mind.store_memory("Time of death: [tod]", 0)
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel()
|
||||
mymob.zone_sel.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.zone_sel.overlays = null
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
@@ -133,82 +133,6 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/Move(a, b, flag)
|
||||
if (buckled)
|
||||
return 0
|
||||
|
||||
if (restrained())
|
||||
stop_pulling()
|
||||
|
||||
var/t7 = 1
|
||||
if (restrained())
|
||||
for(var/mob/M in range(src, 1))
|
||||
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
|
||||
t7 = null
|
||||
if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
|
||||
var/turf/T = loc
|
||||
. = ..()
|
||||
|
||||
if (pulling && pulling.loc)
|
||||
if(!( isturf(pulling.loc) ))
|
||||
stop_pulling()
|
||||
return
|
||||
else
|
||||
if(Debug)
|
||||
diary <<"pulling disappeared? at __LINE__ in mob.dm - pulling = [pulling]"
|
||||
diary <<"REPORT THIS"
|
||||
|
||||
/////
|
||||
if(pulling && pulling.anchored)
|
||||
stop_pulling()
|
||||
return
|
||||
|
||||
if (!restrained())
|
||||
var/diag = get_dir(src, pulling)
|
||||
if ((diag - 1) & diag)
|
||||
else
|
||||
diag = null
|
||||
if ((get_dist(src, pulling) > 1 || diag))
|
||||
if (ismob(pulling))
|
||||
var/mob/M = pulling
|
||||
var/ok = 1
|
||||
if (locate(/obj/item/weapon/grab, M.grabbed_by))
|
||||
if (prob(75))
|
||||
var/obj/item/weapon/grab/G = pick(M.grabbed_by)
|
||||
if (istype(G, /obj/item/weapon/grab))
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red [] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1)
|
||||
//G = null
|
||||
del(G)
|
||||
else
|
||||
ok = 0
|
||||
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
|
||||
ok = 0
|
||||
if (ok)
|
||||
var/atom/movable/t = M.pulling
|
||||
M.stop_pulling()
|
||||
|
||||
step(pulling, get_dir(pulling.loc, T))
|
||||
M.start_pulling(t)
|
||||
else
|
||||
if (pulling)
|
||||
if (istype(pulling, /obj/structure/window))
|
||||
if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST)
|
||||
for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T)))
|
||||
stop_pulling()
|
||||
if (pulling)
|
||||
step(pulling, get_dir(pulling.loc, T))
|
||||
else
|
||||
stop_pulling()
|
||||
. = ..()
|
||||
if ((s_active && !( s_active in contents ) ))
|
||||
s_active.close(src)
|
||||
|
||||
for(var/mob/living/carbon/metroid/M in view(1,src))
|
||||
M.UpdateFeed(src)
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hand_p(mob/M as mob)
|
||||
if (!ticker)
|
||||
@@ -256,7 +180,7 @@
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_metroid(mob/living/carbon/metroid/M as mob)
|
||||
/mob/living/carbon/alien/humanoid/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
@@ -271,7 +195,7 @@
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(istype(M, /mob/living/carbon/metroid/adult))
|
||||
if(istype(M, /mob/living/carbon/slime/adult))
|
||||
damage = rand(10, 40)
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
@@ -359,6 +359,8 @@
|
||||
//Other
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
if(!stunned)
|
||||
update_icons()
|
||||
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
/mob/living/carbon/alien/humanoid/queen/large/update_icons()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
update_hud() //TODO: remove the need for this to be here
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(lying)
|
||||
if(resting) icon_state = "queen_sleep"
|
||||
else icon_state = "queen_l"
|
||||
|
||||
@@ -13,10 +13,22 @@
|
||||
/mob/living/carbon/alien/humanoid/update_icons()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
update_hud() //TODO: remove the need for this to be here
|
||||
overlays = null
|
||||
if(lying)
|
||||
if(resting) icon_state = "alien[caste]_sleep"
|
||||
else icon_state = "alien[caste]_l"
|
||||
overlays.Cut()
|
||||
if(stat == DEAD)
|
||||
//If we mostly took damage from fire
|
||||
if(fireloss > 125)
|
||||
icon_state = "alien[caste]_husked"
|
||||
else
|
||||
icon_state = "alien[caste]_dead"
|
||||
for(var/image/I in overlays_lying)
|
||||
overlays += I
|
||||
else if(lying)
|
||||
if(resting)
|
||||
icon_state = "alien[caste]_sleep"
|
||||
else if(stat == UNCONSCIOUS)
|
||||
icon_state = "alien[caste]_unconscious"
|
||||
else
|
||||
icon_state = "alien[caste]_l"
|
||||
for(var/image/I in overlays_lying)
|
||||
overlays += I
|
||||
else
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
if(stat == DEAD) return
|
||||
if(healths) healths.icon_state = "health6"
|
||||
stat = DEAD
|
||||
icon_state = "larva_l"
|
||||
icon_state = "larva_dead"
|
||||
|
||||
if(!gibbed)
|
||||
update_canmove()
|
||||
|
||||
@@ -88,6 +88,9 @@
|
||||
if("jump")
|
||||
message = "<B>The [src.name]</B> jumps!"
|
||||
m_type = 1
|
||||
if("hiss_")
|
||||
message = "<B>The [src.name]</B> hisses softly."
|
||||
m_type = 1
|
||||
if("collapse")
|
||||
Paralyse(2)
|
||||
message = text("<B>[]</B> collapses!", src)
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
mymob.flash.layer = 17
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel()
|
||||
mymob.zone_sel.overlays = null
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image("icon" = 'icons/mob/zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/mob/living/carbon/alien/larva
|
||||
name = "alien larva"
|
||||
real_name = "alien larva"
|
||||
icon_state = "larva"
|
||||
icon_state = "larva0"
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
maxHealth = 25
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
var/amount_grown = 0
|
||||
var/max_grown = 200
|
||||
var/time_of_birth
|
||||
|
||||
//This is fine right now, if we're adding organ specific damage this needs to be updated
|
||||
/mob/living/carbon/alien/larva/New()
|
||||
@@ -138,72 +139,6 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/Move(a, b, flag)
|
||||
|
||||
var/t7 = 1
|
||||
if (restrained())
|
||||
for(var/mob/M in range(src, 1))
|
||||
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
|
||||
t7 = null
|
||||
|
||||
if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
|
||||
var/turf/T = loc
|
||||
. = ..()
|
||||
|
||||
if (pulling && pulling.loc)
|
||||
if(!( isturf(pulling.loc) ))
|
||||
stop_pulling()
|
||||
return
|
||||
else
|
||||
if(Debug)
|
||||
diary <<"pulling disappeared? at __LINE__ in mob.dm - pulling = [pulling]"
|
||||
diary <<"REPORT THIS"
|
||||
|
||||
/////
|
||||
if(pulling && pulling.anchored)
|
||||
stop_pulling()
|
||||
return
|
||||
|
||||
if (!restrained())
|
||||
var/diag = get_dir(src, pulling)
|
||||
if ((diag - 1) & diag)
|
||||
else
|
||||
diag = null
|
||||
if ((get_dist(src, pulling) > 1 || diag))
|
||||
if (ismob(pulling))
|
||||
var/mob/M = pulling
|
||||
var/ok = 1
|
||||
if (locate(/obj/item/weapon/grab, M.grabbed_by))
|
||||
if (prob(75))
|
||||
var/obj/item/weapon/grab/G = pick(M.grabbed_by)
|
||||
if (istype(G, /obj/item/weapon/grab))
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red [] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1)
|
||||
//G = null
|
||||
del(G)
|
||||
else
|
||||
ok = 0
|
||||
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
|
||||
ok = 0
|
||||
if (ok)
|
||||
var/atom/movable/t = M.pulling
|
||||
M.stop_pulling()
|
||||
step(pulling, get_dir(pulling.loc, T))
|
||||
M.start_pulling(t)
|
||||
else
|
||||
if (pulling)
|
||||
step(pulling, get_dir(pulling.loc, T))
|
||||
else
|
||||
stop_pulling()
|
||||
. = ..()
|
||||
if ((s_active && !( s_active in contents ) ))
|
||||
s_active.close(src)
|
||||
|
||||
for(var/mob/living/carbon/metroid/M in view(1,src))
|
||||
M.UpdateFeed(src)
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/hand_p(mob/M as mob)
|
||||
if (!ticker)
|
||||
@@ -270,7 +205,7 @@
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_metroid(mob/living/carbon/metroid/M as mob)
|
||||
/mob/living/carbon/alien/larva/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
@@ -285,7 +220,7 @@
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(istype(src, /mob/living/carbon/slime/adult))
|
||||
damage = rand(20, 40)
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
@@ -55,6 +55,9 @@
|
||||
for(var/obj/item/weapon/grab/G in src)
|
||||
G.process()
|
||||
|
||||
//some kind of bug in canmove() isn't properly calling update_icons, so this is here as a placeholder
|
||||
update_icons()
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
@@ -226,7 +229,7 @@ FUCK YOU MORE FAT CODE -Hawk*/
|
||||
return 1
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if( (getOxyLoss() > 50) || (0 > health) )
|
||||
if( (getOxyLoss() > 25) || (0 > health) )
|
||||
//if( health <= 20 && prob(1) )
|
||||
// spawn(0)
|
||||
// emote("gasp")
|
||||
@@ -244,7 +247,7 @@ FUCK YOU MORE FAT CODE -Hawk*/
|
||||
stat = UNCONSCIOUS
|
||||
if( prob(10) && health )
|
||||
spawn(0)
|
||||
emote("hiss")
|
||||
emote("hiss_")
|
||||
//CONSCIOUS
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
|
||||
@@ -28,12 +28,16 @@
|
||||
if(stat != CONSCIOUS)
|
||||
return
|
||||
|
||||
if(handcuffed || legcuffed)
|
||||
src << "\red You cannot evolve when you are cuffed."
|
||||
|
||||
if(amount_grown >= max_grown) //TODO ~Carn
|
||||
src << "\green You are growing into a beautiful alien! It is time to choose a caste."
|
||||
src << "\green There are three to choose from:"
|
||||
src << "\green <B>Hunters</B> are strong and agile, able to hunt away from the hive and rapidly move through ventilation shafts. Hunters generate plasma slowly and have low reserves."
|
||||
src << "\green <B>Sentinels</B> are tasked with protecting the hive and are deadly up close and at a range. They are not as physically imposing nor fast as the hunters."
|
||||
src << "\green <B>Drones</B> are the working class, offering the largest plasma storage and generation. They are the only caste which may evolve again, turning into the dreaded alien queen."
|
||||
//green is impossible to read, so i made these blue and changed the formatting slightly
|
||||
src << "\blue <b>You are growing into a beautiful alien! It is time to choose a caste.</b>"
|
||||
src << "\blue There are three to choose from:"
|
||||
src << "<B>Hunters</B> \blue are strong and agile, able to hunt away from the hive and rapidly move through ventilation shafts. Hunters generate plasma slowly and have low reserves."
|
||||
src << "<B>Sentinels</B> \blue are tasked with protecting the hive and are deadly up close and at a range. They are not as physically imposing nor fast as the hunters."
|
||||
src << "<B>Drones</B> \blue are the working class, offering the largest plasma storage and generation. They are the only caste which may evolve again, turning into the dreaded alien queen."
|
||||
var/alien_caste = alert(src, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone")
|
||||
|
||||
var/mob/living/carbon/alien/humanoid/new_xeno
|
||||
|
||||
@@ -1 +1,22 @@
|
||||
//No special icons processing
|
||||
|
||||
/mob/living/carbon/alien/larva/regenerate_icons()
|
||||
overlays = list()
|
||||
update_icons()
|
||||
|
||||
/mob/living/carbon/alien/larva/update_icons()
|
||||
var/state = 0
|
||||
if(amount_grown > 150)
|
||||
state = 2
|
||||
else if(amount_grown > 50)
|
||||
state = 1
|
||||
|
||||
if(stat == DEAD)
|
||||
icon_state = "larva[state]_dead"
|
||||
else if (handcuffed || legcuffed)
|
||||
icon_state = "larva[state]_cuff"
|
||||
else if (stunned)
|
||||
icon_state = "larva[state]_stun"
|
||||
else if(lying || resting)
|
||||
icon_state = "larva[state]_sleep"
|
||||
else
|
||||
icon_state = "larva[state]"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/mob/living/carbon/alien/verb/ventcrawl() // -- TLE
|
||||
set name = "Crawl through Vent"
|
||||
set name = "Crawl through vent"
|
||||
set desc = "Enter an air vent and crawl through the pipe system."
|
||||
set category = "Alien"
|
||||
handle_ventcrawl()
|
||||
@@ -0,0 +1,142 @@
|
||||
// This is to replace the previous datum/disease/alien_embryo for slightly improved handling and maintainability
|
||||
// It functions almost identically (see code/datums/diseases/alien_embryo.dm)
|
||||
|
||||
/obj/item/alien_embryo
|
||||
name = "alien embryo"
|
||||
desc = "All slimy and yuck."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "larva0_dead"
|
||||
var/mob/living/affected_mob
|
||||
var/stage = 0
|
||||
|
||||
/obj/item/alien_embryo/New()
|
||||
if(istype(loc, /mob/living))
|
||||
affected_mob = loc
|
||||
processing_objects.Add(src)
|
||||
spawn(0)
|
||||
AddInfectionImages(affected_mob)
|
||||
else
|
||||
del(src)
|
||||
|
||||
/obj/item/alien_embryo/Del()
|
||||
if(affected_mob)
|
||||
affected_mob.status_flags &= ~(XENO_HOST)
|
||||
spawn(0)
|
||||
RemoveInfectionImages(affected_mob)
|
||||
..()
|
||||
|
||||
/obj/item/alien_embryo/process()
|
||||
if(loc != affected_mob)
|
||||
affected_mob.status_flags &= ~(XENO_HOST)
|
||||
processing_objects.Remove(src)
|
||||
affected_mob = null
|
||||
spawn(0)
|
||||
RemoveInfectionImages(affected_mob)
|
||||
return
|
||||
|
||||
if(stage < 5 && prob(3))
|
||||
stage++
|
||||
spawn(0)
|
||||
RefreshInfectionImage(affected_mob)
|
||||
|
||||
switch(stage)
|
||||
if(2, 3)
|
||||
if(prob(1))
|
||||
affected_mob.emote("sneeze")
|
||||
if(prob(1))
|
||||
affected_mob.emote("cough")
|
||||
if(prob(1))
|
||||
affected_mob << "\red Your throat feels sore."
|
||||
if(prob(1))
|
||||
affected_mob << "\red Mucous runs down the back of your throat."
|
||||
if(4)
|
||||
if(prob(1))
|
||||
affected_mob.emote("sneeze")
|
||||
if(prob(1))
|
||||
affected_mob.emote("cough")
|
||||
if(prob(2))
|
||||
affected_mob << "\red Your muscles ache."
|
||||
if(prob(20))
|
||||
affected_mob.take_organ_damage(1)
|
||||
if(prob(2))
|
||||
affected_mob << "\red Your stomach hurts."
|
||||
if(prob(20))
|
||||
affected_mob.adjustToxLoss(1)
|
||||
affected_mob.updatehealth()
|
||||
if(5)
|
||||
affected_mob << "\red You feel something tearing its way out of your stomach..."
|
||||
affected_mob.adjustToxLoss(10)
|
||||
affected_mob.updatehealth()
|
||||
if(prob(50))
|
||||
AttemptGrow()
|
||||
|
||||
/obj/item/alien_embryo/proc/AttemptGrow(var/gib_on_success = 1)
|
||||
var/list/candidates = get_alien_candidates()
|
||||
var/picked = null
|
||||
|
||||
// To stop clientless larva, we will check that our host has a client
|
||||
// if we find no ghosts to become the alien. If the host has a client
|
||||
// he will become the alien but if he doesn't then we will set the stage
|
||||
// to 2, so we don't do a process heavy check everytime.
|
||||
|
||||
if(candidates.len)
|
||||
picked = pick(candidates)
|
||||
else if(affected_mob.client)
|
||||
picked = affected_mob.key
|
||||
else
|
||||
stage = 4 // Let's try again later.
|
||||
return
|
||||
|
||||
if(affected_mob.lying)
|
||||
affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_lie")
|
||||
else
|
||||
affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_stand")
|
||||
spawn(6)
|
||||
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
|
||||
if(gib_on_success)
|
||||
affected_mob.gib()
|
||||
del(src)
|
||||
|
||||
/*----------------------------------------
|
||||
Proc: RefreshInfectionImage()
|
||||
Des: Removes all infection images from aliens and places an infection image on all infected mobs for aliens.
|
||||
----------------------------------------*/
|
||||
/obj/item/alien_embryo/proc/RefreshInfectionImage()
|
||||
for(var/mob/living/carbon/alien/alien in player_list)
|
||||
if(alien.client)
|
||||
for(var/image/I in alien.client.images)
|
||||
if(dd_hasprefix_case(I.icon_state, "infected"))
|
||||
del(I)
|
||||
for(var/mob/living/L in mob_list)
|
||||
if(iscorgi(L) || iscarbon(L))
|
||||
if(L.status_flags & XENO_HOST)
|
||||
var/I = image('icons/mob/alien.dmi', loc = L, icon_state = "infected[stage]")
|
||||
alien.client.images += I
|
||||
|
||||
/*----------------------------------------
|
||||
Proc: AddInfectionImages(C)
|
||||
Des: Checks if the passed mob (C) is infected with the alien egg, then gives each alien client an infected image at C.
|
||||
----------------------------------------*/
|
||||
/obj/item/alien_embryo/proc/AddInfectionImages(var/mob/living/C)
|
||||
if(C)
|
||||
for(var/mob/living/carbon/alien/alien in player_list)
|
||||
if(alien.client)
|
||||
if(C.status_flags & XENO_HOST)
|
||||
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[stage]")
|
||||
alien.client.images += I
|
||||
|
||||
/*----------------------------------------
|
||||
Proc: RemoveInfectionImage(C)
|
||||
Des: Removes the alien infection image from all aliens in the world located in passed mob (C).
|
||||
----------------------------------------*/
|
||||
|
||||
/obj/item/alien_embryo/proc/RemoveInfectionImages(var/mob/living/C)
|
||||
if(C)
|
||||
for(var/mob/living/carbon/alien/alien in player_list)
|
||||
if(alien.client)
|
||||
for(var/image/I in alien.client.images)
|
||||
if(I.loc == C)
|
||||
if(dd_hasprefix_case(I.icon_state, "infected"))
|
||||
del(I)
|
||||
@@ -15,7 +15,7 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
icon_state = "facehugger"
|
||||
item_state = "facehugger"
|
||||
w_class = 1 //note: can be picked up by aliens unlike most other items of w_class below 4
|
||||
flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH|MASKCOVERSEYES
|
||||
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | MASKINTERNALS
|
||||
throw_range = 5
|
||||
|
||||
var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case
|
||||
@@ -35,7 +35,7 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attack_hand(user as mob)
|
||||
if(stat == CONSCIOUS && !isalien(user))
|
||||
if((stat == CONSCIOUS && !sterile) && !isalien(user))
|
||||
Attach(user)
|
||||
return
|
||||
else
|
||||
@@ -85,21 +85,31 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/on_found(mob/finder as mob)
|
||||
HasProximity(finder)
|
||||
return 1
|
||||
|
||||
/obj/item/clothing/mask/facehugger/dropped()
|
||||
..()
|
||||
GoActive()
|
||||
if(stat == CONSCIOUS)
|
||||
HasProximity(finder)
|
||||
return 1
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/HasProximity(atom/movable/AM as mob|obj)
|
||||
if(CanHug(AM))
|
||||
Attach(AM)
|
||||
|
||||
/obj/item/clothing/mask/facehugger/throw_at(atom/target, range, speed)
|
||||
..()
|
||||
if(stat == CONSCIOUS)
|
||||
icon_state = "[initial(icon_state)]_thrown"
|
||||
spawn(15)
|
||||
if(icon_state == "[initial(icon_state)]_thrown")
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
/obj/item/clothing/mask/facehugger/throw_impact(atom/hit_atom)
|
||||
if(prob(25))
|
||||
..()
|
||||
if(stat == CONSCIOUS)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
Attach(hit_atom)
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/proc/Attach(M as mob)
|
||||
if(!iscarbon(M) || isalien(M))
|
||||
if( (!iscorgi(M) && !iscarbon(M)) || isalien(M))
|
||||
return
|
||||
if(attached)
|
||||
return
|
||||
@@ -110,67 +120,67 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
|
||||
var/mob/living/L = M //just so I don't need to use :
|
||||
|
||||
if(loc == L) return
|
||||
if(stat != CONSCIOUS) return
|
||||
if(!sterile) L.take_organ_damage(strength,0) //done here so that even borgs and humans in helmets take damage
|
||||
|
||||
var/mob/living/carbon/target = L
|
||||
L.visible_message("\red \b [src] leaps at [L]'s face!")
|
||||
|
||||
for(var/mob/O in viewers(target, null))
|
||||
O.show_message("\red \b [src] leaps at [target]'s face!", 1)
|
||||
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.head && H.head.flags & HEADCOVERSMOUTH)
|
||||
for(var/mob/O in viewers(H, null))
|
||||
O.show_message("\red \b [src] smashes against [H]'s [H.head]!", 1)
|
||||
H.visible_message("\red \b [src] smashes against [H]'s [H.head]!")
|
||||
Die()
|
||||
return
|
||||
|
||||
if(target.wear_mask)
|
||||
if(prob(20)) return
|
||||
var/obj/item/clothing/W = target.wear_mask
|
||||
if(!W.canremove) return
|
||||
target.drop_from_inventory(W)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/target = L
|
||||
|
||||
for(var/mob/O in viewers(target, null))
|
||||
O.show_message("\red \b [src] tears [W] off of [target]'s face!", 1)
|
||||
if(target.wear_mask)
|
||||
if(prob(20)) return
|
||||
var/obj/item/clothing/W = target.wear_mask
|
||||
if(!W.canremove) return
|
||||
target.drop_from_inventory(W)
|
||||
|
||||
if(prob(75))
|
||||
loc = target
|
||||
layer = 20
|
||||
target.wear_mask = src
|
||||
target.update_inv_wear_mask()
|
||||
target.visible_message("\red \b [src] tears [W] off of [target]'s face!")
|
||||
|
||||
GoIdle() //so it doesn't jump the people that tear it off
|
||||
target.equip_to_slot(src, slot_wear_mask)
|
||||
|
||||
if(!sterile) target.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
|
||||
if(!sterile) L.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
|
||||
else if (iscorgi(M))
|
||||
var/mob/living/simple_animal/corgi/C = M
|
||||
src.loc = C
|
||||
C.facehugger = src
|
||||
C.wear_mask = src
|
||||
//C.regenerate_icons()
|
||||
|
||||
spawn(rand(MIN_IMPREGNATION_TIME,MAX_IMPREGNATION_TIME))
|
||||
Impregnate(target)
|
||||
else
|
||||
for(var/mob/O in viewers(target, null))
|
||||
O.show_message("\red \b [src] misses [target]'s face!", 1)
|
||||
GoIdle() //so it doesn't jump the people that tear it off
|
||||
|
||||
spawn(rand(MIN_IMPREGNATION_TIME,MAX_IMPREGNATION_TIME))
|
||||
Impregnate(L)
|
||||
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/proc/Impregnate(mob/living/carbon/target as mob)
|
||||
/obj/item/clothing/mask/facehugger/proc/Impregnate(mob/living/target as mob)
|
||||
if(!target || target.wear_mask != src || target.stat == DEAD) //was taken off or something
|
||||
return
|
||||
|
||||
if(!sterile)
|
||||
target.contract_disease(new /datum/disease/alien_embryo(0)) //so infection chance is same as virus infection chance
|
||||
for(var/datum/disease/alien_embryo/A in target.viruses)
|
||||
target.status_flags |= XENO_HOST
|
||||
break
|
||||
//target.contract_disease(new /datum/disease/alien_embryo(0)) //so infection chance is same as virus infection chance
|
||||
new /obj/item/alien_embryo(target)
|
||||
target.status_flags |= XENO_HOST
|
||||
|
||||
for(var/mob/O in viewers(target,null))
|
||||
O.show_message("\red \b [src] falls limp after violating [target]'s face!", 1)
|
||||
target.visible_message("\red \b [src] falls limp after violating [target]'s face!")
|
||||
|
||||
Die()
|
||||
icon_state = "[initial(icon_state)]_impregnated"
|
||||
|
||||
if(iscorgi(target))
|
||||
var/mob/living/simple_animal/corgi/C = target
|
||||
src.loc = get_turf(C)
|
||||
C.facehugger = null
|
||||
else
|
||||
for(var/mob/O in viewers(target,null))
|
||||
O.show_message("\red \b [src] violates [target]'s face!", 1)
|
||||
target.update_inv_wear_mask()
|
||||
target.visible_message("\red \b [src] violates [target]'s face!")
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/proc/GoActive()
|
||||
@@ -210,16 +220,15 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
icon_state = "[initial(icon_state)]_dead"
|
||||
stat = DEAD
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red \b[src] curls up into a ball!", 1)
|
||||
src.visible_message("\red \b[src] curls up into a ball!")
|
||||
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/HasProximity(atom/movable/AM as mob|obj)
|
||||
if(CanHug(AM))
|
||||
Attach(AM)
|
||||
|
||||
/proc/CanHug(var/mob/M)
|
||||
|
||||
if(iscorgi(M))
|
||||
return 1
|
||||
|
||||
if(!iscarbon(M) || isalien(M))
|
||||
return 0
|
||||
var/mob/living/carbon/C = M
|
||||
@@ -227,4 +236,4 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(H.head && H.head.flags & HEADCOVERSMOUTH)
|
||||
return 0
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/human))
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/metroid))
|
||||
if (istype(other, /mob/living/carbon/slime))
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
brainmob.client.screen.len = null //clear the hud
|
||||
|
||||
proc
|
||||
transfer_identity(var/mob/living/carbon/human/H)
|
||||
transfer_identity(var/mob/living/carbon/H)
|
||||
name = "[H]'s brain"
|
||||
brainmob = new(src)
|
||||
brainmob.name = H.real_name
|
||||
@@ -32,7 +32,7 @@
|
||||
brainmob.timeofhostdeath = H.timeofdeath
|
||||
if(H.mind)
|
||||
H.mind.transfer_to(brainmob)
|
||||
brainmob << "\blue You might feel slightly disoriented. That's normal when your brain gets cut out."
|
||||
brainmob << "\blue You feel slightly disoriented. That's normal when you're just a brain."
|
||||
return
|
||||
|
||||
/obj/item/brain/examine() // -- TLE
|
||||
@@ -41,10 +41,10 @@
|
||||
return
|
||||
usr << "This is \icon[src] \an [name]."
|
||||
|
||||
if(brainmob)//if thar be a brain inside... the brain.
|
||||
if(brainmob && brainmob.client)//if thar be a brain inside... the brain.
|
||||
usr << "You can feel the small spark of life still left in this one."
|
||||
else
|
||||
usr << "This one seems particularly lifeless. Perhaps it will regain some of its luster later. Probably not."
|
||||
usr << "This one seems particularly lifeless. Perhaps it will regain some of its luster later.."
|
||||
|
||||
/obj/item/brain/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M, /mob))
|
||||
|
||||
@@ -59,15 +59,15 @@
|
||||
return
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
world << "1 [D.spread]"
|
||||
|
||||
if(D.spread_by_touch())
|
||||
world << "1 contract"
|
||||
|
||||
M.contract_disease(D, 0, 1, CONTACT_HANDS)
|
||||
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
world << "2 [D.spread]"
|
||||
|
||||
if(D.spread_by_touch())
|
||||
world << "2 contract"
|
||||
|
||||
contract_disease(D, 0, 1, CONTACT_HANDS)
|
||||
|
||||
return
|
||||
@@ -151,8 +151,7 @@
|
||||
swap_hand()
|
||||
|
||||
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
|
||||
if (src.health > config.health_threshold_crit)
|
||||
if(src == M && istype(src, /mob/living/carbon/human))
|
||||
if (src.health >= config.health_threshold_crit) if(src == M && istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
src.visible_message( \
|
||||
text("\blue [src] examines [].",src.gender==MALE?"himself":"herself"), \
|
||||
@@ -412,10 +411,9 @@
|
||||
|
||||
item.throw_at(target, item.throw_range, item.throw_speed)
|
||||
|
||||
/mob/living/carbon/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > CARBON_LIFEFORM_FIRE_RESISTANCE)
|
||||
adjustFireLoss(CARBON_LIFEFORM_FIRE_DAMAGE)
|
||||
/mob/living/carbon/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
bodytemperature = max(bodytemperature, BODYTEMP_HEAT_DAMAGE_LIMIT+10)
|
||||
|
||||
/mob/living/carbon/can_use_hands()
|
||||
if(handcuffed)
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
var/list/stomach_contents = list()
|
||||
var/brain_op_stage = 0.0
|
||||
var/ribcage_op_stage = 0
|
||||
var/alien_op_stage = 0.0
|
||||
/*
|
||||
var/eye_op_stage = 0.0
|
||||
var/appendix_op_stage = 0.0
|
||||
*/
|
||||
var/datum/disease2/disease/virus2 = null
|
||||
var/list/datum/disease2/disease/resistances2 = list()
|
||||
|
||||
var/antibodies = 0
|
||||
|
||||
var/silent = null //Can't talk. Value goes down every life proc.
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
msg += "<span class='warning'>[t_He] [t_is] twitching ever so slightly.</span>\n"
|
||||
|
||||
if(suiciding)
|
||||
msg += "<span class='warning'>[t_He] [t_has] bitten off [t_his] own tongue and [t_has] suffered major bloodloss!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] appears to have commited suicide... there is no hope of recovery.</span>\n"
|
||||
|
||||
if(mSmallsize in mutations)
|
||||
msg += "[t_He] [t_is] small halfling!\n"
|
||||
@@ -396,23 +396,24 @@
|
||||
var/criminal = "None"
|
||||
|
||||
if(wear_id)
|
||||
if(istype(wear_id,/obj/item/weapon/card/id))
|
||||
perpname = wear_id:registered_name
|
||||
else if(istype(wear_id,/obj/item/device/pda))
|
||||
var/obj/item/device/pda/tempPda = wear_id
|
||||
perpname = tempPda.owner
|
||||
var/obj/item/weapon/card/id/I = wear_id.GetID()
|
||||
if(I)
|
||||
perpname = I.registered_name
|
||||
else
|
||||
perpname = name
|
||||
else
|
||||
perpname = name
|
||||
|
||||
for (var/datum/data/record/E in data_core.general)
|
||||
if(E.fields["name"] == perpname)
|
||||
for (var/datum/data/record/R in data_core.security)
|
||||
if(R.fields["id"] == E.fields["id"])
|
||||
criminal = R.fields["criminal"]
|
||||
if(perpname)
|
||||
for (var/datum/data/record/E in data_core.general)
|
||||
if(E.fields["name"] == perpname)
|
||||
for (var/datum/data/record/R in data_core.security)
|
||||
if(R.fields["id"] == E.fields["id"])
|
||||
criminal = R.fields["criminal"]
|
||||
|
||||
|
||||
msg += "<span class = 'deptradio'>Criminal status:</span> <a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a>\n"
|
||||
//msg += "\[Set Hostile Identification\]\n"
|
||||
msg += "<span class = 'deptradio'>Criminal status:</span> <a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a>\n"
|
||||
//msg += "\[Set Hostile Identification\]\n"
|
||||
|
||||
if(print_flavor_text()) msg += "[print_flavor_text()]\n"
|
||||
|
||||
|
||||
@@ -482,7 +482,7 @@
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel( null )
|
||||
mymob.zone_sel.icon = ui_style
|
||||
mymob.zone_sel.overlays = null
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
|
||||
mymob.client.screen = null
|
||||
@@ -598,10 +598,6 @@ Radar-related things
|
||||
if(M.stat == 2) continue
|
||||
found_targets.Add(M)
|
||||
|
||||
for(var/obj/effect/critter/C in orange(max_dist, distance_ref))
|
||||
if(!C.alive) continue
|
||||
found_targets.Add(C)
|
||||
|
||||
for(var/obj/mecha/M in orange(max_dist, distance_ref))
|
||||
if(!M.occupant) continue
|
||||
found_targets.Add(M)
|
||||
@@ -655,10 +651,6 @@ Radar-related things
|
||||
blip.icon_state = "unknownblip"
|
||||
blip.name = "Unknown Organism"
|
||||
|
||||
else if(istype(A, /obj/effect/critter))
|
||||
blip.icon_state = "unknownblip"
|
||||
blip.name = "Unknown Organism"
|
||||
|
||||
else if(istype(A, /obj/mecha))
|
||||
blip.icon_state = "roboblip"
|
||||
blip.name = "Robotic Organism"
|
||||
|
||||
@@ -149,9 +149,9 @@
|
||||
loc = tmob.loc
|
||||
tmob.loc = oldloc
|
||||
now_pushing = 0
|
||||
for(var/mob/living/carbon/metroid/Metroid in view(1,tmob))
|
||||
if(Metroid.Victim == tmob)
|
||||
Metroid.UpdateFeed()
|
||||
for(var/mob/living/carbon/slime/slime in view(1,tmob))
|
||||
if(slime.Victim == tmob)
|
||||
slime.UpdateFeed()
|
||||
return
|
||||
|
||||
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
||||
@@ -329,110 +329,6 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/Move(a, b, flag)
|
||||
|
||||
if (buckled)
|
||||
return
|
||||
|
||||
if (restrained())
|
||||
stop_pulling()
|
||||
|
||||
|
||||
var/t7 = 1
|
||||
if (restrained())
|
||||
for(var/mob/living/M in range(src, 1))
|
||||
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
|
||||
t7 = null
|
||||
if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
|
||||
var/turf/T = loc
|
||||
. = ..()
|
||||
|
||||
if (pulling && pulling.loc)
|
||||
if(!( isturf(pulling.loc) ))
|
||||
stop_pulling()
|
||||
return
|
||||
else
|
||||
if(Debug)
|
||||
diary <<"pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]"
|
||||
diary <<"REPORT THIS"
|
||||
|
||||
/////
|
||||
if(pulling && pulling.anchored)
|
||||
stop_pulling()
|
||||
return
|
||||
|
||||
if (!restrained())
|
||||
var/diag = get_dir(src, pulling)
|
||||
if ((diag - 1) & diag)
|
||||
else
|
||||
diag = null
|
||||
if ((get_dist(src, pulling) > 1 || diag))
|
||||
if (isliving(pulling))
|
||||
var/mob/living/M = pulling
|
||||
var/ok = 1
|
||||
if (locate(/obj/item/weapon/grab, M.grabbed_by))
|
||||
if (prob(75))
|
||||
var/obj/item/weapon/grab/G = pick(M.grabbed_by)
|
||||
if (istype(G, /obj/item/weapon/grab))
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red [] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1)
|
||||
//G = null
|
||||
del(G)
|
||||
else
|
||||
ok = 0
|
||||
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
|
||||
ok = 0
|
||||
if (ok)
|
||||
var/atom/movable/t = M.pulling
|
||||
M.stop_pulling()
|
||||
|
||||
//this is the gay blood on floor shit -- Added back -- Skie
|
||||
if (M.lying && (prob(M.getBruteLoss() / 6)))
|
||||
var/turf/location = M.loc
|
||||
if (istype(location, /turf/simulated))
|
||||
location.add_blood(M)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/H = M
|
||||
var/blood_volume = round(H:vessel.get_reagent_amount("blood"))
|
||||
if(blood_volume > 0)
|
||||
H:vessel.remove_reagent("blood",1)
|
||||
if(prob(5))
|
||||
M.adjustBruteLoss(1)
|
||||
visible_message("\red \The [M]'s wounds open more from being dragged!")
|
||||
if(M.pull_damage())
|
||||
if(prob(25))
|
||||
M.adjustBruteLoss(2)
|
||||
visible_message("\red \The [M]'s wounds worsen terribly from being dragged!")
|
||||
var/turf/location = M.loc
|
||||
if (istype(location, /turf/simulated))
|
||||
location.add_blood(M)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/H = M
|
||||
var/blood_volume = round(H:vessel.get_reagent_amount("blood"))
|
||||
if(blood_volume > 0)
|
||||
H:vessel.remove_reagent("blood",1)
|
||||
|
||||
|
||||
step(pulling, get_dir(pulling.loc, T))
|
||||
M.start_pulling(t)
|
||||
else
|
||||
if (pulling)
|
||||
if (istype(pulling, /obj/structure/window))
|
||||
if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST)
|
||||
for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T)))
|
||||
stop_pulling()
|
||||
if (pulling)
|
||||
step(pulling, get_dir(pulling.loc, T))
|
||||
else
|
||||
stop_pulling()
|
||||
. = ..()
|
||||
if ((s_active && !( s_active in contents ) ))
|
||||
s_active.close(src)
|
||||
|
||||
for(var/mob/living/carbon/metroid/M in view(1,src))
|
||||
M.UpdateFeed(src)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/human/hand_p(mob/M as mob)
|
||||
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
|
||||
@@ -469,7 +365,7 @@
|
||||
if(armor >= 2) return
|
||||
|
||||
|
||||
/mob/living/carbon/human/attack_metroid(mob/living/carbon/metroid/M as mob)
|
||||
/mob/living/carbon/human/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if(M.Victim) return // can't attack while eating!
|
||||
|
||||
if (health > -100)
|
||||
@@ -480,7 +376,7 @@
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(istype(M, /mob/living/carbon/metroid/adult))
|
||||
if(istype(M, /mob/living/carbon/slime/adult))
|
||||
damage = rand(10, 35)
|
||||
else
|
||||
damage = rand(5, 25)
|
||||
@@ -691,15 +587,26 @@
|
||||
if(istype(usr, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
|
||||
|
||||
/* // Uncomment if you want sechuds to need security access
|
||||
var/allowed_access = 0
|
||||
if(H.wear_id)
|
||||
var/list/access = H.wear_id.GetAccess()
|
||||
if(access_security in access)
|
||||
allowed_access = 1
|
||||
return
|
||||
|
||||
if(!allowed_access)
|
||||
H << "<span class='warning'>ERROR: Invalid Access</span>"
|
||||
return
|
||||
*/
|
||||
|
||||
var/perpname = "wot"
|
||||
var/modified = 0
|
||||
|
||||
if(wear_id)
|
||||
if(istype(wear_id,/obj/item/weapon/card/id))
|
||||
perpname = wear_id:registered_name
|
||||
else if(istype(wear_id,/obj/item/device/pda))
|
||||
var/obj/item/device/pda/tempPda = wear_id
|
||||
perpname = tempPda.owner
|
||||
var/obj/item/weapon/card/id/I = wear_id.GetID()
|
||||
perpname = I.registered_name
|
||||
else
|
||||
perpname = src.name
|
||||
|
||||
|
||||
@@ -57,9 +57,7 @@
|
||||
|
||||
switch(M.a_intent)
|
||||
if("help")
|
||||
if(health > config.health_threshold_crit)
|
||||
diary << "\[[time2text(world.timeofday, "hh:mm.ss")]\] CPR BUGHINTING: [M] shakes [src]: health - [health], threshold - [config.health_threshold_crit]. Health details: OX [getOxyLoss()] TX [getToxLoss()] BU [getFireLoss()] BR [getBruteLoss()] Blood: [round(vessel.get_reagent_amount("blood"))] out of 560"
|
||||
help_shake_act(M)
|
||||
if(health >= config.health_threshold_crit) help_shake_act(M)
|
||||
return 1
|
||||
// if(M.health < -75) return 0
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
var/obj/item/glasses = null
|
||||
var/obj/item/head = null
|
||||
var/obj/item/ears = null
|
||||
var/obj/item/weapon/card/id/wear_id = null
|
||||
var/obj/item/wear_id = null
|
||||
var/obj/item/r_store = null
|
||||
var/obj/item/l_store = null
|
||||
var/obj/item/s_store = null
|
||||
|
||||
@@ -364,6 +364,7 @@
|
||||
if("mask")
|
||||
if(target.wear_mask && !target.wear_mask.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.wear_mask] from [target]'s head!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off \a [source.wear_mask] from [target]'s head!</B>"
|
||||
if("l_hand")
|
||||
@@ -373,26 +374,31 @@
|
||||
if("gloves")
|
||||
if(target.gloves && !target.gloves.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.gloves] from [target]'s hands!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off the [target.gloves] from [target]'s hands!</B>"
|
||||
if("eyes")
|
||||
if(target.glasses && !target.glasses.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.glasses] from [target]'s eyes!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off the [target.glasses] from [target]'s eyes!</B>"
|
||||
if("ears")
|
||||
if(target.ears && !target.ears.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.ears] from [target]'s ears!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off the [target.ears] from [target]'s ears!</B>"
|
||||
if("head")
|
||||
if(target.head && !target.head.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.head] from [target]'s head!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off the [target.head] from [target]'s head!</B>"
|
||||
if("shoes")
|
||||
if(target.shoes && !target.shoes.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.shoes] from [target]'s feet!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off the [target.shoes] from [target]'s feet!</B>"
|
||||
if("belt")
|
||||
@@ -400,6 +406,7 @@
|
||||
if("suit")
|
||||
if(target.wear_suit && !target.wear_suit.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.wear_suit] from [target]'s body!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off \a [target.wear_suit] from [target]'s body!</B>"
|
||||
if("back")
|
||||
@@ -414,6 +421,7 @@
|
||||
return
|
||||
if(target.w_uniform && !target.w_uniform.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.w_uniform] from [target]'s body!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off \a [target.w_uniform] from [target]'s body!</B>"
|
||||
if("s_store")
|
||||
@@ -466,11 +474,11 @@ It can still be worn/put on as normal.
|
||||
switch(place) //here we go again...
|
||||
if("mask")
|
||||
slot_to_process = slot_wear_mask
|
||||
if (target.wear_mask)
|
||||
if (target.wear_mask && target.wear_mask.canremove)
|
||||
strip_item = target.wear_mask
|
||||
if("gloves")
|
||||
slot_to_process = slot_gloves
|
||||
if (target.gloves)
|
||||
if (target.gloves && target.gloves.canremove)
|
||||
strip_item = target.gloves
|
||||
if("eyes")
|
||||
slot_to_process = slot_glasses
|
||||
@@ -486,7 +494,7 @@ It can still be worn/put on as normal.
|
||||
strip_item = target.s_store
|
||||
if("head")
|
||||
slot_to_process = slot_head
|
||||
if (target.head)
|
||||
if (target.head && target.head.canremove)
|
||||
strip_item = target.head
|
||||
if("ears")
|
||||
slot_to_process = slot_ears
|
||||
@@ -494,7 +502,7 @@ It can still be worn/put on as normal.
|
||||
strip_item = target.ears
|
||||
if("shoes")
|
||||
slot_to_process = slot_shoes
|
||||
if (target.shoes)
|
||||
if (target.shoes && target.shoes.canremove)
|
||||
strip_item = target.shoes
|
||||
if("l_hand")
|
||||
if (istype(target, /obj/item/clothing/suit/straight_jacket))
|
||||
@@ -510,11 +518,11 @@ It can still be worn/put on as normal.
|
||||
strip_item = target.r_hand
|
||||
if("uniform")
|
||||
slot_to_process = slot_w_uniform
|
||||
if (target.w_uniform)
|
||||
if(target.w_uniform && target.w_uniform.canremove)
|
||||
strip_item = target.w_uniform
|
||||
if("suit")
|
||||
slot_to_process = slot_wear_suit
|
||||
if (target.wear_suit)
|
||||
if (target.wear_suit && target.wear_suit.canremove)
|
||||
strip_item = target.wear_suit
|
||||
if("id")
|
||||
slot_to_process = slot_wear_id
|
||||
|
||||
@@ -1340,11 +1340,8 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
if(dna)
|
||||
switch(dna.mutantrace)
|
||||
if("metroid")
|
||||
see_in_dark = 3
|
||||
if("lizard","slime") see_in_dark = 3
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_ONE
|
||||
if("lizard")
|
||||
see_in_dark = 3
|
||||
if("tajaran")
|
||||
see_in_dark = 4
|
||||
if("shadow")
|
||||
@@ -1415,15 +1412,10 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
if(!druggy) see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/hud))
|
||||
var/obj/item/clothing/glasses/hud/health/O = glasses
|
||||
|
||||
if(istype(O, /obj/item/clothing/glasses/hud/health))
|
||||
O.process_hud(src)
|
||||
if(!druggy) see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
else if(istype(O, /obj/item/clothing/glasses/hud/security))
|
||||
O.process_hud(src)
|
||||
if(!druggy) see_invisible = SEE_INVISIBLE_LIVING
|
||||
var/obj/item/clothing/glasses/hud/O = glasses
|
||||
O.process_hud(src)
|
||||
if(!druggy)
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
else
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
else
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/*if(src.dna.mutantrace == "lizard") //Soghun stutterss-s-ss-sss.
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
message = replacetext(message, "s", stutter("ss"))*/
|
||||
if(src.dna.mutantrace == "metroid" && prob(5))
|
||||
/*if(src.dna.mutantrace == "slime" && prob(5))
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
if(copytext(message, 1, 2) == ";")
|
||||
message = ";"
|
||||
@@ -31,7 +31,7 @@
|
||||
message += "SKR"
|
||||
var/imax = rand(5,20)
|
||||
for(var/i = 0,i<imax,i++)
|
||||
message += "E"
|
||||
message += "E"*/
|
||||
|
||||
if(stat != DEAD)
|
||||
for(var/datum/disease/pierrot_throat/D in viruses)
|
||||
@@ -70,6 +70,7 @@
|
||||
message += " OLE!"
|
||||
|
||||
if ((HULK in mutations) && health >= 25)
|
||||
if ((HULK in mutations) && health >= 25 && length(message))
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
message = "[uppertext(message)]!!" //because I don't know how to code properly in getting vars from other files -Bro
|
||||
|
||||
@@ -135,7 +136,7 @@
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/brain))
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/metroid))
|
||||
if (istype(other, /mob/living/carbon/slime))
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ There are several things that need to be remembered:
|
||||
|
||||
All of these are named after the variable they update from. They are defined at the mob/ level like
|
||||
update_clothing was, so you won't cause undefined proc runtimes with usr.update_inv_wear_id() if the usr is a
|
||||
metroid etc. Instead, it'll just return without doing any work. So no harm in calling it for metroids and such.
|
||||
slime etc. Instead, it'll just return without doing any work. So no harm in calling it for slimes and such.
|
||||
|
||||
|
||||
> There are also these special cases:
|
||||
@@ -133,7 +133,7 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
update_hud() //TODO: remove the need for this
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
|
||||
if(lying) //can't be cloaked when lying. (for now)
|
||||
icon = lying_icon
|
||||
@@ -448,8 +448,7 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
//BS12 EDIT
|
||||
if(dna)
|
||||
switch(dna.mutantrace)
|
||||
if("golem","metroid","shadow")
|
||||
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_l")
|
||||
if("lizard","golem","slime","shadow","adamantine") overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_l")
|
||||
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_s")
|
||||
if("lizard","tajaran","skrell")
|
||||
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[gender]_l")
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
/mob/living/carbon/metroid/death(gibbed)
|
||||
/mob/living/carbon/slime/death(gibbed)
|
||||
if(stat == DEAD) return
|
||||
stat = DEAD
|
||||
icon_state = "baby roro dead"
|
||||
icon_state = "[colour] baby slime dead"
|
||||
|
||||
if(!gibbed)
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(istype(src, /mob/living/carbon/slime/adult))
|
||||
ghostize()
|
||||
explosion(loc, -1,-1,3,12)
|
||||
var/mob/living/carbon/slime/M1 = new primarytype(loc)
|
||||
M1.rabid = 1
|
||||
var/mob/living/carbon/slime/M2 = new primarytype(loc)
|
||||
M2.rabid = 1
|
||||
if(src) del(src)
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/metroid/emote(var/act)
|
||||
/mob/living/carbon/slime/emote(var/act)
|
||||
|
||||
|
||||
if (findtext(act, "-", 1, null))
|
||||
@@ -16,11 +16,6 @@
|
||||
if("moan")
|
||||
message = "<B>The [src.name]</B> moans."
|
||||
m_type = 2
|
||||
// if("roar")
|
||||
// if (!muzzled)
|
||||
// message = "<B>The [src.name]</B> roars." Commenting out since larva shouldn't roar /N
|
||||
// m_type = 2
|
||||
|
||||
if("shiver")
|
||||
message = "<B>The [src.name]</B> shivers."
|
||||
m_type = 2
|
||||
@@ -36,17 +31,11 @@
|
||||
if("light")
|
||||
message = "<B>The [src.name]</B> lights up for a bit, then stops."
|
||||
m_type = 1
|
||||
if("click")
|
||||
message = "<B>The [src.name]</B> makes a clicking noise!"
|
||||
if("jiggle")
|
||||
message = "<B>The [src.name]</B> jiggles!"
|
||||
m_type = 1
|
||||
if("chatter")
|
||||
message = "<B>The [src.name]</B> makes a noisy chattering sound!"
|
||||
m_type = 1
|
||||
if("growl")
|
||||
message = "<B>The [src.name]</B> growls!"
|
||||
m_type = 1
|
||||
if("shriek")
|
||||
message = "<B>The [src.name]</B> makes a high-pitched shriek!"
|
||||
if("bounce")
|
||||
message = "<B>The [src.name]</B> bounces in place."
|
||||
m_type = 1
|
||||
else
|
||||
src << text("Invalid Emote: []", act)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/metroid/examine()
|
||||
/mob/living/carbon/slime/examine()
|
||||
set src in oview()
|
||||
|
||||
if(!usr || !src) return
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
/mob/living/carbon/metroid/proc/regular_hud_updates()
|
||||
/mob/living/carbon/slime/proc/regular_hud_updates()
|
||||
return
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/metroid/Life()
|
||||
/mob/living/carbon/slime/Life()
|
||||
set invisibility = 0
|
||||
set background = 1
|
||||
|
||||
@@ -41,21 +41,21 @@
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/metroid
|
||||
/mob/living/carbon/slime
|
||||
var/AIproc = 0 // determines if the AI loop is activated
|
||||
var/Atkcool = 0 // attack cooldown
|
||||
var/Tempstun = 0 // temporary temperature stuns
|
||||
var/Discipline = 0 // if a metroid has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while
|
||||
var/Discipline = 0 // if a slime has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while
|
||||
var/SStun = 0 // stun variable
|
||||
|
||||
/mob/living/carbon/metroid/proc/AIprocess() // the master AI process
|
||||
/mob/living/carbon/slime/proc/AIprocess() // the master AI process
|
||||
|
||||
//world << "AI proc started."
|
||||
if(AIproc || stat == DEAD || client) return
|
||||
|
||||
var/hungry = 0
|
||||
var/starving = 0
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(istype(src, /mob/living/carbon/slime/adult))
|
||||
switch(nutrition)
|
||||
if(400 to 1100) hungry = 1
|
||||
if(0 to 399)
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
if(Target)
|
||||
//world << "[Target] Target Found"
|
||||
for(var/mob/living/carbon/metroid/M in view(1,Target))
|
||||
for(var/mob/living/carbon/slime/M in view(1,Target))
|
||||
if(M.Victim == Target)
|
||||
Target = null
|
||||
AIproc = 0
|
||||
@@ -104,7 +104,7 @@
|
||||
Atkcool = 0
|
||||
|
||||
if(get_obstacle_ok(Target))
|
||||
Target.attack_metroid(src)
|
||||
Target.attack_slime(src)
|
||||
//world << "retrun 1"
|
||||
return
|
||||
if(!Target.lying && prob(80))
|
||||
@@ -117,7 +117,7 @@
|
||||
Atkcool = 0
|
||||
|
||||
if(get_obstacle_ok(Target))
|
||||
Target.attack_metroid(src)
|
||||
Target.attack_slime(src)
|
||||
|
||||
|
||||
if(prob(30))
|
||||
@@ -145,12 +145,12 @@
|
||||
var/sleeptime = movement_delay()
|
||||
if(sleeptime <= 0) sleeptime = 1
|
||||
|
||||
sleep(sleeptime + 2) // this is about as fast as a player Metroid can go
|
||||
sleep(sleeptime + 2) // this is about as fast as a player slime can go
|
||||
|
||||
AIproc = 0
|
||||
//world << "AI proc ended."
|
||||
|
||||
/mob/living/carbon/metroid/proc/handle_environment(datum/gas_mixture/environment)
|
||||
/mob/living/carbon/slime/proc/handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment)
|
||||
adjustToxLoss(rand(10,20))
|
||||
return
|
||||
@@ -208,7 +208,7 @@
|
||||
return //TODO: DEFERRED
|
||||
|
||||
|
||||
/mob/living/carbon/metroid/proc/adjust_body_temperature(current, loc_temp, boost)
|
||||
/mob/living/carbon/slime/proc/adjust_body_temperature(current, loc_temp, boost)
|
||||
var/temperature = current
|
||||
var/difference = abs(current-loc_temp) //get difference
|
||||
var/increments// = difference/10 //find how many increments apart they are
|
||||
@@ -225,7 +225,7 @@
|
||||
temp_change = (temperature - current)
|
||||
return temp_change
|
||||
|
||||
/mob/living/carbon/metroid/proc/handle_chemicals_in_body()
|
||||
/mob/living/carbon/slime/proc/handle_chemicals_in_body()
|
||||
|
||||
if(reagents) reagents.metabolize(src)
|
||||
|
||||
@@ -235,9 +235,9 @@
|
||||
return //TODO: DEFERRED
|
||||
|
||||
|
||||
/mob/living/carbon/metroid/proc/handle_regular_status_updates()
|
||||
/mob/living/carbon/slime/proc/handle_regular_status_updates()
|
||||
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(istype(src, /mob/living/carbon/slime/adult))
|
||||
health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
else
|
||||
health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
@@ -315,10 +315,10 @@
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/carbon/metroid/proc/handle_nutrition()
|
||||
/mob/living/carbon/slime/proc/handle_nutrition()
|
||||
|
||||
if(prob(20))
|
||||
if(istype(src, /mob/living/carbon/metroid/adult)) nutrition-=rand(4,6)
|
||||
if(istype(src, /mob/living/carbon/slime/adult)) nutrition-=rand(4,6)
|
||||
else nutrition-=rand(2,3)
|
||||
|
||||
if(nutrition <= 0)
|
||||
@@ -328,7 +328,7 @@
|
||||
adjustToxLoss(rand(0,5))
|
||||
|
||||
else
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(istype(src, /mob/living/carbon/slime/adult))
|
||||
if(nutrition >= 1000)
|
||||
if(prob(40)) amount_grown++
|
||||
|
||||
@@ -336,29 +336,69 @@
|
||||
if(nutrition >= 800)
|
||||
if(prob(40)) amount_grown++
|
||||
|
||||
//lay eggs or grow
|
||||
if(amount_grown >= 10 && !Victim && !Target)
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(!client && nutrition >= 1000)
|
||||
var/number = pick(1,1,1,1,1,1,2,2,2,3) //number of eggs laid
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/egg/roro/E
|
||||
for(var/i=1,i<=number,i++)
|
||||
E = new(loc)
|
||||
src.nutrition -= 200
|
||||
step_away(E,src)
|
||||
if(istype(src, /mob/living/carbon/slime/adult))
|
||||
if(!client)
|
||||
for(var/i=1,i<=4,i++)
|
||||
if(prob(70))
|
||||
var/mob/living/carbon/slime/M = new primarytype(loc)
|
||||
M.powerlevel = round(powerlevel/4)
|
||||
M.Friends = Friends
|
||||
M.tame = tame
|
||||
M.rabid = rabid
|
||||
M.Discipline = Discipline
|
||||
if(i != 1) step_away(M,src)
|
||||
else
|
||||
var/mutations = pick("one","two","three","four")
|
||||
switch(mutations)
|
||||
if("one")
|
||||
var/mob/living/carbon/slime/M = new mutationone(loc)
|
||||
M.powerlevel = round(powerlevel/4)
|
||||
M.Friends = Friends
|
||||
M.tame = tame
|
||||
M.rabid = rabid
|
||||
M.Discipline = Discipline
|
||||
if(i != 1) step_away(M,src)
|
||||
if("two")
|
||||
var/mob/living/carbon/slime/M = new mutationtwo(loc)
|
||||
M.powerlevel = round(powerlevel/4)
|
||||
M.Friends = Friends
|
||||
M.tame = tame
|
||||
M.rabid = rabid
|
||||
M.Discipline = Discipline
|
||||
if(i != 1) step_away(M,src)
|
||||
if("three")
|
||||
var/mob/living/carbon/slime/M = new mutationthree(loc)
|
||||
M.powerlevel = round(powerlevel/4)
|
||||
M.Friends = Friends
|
||||
M.tame = tame
|
||||
M.rabid = rabid
|
||||
M.Discipline = Discipline
|
||||
if(i != 1) step_away(M,src)
|
||||
if("four")
|
||||
var/mob/living/carbon/slime/M = new mutationfour(loc)
|
||||
M.powerlevel = round(powerlevel/4)
|
||||
M.Friends = Friends
|
||||
M.tame = tame
|
||||
M.rabid = rabid
|
||||
M.Discipline = Discipline
|
||||
if(i != 1) step_away(M,src)
|
||||
|
||||
del(src)
|
||||
|
||||
else
|
||||
if(!client)
|
||||
var/mob/living/carbon/metroid/adult/A = new/mob/living/carbon/metroid/adult(src.loc)
|
||||
var/mob/living/carbon/slime/adult/A = new adulttype(src.loc)
|
||||
A.nutrition = nutrition
|
||||
A.nutrition += 100
|
||||
// A.nutrition += 100
|
||||
A.powerlevel = max(0, powerlevel-1)
|
||||
A.Friends = Friends
|
||||
A.tame = tame
|
||||
A.rabid = rabid
|
||||
del(src)
|
||||
|
||||
/mob/living/carbon/metroid/proc/handle_targets()
|
||||
|
||||
/mob/living/carbon/slime/proc/handle_targets()
|
||||
if(Tempstun)
|
||||
if(!Victim) // not while they're eating!
|
||||
canmove = 0
|
||||
@@ -393,15 +433,15 @@
|
||||
if(Victim) return // if it's eating someone already, continue eating!
|
||||
|
||||
|
||||
if(prob(5))
|
||||
emote(pick("click","chatter","sway","light","vibrate","chatter","shriek"))
|
||||
if(prob(1))
|
||||
emote(pick("bounce","sway","light","vibrate","jiggle"))
|
||||
|
||||
if(AIproc && SStun) return
|
||||
|
||||
|
||||
var/hungry = 0 // determines if the metroid is hungry
|
||||
var/starving = 0 // determines if the metroid is starving-hungry
|
||||
if(istype(src, /mob/living/carbon/metroid/adult)) // 1200 max nutrition
|
||||
var/hungry = 0 // determines if the slime is hungry
|
||||
var/starving = 0 // determines if the slime is starving-hungry
|
||||
if(istype(src, /mob/living/carbon/slime/adult)) // 1200 max nutrition
|
||||
switch(nutrition)
|
||||
if(601 to 900)
|
||||
if(prob(25)) hungry = 1//Ensures they continue eating, but aren't as aggressive at the same time
|
||||
@@ -417,7 +457,7 @@
|
||||
if(0 to 200) starving = 1
|
||||
|
||||
|
||||
if(starving && !client) // if a metroid is starving, it starts losing its friends
|
||||
if(starving && !client) // if a slime is starving, it starts losing its friends
|
||||
if(Friends.len > 0 && prob(1))
|
||||
var/mob/nofriend = pick(Friends)
|
||||
Friends -= nofriend
|
||||
@@ -428,42 +468,42 @@
|
||||
if(hungry || starving) //Only add to the list if we need to
|
||||
for(var/mob/living/L in view(7,src))
|
||||
|
||||
//Ignore other metroids, dead mobs and simple_animals
|
||||
if(ismetroid(L) || L.stat != CONSCIOUS || isanimal(L))
|
||||
//Ignore other slimes, dead mobs and simple_animals
|
||||
if(isslime(L) || L.stat != CONSCIOUS || isanimal(L))
|
||||
continue
|
||||
|
||||
if(issilicon(L))
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult)) //Non-starving diciplined adult metroids wont eat things
|
||||
if(!istype(src, /mob/living/carbon/slime/adult)) //Non-starving diciplined adult slimes wont eat things
|
||||
if(!starving && Discipline > 0)
|
||||
continue
|
||||
|
||||
if(tame) //Tame metroids ignore electronic life
|
||||
if(tame) //Tame slimes ignore electronic life
|
||||
continue
|
||||
|
||||
targets += L //Possible target found!
|
||||
|
||||
else if(iscarbon(L))
|
||||
|
||||
if(istype(L, /mob/living/carbon/human)) //Ignore metroid(wo)men
|
||||
if(istype(L, /mob/living/carbon/human)) //Ignore slime(wo)men
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.dna)
|
||||
if(H.dna.mutantrace == "metroid")
|
||||
if(H.dna.mutantrace == "slime")
|
||||
continue
|
||||
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult)) //Non-starving diciplined adult metroids wont eat things
|
||||
if(!istype(src, /mob/living/carbon/slime/adult)) //Non-starving diciplined adult slimes wont eat things
|
||||
if(!starving && Discipline > 0)
|
||||
continue
|
||||
|
||||
if(L in Friends) //No eating friends!
|
||||
continue
|
||||
|
||||
if(tame && ishuman(L)) //Tame metroids dont eat people.
|
||||
if(tame && ishuman(L)) //Tame slimes dont eat people.
|
||||
continue
|
||||
|
||||
if(!L.canmove) //Only one metroid can latch on at a time.
|
||||
if(!L.canmove) //Only one slime can latch on at a time.
|
||||
|
||||
var/notarget = 0
|
||||
for(var/mob/living/carbon/metroid/M in view(1,L))
|
||||
for(var/mob/living/carbon/slime/M in view(1,L))
|
||||
if(M.Victim == L)
|
||||
notarget = 1
|
||||
if(notarget)
|
||||
@@ -474,7 +514,7 @@
|
||||
|
||||
|
||||
if((hungry || starving) && targets.len > 0)
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(!istype(src, /mob/living/carbon/slime/adult))
|
||||
if(!starving)
|
||||
for(var/mob/living/carbon/C in targets)
|
||||
if(!Discipline && prob(5))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user