TG: Minor fixes to the tensioner, changes to the borg deathsquad from 6->3 and fixes

their cell
Changes changling unstun time to 45 from 25
Fix for the datumvars file which had spaces instead of tabs
Adds the starts of a rather robust erping system!  In time, we can make SS13 as
realistic an ERP simulator as it is an atmos one.
Adds metadata support for clients, mostly to hold ERPing notes.  This is
included in the savefile.
Adds code support for a parrot in!  Just needs a sprite
Bugfix to the 'resist' button, unless I don't understand how it works.  I don't
see how it could have ever worked before.
Preferences are now attached to a mob
Revision: r3386
Author: 	 VivianFoxfoot
This commit is contained in:
Ren Erthilo
2012-05-01 18:42:23 +01:00
parent 0218f2c41a
commit 8d605c33d5
16 changed files with 202 additions and 12 deletions
@@ -14,8 +14,12 @@
if (src.monkeyizing)
return
..()
if (src.stat != 2) //still breathing
//First, resolve location and get a breath
if(air_master.current_cycle%4==2)
@@ -14,6 +14,8 @@
if (monkeyizing)
return
..()
if (stat != 2) //still breathing
//First, resolve location and get a breath
@@ -4,6 +4,8 @@
set invisibility = 0
set background = 1
..()
var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
if(loc)
environment = loc.return_air()
+6 -4
View File
@@ -25,6 +25,8 @@
if(!loc) // Fixing a null error that occurs when the mob isn't found in the world -- TLE
return
..()
//Being buckled to a chair or bed
check_if_buckled()
@@ -125,8 +127,6 @@
if(!currentTurf.sd_lumcount)
playsound_local(src,pick(scarySounds),50, 1, -1)
..() //for organs
src.moved_recently = max(0, moved_recently-1)
/mob/living/carbon/human
@@ -457,8 +457,10 @@
return null
update_canmove()
if(paralysis || resting || stunned || weakened || buckled || (changeling && changeling.changeling_fakedeath)) canmove = 0
else canmove = 1
if(paralysis || stunned || weakened || resting || buckled || (changeling && changeling.changeling_fakedeath))
canmove = 0
else
canmove = 1
handle_breath(datum/gas_mixture/breath)
if(nodamage || (mutations & mNobreath))
@@ -5,6 +5,7 @@
if (src.monkeyizing)
return
..()
var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
if(src.loc)
@@ -23,6 +23,8 @@
if (src.monkeyizing)
return
..()
var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
if(src.loc)
environment = loc.return_air()
+36
View File
@@ -1,3 +1,19 @@
/mob/living/Life()
..()
// While I'm doing a terriblly lazy way of initalizing things, why don't I make it so people's preferences tag along with them. This could be useful in fixing the fucking cloned-as-unknown thing, making me not have to dynamically load them during tensioner, and of course, storing metadata.
if(!src.storedpreferences)
src.storedpreferences = new
storedpreferences.savefile_load(src, 0)
return
/mob/living/verb/succumb()
set hidden = 1
if ((src.health < 0 && src.health > -95.0))
@@ -227,6 +243,26 @@
else
density = !lying
/mob/living/proc/Examine_OOC()
set name = "Examine Meta-Info (OOC)"
set category = "OOC"
set src in view()
if(config.allow_Metadata)
usr << "[src]'s Metainfo:"
if(src.storedpreferences)
usr << "[src]'s OOC Notes: [src.storedpreferences.metadata]"
else
usr << "[src] does not have any stored infomation!"
else
usr << "OOC Metadata is not supported by this server!"
return
/mob/living/attack_animal(mob/M)
attack_paw(M) // treat it like a normal non-human attack
+2 -1
View File
@@ -142,8 +142,9 @@
//world << "channel_prefix=[channel_prefix]; message_mode=[message_mode]"
if (message_mode)
message = trim(copytext(message, 3))
if (!ishuman(src) && (message_mode=="department" || (message_mode in radiochannels)))
if (!(ishuman(src) || istype(src, /mob/living/simple_animal)) && (message_mode=="department" || (message_mode in radiochannels)))
message_mode = null //only humans can use headsets
// Check removed so parrots can use headsets!
if (!message)
return
+2 -1
View File
@@ -282,9 +282,10 @@ the mob is also allowed to move without any sort of restriction. For instance, i
var/digitalcamo = 0 // Can they be tracked by the AI?
var/list/organs = list( ) //List of organs.
var/list/organs2 = list()
//Singularity wants you!
var/grav_delay = 0
var/being_strangled = 0
var/datum/preferences/storedpreferences = null
@@ -129,6 +129,10 @@ datum/preferences
skill_specialization = null
list/skills = list() // skills can range from 0 to 3
// OOC Metadata:
metadata = ""
New()
hair_style = new/datum/sprite_accessory/hair/short
facial_hair_style = new/datum/sprite_accessory/facial_hair/shaved
@@ -243,6 +247,8 @@ datum/preferences
dat += "<b>UI Style:</b> <a href=\"byond://?src=\ref[user];preferences=1;UI=input\"><b>[UI == UI_NEW ? "New" : "Old"]</b></a><br>"
dat += "<b>Play admin midis:</b> <a href=\"byond://?src=\ref[user];preferences=1;midis=input\"><b>[midis == 1 ? "Yes" : "No"]</b></a><br>"
dat += "<b>Ghost ears:</b> <a href=\"byond://?src=\ref[user];preferences=1;ghost_ears=input\"><b>[ghost_ears == 0 ? "Nearest Creatures" : "All Speech"]</b></a><br>"
if(config.allow_Metadata)
dat += "<b>OOC Notes:</b> <a href='byond://?src=\ref[user];preferences=1;OOC=input'> Edit </a><br>"
if((user.client) && (user.client.holder) && (user.client.holder.rank) && (user.client.holder.rank == "Game Master"))
dat += "<hr><b>OOC</b><br>"
@@ -640,6 +646,24 @@ datum/preferences
if("random")
age = rand (20, 45)
if(link_tags["OOC"])
var/tempnote = ""
tempnote = input(user, "Please enter your OOC Notes!:", "OOC notes" , metadata) as text
var/list/bad_characters = list("_", "\"", "<", ">", ";", "\[", "\]", "{", "}", "|", "\\","0","1","2","3","4","5","6","7","8","9")
for(var/c in bad_characters)
tempnote = dd_replacetext(tempnote, c, "")
if(length(tempnote) >= 255)
alert("That name is too long. (255 character max, please)")
return
metadata = tempnote
return
if(link_tags["b_type"])
switch(link_tags["b_type"])
if("input")
+7
View File
@@ -150,6 +150,8 @@ datum/preferences/proc/savefile_save(mob/user, slot)
F["skills"] << src.skills
F["skill_specialization"] << src.skill_specialization
F["OOC_Notes"] << src.metadata
return 1
// loads the savefile corresponding to the mob's ckey
@@ -244,6 +246,11 @@ datum/preferences/proc/savefile_load(mob/user, slot)
if(!job_alt_titles)
job_alt_titles = new()
F["OOC_Notes"] >> src.metadata
if(isnull(metadata))
metadata = ""
//NOTE: Conversion things go inside this if statement
//When updating the save file remember to add 1 to BOTH the savefile constants
//Also take the old conversion things that no longer apply out of this if
+13 -6
View File
@@ -456,13 +456,16 @@
if("hand")
usr:swap_hand()
if("resist")
if(usr.next_move < world.time)
if(usr.next_move > world.time)
return
usr.next_move = world.time + 20
if ((!( usr.stat ) && usr.canmove && !( usr.restrained() )))
var/resisting = 0
for(var/obj/O in usr.requests)
del(O)
resisting++
for(var/obj/item/weapon/grab/G in usr.grabbed_by)
resisting++
if (G.state == 1)
del(G)
else
@@ -477,9 +480,9 @@
for(var/mob/O in viewers(usr, null))
O.show_message(text("\red [] has broken free of []'s headlock!", usr, G.assailant), 1)
del(G)
for(var/mob/O in viewers(usr, null))
O.show_message(text("\red <B>[] resists!</B>", usr), 1)
if(resisting)
for(var/mob/O in viewers(usr, null))
O.show_message(text("\red <B>[] resists!</B>", usr), 1)
if(usr:handcuffed && usr:canmove && (usr.last_special <= world.time))
var/breakouttime = 1200
var/displaytime = 2
@@ -494,7 +497,8 @@
O.show_message(text("\red <B>[] is trying to break the handcuffs!</B>", usr), 1)
spawn(0)
if(do_after(usr, 50))
if(!usr:handcuffed || usr:buckled) return
if(!usr:handcuffed || usr:buckled)
return
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] manages to break the handcuffs!</B>", usr), 1)
usr << "\green You successfully break your handcuffs."
@@ -569,11 +573,14 @@
O.show_message(text("\red <B>[] attempts to unbuckle themself!</B>", usr), 1)
spawn(0)
if(do_after(usr, 1200))
if(!usr:buckled) return
if(!usr:buckled)
return
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] manages to unbuckle themself!</B>", usr), 1)
usr << "\blue You successfully unbuckle yourself."
usr:buckled.manual_unbuckle(usr)
if("module")
if(issilicon(usr))
if(usr:module)
+91
View File
@@ -0,0 +1,91 @@
/mob/living/simple_animal/parrot
name = "\improper Parrot"
desc = "It's a parrot! No dirty words!"
icon = 'mob.dmi'
icon_state = "cat"
icon_living = "cat"
icon_dead = "cat_dead"
speak = list("Hi","Hello!","Cracker?","BAWWWWK george mellons griffing me")
speak_emote = list("squawks","says","yells")
emote_hear = list("squawks","bawks")
emote_see = list("flutters its wings", "glares at you")
speak_chance = 1
turns_per_move = 5
meat_type = /obj/item/weapon/reagent_containers/food/snacks/cracker/
response_help = "pets the"
response_disarm = "gently moves aside the"
response_harm = "swats the"
ears = new /obj/item/device/radio/headset/heads/ce()
/mob/living/simple_animal/parrot/DrProfessor
name = "Doctor Professor Parrot, PhD"
desc = "That's the Doctor Professor. He has more degrees than all of the engineering team put together, and has several published papers on quantum cracker theory."
speak = list(":e Check the singlo, you chucklefucks!",":e Wire the solars, you lazy bums!",":e WHO TOOK THE DAMN RIG SUIT?",":e OH GOD ITS FREE CALL THE SHUTTLE")
response_harm = "is attacked in the face by"
/obj/item/weapon/reagent_containers/food/snacks/cracker/
name = "Cracker"
desc = "It's a salted cracker."
/mob/living/simple_animal/parrot/show_inv(mob/user as mob)
user.machine = src
if(user.stat) return
var/dat = "<div align='center'><b>Inventory of [name]</b></div><p>"
if(ears)
dat += "<br><b>Headset:</b> [ears] (<a href='?src=\ref[src];remove_inv=ears'>Remove</a>)"
else
dat += "<br><b>Headset:</b> <a href='?src=\ref[src];add_inv=ears'>Nothing</a>"
user << browse(dat, text("window=mob[];size=325x500", name))
onclose(user, "mob[real_name]")
return
/mob/living/simple_animal/parrot/Topic(href, href_list)
if(usr.stat) return
//Removing from inventory
if(href_list["remove_inv"])
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
return
var/remove_from = href_list["remove_inv"]
switch(remove_from)
if("ears")
if(ears)
src.say(":e BAWWWWWK LEAVE THE HEADSET BAWKKKKK!")
ears.loc = src.loc
ears = null
else
usr << "\red There is nothing to remove from its [remove_from]."
return
//Adding things to inventory
else if(href_list["add_inv"])
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
return
var/add_to = href_list["add_inv"]
if(!usr.get_active_hand())
usr << "\red You have nothing in your hand to put on its [add_to]."
return
switch(add_to)
if("ears")
if(ears)
usr << "\red It's already wearing something."
return
else
var/obj/item/item_to_add = usr.get_active_hand()
if(!item_to_add)
return
if( !istype(item_to_add, /obj/item/device/radio/headset) )
usr << "\red This object won't fit."
return
usr.drop_item()
item_to_add.loc = src
src.ears = item_to_add
else
..()