Conflicts:
	baystation12.dme
This commit is contained in:
comma
2012-03-02 22:04:20 +02:00
144 changed files with 11811 additions and 20164 deletions

View File

@@ -50,7 +50,7 @@ atom/proc/add_fibers(mob/living/carbon/human/M)
if(!suit_fibers.len) del suit_fibers
atom/proc/get_duplicate(var/atom/location)
var/atom/temp_atom = new src.type(location)
var/atom/movable/temp_atom = new /atom/movable(location)
temp_atom.name = src.name
temp_atom.desc = src.desc
temp_atom.icon = src.icon
@@ -92,16 +92,13 @@ obj/machinery/computer/forensic_scanning
scan_data = ""
scan_name = ""
scan_process = 0
booked = 0
req_access = list(access_forensics_lockers)
New()
..()
if(!booked)
new /obj/item/weapon/book/manual/detective(get_turf(src))
booked = 1
new /obj/item/weapon/book/manual/detective(get_turf(src))
return
@@ -643,7 +640,7 @@ obj/machinery/computer/forensic_scanning
return
proc/update_fingerprints() //I am tired, but this updates the master print, which is used to determine completion of a print.
proc/update_fingerprints() //I am tired, but this updates the master print from evidence, which is used to determine completion of a print.
for(var/k = 1, k <= files.len, k++)
var/list/perp_list = files[k]
var/list/perp_prints = params2list(perp_list[1])
@@ -664,8 +661,7 @@ obj/machinery/computer/forensic_scanning
files[k] = perp_list
return
proc/process_card() //I am tired, but this updates the master print from a fingerprint card
//which is used to determine completion of a print.
proc/process_card() //Same as above, but for fingerprint cards
if(card.fingerprints && !(card.amount > 1))
for(var/k = 1, k <= card.fingerprints.len, k++)
var/list/test_prints = params2list(card.fingerprints[k])
@@ -687,22 +683,22 @@ obj/machinery/computer/forensic_scanning
return
return
proc/delete_record(var/location)
proc/delete_record(var/location) //Deletes an entry in the misc database at the given location
if(misc && misc.len)
for(var/i = location, i < misc.len, i++)
misc[i] = misc[i+i]
misc.len--
return
proc/get_name(var/atom/A)
proc/get_name(var/atom/A) //HurrDurr
return A.name
proc/delete_dossier(var/location)
proc/delete_dossier(var/location) //Deletes a Dossier at a given location.
if(files && files.len)
if(files.len < location)
if(files.len > location)
for(var/i = location, i < files.len, i++)
files[i] = files[i + 1]
if(files.len <= location)
if(files.len >= location)
files[files.len] = list()
files.len--
return
@@ -725,7 +721,7 @@ obj/item/clothing/gloves/var
obj/effect/decal/cleanable/blood/var
track_amt = 3
track_amt = 2
mob/blood_owner
turf/Exited(mob/living/carbon/human/M)
@@ -751,21 +747,21 @@ turf/Entered(mob/living/carbon/human/M)
M.shoes.track_blood--
src.add_bloody_footprints(M.shoes.track_blood_mob,0,M.dir,M.shoes.name)
//REMOVED until we improve it.
// for(var/obj/effect/decal/cleanable/blood/B in src)
// if(B.track_amt <= 0) continue
// if(B.type != /obj/effect/decal/cleanable/blood/tracks)
// if(istype(M,/mob/living/carbon/human))
// if(M.shoes)
// M.shoes.add_blood(B.blood_owner)
// M.shoes.track_blood_mob = B.blood_owner
// M.shoes.track_blood = max(M.shoes.track_blood,8)
// else
// M.add_blood(B.blood_owner)
// M.track_blood_mob = B.blood_owner
// M.track_blood = max(M.track_blood,rand(4,8))
// B.track_amt--
// break
for(var/obj/effect/decal/cleanable/blood/B in src)
if(B.track_amt <= 0) continue
if(B.type != /obj/effect/decal/cleanable/blood/tracks)
if(istype(M,/mob/living/carbon/human))
if(M.shoes)
M.shoes.add_blood(B.blood_owner)
M.shoes.track_blood_mob = B.blood_owner
M.shoes.track_blood = max(M.shoes.track_blood,8)
else
M.add_blood(B.blood_owner)
M.track_blood_mob = B.blood_owner
M.track_blood = max(M.track_blood,rand(4,8))
B.track_amt--
break
. = ..()
turf/proc/add_bloody_footprints(mob/living/carbon/human/M,leaving,d,info)
@@ -831,6 +827,6 @@ proc/blood_incompatible(donor,receiver)
if(istype(A))
user.visible_message("[user] starts to wipe down [A] with [src]!")
if(do_after(user,30))
user.visible_message("[user] finishes wiping away the evidence!")
user.visible_message("[user] finishes wiping off the [A]!")
A.clean_blood()
return

View File

@@ -23,6 +23,11 @@ var/savefile/Banlist
var/id = clientvar.computer_id
var/key = clientvar.ckey
if(!Banlist) // if Banlist cannot be located for some reason
LoadBans() // try to load the bans
if(!Banlist) // uh oh, can't find bans!
return 0 // ABORT ABORT ABORT
Banlist.cd = "/base"
if (Banlist.dir.Find("[key][id]"))
Banlist.cd = "[key][id]"

View File

@@ -1898,6 +1898,20 @@
dat += "</body></html>"
usr << browse(dat, "window=adminplayerinfo;size=480x480")
/obj/admins/proc/show_skills(var/mob/living/carbon/human/M as mob in world)
set category = "Admin"
set name = "Show Skills"
if (!istype(src,/obj/admins))
src = usr.client.holder
if (!istype(src,/obj/admins))
usr << "Error: you are not an admin!"
return
show_skill_window(usr, M)
return
/obj/admins/proc/Jobbans()
if ((src.rank in list( "Game Admin", "Game Master" )))
var/dat = "<B>Job Bans!</B><HR><table>"

View File

@@ -267,6 +267,7 @@
verbs += /client/proc/unban_panel
verbs += /client/proc/jobbans
verbs += /client/proc/playernotes
verbs += /obj/admins/proc/show_skills
verbs += /obj/admins/proc/vmode
verbs += /obj/admins/proc/votekill
verbs += /client/proc/voting
@@ -394,6 +395,7 @@
verbs -= /client/proc/unban_panel
verbs -= /client/proc/jobbans
verbs -= /client/proc/playernotes
verbs -= /obj/admins/proc/show_skills
verbs -= /obj/admins/proc/vmode
verbs -= /obj/admins/proc/votekill
verbs -= /client/proc/voting

View File

@@ -19,6 +19,7 @@
delay = 0
airlock_wire = null
datum/radio_frequency/radio_connection
deadman = 0
proc
signal()
@@ -145,4 +146,25 @@
radio_controller.remove_object(src, frequency)
frequency = new_frequency
radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)
return
return
process()
if(!deadman)
processing_objects.Remove(src)
var/mob/M = src.loc
if(!M || !ismob(M))
if(prob(5))
signal()
deadman = 0
processing_objects.Remove(src)
else if(prob(5))
M.visible_message("[M]'s finger twitches a bit over [src]'s signal button!")
return
verb/deadman_it()
set src in usr
set name = "Threaten to push the button!"
set desc = "BOOOOM!"
deadman = 1
processing_objects.Add(src)
usr.visible_message("\red [usr] moves their finger over [src]'s signal button...")

View File

@@ -156,6 +156,9 @@ datum
if(!blood_prop) //first blood!
blood_prop = new(T)
blood_prop.blood_DNA = list(list(self.data["blood_DNA"], self.data["blood_type"]))
else
blood_prop.blood_DNA.len++
blood_prop.blood_DNA[blood_prop.blood_DNA.len] = list(self.data["blood_DNA"], self.data["blood_type"])
for(var/datum/disease/D in self.data["viruses"])
var/datum/disease/newVirus = new D.type
@@ -179,7 +182,11 @@ datum
var/obj/effect/decal/cleanable/blood/blood_prop = locate() in T
if(!blood_prop)
blood_prop = new(T)
blood_prop.blood_DNA = list(list(self.data["blood_DNA"]))
blood_prop.blood_DNA = list(list(self.data["blood_DNA"],"A+"))
else
blood_prop.blood_DNA.len++
blood_prop.blood_DNA[blood_prop.blood_DNA.len] = list(self.data["blood_DNA"], "A+")
for(var/datum/disease/D in self.data["viruses"])
var/datum/disease/newVirus = new D.type
blood_prop.viruses += newVirus
@@ -196,7 +203,11 @@ datum
var/obj/effect/decal/cleanable/xenoblood/blood_prop = locate() in T
if(!blood_prop)
blood_prop = new(T)
blood_prop.blood_DNA = list(list(self.data["blood_DNA"]))
blood_prop.blood_DNA = list(list("UNKNOWN DNA","X*"))
else
blood_prop.blood_DNA.len++
blood_prop.blood_DNA[blood_prop.blood_DNA.len] = list("UNKNOWN DNA","X*")
for(var/datum/disease/D in self.data["viruses"])
var/datum/disease/newVirus = new D.type
blood_prop.viruses += newVirus
@@ -388,6 +399,9 @@ datum
if(25 to INFINITY)
M.Paralyse(20)
M.drowsyness = max(M:drowsyness, 30)
// NO.
// if(50 to INFINITY)
// M:adjustToxLoss(0.1)
data++
..()
return
@@ -423,6 +437,8 @@ datum
M.slurring = 0
M.confused = 0
M.jitteriness = 0
if(50 to INFINITY)
M:adjustToxLoss(0.1)
..()
return
@@ -449,12 +465,16 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(!data) data = 1
data++
M.druggy = max(M.druggy, 15)
if(isturf(M.loc) && !istype(M.loc, /turf/space))
if(M.canmove)
if(prob(10)) step(M, pick(cardinal))
if(prob(7)) M:emote(pick("twitch","drool","moan","giggle"))
holder.remove_reagent(src.id, 0.2)
if(data >= 50)
M:adjustToxLoss(min(((data-50)/10),3))
return
serotrotium
@@ -582,6 +602,7 @@ datum
if(M.canmove && istype(M.loc, /turf/space))
step(M, pick(cardinal))
if(prob(5)) M:emote(pick("twitch","drool","moan"))
M:adjustToxLoss(1)
..()
return
@@ -820,7 +841,6 @@ datum
M.adjustToxLoss(100)
M:antibodies |= M:virus2.antigen
..()
return
@@ -840,8 +860,13 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(!data) data = 1
data++
M.mutations = 0
M.disabilities = 0
switch(data)
if(50 to INFINITY)
M:adjustToxLoss(min(((data-50)/10),3))
..()
return
@@ -1142,10 +1167,14 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(!data) data = 1
data++
if(M.bodytemperature > 310)
M.bodytemperature = max(310, M.bodytemperature-20)
else if(M.bodytemperature < 311)
M.bodytemperature = min(310, M.bodytemperature+20)
if(data >= 50)
M:adjustToxLoss(min(((data-50)/10),3))
..()
return
@@ -1158,10 +1187,14 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(!data) data = 1
data++
M.make_dizzy(1)
if(!M.confused) M.confused = 1
M.confused = max(M.confused, 20)
holder.remove_reagent(src.id, 0.2)
if(data >= 50)
M:adjustToxLoss(min(((data-50)/10),3))
..()
return
@@ -1194,7 +1227,11 @@ datum
if(M.stat == 2.0)
return
if(!M) M = holder.my_atom
if(!data) data = 1
data++
M:heal_organ_damage(0,2)
if(data >= 50)
M:adjustToxLoss(min(((data-50)/10),3))
..()
return
@@ -1209,7 +1246,11 @@ datum
if(M.stat == 2.0) //THE GUY IS **DEAD**! BEREFT OF ALL LIFE HE RESTS IN PEACE etc etc. He does NOT metabolise shit anymore, god DAMN
return
if(!M) M = holder.my_atom
if(!data) data = 1
data++
M:heal_organ_damage(0,3)
if(data >= 50)
M:adjustToxLoss(min(((data-50)/10),3))
..()
return
@@ -1224,9 +1265,13 @@ datum
if(M.stat == 2.0)
return //See above, down and around. --Agouri
if(!M) M = holder.my_atom
if(!data) data = 1
data++
M:adjustOxyLoss(-2)
if(holder.has_reagent("lexorin"))
holder.remove_reagent("lexorin", 2)
if(data >= 50)
M:adjustToxLoss(min(((data-50)/10),3))
..()
return
@@ -1241,9 +1286,13 @@ datum
if(M.stat == 2.0)
return
if(!M) M = holder.my_atom
if(!data) data = 1
data++
M:oxyloss = 0
if(holder.has_reagent("lexorin"))
holder.remove_reagent("lexorin", 2)
if(data >= 50)
M:adjustToxLoss(min(((data-50)/10),3))
..()
return
@@ -1366,10 +1415,14 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(!data) data = 1
data++
M:jitteriness = max(M:jitteriness-5,0)
if(prob(80)) M:adjustBrainLoss(1)
if(prob(50)) M:drowsyness = max(M:drowsyness, 3)
if(prob(10)) M:emote("drool")
if(data >= 50)
M:adjustToxLoss(min(((data-50)/10),3))
..()
return
@@ -1383,6 +1436,8 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M:radiation = max(M:radiation-3,0)
if(data >= 50)
M:adjustToxLoss(min(((data-50)/10),3))
..()
return
@@ -1397,11 +1452,15 @@ datum
if(M.stat == 2.0)
return //See above, down and around. --Agouri
if(!M) M = holder.my_atom
if(!data) data = 1
data++
M:radiation = max(M:radiation-7,0)
M:adjustToxLoss(-1)
if(prob(15))
M.take_organ_damage(1, 0)
..()
if(data >= 50)
M:adjustToxLoss(min(((data-50)/10),3))
return
alkysine
@@ -1414,6 +1473,7 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M:adjustBrainLoss(-3)
M:adjustToxLoss(0.1)
..()
return
@@ -1426,10 +1486,13 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(!data) data = 1
data++
M:eye_blurry = max(M:eye_blurry-5 , 0)
M:eye_blind = max(M:eye_blind-5 , 0)
M:disabilities &= ~1
// M:sdisabilities &= ~1 Replaced by eye surgery
if(data >= 50)
M:adjustToxLoss(min(((data-50)/10),3))
..()
return
@@ -1444,7 +1507,11 @@ datum
if(M.stat == 2.0)
return
if(!M) M = holder.my_atom
if(!data) data = 1
data++
M:heal_organ_damage(2,0)
if(data >= 50)
M:adjustToxLoss(0.1)
..()
return
@@ -1457,8 +1524,12 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(!data) data = 1
data++
if(prob(5)) M:emote(pick("twitch","blink_r","shiver"))
holder.remove_reagent(src.id, 0.2)
if(data >= 50)
M:adjustToxLoss(min(((data-50)/5),3))
..()
return
@@ -1477,7 +1548,7 @@ datum
M:heal_organ_damage(3,3)
M:adjustToxLoss(-3)
M:halloss = 0
M:hallucination -= 5
M:hallucination = max(M:hallucination - 5,0)
..()
return
@@ -1506,7 +1577,11 @@ datum
color = "#C8A5DC" // rgb: 200, 165, 220
on_mob_life(var/mob/living/M as mob)//no more mr. panacea
if(!data) data = 1
data++
holder.remove_reagent(src.id, 0.1)
if(data >= 50)
M:adjustToxLoss(min(((data-50)/10),3))
return
carpotoxin
@@ -1546,7 +1621,7 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M:bodytemperature -= 50 //This and the following two lines need to be checked and tinkered with so that the Cryo-In-A-Syringe
M:bodytemperature = max(M:bodytemperature - 30, 100) //This and the following two lines need to be checked and tinkered with so that the Cryo-In-A-Syringe
if(prob(5)) // leaves someone at 100% healthy from anything up to in heavy crit (-75%)
M.take_organ_damage(0, 1)
if(prob(80) && istype(M, /mob/living/carbon/metroid))
@@ -1568,7 +1643,11 @@ datum
on_mob_life(var/mob/M)
if(!M) M = holder.my_atom
if(!data) data = 1
data++
M:hallucination += 5
if(data >= 50)
M:adjustToxLoss(0.1)
..()
return
@@ -4032,6 +4111,4 @@ datum
else if(data >= 115 && prob(60))
M.confused = max(M:confused+15,15)
..()
return*/
return*/

View File

@@ -1226,12 +1226,11 @@
/obj/item/weapon/reagent_containers/hypospray/attack_paw(mob/user as mob)
return src.attack_hand(user)
/*
/obj/item/weapon/reagent_containers/hypospray/New()
/obj/item/weapon/reagent_containers/hypospray/New() //comment this to make hypos start off empty
..()
reagents.add_reagent("tricordrazine", 30) //uncomment this to make it start with stuff in
reagents.add_reagent("tricordrazine", 30)
return
*/
/obj/item/weapon/reagent_containers/hypospray/attack(mob/M as mob, mob/user as mob)
if(!reagents.total_volume)

View File

@@ -52,6 +52,13 @@
icon_state = "marisa"
item_state = "marisarobe"
/obj/item/clothing/suit/wizrobe/magusblue
name = "Magus Robe"
desc = "A set of armoured robes that seem to radiate a dark power"
icon_state = "magusblue"
item_state = "magusblue"
/obj/item/clothing/suit/wizrobe/fake
name = "wizard robe"

View File

@@ -0,0 +1 @@
//add custom items you give to people here, and put their icons in custom_items.dmi

View File

@@ -0,0 +1,40 @@
//switch this out to use a database at some point
//list of ckey/ real_name and item paths
//gives item to specific people when they join if it can
//for multiple items just add mutliple entries, unless i change it to be a listlistlist
//yes, it has to be an item, you can't pick up nonitems
/proc/EquipCustomItems(mob/living/carbon/human/M)
// load lines
var/file = file2text("config/custom_items.txt")
var/lines = dd_text2list(file, "\n")
for(var/line in lines)
// split & clean up
var/list/Entry = dd_text2list(line, ":")
for(var/i = 1 to Entry.len)
Entry[i] = trim(Entry[i])
if(Entry.len < 3)
continue;
if(Entry[1] == M.ckey && Entry[2] == M.real_name)
var/list/Paths = dd_text2list(Entry[3], ",")
for(var/P in Paths)
var/ok = 0 // 1 if the item was placed successfully
P = trim(P)
var/path = text2path(P)
var/obj/item/Item = new path()
if(istype(M.back,/obj/item/weapon/storage) && M.back:contents.len < M.back:storage_slots) // Try to place it in something on the mob's back first
Item.loc = M.back
ok = 1
else
for(var/obj/item/weapon/storage/S in M.contents) // Try to place it in any item that can store stuff, on the mob.
if (S:len < S:storage_slots)
Item.loc = S
ok = 1
break
if (ok == 0) // Finally, since everything else failed, place it on the ground
Item.loc = get_turf(M.loc)

View File

@@ -132,6 +132,7 @@ mob/living/carbon/proc/handle_hallucinations()
src << 'Taser.ogg'
//Rare audio
if(12)
//These sounds are (mostly) taken from Hidden: Source
var/list/creepyasssounds = list('ghost.ogg', 'ghost2.ogg', 'Heart Beat.ogg', 'screech.ogg',\
'behind_you1.ogg', 'behind_you2.ogg', 'far_noise.ogg', 'growl1.ogg', 'growl2.ogg',\
'growl3.ogg', 'im_here1.ogg', 'im_here2.ogg', 'i_see_you1.ogg', 'i_see_you2.ogg',\

View File

@@ -444,6 +444,13 @@
AddCamoOverlay(loc)//Overlay camo.
else
invisibility = 0
if(targeted_by && target_locked)
overlays += target_locked
else if(targeted_by)
target_locked = new /obj/effect/target_locked(src)
overlays += target_locked
else if(!targeted_by && target_locked)
del(target_locked)
for (var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))

View File

@@ -22,7 +22,7 @@
var/s_tone = 0.0
var/age = 30.0
var/used_skillpoints = 0
var/skills = null
var/list/skills = null
// var/b_type
var/obj/item/clothing/suit/wear_suit = null
@@ -765,7 +765,6 @@
for(var/mob/living/carbon/metroid/M in view(1,src))
M.UpdateFeed(src)
return
/mob/living/carbon/human/update_clothing()
@@ -1174,6 +1173,13 @@
invisibility = 2
else
invisibility = 0
if(targeted_by && target_locked)
overlays += target_locked
else if(targeted_by)
target_locked = new /obj/effect/target_locked(src)
overlays += target_locked
else if(!targeted_by && target_locked)
del(target_locked)
/*
for (var/mob/M in viewers(1, src))//For the love of god DO NOT REFRESH EVERY SECOND - Mport
@@ -2643,4 +2649,4 @@ It can still be worn/put on as normal.
/mob/living/carbon/human/proc/check_dna()
dna.check_integrity(src)
return
return

View File

@@ -121,6 +121,7 @@
..() //for organs
src.moved_recently = max(0, moved_recently-1)
/mob/living/carbon/human
proc

View File

@@ -94,7 +94,6 @@
if(prob(1))
emote(pick("scratch","jump","roll","tail"))
/mob/living/carbon/monkey
proc

View File

@@ -439,8 +439,7 @@
if(update_icon) // Skie
..()
for(var/i in overlays)
overlays -= i
overlays = null
if (!( lying ))
icon_state = "monkey1"
@@ -505,6 +504,13 @@
else
m_select.screen_loc = null
if(targeted_by && target_locked)
overlays += target_locked
else if(targeted_by)
target_locked = new /obj/effect/target_locked(src)
overlays += target_locked
else if(!targeted_by && target_locked)
del(target_locked)
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
spawn( 0 )
@@ -560,7 +566,6 @@
for(var/mob/living/carbon/metroid/M in view(1,src))
M.UpdateFeed(src)
return
/mob/living/carbon/monkey/verb/removeinternal()

View File

@@ -42,9 +42,9 @@
if(!effect || (blocked >= 2)) return 0
switch(effecttype)
if(STUN)
Stun((effect - (effect*getarmor(null, "melee")))/(blocked + 1))
Stun((effect - (min(effect*getarmor(null, "laser"), effect*(0.75 + (blocked*0.05))))))
if(WEAKEN)
Weaken((effect - (effect*getarmor(null, "melee")))/(blocked + 1))
Weaken((effect - (min(effect*getarmor(null, "laser"), effect*(0.75 + (blocked*0.05))))))
if(PARALYZE)
Paralyse(effect/(blocked+1))
if(IRRADIATE)

View File

@@ -45,6 +45,12 @@
flash_weak_pain()
if(istype(equipped(),/obj/item/device/assembly/signaler))
var/obj/item/device/assembly/signaler/signaler = equipped()
if(signaler.deadman && prob(80))
src.visible_message("\red [src] triggers their deadman's switch!")
signaler.signal()
var/absorb = run_armor_check(def_zone, P.flag)
if(absorb >= 2)
P.on_hit(src,2)

View File

@@ -86,22 +86,39 @@
var/channel_prefix = copytext(message, 1, 3)
var/list/keys = list(
":r" = "right ear",
":l" = "left ear",
":i" = "intercom",
":h" = "department",
":c" = "Command",
":n" = "Science",
":m" = "Medical",
":e" = "Engineering",
":s" = "Security",
":w" = "whisper",
":b" = "binary",
":a" = "alientalk",
":t" = "Syndicate",
":d" = "Mining",
":q" = "Cargo",
":g" = "changeling",
":r" = "right ear",
":l" = "left ear",
":i" = "intercom",
":h" = "department",
":c" = "Command",
":n" = "Science",
":m" = "Medical",
":e" = "Engineering",
":s" = "Security",
":w" = "whisper",
":b" = "binary",
":a" = "alientalk",
":t" = "Syndicate",
":d" = "Mining",
":q" = "Cargo",
":g" = "changeling",
":R" = "right hand",
":L" = "left hand",
":I" = "intercom",
":H" = "department",
":C" = "Command",
":N" = "Science",
":M" = "Medical",
":E" = "Engineering",
":S" = "Security",
":W" = "whisper",
":B" = "binary",
":A" = "alientalk",
":T" = "Syndicate",
":D" = "Mining",
":Q" = "Cargo",
":G" = "changeling",
//kinda localization -- rastaf0
//same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding.

View File

@@ -700,6 +700,14 @@
overlays += "ov-openpanel +c"
else
overlays += "ov-openpanel -c"
if(targeted_by && target_locked)
overlays += target_locked
else if(targeted_by)
target_locked = new /obj/effect/target_locked(src)
overlays += target_locked
else if(!targeted_by && target_locked)
del(target_locked)
return

View File

@@ -15,13 +15,13 @@
return
if (length(message) >= 2)
if (copytext(message, 1, 3) == ":s")
if ((copytext(message, 1, 3) == ":s") || (copytext(message, 1, 3) == ":S"))
if(istype(src, /mob/living/silicon/pai))
return ..(message)
message = copytext(message, 3)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
robot_talk(message)
else if (copytext(message, 1, 3) == ":h")
else if ((copytext(message, 1, 3) == ":h") || (copytext(message, 1, 3) == ":H"))
if(isAI(src)&&client)//For patching directly into AI holopads.
message = copytext(message, 3)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))

View File

@@ -277,6 +277,13 @@
back = null
else if (W == wear_mask)
wear_mask = null
if(istype(W,/obj/item/weapon/gun))
var/obj/item/weapon/gun/gun = W
if(gun.target)
gun.target.NotTargeted(gun)
del(item_use_icon)
del(gun_move_icon)
del(gun_run_icon)
update_clothing()
return
@@ -786,6 +793,14 @@
flick("gibbed-h", animation)
else if(ismonkey(src))
flick("gibbed-m", animation)
else if(ismetroid(src))
flick("gibbed-m", animation)
else if(iscrab(src))
flick("gibbed-m", animation)
else if(iscorgi(src))
flick("gibbed-m", animation)
else if(iscat(src))
flick("gibbed-m", animation) //New-has monkey gib effect versus robogib
else if(isalien(src))
flick("gibbed-a", animation)
else
@@ -800,6 +815,14 @@
else
gibs(loc, viruses, dna)
/* else if(key)
if(istype(src, /mob/living/simple_animals)) //Should gib all simple_animals like a monkey
gibs(loc, viruses)
else if (istype(src, /mob/living/simple_animals))
gibs(loc, viruses)
Currently doesn't work, but should be useful later or at least as a template
*/
else
if(istype(src, /mob/living/silicon))
robogibs(loc, viruses)

View File

@@ -50,6 +50,16 @@
return 1
return 0
/proc/iscrab(A)
if(istype(A, /mob/living/simple_animal/crab))
return 1
return 0
/proc/iscat(A)
if(istype(A, /mob/living/simple_animal/cat))
return 1
return 0
/proc/istajaran(A)
if(istype(A, /mob/living/carbon/human/tajaran))
return 1

View File

@@ -173,6 +173,7 @@
return 0
move_delay = world.time//set move delay
mob.last_move_intent = world.time + 10
switch(mob.m_intent)
if("run")
if(mob.drowsyness > 0)

View File

@@ -292,8 +292,14 @@
var/obj/item/weapon/card/id/C = H.wear_id
if (C)
G.fields["rank"] = C.assignment
G.fields["real_rank"] = H.mind.assigned_role
else
G.fields["rank"] = "Unassigned"
if(H.mind && H.mind.assigned_role)
G.fields["rank"] = H.mind.assigned_role
G.fields["real_rank"] = H.mind.assigned_role
else
G.fields["rank"] = "Unassigned"
G.fields["real_rank"] = G.fields["rank"]
G.fields["name"] = H.real_name
G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
M.fields["name"] = G.fields["name"]
@@ -332,6 +338,7 @@
L.fields["age"] = H.age
L.fields["id"] = md5("[H.real_name][H.mind.assigned_role]")
L.fields["rank"] = H.mind.role_alt_title ? H.mind.role_alt_title : H.mind.assigned_role
L.fields["real_rank"] = H.mind.assigned_role
L.fields["b_type"] = H.dna.b_type
L.fields["b_dna"] = H.dna.unique_enzymes
L.fields["enzymes"] = H.dna.struc_enzymes

View File

@@ -153,14 +153,7 @@ datum/preferences
proc/SetSkills(mob/user)
if(SKILLS == null)
SKILLS = list()
for(var/T in (typesof(/datum/skill)-/datum/skill))
var/datum/skill/S = new T
if(S.ID != "none")
if(!SKILLS.Find(S.field))
SKILLS[S.field] = list()
var/list/L = SKILLS[S.field]
L += S
setup_skills()
if(skills.len == 0)
ZeroSkills()

View File

@@ -156,3 +156,74 @@ datum/attribute/var
desc = "This is a placeholder"
proc/setup_skills()
if(SKILLS == null)
SKILLS = list()
for(var/T in (typesof(/datum/skill)-/datum/skill))
var/datum/skill/S = new T
if(S.ID != "none")
if(!SKILLS.Find(S.field))
SKILLS[S.field] = list()
var/list/L = SKILLS[S.field]
L += S
mob/living/carbon/human/proc/GetSkillClass(points)
// skill classes describe how your character compares in total points
switch(points)
if(0)
return "Unconfigured"
if(1 to 3)
return "Talentless"
if(4 to 6)
return "Below Average"
if(7 to 9)
return "Average"
if(10 to 12)
return "Talented"
if(13 to 15)
return "Extremely Talented"
if(16 to 18)
return "Genius"
if(19 to 21)
return "True Genius"
if(22 to 1000)
return "God"
proc/show_skill_window(var/mob/user, var/mob/living/carbon/human/M)
if(!istype(M)) return
if(SKILLS == null)
setup_skills()
if(!M.skills || M.skills.len == 0)
user << "There are no skills to display."
return
var/HTML = "<body>"
HTML += "<b>Select your Skills</b><br>"
HTML += "Current skill level: <b>[M.GetSkillClass(M.used_skillpoints)]</b> ([M.used_skillpoints])<br>"
HTML += "<a href=\"byond://?src=\ref[user];skills=1;preferences=1;preconfigured=1;\">Use preconfigured skillset</a><br>"
HTML += "<table>"
for(var/V in SKILLS)
HTML += "<tr><th colspan = 5><b>[V]</b></th></tr>"
for(var/datum/skill/S in SKILLS[V])
var/level = M.skills[S.ID]
HTML += "<tr style='text-align:left;'>"
HTML += "<th>[S.name]</th>"
HTML += "<th><font color=[(level == SKILL_NONE) ? "red" : "black"]>\[None\]</font></th>"
HTML += "<th><font color=[(level == SKILL_BASIC) ? "red" : "black"]>\[Basic\]</font></th>"
HTML += "<th><font color=[(level == SKILL_ADEPT) ? "red" : "black"]>\[Adept\]</font></th>"
HTML += "<th><font color=[(level == SKILL_EXPERT) ? "red" : "black"]>\[Expert\]</font></th>"
HTML += "</tr>"
HTML += "</table>"
user << browse(null, "window=show_skills")
user << browse(HTML, "window=show_skills;size=600x800")
return
mob/living/carbon/human/verb/show_skills()
set category = "IC"
set name = "Show Own Skills"
show_skill_window(src, src)

View File

@@ -5,6 +5,7 @@
unacidable = 1
var/id = 0.0
var/obj/master
var/gun_click_time = -100 //I'm lazy.
/obj/screen/close
name = "close"
@@ -25,6 +26,25 @@
var/selecting = "chest"
screen_loc = "EAST+1,NORTH"
/obj/screen/gun
name = "gun"
icon = 'screen1.dmi'
master = null
move
name = "Allow Walking"
icon_state = "no_walk"
screen_loc = ui_gun2
run
name = "Allow Running"
icon_state = "no_run"
screen_loc = ui_gun3
item
name = "Allow Item Use"
icon_state = "no_item"
screen_loc = ui_gun1
/obj/screen/zone_sel/MouseDown(location, control,params)
// Changes because of 4.0
@@ -569,6 +589,79 @@
usr:inv3.icon_state = "inv3"
usr:module_active = null
if("Allow Walking")
if(gun_click_time > world.time - 15) //give them 1.5 seconds between mode changes.
usr << "You need to wait some before you can change what they can do!"
return
if(!istype(usr.equipped(),/obj/item/weapon/gun))
usr << "You need your gun in your active hand to do that!"
return
usr.AllowTargetMove()
icon_state = "walking"
name = "Disallow Walking"
gun_click_time = world.time
if("Disallow Walking")
if(gun_click_time > world.time - 15) //give them 1.5 seconds between mode changes.
usr << "You need to wait some before you can change what they can do!"
return
if(!istype(usr.equipped(),/obj/item/weapon/gun))
usr << "You need your gun in your active hand to do that!"
return
usr.AllowTargetMove()
icon_state = "no_walk"
name = "Allow Walking"
gun_click_time = world.time
if("Allow Running")
if(gun_click_time > world.time - 15) //give them 1.5 seconds between mode changes.
usr << "You need to wait some before you can change what they can do!"
return
if(!istype(usr.equipped(),/obj/item/weapon/gun))
usr << "You need your gun in your active hand to do that!"
return
usr.AllowTargetRun()
icon_state = "running"
name = "Disallow Running"
gun_click_time = world.time
if("Disallow Running")
if(gun_click_time > world.time - 15) //give them 1.5 seconds between mode changes.
usr << "You need to wait some before you can change what they can do!"
return
if(!istype(usr.equipped(),/obj/item/weapon/gun))
usr << "You need your gun in your active hand to do that!"
return
usr.AllowTargetRun()
icon_state = "no_run"
name = "Allow Running"
gun_click_time = world.time
if("Allow Item Use")
if(gun_click_time > world.time - 15) //give them 1.5 seconds between mode changes.
usr << "You need to wait some before you can change what they can do!"
return
if(!istype(usr.equipped(),/obj/item/weapon/gun))
usr << "You need your gun in your active hand to do that!"
return
name = "Disallow Item Use"
icon_state = "act_throw_off"
usr.AllowTargetClick()
gun_click_time = world.time
if("Disallow Item Use")
if(gun_click_time > world.time - 15) //give them 1.5 seconds between mode changes.
usr << "You need to wait some before you can change what they can do!"
return
if(!istype(usr.equipped(),/obj/item/weapon/gun))
usr << "You need your gun in your active hand to do that!"
return
name = "Allow Item Use"
icon_state = "no_item"
usr.AllowTargetClick()
gun_click_time = world.time
else
DblClick()
return

View File

@@ -1,5 +1,5 @@
/obj/item/weapon/gun
name = "gun"
name = "\improper Gun"
desc = "Its a gun. It's pretty terrible, though."
icon = 'gun.dmi'
icon_state = "detective"
@@ -19,6 +19,9 @@
caliber = ""
silenced = 0
recoil = 0
tmp/mob/target
tmp/lock_time = -100
mouthshoot = 0
proc
load_into_chamber()
@@ -28,6 +31,14 @@
load_into_chamber()
return 0
//Removing the lock and the buttons.
dropped(mob/user as mob)
if(target)
target.NotTargeted(src)
del(user.item_use_icon)
del(user.gun_move_icon)
del(user.gun_run_icon)
return ..()
special_check(var/mob/M) //Placeholder for any special checks, like detective's revolver.
return 1
@@ -37,8 +48,18 @@
for(var/obj/O in contents)
O.emp_act(severity)
//Handling lowering yer gun.
attack_self()
if(target)
target.NotTargeted(src)
usr.visible_message("[usr] lowers \the [src].")
return 0
return 1
//Suiciding.
attack(mob/living/M as mob, mob/living/user as mob, def_zone)
if (M == user && user.zone_sel.selecting == "mouth" && load_into_chamber())
if (M == user && user.zone_sel.selecting == "mouth" && load_into_chamber() && !mouthshoot)
mouthshoot = 1
M.visible_message("\red [user] sticks their gun in their mouth, ready to pull the trigger...")
if(!do_after(user, 40))
M.visible_message("\blue [user] decided life was worth living")
@@ -59,18 +80,20 @@
M.apply_damage(85, BRUTE, "chest")
M.visible_message("\red [user] pulls the trigger. Ow.")
del(src.in_chamber)
mouthshoot = 0
return
else if(target && M == target)
PreFire(M,user)
else
return ..()
afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)//TODO: go over this
if(flag) return //we're placing gun on a table or in backpack
if(istype(target, /obj/machinery/recharger) && istype(src, /obj/item/weapon/gun/energy)) return//Shouldnt flag take care of this?
//POWPOW!... Used to be afterattack.
proc/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params)//TODO: go over this
if(istype(user, /mob/living))
var/mob/living/M = user
if ((M.mutations & CLUMSY) && prob(50))
M << "\red The [src.name] blows up in your face."
M << "\red \the [src] blows up in your face."
M.take_organ_damage(0,20)
M.drop_item()
del(src)
@@ -113,7 +136,7 @@
playsound(user, fire_sound, 10, 1)
else
playsound(user, fire_sound, 50, 1)
user.visible_message("\red [user.name] fires the [src.name]!", "\red You fire the [src.name]!", "\blue You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
user.visible_message("\red [user] fires the [src]!", "\red You fire the [src]!", "\blue You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
in_chamber.original = targloc
in_chamber.loc = get_turf(user)
@@ -138,3 +161,281 @@
update_icon()
return
//Aiming at the target mob.
proc/Aim(var/mob/M)
if(target != M)
lock_time = world.time
if(target)
//usr.ClearRequest("Aim")
target.NotTargeted(src)
usr.visible_message("[usr] turns \the [src] on [M]!")
else
usr.visible_message("[usr] aims \a [src] at [M]!")
for(var/mob/K in viewers(usr))
K << 'TargetOn.ogg'
M.Targeted(src)
//HE MOVED, SHOOT HIM!
proc/TargetActed()
var/mob/M = loc
if(target == M) return
usr.last_move_intent = world.time
Fire(target,usr)
var/dir_to_fire = sd_get_approx_dir(M,target)
if(dir_to_fire != M.dir)
M.dir = dir_to_fire
afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
if(flag) return //we're placing gun on a table or in backpack
if(istype(target, /obj/machinery/recharger) && istype(src, /obj/item/weapon/gun/energy)) return//Shouldnt flag take care of this?
PreFire(A,user,params)
//Compute how to fire.....
proc/PreFire(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, params)
if(usr.a_intent in list("help","grab","disarm"))
//GraphicTrace(usr.x,usr.y,A.x,A.y,usr.z)
if(lock_time > world.time - 2) return
if(!ismob(A))
// var/mob/M = locate() in range(0,A)
// if(M && !ismob(A))
// if(M.type == /mob)
// return FindTarget(M,user,params)
var/mob/M = GunTrace(usr.x,usr.y,A.x,A.y,usr.z,usr)
if(M && ismob(M) && !target)
Aim(M)
return
if(ismob(A) && target != A)
Aim(A)
else if(lock_time < world.time + 10)
Fire(A,user,params)
else if(!target)
Fire(A,user,params)
//else
//var/item/gun/G = usr.OHand
//if(!G)
//Fire(A,0)
//else if(istype(G))
//G.Fire(A,3)
//Fire(A,2)
//else
//Fire(A)
var/dir_to_fire = sd_get_approx_dir(usr,A)
if(dir_to_fire != usr.dir)
usr.dir = dir_to_fire
else
Fire(A, user)
//Yay, math!
#define SIGN(X) ((X<0)?-1:1)
proc/GunTrace(X1,Y1,X2,Y2,Z=1,exc_obj,PX1=16,PY1=16,PX2=16,PY2=16)
//bluh << "Tracin' [X1],[Y1] to [X2],[Y2] on floor [Z]."
var/turf/T
var/mob/M
if(X1==X2)
if(Y1==Y2) return 0 //Light cannot be blocked on same tile
else
var/s = SIGN(Y2-Y1)
Y1+=s
while(1)
T = locate(X1,Y1,Z)
if(!T) return 0
M = locate() in T
if(M) return M
M = locate() in orange(1,T)-exc_obj
if(M) return M
Y1+=s
else
var
m=(32*(Y2-Y1)+(PY2-PY1))/(32*(X2-X1)+(PX2-PX1))
b=(Y1+PY1/32-0.015625)-m*(X1+PX1/32-0.015625) //In tiles
signX = SIGN(X2-X1)
signY = SIGN(Y2-Y1)
if(X1<X2) b+=m
while(1)
var/xvert = round(m*X1+b-Y1)
if(xvert) Y1+=signY //Line exits tile vertically
else X1+=signX //Line exits tile horizontally
T = locate(X1,Y1,Z)
if(!T) return 0
M = locate() in T
if(M) return M
M = locate() in orange(1,T)-exc_obj
if(M) return M
return 0
//Targeting management procs
mob/var
list/targeted_by
target_time = -100
last_move_intent = -100
last_target_click = -5
obj/effect/target_locked/target_locked = null
mob/proc
Targeted(var/obj/item/weapon/gun/I)
if(!targeted_by) targeted_by = list()
targeted_by += I
I.target = src
//I.lock_time = world.time + 10 //Target has 1 second to realize they're targeted and stop (or target the opponent).
src << "((\red <b>Your character is being targeted. They have 1 second to stop any click or move actions.</b> \black While targeted, they may \
drag and drop items in or into the map, speak, and click on interface buttons. Clicking on the map, their items \
(other than a weapon to de-target), or moving will result in being fired upon. \red The aggressor may also fire manually, \
so try not to get on their bad side.\black ))"
if(targeted_by.len == 1)
spawn(0)
target_locked = new /obj/effect/target_locked(src)
overlays += target_locked
spawn flick("locking",target_locked)
var/mob/T = I.loc
//Adding the buttons to the controler person
if(T)
T.item_use_icon = new /obj/screen/gun/item(null)
T.gun_move_icon = new /obj/screen/gun/move(null)
if(T.client)
T.client.screen += T.item_use_icon
T.client.screen += T.gun_move_icon
while(targeted_by)
sleep(1)
if(last_move_intent > I.lock_time + 10 && !T.target_can_move) //If the target moved while targeted
I.TargetActed()
I.lock_time = world.time + 5
else if(last_move_intent > I.lock_time + 10 && !T.target_can_run && m_intent == "run") //If the target ran while targeted
I.TargetActed()
I.lock_time = world.time + 5
if(last_target_click > I.lock_time + 10 && !T.target_can_click) //If the target clicked the map to pick something up/shoot/etc
I.TargetActed()
I.lock_time = world.time + 5
NotTargeted(var/obj/item/weapon/gun/I,silent)
if(!silent)
for(var/mob/M in viewers(src))
M << 'TargetOff.ogg'
del(target_locked)
targeted_by -= I
update_clothing()
I.target = null
var/mob/T = I.loc
if(T && ismob(T))
del(T.item_use_icon)
del(T.gun_move_icon)
del(T.gun_run_icon)
if(!targeted_by.len) del targeted_by
/* Captive(var/obj/item/weapon/gun/I)
Sound(src,'CounterAttack.ogg')
if(!targeted_by) targeted_by = list()
targeted_by += I
I.target = src
// Stun("Captive")
I.lock_time = world.time + 10 //Target has 1 second to realize they're targeted and stop (or target the opponent).
src << "(Your character is being held captive. They have 1 second to stop any click or move actions. While held, they may \
drag and drop items in or into the map, speak, and click on interface buttons. Clicking on the map or their items \
(other than a weapon to de-target) will result in being attacked. The aggressor may also attack manually, \
so try not to get on their bad side.)"
if(targeted_by.len == 1)
var/mob/T = I.loc
while(targeted_by)
sleep(1)
if(last_target_click > I.lock_time + 10 && !T.target_can_click) //If the target clicked the map to pick something up/shoot/etc
I.TargetActed()
NotCaptive(var/obj/item/weapon/gun/I,silent)
if(!silent) Sound(src,'SwordSheath.ogg')
// UnStun("Captive")
targeted_by -= I
I.target = null
if(!targeted_by.len) del targeted_by*/
//Used to overlay the awesome stuff
/obj/effect
// target_locking
// icon = 'icons/effects/Targeted.dmi'
// icon_state = "locking"
// layer = 99
target_locked
icon = 'icons/effects/Targeted.dmi'
icon_state = "locked"
layer = 99
// captured
// icon = 'Captured.dmi'
// layer = 99
//If you move out of range, it isn't going to still stay locked on you any more.
mob/var
target_can_move = 0
target_can_run = 0
target_can_click = 0
mob/Move()
. = ..()
for(var/obj/item/weapon/gun/G in targeted_by)
var/mob/M = G.loc
if(!(M in view(src)))
//ClearRequest("Aim")
NotTargeted(G)
for(var/obj/item/weapon/gun/G in src)
if(G.target)
if(!(G.target in view(src)))
//ClearRequest("Aim")
G.target.NotTargeted(G)
mob/verb
//These are called by the on-screen buttons, adjusting what the victim can and cannot do.
AllowTargetMove()
set hidden=1
spawn(1) target_can_move = !target_can_move
if(!target_can_move)
// winset(usr,"default.target_can_move","is-flat=true;border=sunken")
usr << "Target may now walk."
gun_run_icon = new /obj/screen/gun/run(null)
if(client)
client.screen += gun_run_icon
else
// winset(usr,"default.target_can_move","is-flat=false;border=none")
usr << "Target may no longer move."
target_can_run = 0
del(gun_run_icon)
for(var/obj/item/weapon/gun/G in src)
G.lock_time = world.time + 5
if(G.target)
if(!target_can_move)
G.target << "Your character may now <b>walk</b> at the discretion of their targeter."
else
G.target << "\red <b>Your character will now be shot if they move.</b>"
AllowTargetRun()
set hidden=1
spawn(1) target_can_run = !target_can_run
if(!target_can_run)
// winset(usr,"default.target_can_move","is-flat=true;border=sunken")
usr << "Target may now run."
else
// winset(usr,"default.target_can_move","is-flat=false;border=none")
usr << "Target may no longer run."
for(var/obj/item/weapon/gun/G in src)
G.lock_time = world.time + 5
if(G.target)
if(!target_can_run)
G.target << "Your character may now <b>run</b> at the discretion of their targeter."
else
G.target << "\red <b>Your character will now be shot if they run.</b>"
AllowTargetClick()
set hidden=1
spawn(1) target_can_click = !target_can_click
if(!target_can_click)
// winset(usr,"default.target_can_click","is-flat=true;border=sunken")
usr << "Target may now use items."
else
// winset(usr,"default.target_can_click","is-flat=false;border=none")
usr << "Target may no longer use items."
for(var/obj/item/weapon/gun/G in src)
G.lock_time = world.time + 5
if(G.target)
if(!target_can_click)
G.target << "Your character may now <b>use items</b> at the discretion of their targeter."
else
G.target << "\red <b>Your character will now be shot if they use items.</b>"

View File

@@ -1,6 +1,6 @@
/obj/item/weapon/gun/energy
icon_state = "energy"
name = "energy gun"
name = "\improper Energy gun"
desc = "A basic energy-based gun with two settings: Stun and kill."
fire_sound = 'Taser.ogg'

View File

@@ -1,5 +1,5 @@
/obj/item/weapon/gun/energy/laser
name = "laser gun"
name = "\improper Laser Gun"
desc = "a basic weapon designed kill with concentrated energy bolts"
icon_state = "laser"
item_state = "laser"
@@ -11,7 +11,7 @@
obj/item/weapon/gun/energy/laser/retro
name ="retro laser"
name ="\improper Retro Laser"
icon_state = "retro"
desc = "An older model of the basic lasergun, no longer used by Nanotrasen's security or military forces. Nevertheless, it is still quite deadly and easy to maintain, making it a favorite amongst pirates and other outlaws."
@@ -58,7 +58,7 @@ obj/item/weapon/gun/energy/laser/retro
/obj/item/weapon/gun/energy/lasercannon
name = "laser cannon"
name = "\improper Laser Cannon"
desc = "With the L.A.S.E.R. cannon, the lasing medium is enclosed in a tube lined with uranium-235 and subjected to high neutron flux in a nuclear reactor core. This incredible technology may help YOU achieve high excitation rates with small laser volumes!"
icon_state = "lasercannon"
fire_sound = 'lasercannonfire.ogg'

View File

@@ -1,6 +1,6 @@
/obj/item/weapon/gun/energy/gun
icon_state = "energy"
name = "energy gun"
name = "\improper Energy Gun"
desc = "A basic energy-based gun with two settings: Stun and kill."
fire_sound = 'Taser.ogg'
@@ -13,26 +13,27 @@
attack_self(mob/living/user as mob)
switch(mode)
if(0)
mode = 1
charge_cost = 100
fire_sound = 'Laser.ogg'
user << "\red [src.name] is now set to kill."
projectile_type = "/obj/item/projectile/beam"
if(1)
mode = 0
charge_cost = 100
fire_sound = 'Taser.ogg'
user << "\red [src.name] is now set to stun."
projectile_type = "/obj/item/projectile/energy/electrode"
update_icon()
if(..())
switch(mode)
if(0)
mode = 1
charge_cost = 100
fire_sound = 'Laser.ogg'
user << "\red [src] is now set to kill."
projectile_type = "/obj/item/projectile/beam"
if(1)
mode = 0
charge_cost = 100
fire_sound = 'Taser.ogg'
user << "\red [src] is now set to stun."
projectile_type = "/obj/item/projectile/energy/electrode"
update_icon()
return
/obj/item/weapon/gun/energy/gun/nuclear
name = "Advanced Energy Gun"
name = "\improper Advanced Energy Gun"
desc = "An energy gun with an experimental miniaturized reactor."
origin_tech = "combat=3;materials=5;powerstorage=3"
var/lightfail = 0

View File

@@ -1,5 +1,5 @@
/obj/item/weapon/gun/energy/pulse_rifle
name = "pulse rifle"
name = "\improper Pulse Rifle"
desc = "A heavy-duty, pulse-based energy weapon, preferred by front-line combat personnel."
icon_state = "pulse"
force = 10
@@ -11,40 +11,42 @@
attack_self(mob/living/user as mob)
switch(mode)
if(2)
mode = 0
charge_cost = 100
fire_sound = 'Taser.ogg'
user << "\red [src.name] is now set to stun."
projectile_type = "/obj/item/projectile/energy/electrode"
if(0)
mode = 1
charge_cost = 100
fire_sound = 'Laser.ogg'
user << "\red [src.name] is now set to kill."
projectile_type = "/obj/item/projectile/beam"
if(1)
mode = 2
charge_cost = 200
fire_sound = 'pulse.ogg'
user << "\red [src.name] is now set to DESTROY."
projectile_type = "/obj/item/projectile/beam/pulse"
if(..())
switch(mode)
if(2)
mode = 0
charge_cost = 100
fire_sound = 'Taser.ogg'
user << "\red [src] is now set to stun."
projectile_type = "/obj/item/projectile/energy/electrode"
if(0)
mode = 1
charge_cost = 100
fire_sound = 'Laser.ogg'
user << "\red [src] is now set to kill."
projectile_type = "/obj/item/projectile/beam"
if(1)
mode = 2
charge_cost = 200
fire_sound = 'pulse.ogg'
user << "\red [src] is now set to DESTROY."
projectile_type = "/obj/item/projectile/beam/pulse"
return
/obj/item/weapon/gun/energy/pulse_rifle/destroyer
name = "pulse destroyer"
name = "\improper Pulse Destroyer"
desc = "A heavy-duty, pulse-based energy weapon."
cell_type = "/obj/item/weapon/cell/infinite"
attack_self(mob/living/user as mob)
user << "\red [src.name] has three settings, and they are all DESTROY."
if(..())
user << "\red [src] has three settings, and they are all DESTROY."
/obj/item/weapon/gun/energy/pulse_rifle/M1911
name = "m1911-P"
name = "\improper M1911-P"
desc = "It's not the size of the gun, it's the size of the hole it puts through people."
icon_state = "m1911-p"
cell_type = "/obj/item/weapon/cell/infinite"

View File

@@ -1,5 +1,5 @@
/obj/item/weapon/gun/energy/ionrifle
name = "ion rifle"
name = "\improper Ion Rifle"
desc = "A man portable anti-armor weapon designed to disable mechanical threats"
icon_state = "ionrifle"
fire_sound = 'Laser.ogg'
@@ -12,7 +12,7 @@
/obj/item/weapon/gun/energy/decloner
name = "biological demolecularisor"
name = "\improper Biological Demolecularisor"
desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements."
icon_state = "decloner"
fire_sound = 'pulse3.ogg'
@@ -21,13 +21,13 @@
projectile_type = "/obj/item/projectile/energy/declone"
obj/item/weapon/gun/energy/staff
name = "staff of change"
name = "\improper Staff of Change"
desc = "an artefact that spits bolts of coruscating energy which cause the target's very form to reshape itself"
icon = 'gun.dmi'
icon_state = "staffofchange"
item_state = "staffofchange"
fire_sound = 'emitter.ogg'
flags = FPRINT | TABLEPASS | CONDUCT | ONBACK
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
w_class = 4.0
charge_cost = 200
projectile_type = "/obj/item/projectile/change"

View File

@@ -1,6 +1,6 @@
/obj/item/weapon/gun/energy/taser
name = "taser gun"
name = "\improper Taser Gun"
desc = "A small, low capacity gun used for non-lethal takedowns."
icon_state = "taser"
fire_sound = 'Taser.ogg'
@@ -24,7 +24,7 @@
/obj/item/weapon/gun/energy/stunrevolver
name = "stun revolver"
name = "\improper Stun Revolver"
desc = "A high-tech revolver that fires stun cartridges. The stun cartridges can be recharged using a conventional energy weapon recharger."
icon_state = "stunrevolver"
fire_sound = 'Gunshot.ogg'
@@ -36,7 +36,7 @@
/obj/item/weapon/gun/energy/crossbow
name = "mini energy-crossbow"
name = "\improper Mini Energy-Crossbow"
desc = "A weapon favored by many of the syndicates stealth specialists."
icon_state = "crossbow"
w_class = 2.0
@@ -75,7 +75,7 @@
/obj/item/weapon/gun/energy/crossbow/largecrossbow
name = "Energy Crossbow"
name = "\improper Energy Crossbow"
desc = "A weapon favored by syndicate infiltration teams."
w_class = 4.0
force = 10

View File

@@ -1,5 +1,5 @@
/obj/item/weapon/gun/energy/temperature
name = "temperature gun"
name = "\improper Temperature Gun"
icon_state = "freezegun"
fire_sound = 'pulse3.ogg'
desc = "A gun that changes temperatures."
@@ -23,20 +23,21 @@
attack_self(mob/living/user as mob)
user.machine = src
var/temp_text = ""
if(temperature > (T0C - 50))
temp_text = "<FONT color=black>[temperature] ([round(temperature-T0C)]&deg;C) ([round(temperature*1.8-459.67)]&deg;F)</FONT>"
else
temp_text = "<FONT color=blue>[temperature] ([round(temperature-T0C)]&deg;C) ([round(temperature*1.8-459.67)]&deg;F)</FONT>"
if(..())
user.machine = src
var/temp_text = ""
if(temperature > (T0C - 50))
temp_text = "<FONT color=black>[temperature] ([round(temperature-T0C)]&deg;C) ([round(temperature*1.8-459.67)]&deg;F)</FONT>"
else
temp_text = "<FONT color=blue>[temperature] ([round(temperature-T0C)]&deg;C) ([round(temperature*1.8-459.67)]&deg;F)</FONT>"
var/dat = {"<B>Freeze Gun Configuration: </B><BR>
Current output temperature: [temp_text]<BR>
Target output temperature: <A href='?src=\ref[src];temp=-100'>-</A> <A href='?src=\ref[src];temp=-10'>-</A> <A href='?src=\ref[src];temp=-1'>-</A> [current_temperature] <A href='?src=\ref[src];temp=1'>+</A> <A href='?src=\ref[src];temp=10'>+</A> <A href='?src=\ref[src];temp=100'>+</A><BR>
"}
var/dat = {"<B>Freeze Gun Configuration: </B><BR>
Current output temperature: [temp_text]<BR>
Target output temperature: <A href='?src=\ref[src];temp=-100'>-</A> <A href='?src=\ref[src];temp=-10'>-</A> <A href='?src=\ref[src];temp=-1'>-</A> [current_temperature] <A href='?src=\ref[src];temp=1'>+</A> <A href='?src=\ref[src];temp=10'>+</A> <A href='?src=\ref[src];temp=100'>+</A><BR>
"}
user << browse(dat, "window=freezegun;size=450x300")
onclose(user, "freezegun")
user << browse(dat, "window=freezegun;size=450x300")
onclose(user, "freezegun")
Topic(href, href_list)

View File

@@ -1,6 +1,6 @@
/obj/item/weapon/gun/projectile
desc = "A classic revolver. Uses 357 ammo"
name = "revolver"
name = "\improper Revolver"
icon_state = "revolver"
caliber = "357"
origin_tech = "combat=2;materials=2"

View File

@@ -1,5 +1,5 @@
/obj/item/weapon/gun/projectile/automatic //Hopefully someone will find a way to make these fire in bursts or something. --Superxpdude
name = "Submachine Gun"
name = "\improper Submachine Gun"
desc = "A lightweight, fast firing gun. Uses 9mm rounds."
icon_state = "saber"
w_class = 3.0
@@ -11,7 +11,7 @@
/obj/item/weapon/gun/projectile/automatic/mini_uzi
name = "Mini-Uzi"
name = "\improper Mini-Uzi"
desc = "A lightweight, fast firing gun, for when you want someone dead. Uses .45 rounds."
icon_state = "mini-uzi"
w_class = 3.0
@@ -23,7 +23,7 @@
/obj/item/weapon/gun/projectile/automatic/c20r
name = "C-20r SMG"
name = "\improper C-20r SMG"
desc = "A lightweight, fast firing gun, for when you REALLY need someone dead. Uses 12mm rounds. Has a 'Scarborough Arms - Per falcis, per pravitas' buttstamp"
icon_state = "c20r"
item_state = "c20r"

View File

@@ -1,5 +1,5 @@
/obj/item/weapon/gun/projectile/silenced
name = "Silenced Pistol"
name = "\improper Silenced Pistol"
desc = "A small, quiet, easily concealable gun. Uses .45 rounds."
icon_state = "silenced_pistol"
w_class = 3.0
@@ -12,7 +12,7 @@
/obj/item/weapon/gun/projectile/deagle
name = "Desert Eagle"
name = "\improper Desert Eagle"
desc = "A robust handgun that uses 357 magnum ammo"
icon_state = "deagle"
force = 14.0
@@ -21,7 +21,7 @@
/obj/item/weapon/gun/projectile/deagle/gold
name = "Desert Eagle"
name = "\improper Desert Eagle"
desc = "A gold plated gun folded over a million times by superior martian gunsmiths. Uses 357 ammo."
icon_state = "deagleg"
item_state = "deagleg"
@@ -29,7 +29,7 @@
/obj/item/weapon/gun/projectile/deagle/camo
name = "Desert Eagle"
name = "\improper Desert Eagle"
desc = "A Deagle brand Deagle for operators operating operationally. Uses 357 ammo."
icon_state = "deaglecamo"
item_state = "deagleg"
@@ -37,7 +37,7 @@
/obj/item/weapon/gun/projectile/gyropistol
name = "Gyrojet Pistol"
name = "\improper Gyrojet Pistol"
desc = "A bulky pistol designed to fire self propelled rounds"
icon_state = "gyropistol"
max_shells = 8

View File

@@ -1,6 +1,6 @@
/obj/item/weapon/gun/projectile/detective
desc = "A cheap Martian knock-off of a Smith & Wesson Model 10. Uses .38-Special rounds."
name = "revolver"
name = "\improper Revolver"
icon_state = "detective"
caliber = "38"
origin_tech = "combat=2;materials=2"
@@ -18,7 +18,7 @@
verb/rename_gun()
set name = "Name Gun"
set desc = "Click to rename your gun. If you're the detective."
set desc = "Click to rename your gun."
var/mob/M = usr
if(!M.mind) return 0
@@ -38,7 +38,7 @@
/obj/item/weapon/gun/projectile/mateba
name = "mateba"
name = "\improper Mateba"
desc = "When you absolutely, positively need a 10mm hole in the other guy. Uses .357 ammo."
icon_state = "mateba"
origin_tech = "combat=2;materials=2"

View File

@@ -1,5 +1,5 @@
/obj/item/weapon/gun/projectile/shotgun
name = "shotgun"
name = "\improper Shotgun"
desc = "Useful for sweeping alleys."
icon_state = "shotgun"
max_shells = 2
@@ -21,11 +21,12 @@
attack_self(mob/living/user as mob)
if(recentpump) return
pump()
recentpump = 1
spawn(10)
recentpump = 0
if(..())
if(recentpump) return
pump()
recentpump = 1
spawn(10)
recentpump = 0
return
@@ -48,7 +49,7 @@
/obj/item/weapon/gun/projectile/shotgun/combat
name = "combat shotgun"
name = "\improper Combat Shotgun"
icon_state = "cshotgun"
max_shells = 8
ammo_type = "/obj/item/ammo_casing/shotgun"
@@ -56,7 +57,7 @@
/obj/item/weapon/gun/projectile/shotgun/combat2
name = "security combat shotgun"
name = "\improper Security Combat Shotgun"
icon_state = "cshotgun"
max_shells = 4

View File

@@ -10,7 +10,7 @@
*/
/obj/item/projectile
name = "projectile"
name = "\improper Projectile"
icon = 'projectiles.dmi'
icon_state = "bullet"
density = 1
@@ -70,7 +70,7 @@
return // nope.avi
if(!silenced)
visible_message("\red [A.name] has been shot by the [src.name]!")//X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
visible_message("\red [A] is hit by the [src]!")//X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
else
M << "\red You've been shot!"
if(istype(firer, /mob))

View File

@@ -1,5 +1,5 @@
/obj/item/projectile/beam
name = "laser"
name = "\improper Laser"
icon_state = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 20
@@ -49,19 +49,19 @@
del(src)
/obj/item/projectile/beam/heavylaser
name = "heavy laser"
name = "\improper Heavy Laser"
icon_state = "heavylaser"
damage = 40
/obj/item/projectile/beam/pulse
name = "pulse"
name = "\improper Pulse"
icon_state = "u_laser"
damage = 50
/obj/item/projectile/beam/deathlaser
name = "death laser"
name = "\improper Death Laser"
icon_state = "heavylaser"
damage = 60

View File

@@ -1,5 +1,5 @@
/obj/item/projectile/bullet
name = "bullet"
name = "\improper Bullet"
icon_state = "bullet"
damage = 60
damage_type = BRUTE
@@ -15,27 +15,29 @@
/obj/item/projectile/bullet/midbullet
damage = 30
stun = 5
weaken = 5
eyeblur = 3
/obj/item/projectile/bullet/suffocationbullet//How does this even work?
name = "co bullet"
// name = "\improper ullet"
damage = 20
damage_type = OXY
/obj/item/projectile/bullet/cyanideround
name = "poison bullet"
name = "\improper Poison Bullet"
damage = 40
damage_type = TOX
/obj/item/projectile/bullet/burstbullet//I think this one needs something for the on hit
name = "exploding bullet"
name = "\improper Exploding Bullet"
damage = 20
/obj/item/projectile/bullet/stunshot
name = "stunshot"
name = "\improper Stunshot"
damage = 5
stun = 10
weaken = 10

View File

@@ -1,5 +1,5 @@
/obj/item/projectile/change
name = "bolt of change"
name = "\improper Bolt of Change"
icon_state = "ice_1"
damage = 0
damage_type = BURN
@@ -19,10 +19,12 @@
/obj/item/projectile/change/proc/wabbajack (mob/M as mob in world)
if(istype(M, /mob/living))
if(istype(M, /mob/living) && M.stat != 2)
for(var/obj/item/W in M)
if (istype(W, /obj/item/weapon/implant)||istype(W, /obj/item/weapon/cell)||istype(W, /obj/item/device/mmi))
del (W)
M.drop_from_slot(W)
var/randomize = pick("monkey","robot","metroid","alien")
var/randomize = pick("monkey","robot","metroid","alien","human")
switch(randomize)
if("monkey")
if (M.monkeyizing)
@@ -33,13 +35,13 @@
M.icon = null
M.invisibility = 101
var/mob/living/carbon/monkey/O = new /mob/living/carbon/monkey( M.loc )
O.name = "monkey"
if (M.client)
M.client.mob = O
if(M.mind)
M.mind.transfer_to(O)
O.a_intent = "hurt"
O.universal_speak = 1
O << "<B>You are now a monkey.</B>"
del(M)
return O
@@ -66,7 +68,6 @@
O.invisibility = 0
O.name = "Cyborg"
O.real_name = "Cyborg"
O.lastKnownIP = M.client.address ? M.client.address : null
if (M.mind)
M.mind.transfer_to(O)
if (M.mind.assigned_role == "Cyborg")
@@ -111,6 +112,7 @@
new_metroid.a_intent = "hurt"
new_metroid << "<B>You are now an adult Metroid.</B>"
new_metroid.universal_speak = 1
del(M)
return new_metroid
else
@@ -120,6 +122,7 @@
if(M.mind)
M.mind.transfer_to(new_metroid)
new_metroid.a_intent = "hurt"
new_metroid.universal_speak = 1
new_metroid << "<B>You are now a baby Metroid.</B>"
del(M)
return new_metroid
@@ -145,8 +148,43 @@
if(M.mind)
M.mind.transfer_to(new_xeno)
new_xeno.a_intent = "hurt"
new_xeno.universal_speak = 1
new_xeno << "<B>You are now an alien.</B>"
del(M)
return new_xeno
if("human")
if (M.monkeyizing)
return
M.update_clothing()
M.monkeyizing = 1
M.canmove = 0
M.icon = null
M.invisibility = 101
var/mob/living/carbon/human/O = new /mob/living/carbon/human( M.loc )
var/first = pick(first_names_male)
var/last = pick(last_names)
O.name = "[first] [last]"
O.real_name = "[first] [last]"
var/race = pick("lizard","golem","metroid","plant","normal")
switch(race)
if("lizard")
O.mutantrace = "lizard"
if("golem")
O.mutantrace = "golem"
if("metroid")
O.mutantrace = "metroid"
if("plant")
O.mutantrace = "plant"
if("normal")
O.mutantrace = ""
if (M.client)
M.client.mob = O
if(M.mind)
M.mind.transfer_to(O)
O.a_intent = "hurt"
O << "<B>You are now a human.</B>"
del(M)
return O
return

View File

@@ -1,5 +1,5 @@
/obj/item/projectile/energy
name = "energy"
name = "\improper Energy"
icon_state = "spark"
damage = 0
damage_type = BURN
@@ -7,17 +7,17 @@
/obj/item/projectile/energy/electrode
name = "electrode"
name = "\improper Electrode"
icon_state = "spark"
nodamage = 1
stun = 10
weaken = 10
stun = 15
weaken = 15
stutter = 10
flag = "melee" //Give it a better chance to be blocked.
flag = "laser" //Give it a better chance to be blocked.
/obj/item/projectile/energy/declone
name = "declown"
name = "\improper Decloner Bolt"
icon_state = "declone"
nodamage = 1
damage_type = CLONE
@@ -25,7 +25,7 @@
/obj/item/projectile/energy/dart
name = "dart"
name = "\improper Dart"
icon_state = "toxin"
damage = 5
damage_type = TOX
@@ -33,7 +33,7 @@
/obj/item/projectile/energy/bolt
name = "bolt"
name = "\improper Bolt"
icon_state = "cbbolt"
damage = 10
damage_type = TOX
@@ -43,7 +43,7 @@
/obj/item/projectile/energy/bolt/large
name = "largebolt"
name = "\improper Large Bolt"
damage = 20

View File

@@ -1,5 +1,5 @@
/obj/item/projectile/ion
name = "ion bolt"
name = "\improper Ion Bolt"
icon_state = "ion"
damage = 0
damage_type = BURN
@@ -13,7 +13,7 @@
/obj/item/projectile/bullet/gyro
name ="gyro"
name ="\improper Rocket"
icon_state= "bolter"
damage = 50
flag = "bullet"
@@ -24,7 +24,7 @@
return 1
/obj/item/projectile/temp
name = "freeze beam"
name = "\improper Freeze Beam"
icon_state = "ice_2"
damage = 0
damage_type = BURN

View File

@@ -95,7 +95,7 @@
if(ismob(G.affecting))
var/mob/GM = G.affecting
for (var/mob/V in viewers(usr))
V.show_message("[usr] starts putting [GM.name] into the disposal.", 3)
V.show_message("[usr] starts putting [GM] into the disposal.", 3)
if(do_after(usr, 20))
if (GM.client)
GM.client.perspective = EYE_PERSPECTIVE
@@ -163,7 +163,7 @@
timeleft = 5
update()
return
if(istype(T,/obj/effect/bigDelivery))
if(istype(T,/obj/structure/bigDelivery))
if (T.anchored || get_dist(user, src) > 1 || get_dist(src,T) > 2 )
return
@@ -581,8 +581,8 @@
if(H.mutations & FAT) // is a human and fat?
has_fat_guy = 1 // set flag on holder
*/
if(istype(AM, /obj/effect/bigDelivery))
var/obj/effect/bigDelivery/T = AM
if(istype(AM, /obj/structure/bigDelivery))
var/obj/structure/bigDelivery/T = AM
src.destinationTag = T.sortTag
else if(istype(AM, /obj/item/smallDelivery))
var/obj/item/smallDelivery/T = AM

View File

@@ -1,4 +1,4 @@
/obj/effect/bigDelivery
/obj/structure/bigDelivery
desc = "A big wrapped package."
name = "large parcel"
icon = 'storage.dmi'
@@ -171,9 +171,13 @@
var/amount = 25.0
afterattack(target as obj, mob/user as mob)
afterattack(var/obj/target as obj, mob/user as mob)
if(istype(target, /obj/structure/table) || istype(target, /obj/structure/rack))
return
if(target.anchored)
return
if(target in user)
return
user.attack_log += text("\[[time_stamp()]\] <font color='blue'>Has used [src.name] on \ref[target]</font>")
@@ -190,7 +194,7 @@
else if (istype(target, /obj/structure/closet/crate))
var/obj/structure/closet/crate/O = target
if (src.amount > 3)
var/obj/effect/bigDelivery/P = new /obj/effect/bigDelivery(get_turf(O.loc))
var/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(O.loc))
P.wrapped = O
O.loc = P
src.amount -= 3
@@ -199,9 +203,11 @@
else if (istype (target, /obj/structure/closet))
var/obj/structure/closet/O = target
if (src.amount > 3)
var/obj/effect/bigDelivery/P = new /obj/effect/bigDelivery(get_turf(O.loc))
P.wrapped = O
O.close()
var/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(O.loc))
P.wrapped = O
P.waswelded = O.welded
O.opened = 0
O.welded = 1
O.loc = P
src.amount -= 3
@@ -242,9 +248,10 @@
desc = "Used to set the destination of properly wrapped packages."
icon_state = "forensic0"
var/currTag = null
var/list/spaceList = list(0,1,0,0,1,0,0,0,1,0,0,0,1,0,0,1,0,0,0,1,0,0,0,0,1,0,0,0,1,0,0,1,0,0,0) // Breaks up departments with whitespace.
var/list/spaceList = list(0,1,0,0,1,0,0,1,0,0,0,1,0,0,0,1,0,0,1,0,0,0,1,0,0,0,0,1,0,0,0,1,0,0,1,0,0,0) // Breaks up departments with whitespace.
var/list/locationList = list("Disposals",
"Mail Office", "Cargo Bay", "QM Office",
"Mining Base", "Mining West", "Mining North",
"Locker Room", "Tool Storage", "Laundry Room", "Toilets",
"Security", "Courtroom", "Detective's Office", "Law Office",
"Research Division", "Research Director", "Genetics",
@@ -253,11 +260,6 @@
"Bar", "Kitchen", "Diner", "Hydroponics",
"Meeting Room", "HoP Office", "Captain",
"Atmospherics", "Engineering", "Chief Engineer", "Robotics",)
//The whole system for the sorttype var is determined based on the order of this list,
//disposals must always be 1, since anything that's untagged will automatically go to disposals, or sorttype = 1 --Superxpdude
//If you don't want to fuck up disposals, add to this list, and don't change the order.
//If you insist on changing the order, you'll have to change every sort junction to reflect the new order. --Pete
w_class = 1
item_state = "electronic"
@@ -300,9 +302,9 @@
return
attack(target as obj, mob/user as mob)
if (istype(target, /obj/effect/bigDelivery))
if (istype(target, /obj/structure/bigDelivery))
user << "\blue *TAGGED*"
var/obj/effect/bigDelivery/O = target
var/obj/structure/bigDelivery/O = target
O.sortTag = src.currTag
O.update_icon()
else if (istype(target, /obj/item/smallDelivery))
@@ -339,7 +341,7 @@
var/deliveryCheck = 0
var/obj/structure/disposalholder/H = new() // virtual holder object which actually
// travels through the pipes.
for(var/obj/effect/bigDelivery/O in src)
for(var/obj/structure/bigDelivery/O in src)
deliveryCheck = 1
if(!O.sortTag)
O.sortTag = "Disposals"

View File

@@ -408,8 +408,8 @@ datum
build_path = "/obj/item/weapon/aiModule/safeguard"
onehuman_module
name = "Module Design (OneHuman)"
desc = "Allows for the construction of a OneHuman AI Module."
name = "Module Design (OneCrewmember)"
desc = "Allows for the construction of a OneCrewmember AI Module."
id = "onehuman_module"
req_tech = list("programming" = 4, "materials" = 6)
build_type = IMPRINTER
@@ -444,8 +444,8 @@ datum
build_path = "/obj/item/weapon/aiModule/quarantine"
oxygen_module
name = "Module Design (OxygenIsToxicToHumans)"
desc = "Allows for the construction of a Safeguard AI Module."
name = "Module Design (OxygenIsToxicToCrew)"
desc = "Allows for the construction of a OxygenIsToxicToCrew AI Module."
id = "oxygen_module"
req_tech = list("programming" = 3, "biotech" = 2, "materials" = 4)
build_type = IMPRINTER

View File

@@ -35,25 +35,6 @@
interpreter.persist = 1
interpreter.Compiler= src
// Set up all the preprocessor bullshit
//TCS_Setup(program)
// Apply preprocessor global variables
program.SetVar("PI" , 3.141592653) // value of pi
program.SetVar("E" , 2.718281828) // value of e
program.SetVar("SQURT2" , 1.414213562) // value of the square root of 2
program.SetVar("FALSE" , 0) // boolean shortcut to 0
program.SetVar("TRUE" , 1) // boolean shortcut to 1
program.SetVar("NORTH" , NORTH) // NORTH (1)
program.SetVar("SOUTH" , SOUTH) // SOUTH (2)
program.SetVar("EAST" , EAST) // EAST (4)
program.SetVar("WEST" , WEST) // WEST (8)
program.SetVar("HONK" , "clown griff u")
program.SetVar("CODERS" , "hide the fun")
program.SetVar("GRIFF" , pick("HALP IM BEING GRIFFED", "HALP AI IS MALF", "HALP GRIFFE", "HALP TRAITORS", "HALP WIZ GRIEFE ME"))
return returnerrors
/* -- Execute the compiled code -- */
@@ -63,6 +44,32 @@
if(!ready)
return
if(!interpreter)
return
interpreter.SetVar("PI" , 3.141592653) // value of pi
interpreter.SetVar("E" , 2.718281828) // value of e
interpreter.SetVar("SQURT2" , 1.414213562) // value of the square root of 2
interpreter.SetVar("FALSE" , 0) // boolean shortcut to 0
interpreter.SetVar("TRUE" , 1) // boolean shortcut to 1
interpreter.SetVar("NORTH" , NORTH) // NORTH (1)
interpreter.SetVar("SOUTH" , SOUTH) // SOUTH (2)
interpreter.SetVar("EAST" , EAST) // EAST (4)
interpreter.SetVar("WEST" , WEST) // WEST (8)
// Channel macros
interpreter.SetVar("$common", 1459)
interpreter.SetVar("$science", 1351)
interpreter.SetVar("$command", 1353)
interpreter.SetVar("$medical", 1355)
interpreter.SetVar("$engineering",1357)
interpreter.SetVar("$security", 1359)
interpreter.SetVar("$mining", 1349)
interpreter.SetVar("$cargo", 1347)
// Signal data
interpreter.SetVar("$content", signal.data["message"])
interpreter.SetVar("$freq" , signal.frequency)
interpreter.SetVar("$source" , signal.data["name"])
@@ -154,25 +161,24 @@
interpreter.Run()
// Backwards-apply variables onto signal data
/* html_encode() EVERYTHING. fucking players can't be trusted with SHIT */
/* sanitize EVERYTHING. fucking players can't be trusted with SHIT */
signal.data["message"] = html_encode(interpreter.GetVar("$content"))
signal.data["message"] = trim(copytext(sanitize(interpreter.GetVar("$content")), 1, MAX_MESSAGE_LEN))
signal.frequency = interpreter.GetVar("$freq")
var/setname = ""
var/obj/machinery/telecomms/server/S = signal.data["server"]
if(interpreter.GetVar("$source") in S.stored_names)
setname = html_encode(interpreter.GetVar("$source"))
setname = interpreter.GetVar("$source")
else
setname = "<i>[html_encode(interpreter.GetVar("$source"))]</i>"
setname = "<i>[trim(copytext(sanitize(interpreter.GetVar("$source")), 1, MAX_MESSAGE_LEN))]</i>"
if(signal.data["name"] != setname)
signal.data["realname"] = setname
signal.data["name"] = setname
signal.data["job"] = html_encode(interpreter.GetVar("$job"))
signal.data["job"] = trim(copytext(sanitize(interpreter.GetVar("$job")), 1, MAX_MESSAGE_LEN))
signal.data["reject"] = !(interpreter.GetVar("$pass")) // set reject to the opposite of $pass
/* -- Actual language proc code -- */
datum/signal
@@ -203,6 +209,9 @@ datum/signal
hradio = new // sets the hradio as a radio intercom
if(!freq)
freq = 1459
if(findtext(num2text(freq), ".")) // if the frequency has been set as a decimal
freq *= 10 // shift the decimal one place
if(!job)
job = "None"
@@ -233,4 +242,4 @@ datum/signal
newsign.data["vmessage"] = H.voice_message
newsign.data["vname"] = H.voice_name
newsign.data["vmask"] = 0
S.relay_information(newsign, "/obj/machinery/telecomms/broadcaster") // send this simple message to broadcasters
S.relay_information(newsign, "/obj/machinery/telecomms/broadcaster") // send this simple message to broadcasters

View File

@@ -120,4 +120,4 @@
/proc/smartlength(var/container)
if(container)
if(istype(container, /list) || istext(container))
return length(container)
return length(container)

View File

@@ -32,6 +32,7 @@
returnVal
max_iterations=100 // max iterations without any kind of delay
cur_iterations=0 // current iteration
max_recursion=50 // max recursions without returning anything (or completing the code block)
cur_recursion=0 // current amount of recursion
/*
@@ -211,9 +212,14 @@
*/
RunWhile(node/statement/WhileLoop/stmt)
var/i=1
if(!cur_iterations)
cur_iterations = 1
while(Eval(stmt.cond) && Iterate(stmt.block, i++))
cur_iterations++
continue
status &= ~BREAKING
cur_iterations -= i
if(cur_iterations <= 0) cur_iterations = 0
/*
Proc:Iterate
@@ -221,7 +227,7 @@
*/
Iterate(node/BlockDefinition/block, count)
RunBlock(block)
if(max_iterations > 0 && count >= max_iterations)
if(max_iterations > 0 && (count >= max_iterations || cur_iterations + 1 >= max_iterations))
RaiseError(new/runtimeError/IterationLimitReached())
return 0
if(status & (BREAKING|RETURNING))
@@ -288,4 +294,3 @@
else if(!istype(value) && isobject(value)) value = new/node/expression/value/reference(value)
//TODO: check for invalid name
S.variables["[name]"] = value