Merge remote-tracking branch 'remotes/git-svn' r4881 into bs12_with_tgport

Conflicts:
	baystation12.dme
	code/game/gamemodes/events.dm
	code/game/machinery/doors/door.dm
	code/game/machinery/gateway.dm
	code/game/objects/items/devices/flashlight.dm
	code/game/sound.dm
	code/global.dm
	code/modules/admin/admin_verbs.dm
	code/modules/awaymissions/zlevel.dm
	code/modules/food/recipes_microwave.dm
	code/modules/mining/mine_items.dm
	code/modules/mob/living/carbon/carbon.dm
	code/modules/mob/living/carbon/human/update_icons.dm
	code/modules/paperwork/clipboard.dm
	code/modules/paperwork/filingcabinet.dm
	code/modules/paperwork/folders.dm
	code/modules/paperwork/handlabeler.dm
	code/modules/paperwork/paper.dm
	code/modules/paperwork/paperbin.dm
	code/modules/paperwork/pen.dm
	code/modules/paperwork/photocopier.dm
	code/modules/paperwork/stamps.dm
	code/world.dm
	html/changelog.html
	maps/RandomZLevels/fileList.txt

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2012-10-15 23:16:27 +10:00
92 changed files with 10402 additions and 9019 deletions

View File

@@ -40,6 +40,7 @@
if(!need_update) return
clear_admin_verbs()
handle_permission_verbs()
switch(rank)
if("Game Master")
@@ -68,8 +69,6 @@
verbs += /client/proc/cmd_admin_delete
verbs += /client/proc/cmd_admin_add_freeform_ai_law
verbs += /client/proc/cmd_admin_rejuvenate
//verbs += /client/proc/cmd_admin_drop_everything --Merged with view variables
//verbs += /client/proc/cmd_modify_object_variables --Merged with view variables
if ("Admin Candidate")
holder.level = 2
@@ -81,7 +80,6 @@
verbs += /client/proc/Jump
verbs += /client/proc/jumptokey
verbs += /client/proc/jumptomob
//verbs += /client/proc/cmd_admin_attack_log --Merged with view variables
if ("Temporary Admin")
holder.level = 1
@@ -112,27 +110,15 @@
//Admin Observer
if (holder.level == -1)
verbs += /client/proc/investigate_show
verbs += /client/proc/cmd_admin_say
verbs += /client/proc/cmd_mod_say
verbs += /client/proc/cmd_admin_gib_self
verbs += /client/proc/deadmin_self
verbs += /client/proc/cmd_mod_say verbs += /client/proc/cmd_admin_gib_self verbs += /client/proc/deadmin_self
return
//Moderator
if (holder.level >= 0)
verbs += /client/proc/cmd_admin_pm_context
verbs += /client/proc/cmd_admin_pm_panel
verbs += /client/proc/cmd_mod_say
verbs += /client/proc/hide_verbs
verbs += /client/proc/deadmin_self
verbs += /client/proc/Report
verbs += /client/proc/display_admin_reports
verbs += /datum/admins/proc/show_skills
verbs += /client/proc/admin_ghost
verbs += /datum/admins/proc/show_player_info
verbs += /datum/admins/proc/PlayerNotes
else return
verbs += /client/proc/cmd_admin_pm_context verbs += /client/proc/cmd_admin_pm_panel
verbs += /client/proc/hide_verbs verbs += /client/proc/deadmin_self
verbs += /client/proc/Report verbs += /client/proc/display_admin_reports verbs += /datum/admins/proc/show_skills verbs += /client/proc/admin_ghost verbs += /datum/admins/proc/show_player_info verbs += /datum/admins/proc/PlayerNotes else return
//Extra moderator commands
if(holder.level == 0)
@@ -152,17 +138,28 @@
verbs += /client/proc/toggle_hear_deadcast
verbs += /client/proc/toggle_hear_radio
verbs += /client/proc/deadmin_self
verbs += /client/proc/player_panel_new
verbs += /client/proc/cmd_admin_change_custom_event
verbs += /datum/admins/proc/announce
verbs += /datum/admins/proc/startnow
verbs += /datum/admins/proc/toggleAI //Toggle the AI
verbs += /datum/admins/proc/toggleenter //Toggle enterting
verbs += /datum/admins/proc/toggleguests //Toggle guests entering
verbs += /datum/admins/proc/toggleooc //toggle ooc
verbs += /datum/admins/proc/toggleoocdead //toggle ooc for dead/unc
verbs += /datum/admins/proc/show_player_panel
verbs += /client/proc/deadchat //toggles deadchat
verbs += /client/proc/cmd_admin_subtle_message
verbs += /client/proc/dsay
verbs += /client/proc/admin_ghost
verbs += /client/proc/game_panel
verbs += /client/proc/unjobban_panel
verbs += /client/proc/jobbans
verbs += /client/proc/player_panel
verbs += /client/proc/player_panel_new
verbs += /client/proc/unban_panel
verbs += /datum/admins/proc/toggleooc
verbs += /datum/admins/proc/toggleoocdead
//verbs += /client/proc/cmd_admin_attack_log --Merged with view variables
else return
verbs += /client/proc/jobbans
verbs += /client/proc/unjobban_panel
verbs += /client/proc/check_ai_laws
verbs += /client/proc/investigate_show
verbs += /client/proc/cmd_admin_gib_self
verbs += /client/proc/player_panel_new verbs += /client/proc/cmd_admin_change_custom_event verbs += /client/proc/game_panel verbs += /client/proc/unjobban_panel verbs += /client/proc/jobbans verbs += /client/proc/unban_panel verbs += /datum/admins/proc/toggleooc verbs += /datum/admins/proc/toggleoocdead else return
//Admin Candidate
if (holder.level >= 2)
@@ -185,7 +182,6 @@
verbs += /datum/admins/proc/toggleaban //abandon mob
verbs += /datum/admins/proc/show_traitor_panel
verbs += /client/proc/getserverlog //fetch an old serverlog to look at
//verbs += /client/proc/cmd_admin_remove_plasma --This proc is outdated, does not do anything
verbs += /client/proc/admin_call_shuttle
verbs += /client/proc/admin_cancel_shuttle
verbs += /client/proc/cmd_admin_dress
@@ -229,11 +225,8 @@
verbs += /client/proc/jumptocoord
verbs += /client/proc/deadmin_self
verbs += /client/proc/giveruntimelog //used by coders to retrieve runtime logs
//verbs += /client/proc/cmd_admin_godmode --Merged with view variables
//verbs += /client/proc/cmd_admin_gib --Merged with view variables
//verbs += /proc/togglebuildmode --Merged with view variables
//verbs += /client/proc/cmd_modify_object_variables --Merged with view variables
verbs += /client/proc/togglebuildmodeself
verbs += /client/proc/debug_controller
else return
//Game Admin
@@ -246,18 +239,13 @@
verbs += /client/proc/cmd_admin_world_narrate
verbs += /client/proc/cmd_debug_del_all
verbs += /client/proc/cmd_debug_tog_aliens
// verbs += /client/proc/mapload
verbs += /client/proc/check_words
verbs += /client/proc/drop_bomb
verbs += /client/proc/kill_airgroup
//verbs += /client/proc/cmd_admin_drop_everything --Merged with view variables
verbs += /client/proc/make_sound
verbs += /client/proc/play_local_sound
verbs += /client/proc/send_space_ninja
verbs += /client/proc/restart_controller //Can call via aproccall --I_hate_easy_things.jpg, Mport --Agouri
verbs += /client/proc/debug_controller
// verbs += /client/proc/Blobize //I need to remember to move/remove this later
// verbs += /client/proc/Blobcount //I need to remember to move/remove this later
verbs += /client/proc/toggle_clickproc //TODO ERRORAGE (Temporary proc while the new clickproc is being tested)
verbs += /client/proc/toggle_gravity_on
verbs += /client/proc/toggle_gravity_off
@@ -266,14 +254,7 @@
verbs += /client/proc/Set_Holiday //Force-set a Holiday
verbs += /client/proc/admin_memo
verbs += /client/proc/ToRban //ToRban frontend to access its features.
verbs += /client/proc/game_panel
//verbs += /client/proc/cmd_mass_modify_object_variables --Merged with view variables
//verbs += /client/proc/cmd_admin_explosion --Merged with view variables
//verbs += /client/proc/cmd_admin_emp --Merged with view variables
//verbs += /client/proc/give_spell --Merged with view variables
//verbs += /client/proc/cmd_admin_ninjafy --Merged with view variables
//verbs += /client/proc/cmd_switch_radio --removed as tcommsat is staying
else return
verbs += /client/proc/game_panel else return
//Game Master
if (holder.level >= 6)
@@ -440,26 +421,6 @@
/client/proc/playernotes,
/client/proc/cmd_admin_change_custom_event
)
//verbs -= /client/proc/mapload
//verbs -= /client/proc/cmd_admin_drop_everything --merged with view variables
//verbs -= /client/proc/give_spell --Merged with view variables
//verbs -= /client/proc/cmd_admin_ninjafy --Merged with view variables
//verbs -= /client/proc/cmd_modify_object_variables --Merged with view variables
//verbs -= /client/proc/cmd_admin_explosion --Merged with view variables
//verbs -= /client/proc/cmd_admin_emp --Merged with view variables
//verbs -= /client/proc/cmd_admin_godmode --Merged with view variables
//verbs -= /client/proc/cmd_admin_gib --Merged with view variables
//verbs -= /client/proc/cmd_mass_modify_object_variables --Merged with view variables
//verbs -= /client/proc/cmd_admin_attack_log --Merged with view variables
//verbs -= /proc/togglebuildmode --Merged with view variables
//verbs -= /client/proc/cmd_admin_prison --Merged with player panel
//verbs -= /datum/admins/proc/unprison --Merged with player panel
//verbs -= /client/proc/cmd_switch_radio --removed because tcommsat is staying
// verbs -= /client/proc/Blobize
// verbs -= /client/proc/Blobcount
//verbs -= /client/proc/warn
//verbs -= /client/proc/cmd_admin_mute --was never used (according to stats trackind) - use show player panel --erro
//verbs -= /client/proc/cmd_admin_remove_plasma --This proc is outdated, does not do anything
return
/client/proc/admin_ghost()

View File

@@ -19,6 +19,7 @@ var/list/admin_datums = list()
var/fakekey = null
var/ooccolor = "#b82e00"
var/sound_adminhelp = 0 //If set to 1 this will play a sound when adminhelps are received.
var/sql_permissions = 0 //Permissions for different admin command groups. Must not be editable ingame.
var/datum/marked_datum
@@ -84,6 +85,49 @@ var/list/admin_datums = list()
usr << "\red Unfortunatly there were no candidates available"
return
if(href_list["editadminpermissions"])
if(!usr.client)
return
var/adm_ckey = href_list["editadminckey"]
if(!adm_ckey)
usr << "\red no valid ckey"
return
if(!usr.client.holder || !(usr.client.holder.sql_permissions & PERMISSIONS))
usr << "\red You do not have permission to do this!"
message_admins("[key_name_admin(usr)] attempted to edit the admin permissions of [adm_ckey] without authentication!")
log_admin("[key_name(usr)] attempted to edit the admin permissions of [adm_ckey] without authentication!")
return
switch(href_list["editadminpermissions"])
if("permissions")
usr << "Currently unavailable since nothing runs off of permissions"
if("rank")
var/new_rank = input("Please, select a rank", "New rank for player", null, null) as null|anything in list("Game Master","Game Admin", "Trial Admin", "Admin Observer")
if(!new_rank)
return
message_admins("[key_name_admin(usr)] edited the admin rank of [adm_ckey] to [new_rank]")
log_admin("[key_name(usr)] edited the admin rank of [adm_ckey] to [new_rank]")
log_admin_rank_modification(adm_ckey, new_rank)
if("remove")
if(alert("Are you sure you want to remove [adm_ckey]?","Message","Yes","Cancel") == "Yes")
message_admins("[key_name_admin(usr)] removed [adm_ckey] from the admins list")
log_admin("[key_name(usr)] removed [adm_ckey] from the admins list")
log_admin_rank_modification(adm_ckey, "Removed")
if("add")
var/new_ckey = input(usr,"New admin's ckey","Admin ckey", null) as text|null
if(!new_ckey)
return
var/new_rank = input("Please, select a rank", "New rank for player", null, null) as null|anything in list("Game Master","Game Admin", "Trial Admin", "Admin Observer")
if(!new_rank)
return
message_admins("[key_name_admin(usr)] added [new_ckey] as a new admin to the rank [new_rank]")
log_admin("[key_name(usr)] added [new_ckey] as a new admin to the rank [new_rank]")
log_admin_rank_modification(new_ckey, new_rank)
if(href_list["call_shuttle"])
if (src.rank in list("Trial Admin", "Badmin", "Game Admin", "Game Master"))
if( ticker.mode.name == "blob" )
@@ -2651,4 +2695,4 @@ var/list/admin_datums = list()
switch(href_list["notes"])
if("show")
show_player_info(ckey)
return
return

View File

@@ -0,0 +1,12 @@
//Before this proc is called, the holder variable must already be set, with the proper rank, level and permissions set.
//This proc also DOES NOT CLEAR EXISTING ADMIN VERBS
/client/proc/handle_permission_verbs()
if(!holder || !holder.rank || !holder.sql_permissions)
return
if(holder.sql_permissions & PERMISSIONS)
verbs += /client/proc/edit_admin_permissions

View File

@@ -0,0 +1,127 @@
/client/proc/edit_admin_permissions()
set category = "Admin"
set name = "Permissions Panel"
set desc = "Edit admin permissions"
if(!holder)
return
holder.edit_admin_permissions()
/datum/admins/proc/edit_admin_permissions()
if(!usr.client)
return
if(!usr.client.holder || !(usr.client.holder.sql_permissions & PERMISSIONS))
usr << "\red You do not have permission to do this!"
return
var/user = sqlfdbklogin
var/pass = sqlfdbkpass
var/db = sqlfdbkdb
var/address = sqladdress
var/port = sqlport
var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
if(!dbcon.IsConnected())
usr << "\red Failed to establish database connection"
return
var/DBQuery/select_query = dbcon.NewQuery("SELECT ckey, rank, level, flags FROM erro_admin ORDER BY rank, ckey")
select_query.Execute()
var/output = "<div align='center'><h1>Current admins</h1>"
output += "<a href=\"byond://?src=\ref[src];editadminpermissions=add;editadminckey=none\">Add new admin</a>"
output += "<table width='90%' bgcolor='#e3e3e3' cellpadding='5' cellspacing='0'>"
output += "<tr>"
output += "<th width='125'><b>CKEY</b></th>"
output += "<th width='125'><b>RANK</b></th>"
output += "<th width='25'><b>LEVEL</b></th>"
output += "<th width='75'><b>PERMISSIONS</b></th>"
output += "<th width='150'><b>OPTIONS</b></th>"
output += "</tr>"
var/color1 = "#f4f4f4"
var/color2 = "#e7e7e7"
var/i = 1 //Used to determine the color of each row
while(select_query.NextRow())
i = !i
var/adm_ckey = select_query.item[1]
var/adm_rank = select_query.item[2]
var/adm_level = select_query.item[3]
var/adm_flags = text2num(select_query.item[4])
output += "<tr bgcolor='[(i % 2) ? color1 : color2]'>"
output += "<td align='center'><b>[adm_ckey]</b></td>"
output += "<td align='center'><b>[adm_rank]</b></td>"
output += "<td align='center'>[adm_level]</td>"
var/list/permissionlist = bitfield2list(adm_flags, permissionwords_sql)
output += "<td align='center'>"
for(var/word in permissionlist)
output += "[word]<BR>"
output += "</td>"
output += "<td align='center'><font size='2'>"
//Options
output += "<a href=\"byond://?src=\ref[src];editadminpermissions=permissions;editadminckey=[adm_ckey]\">PERMISSIONS</a><br>"
output += "<a href=\"byond://?src=\ref[src];editadminpermissions=rank;editadminckey=[adm_ckey]\">RANK</a><br>"
output += "<a href=\"byond://?src=\ref[src];editadminpermissions=remove;editadminckey=[adm_ckey]\">REMOVE</a>"
output += "</font></td>"
output += "</tr>"
output += "</table></div>"
usr << browse(output,"window=editadminpermissions;size=600x500")
/datum/admins/proc/log_admin_rank_modification(var/adm_ckey, var/new_rank)
if(!usr.client)
return
if(!usr.client.holder || !(usr.client.holder.sql_permissions & PERMISSIONS))
usr << "\red You do not have permission to do this!"
return
var/user = sqlfdbklogin
var/pass = sqlfdbkpass
var/db = sqlfdbkdb
var/address = sqladdress
var/port = sqlport
var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
if(!dbcon.IsConnected())
usr << "\red Failed to establish database connection"
return
if(!adm_ckey || !new_rank)
return
if(!istext(adm_ckey) || !istext(new_rank))
return
var/DBQuery/select_query = dbcon.NewQuery("SELECT id FROM erro_admin WHERE ckey = '[adm_ckey]'")
select_query.Execute()
var/new_admin = 1
var/admin_id
while(select_query.NextRow())
new_admin = 0
admin_id = text2num(select_query.item[1])
if(new_admin)
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO `erro_admin` (`id`, `ckey`, `rank`, `level`, `flags`) VALUES (null, '[adm_ckey]', '[new_rank]', -1, 0)")
insert_query.Execute()
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new admin [adm_ckey] to rank [new_rank]');")
log_query.Execute()
usr << "\blue New admin added."
else
if(!isnull(admin_id) && isnum(admin_id))
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET rank = '[new_rank]' WHERE id = [admin_id]")
insert_query.Execute()
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edited the rank of [adm_ckey] to [new_rank]');")
log_query.Execute()
usr << "\blue Admin rank changed."

View File

@@ -4,12 +4,14 @@ var/list/forbidden_varedit_object_types = list(
/datum/feedback_variable //Prevents people messing with feedback gathering
)
/*
/client/proc/cmd_modify_object_variables(obj/O as obj|mob|turf|area in world)
set category = "Debug"
set name = "Edit Variables"
set desc="(target) Edit a target item's variables"
src.modify_variables(O)
feedback_add_details("admin_verb","EDITV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
*/
/client/proc/cmd_modify_ticker_variables()
set category = "Debug"

View File

@@ -18,10 +18,6 @@
var/datum/radio_frequency/radio_connection
var/deadman = 0
proc
signal()
New()
..()
spawn(40)
@@ -104,7 +100,7 @@
return
signal()
proc/signal()
if(!radio_connection) return
var/datum/signal/signal = new

View File

@@ -4,6 +4,8 @@
name = "Bluespace Artillery Control"
icon_state = "control_boxp1"
icon = 'particle_accelerator.dmi'
density = 1
anchored = 1
/obj/machinery/artillerycontrol/process()
if(src.reload<180)
@@ -21,7 +23,7 @@
dat += "Locked on<BR>"
dat += "<B>180 seconds are required to charge between shots:</B><BR>"
dat += "<A href='byond://?src=\ref[src];fire=1'>Open Fire</A><BR>"
dat += "Deployment of weapon authorized by <br>Nanotrasen Naval Command<br><br>Rember, friendly fire is grounds for termination of your contract and life.<HR>"
dat += "Deployment of weapon authorized by <br>Nanotrasen Naval Command<br><br>Remember, friendly fire is grounds for termination of your contract and life.<HR>"
user << browse(dat, "window=scroll")
onclose(user, "scroll")
return
@@ -35,6 +37,7 @@
A = input("Area to jump bombard", "Open Fire", A) in teleportlocs
var/area/thearea = teleportlocs[A]
if (usr.stat || usr.restrained()) return
if(src.reload < 180) return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
command_alert("Bluespace artillery fire detected. Brace for impact.")
message_admins("[key_name_admin(usr)] has launched an artillery strike.", 1)

View File

@@ -3,8 +3,8 @@
//To do: Allow corpses to appear mangled, bloody, etc. Allow customizing the bodies appearance (they're all bald and white right now).
/obj/effect/landmark/corpse
var/mobname = "Unknown" //Names the mob, obviously
name = "Unknown"
var/mobname = "Unknown" //Unused now
var/corpseuniform = null //Set this to an object path to have the slot filled with said object on the corpse.
var/corpsesuit = null
var/corpseshoes = null
@@ -25,7 +25,7 @@
/obj/effect/landmark/corpse/New() //Creates a mob and checks for gear in each slot before attempting to equip it.
var/mob/living/carbon/human/M = new /mob/living/carbon/human (src.loc)
M.real_name = src.mobname
M.real_name = src.name
M.stat = 2 //Kills the new mob
if(src.corpseuniform)
M.equip_to_slot_or_del(new src.corpseuniform(M), slot_w_uniform)
@@ -73,7 +73,7 @@
/obj/effect/landmark/corpse/syndicatesoldier
mobname = "Syndicate Operative"
name = "Syndicate Operative"
corpseuniform = /obj/item/clothing/under/syndicate
corpsesuit = /obj/item/clothing/suit/armor/vest
corpseshoes = /obj/item/clothing/shoes/swat
@@ -89,7 +89,7 @@
/obj/effect/landmark/corpse/syndicatecommando
mobname = "Syndicate Commando"
name = "Syndicate Commando"
corpseuniform = /obj/item/clothing/under/syndicate
corpsesuit = /obj/item/clothing/suit/space/rig/syndi
corpseshoes = /obj/item/clothing/shoes/swat
@@ -108,7 +108,7 @@
///////////Civilians//////////////////////
/obj/effect/landmark/corpse/chef
mobname = "Chef"
name = "Chef"
corpseuniform = /obj/item/clothing/suit/chef
corpsesuit = /obj/item/clothing/suit/chef/classic
corpseshoes = /obj/item/clothing/shoes/black
@@ -121,7 +121,7 @@
/obj/effect/landmark/corpse/doctor
mobname = "Doctor"
name = "Doctor"
corpseradio = /obj/item/device/radio/headset/headset_med
corpseuniform = /obj/item/clothing/under/rank/medical
corpsesuit = /obj/item/clothing/suit/labcoat
@@ -133,7 +133,7 @@
corpseidaccess = "Medical Doctor"
/obj/effect/landmark/corpse/engineer
mobname = "Engineer"
name = "Engineer"
corpseradio = /obj/item/device/radio/headset/headset_eng
corpseuniform = /obj/item/clothing/under/rank/engineer
corpseback = /obj/item/weapon/storage/backpack/industrial
@@ -151,7 +151,7 @@
corpsehelmet = /obj/item/clothing/head/helmet/space/rig
/obj/effect/landmark/corpse/clown
mobname = "Clown"
name = "Clown"
corpseuniform = /obj/item/clothing/under/rank/clown
corpseshoes = /obj/item/clothing/shoes/clown_shoes
corpseradio = /obj/item/device/radio/headset
@@ -163,7 +163,7 @@
corpseidaccess = "Clown"
/obj/effect/landmark/corpse/scientist
mobname = "Scientist"
name = "Scientist"
corpseradio = /obj/item/device/radio/headset/headset_sci
corpseuniform = /obj/item/clothing/under/rank/scientist
corpsesuit = /obj/item/clothing/suit/labcoat/science
@@ -177,7 +177,7 @@
/////////////////Officers//////////////////////
/obj/effect/landmark/corpse/bridgeofficer
mobname = "Bridge Officer"
name = "Bridge Officer"
corpseradio = /obj/item/device/radio/headset/heads/hop
corpseuniform = /obj/item/clothing/under/rank/centcom_officer
corpsesuit = /obj/item/clothing/suit/armor/bulletproof
@@ -188,7 +188,7 @@
corpseidaccess = "Captain"
/obj/effect/landmark/corpse/commander
mobname = "Commander"
name = "Commander"
corpseuniform = /obj/item/clothing/under/rank/centcom_commander
corpsesuit = /obj/item/clothing/suit/armor/bulletproof
corpseradio = /obj/item/device/radio/headset/heads/captain

View File

@@ -76,12 +76,13 @@ obj/machinery/gateway/centerstation/process()
if(!ready) return
if(linked.len != 8) return
if(!powered()) return
if(world.time < wait)
user << "<span class='notice'>Error: Warpspace triangulation in progress. Estimated time to completion: [round(((wait - world.time) / 10) / 60)] minutes.</span>"
return
if(awaygate == null)
user << "<span class='notice'>Error: No destination found.</span>"
return
if(world.time < wait)
user << "<span class='notice'>Error: Warpspace triangulation in progress. Estimated time to completion: [round(((wait - world.time) / 10) / 60)] minutes.</span>"
return
for(var/obj/machinery/gateway/G in linked)
G.active = 1

View File

@@ -31,4 +31,8 @@
<br><br><b>A New World</b><br>\
As a participant in the Nanotrasen Gateway Project, you will be on the frontiers of space. \
Though complete safety is assured, participants are advised to prepare for inhospitable \
environs."
environs."
//we don't want the silly text overlay!
/obj/item/weapon/paper/pamphlet/update_icon()
return

View File

@@ -43,6 +43,7 @@ proc/createRandomZlevel()
world << "\red \b Loading away mission..."
var/map = pick(potentialRandomZlevels)
world.log << "away mission loaded: [map]"
var/file = file(map)
if(isfile(file))
maploader.load_map(file)

View File

@@ -102,7 +102,7 @@ BLIND // can't see anything
name = "Space helmet"
icon_state = "space"
desc = "A special helmet designed for work in a hazardous, low-pressure environment."
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH
item_state = "space"
permeability_coefficient = 0.01
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)

View File

@@ -36,13 +36,13 @@
if(usr.canmove && !usr.stat && !usr.restrained())
if(src.up)
src.up = !src.up
src.flags |= HEADCOVERSEYES
src.flags |= HEADCOVERSEYES | HEADCOVERSMOUTH
flags_inv |= HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
icon_state = "welding"
usr << "You flip the mask down to protect your eyes."
else
src.up = !src.up
src.flags &= ~HEADCOVERSEYES
src.flags &= ~HEADCOVERSEYES | HEADCOVERSMOUTH
flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
icon_state = "weldingup"
usr << "You push the mask up out of your face."

View File

@@ -11,12 +11,14 @@
desc = "An armored beret commonly used by special operations officers."
icon_state = "beret_badge"
armor = list(melee = 65, bullet = 55, laser = 35,energy = 20, bomb = 30, bio = 30, rad = 30)
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR
//Space santa outfit suit
/obj/item/clothing/head/helmet/space/santahat
name = "Santa's hat"
desc = "Ho ho ho. Merrry X-mas!"
icon_state = "santahat"
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR
/obj/item/clothing/suit/space/santa
name = "Santa's suit"
@@ -35,6 +37,7 @@
icon_state = "pirate"
item_state = "pirate"
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR
/obj/item/clothing/suit/space/pirate
name = "pirate coat"

View File

@@ -1,6 +1,8 @@
// see code/datums/recipe.dm
/* No telebacon. just no...
/datum/recipe/telebacon
items = list(
/obj/item/weapon/reagent_containers/food/snacks/meat,
@@ -8,12 +10,14 @@
)
result = /obj/item/weapon/reagent_containers/food/snacks/telebacon
I said no!
/datum/recipe/syntitelebacon
items = list(
/obj/item/weapon/syntiflesh,
/obj/item/device/assembly/signaler
)
result = /obj/item/weapon/reagent_containers/food/snacks/telebacon
*/
/datum/recipe/friedegg
reagents = list("sodiumchloride" = 1, "blackpepper" = 1)

View File

@@ -10,7 +10,7 @@
/**********************Miner Lockers**************************/
/obj/structure/closet/secure_closet/miner
name = "Miner's Equipment"
name = "miner's equipment"
icon_state = "miningsec1"
icon_closed = "miningsec"
icon_locked = "miningsec1"
@@ -95,7 +95,7 @@ proc/move_mining_shuttle()
return
/obj/machinery/computer/mining_shuttle
name = "Mining Shuttle Console"
name = "mining shuttle console"
icon = 'icons/obj/computer.dmi'
icon_state = "shuttle"
req_access = list(access_mining)
@@ -158,29 +158,15 @@ proc/move_mining_shuttle()
/******************************Lantern*******************************/
/obj/item/device/flashlight/lantern
name = "Mining Lantern"
icon_state = "lantern-off"
desc = "A miner's lantern"
anchored = 0
icon_on = "lantern-on"
icon_off = "lantern-off"
var/brightness = 12 // luminosity when on
/obj/item/device/flashlight/lantern/New()
luminosity = 0
on = 0
return
/obj/item/device/flashlight/lantern/attack_self(mob/user)
src.add_fingerprint(user)
on = !on
update_brightness(user)
return
name = "lantern"
icon_state = "lantern"
desc = "A mining lantern."
brightness_on = 6 // luminosity when on
/*****************************Pickaxe********************************/
/obj/item/weapon/pickaxe
name = "Miner's pickaxe"
name = "pickaxe"
icon = 'icons/obj/items.dmi'
icon_state = "pickaxe"
flags = FPRINT | TABLEPASS| CONDUCT
@@ -195,12 +181,12 @@ proc/move_mining_shuttle()
attack_verb = list("hit", "pierced", "sliced", "attacked")
hammer
name = "Mining Sledge Hammer"
name = "sledgehammer"
//icon_state = "sledgehammer" Waiting on sprite
desc = "A mining hammer made of reinforced metal. You feel like smashing your boss in the face with this."
silver
name = "Silver Pickaxe"
name = "silver pickaxe"
icon_state = "spickaxe"
item_state = "spickaxe"
digspeed = 30
@@ -208,7 +194,7 @@ proc/move_mining_shuttle()
desc = "This makes no metallurgic sense."
drill
name = "Mining Drill" // Can dig sand as well!
name = "mining drill" // Can dig sand as well!
icon_state = "handdrill"
item_state = "jackhammer"
digspeed = 30
@@ -216,7 +202,7 @@ proc/move_mining_shuttle()
desc = "Yours is the drill that will pierce through the rock walls."
jackhammer
name = "Sonic Jackhammer"
name = "sonic jackhammer"
icon_state = "jackhammer"
item_state = "jackhammer"
digspeed = 20 //faster than drill, but cannot dig
@@ -224,7 +210,7 @@ proc/move_mining_shuttle()
desc = "Cracks rocks with sonic blasts, perfect for killing cave lizards."
gold
name = "Golden Pickaxe"
name = "golden pickaxe"
icon_state = "gpickaxe"
item_state = "gpickaxe"
digspeed = 20
@@ -232,7 +218,7 @@ proc/move_mining_shuttle()
desc = "This makes no metallurgic sense."
plasmacutter
name = "Plasma Cutter"
name = "plasma cutter"
icon_state = "plasmacutter"
item_state = "gun"
w_class = 3.0 //it is smaller than the pickaxe
@@ -242,7 +228,7 @@ proc/move_mining_shuttle()
desc = "A rock cutter that uses bursts of hot plasma. You could use it to cut limbs off of xenos! Or, you know, mine stuff."
diamond
name = "Diamond Pickaxe"
name = "diamond pickaxe"
icon_state = "dpickaxe"
item_state = "dpickaxe"
digspeed = 10
@@ -250,7 +236,7 @@ proc/move_mining_shuttle()
desc = "A pickaxe with a diamond pick head, this is just like minecraft."
diamonddrill //When people ask about the badass leader of the mining tools, they are talking about ME!
name = "Diamond Mining Drill"
name = "diamond mining drill"
icon_state = "diamonddrill"
item_state = "jackhammer"
digspeed = 5 //Digs through walls, girders, and can dig up sand
@@ -258,7 +244,7 @@ proc/move_mining_shuttle()
desc = "Yours is the drill that will pierce the heavens!"
borgdrill
name = "Cyborg Mining Drill"
name = "cyborg mining drill"
icon_state = "diamonddrill"
item_state = "jackhammer"
digspeed = 15

View File

@@ -18,7 +18,7 @@
return
. = src.say_dead(message)
/*
for (var/mob/M in hearers(null, null))
if (!M.stat)
if(M.job == "Chaplain")
@@ -41,4 +41,5 @@
else
M.show_message("<span class='game'><i>You hear muffled speech... you can almost make out some words...</i></span>", 2)
// M.show_message("<span class='game'><i>[stutter(message)]</i></span>", 2)
playsound(src.loc, pick('sound/effects/ghost.ogg','sound/effects/ghost2.ogg'), 10, 1)
playsound(src.loc, pick('sound/effects/ghost.ogg','sound/effects/ghost2.ogg'), 10, 1)
*/

View File

@@ -35,11 +35,10 @@
return
/mob/living/carbon/alien/adjustFireLoss(amount) // Weak to Fire
..(amount * 1.5)
return
/mob/living/carbon/alien/adjustBruteLoss(amount) // Strong against melee weapons
..(amount * 0.5)
if(amount > 0)
..(amount * 1.5)
else
..(amount)
return
/mob/living/carbon/alien/proc/getPlasma()
@@ -48,6 +47,15 @@
/mob/living/carbon/alien/eyecheck()
return 2
/mob/living/carbon/alien/updatehealth()
if(nodamage)
health = maxHealth
stat = CONSCIOUS
else
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
health = maxHealth - getOxyLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()
/mob/living/carbon/alien/proc/handle_environment(var/datum/gas_mixture/environment)
//If there are alien weeds on the ground then heal if needed or give some toxins
@@ -106,12 +114,8 @@
/mob/living/carbon/alien/proc/handle_mutations_and_radiation()
if(getFireLoss())
if((COLD_RESISTANCE in mutations) || prob(50))
switch(getFireLoss())
if(1 to 50)
adjustFireLoss(-1)
if(51 to 100)
adjustFireLoss(-5)
if((COLD_RESISTANCE in mutations) || prob(5))
adjustFireLoss(-1)
// Aliens love radiation nom nom nom
if (radiation)
@@ -145,6 +149,7 @@
/mob/living/carbon/alien/Stat()
statpanel("Status")
stat(null, "Intent: [a_intent]")
stat(null, "Move Mode: [m_intent]")

View File

@@ -524,13 +524,4 @@ In all, this is a lot like the monkey code. /N
onclose(user, "mob[name]")
return
/mob/living/carbon/alien/humanoid/updatehealth()
if(nodamage)
health = maxHealth
stat = CONSCIOUS
else
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
health = maxHealth - getOxyLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()

View File

@@ -222,17 +222,17 @@
blinded = 1
silent = 0
else //ALIVE. LIGHTS ARE ON
if(health < config.health_threshold_dead || brain_op_stage == 4.0)
if(health < -25 || brain_op_stage == 4.0)
death()
blinded = 1
silent = 0
return 1
//UNCONSCIOUS. NO-ONE IS HOME
if( (getOxyLoss() > 50) || (config.health_threshold_crit > health) )
if( health <= 20 && prob(1) )
spawn(0)
emote("gasp")
if( (getOxyLoss() > 50) || (0 > health) )
//if( health <= 20 && prob(1) )
// spawn(0)
// emote("gasp")
if(!reagents.has_reagent("inaprovaline"))
adjustOxyLoss(1)
Paralyse(3)

View File

@@ -11,6 +11,7 @@ var/const/MAX_ACTIVE_TIME = 400
/obj/item/clothing/mask/facehugger
name = "alien"
desc = "It has some sort of a tube at the end of its tail."
icon = 'icons/mob/alien.dmi'
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
@@ -167,6 +168,7 @@ var/const/MAX_ACTIVE_TIME = 400
return
stat = CONSCIOUS
icon_state = "[initial(icon_state)]"
/* for(var/mob/living/carbon/alien/alien in world)
var/image/activeIndicator = image('icons/mob/alien.dmi', loc = src, icon_state = "facehugger_active")
@@ -183,6 +185,7 @@ var/const/MAX_ACTIVE_TIME = 400
/* RemoveActiveIndicators() */
stat = UNCONSCIOUS
icon_state = "[initial(icon_state)]_inactive"
spawn(rand(MIN_ACTIVE_TIME,MAX_ACTIVE_TIME))
GoActive()
@@ -194,7 +197,7 @@ var/const/MAX_ACTIVE_TIME = 400
/* RemoveActiveIndicators() */
icon_state = "facehugger_dead"
icon_state = "[initial(icon_state)]_dead"
stat = DEAD
for(var/mob/O in viewers(src, null))

View File

@@ -433,4 +433,4 @@
item.throw_at(target, item.throw_range, item.throw_speed)
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) ..()

View File

@@ -309,7 +309,7 @@
proc/handle_mutations_and_radiation()
if(getFireLoss())
if((COLD_RESISTANCE in mutations) || (prob(1) && prob(75)))
if((COLD_RESISTANCE in mutations) || (prob(1)))
heal_organ_damage(0,1)
// Make nanoregen heal youu, -3 all damage types

View File

@@ -11,6 +11,8 @@
return
else
return ..(message)
if(stat == DEAD)
return ..(message)
if(length(message) >= 1) //In case people forget the '*help' command, this will slow them the message and prevent people from saying one letter at a time
if (copytext(message, 1, 2) != "*")
@@ -32,7 +34,7 @@
for(var/i = 0,i<imax,i++)
message += "E"
if(stat != 2)
if(stat != DEAD)
for(var/datum/disease/pierrot_throat/D in viruses)
var/list/temp_message = dd_text2list(message, " ") //List each word in the message
var/list/pick_list = list()

View File

@@ -220,8 +220,8 @@ proc/get_damage_icon_part(damage_state, body_part)
if(stand_icon) del(stand_icon)
if(lying_icon) del(lying_icon)
if(dna && dna.mutantrace) return
var/husk = (HUSK in src.mutations) //100% unnecessary -Agouri //nope, do you really want to iterate through src.mutations repeatedly? -Pete var/fat = (FAT in src.mutations) var/skeleton = (SKELETON in src.mutations) var/g = "m"
var/g = "m"
if(gender == FEMALE) g = "f"
var/husk = (HUSK in src.mutations)
var/obese = (FAT in src.mutations)
@@ -230,19 +230,10 @@ proc/get_damage_icon_part(damage_state, body_part)
var/individual_limbs = 1
//Base mob icon
if(obese)
// Sorry, no dismemberment for fat people.
stand_icon = new /icon('icons/mob/human.dmi', "fatbody_s")
if(husk) stand_icon = new /icon('icons/mob/human.dmi', "husk_s") lying_icon = new /icon('icons/mob/human.dmi', "husk_l") else if(fat) stand_icon = new /icon('icons/mob/human.dmi', "fatbody_s")
lying_icon = new /icon('icons/mob/human.dmi', "fatbody_l")
individual_limbs = 0
// If dismemberment is on, draw individual limbs
else if(config.limbs_can_break)
stand_icon = new /icon('icons/mob/human.dmi', "torso_[g]_s")
lying_icon = new /icon('icons/mob/human.dmi', "torso_[g]_l")
// Otherwise just draw the full body.
else if(SKELETON in src.mutations)
stand_icon = new /icon('icons/mob/human.dmi', "skeleton_s")
lying_icon = new /icon('icons/mob/human.dmi', "skeleton_l")
else if(skeleton)
stand_icon = new /icon('icons/mob/human.dmi', "skeleton_s") lying_icon = new /icon('icons/mob/human.dmi', "skeleton_l")
else
stand_icon = new /icon('icons/mob/human.dmi', "body_[g]_s")
lying_icon = new /icon('icons/mob/human.dmi', "body_[g]_l")
@@ -289,7 +280,7 @@ proc/get_damage_icon_part(damage_state, body_part)
lying_icon.Blend(husk_l, ICON_OVERLAY)
//Skin tone
if((SKELETON in src.mutations) == 0)
if(!skeleton)
if(s_tone >= 0)
stand_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
lying_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
@@ -298,7 +289,7 @@ proc/get_damage_icon_part(damage_state, body_part)
lying_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
//Eyes
if((SKELETON in src.mutations) == 0)
if(!skeleton)
var/icon/eyes_s = new/icon('icons/mob/human_face.dmi', "eyes_s")
var/icon/eyes_l = new/icon('icons/mob/human_face.dmi', "eyes_l")
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
@@ -314,16 +305,13 @@ proc/get_damage_icon_part(damage_state, body_part)
lying_icon.Blend(eyes_l, ICON_OVERLAY)
//Mouth (lipstick!)
if(lip_style && (SKELETON in src.mutations) == 0)
if(lip_style) //skeletons are allowed to wear lipstick no matter what you think, agouri.
stand_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[lip_style]_s"), ICON_OVERLAY)
lying_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[lip_style]_l"), ICON_OVERLAY)
//Underwear
if(underwear >0 && underwear < 12)
if(!obese)
stand_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_l"), ICON_OVERLAY)
if(update_icons) update_icons()
if(!fat && !skeleton) stand_icon.Blend(new /icon('icons/mob/human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY) if(update_icons) update_icons()
//tail update_tail_showing(0)
@@ -375,7 +363,7 @@ proc/get_damage_icon_part(damage_state, body_part)
/mob/living/carbon/human/update_mutations(var/update_icons=1)
var/fat
if( FAT in mutations )
if(FAT in mutations)
fat = "fat"
var/image/lying = image("icon" = 'icons/effects/genetics.dmi')

View File

@@ -73,7 +73,8 @@ var/datum/cameranet/cameranet = new()
// Removes a camera from a chunk.
/datum/cameranet/proc/removeCamera(obj/machinery/camera/c)
majorChunkChange(c, 0)
if(c.can_use())
majorChunkChange(c, 0)
// Add a camera to a chunk.
@@ -81,15 +82,13 @@ var/datum/cameranet/cameranet = new()
if(c.can_use())
majorChunkChange(c, 1)
// Used for Cyborg cameras. It is the same as "add" but named differently for easier readability
// and to allow the user know what it is for. Since portable cameras can be in ANY chunk, we have to
// all it to be added to all chunks. If the camera is disabled, it will instead remove.
// Used for Cyborg cameras. Since portable cameras can be in ANY chunk.
/datum/cameranet/proc/updatePortableCamera(obj/machinery/camera/c)
if(c.can_use())
majorChunkChange(c, 1)
else
majorChunkChange(c, 0)
//else
// majorChunkChange(c, 0)
// Never access this proc directly!!!!
// This will update the chunk and all the surrounding chunks.

View File

@@ -15,6 +15,9 @@
var/visible = 0
var/changed = 0
var/updating = 0
var/x = 0
var/y = 0
var/z = 0
// Add an AI eye to the chunk, then update if changed.
@@ -69,10 +72,16 @@
var/list/newVisibleTurfs = list()
for(var/obj/machinery/camera/c in cameras)
for(var/camera in cameras)
var/obj/machinery/camera/c = camera
if(!c.can_use())
continue
var/turf/point = locate(src.x + 8, src.y + 8, src.z)
if(get_dist(point, c) > 24)
continue
for(var/turf/t in c.can_see())
newVisibleTurfs += t
@@ -85,7 +94,6 @@
visibleTurfs = newVisibleTurfs
obscuredTurfs = turfs - newVisibleTurfs
for(var/turf in visAdded)
var/turf/t = turf
if(t.obscured)
@@ -116,16 +124,21 @@
/datum/camerachunk/New(loc, x, y, z)
set background = 1
// 0xf = 15
x &= ~0xf
y &= ~0xf
src.x = x
src.y = y
src.z = z
for(var/obj/machinery/camera/c in range(16, locate(x + 8, y + 8, z)))
if(c.can_use())
cameras += c
for(var/turf/t in range(10, locate(x + 8, y + 8, z)))
if(t.x >= x && t.y >= y && t.x < x + 16 && t.y < y + 16)
turfs += t

View File

@@ -64,13 +64,15 @@
/mob/living/silicon/robot/var/updating = 0
/mob/living/silicon/robot/Move()
var/oldLoc = src.loc
. = ..()
if(.)
if(src.camera)
if(!updating)
updating = 1
spawn(BORG_CAMERA_BUFFER)
cameranet.updatePortableCamera(src.camera)
if(oldLoc != src.loc)
cameranet.updatePortableCamera(src.camera)
updating = 0
// CAMERA

View File

@@ -65,6 +65,8 @@
updatename("Default")
updateicon()
playsound(src, 'sound/voice/liveagain.ogg', 75, 1)
if(!cell)
cell = new /obj/item/weapon/cell(src)
cell.maxcharge = 7500

View File

@@ -367,4 +367,21 @@
dir = i
sleep(1)
else
..()
..()
/mob/living/simple_animal/corgi/puppy
name = "\improper corgi puppy"
real_name = "corgi"
desc = "It's a corgi puppy."
icon_state = "puppy"
icon_living = "puppy"
icon_dead = "puppy_dead"
//pupplies cannot wear anything.
/mob/living/simple_animal/corgi/puppy/Topic(href, href_list)
if(href_list["remove_inv"] || href_list["add_inv"])
usr << "\red You can't fit this on [src]"
return
..()

View File

@@ -637,7 +637,11 @@
set category = "Parrot"
set desc = "Drop the item you're holding."
if(stat)
return
src.drop_held_item()
return
/mob/living/simple_animal/parrot/proc/drop_held_item(var/drop_gently = 1)

View File

@@ -16,8 +16,8 @@
response_harm = "hits the"
speed = -1
stop_automated_movement_when_pulled = 0
maxHealth = 75
health = 75
maxHealth = 100
health = 100
var/ranged = 0
var/target
var/rapid = 0
@@ -129,7 +129,8 @@
Shoot(tturf, src.loc, src)
new /obj/item/ammo_casing/a12mm(get_turf(src))
stance = SYNDICATE_STANCE_ATTACK
stance = SYNDICATE_STANCE_IDLE
target_mob = null
return
@@ -156,8 +157,8 @@
///////////////Sword and shield////////////
/mob/living/simple_animal/syndicate/melee
melee_damage_lower = 30
melee_damage_upper = 30
melee_damage_lower = 20
melee_damage_upper = 25
icon_state = "syndicatemelee"
icon_living = "syndicatemelee"
weapon1 = /obj/item/weapon/melee/energy/sword/red
@@ -166,7 +167,7 @@
/mob/living/simple_animal/syndicate/melee/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.force)
if(prob(35))
if(prob(80))
health -= O.force
visible_message("\red \b [src] has been attacked with the [O] by [user]. ")
else
@@ -178,7 +179,7 @@
/mob/living/simple_animal/syndicate/melee/bullet_act(var/obj/item/projectile/Proj)
if(!Proj) return
if(prob(35))
if(prob(65))
src.health -= Proj.damage
else
visible_message("\red <B>[src] blocks [Proj] with its shield!</B>")
@@ -199,6 +200,7 @@
icon_living = "syndicatemeleespace"
name = "Syndicate Commando"
corpse = /obj/effect/landmark/corpse/syndicatecommando
speed = 0
/mob/living/simple_animal/syndicate/melee/space/Process_Spacemove(var/check_drift = 0)
return
@@ -224,6 +226,7 @@
max_n2 = 0
minbodytemp = 0
corpse = /obj/effect/landmark/corpse/syndicatecommando
speed = 0
/mob/living/simple_animal/syndicate/ranged/space/Process_Spacemove(var/check_drift = 0)
return

View File

@@ -53,7 +53,7 @@
var/isadmin = 0
if(src.client && src.client.holder)
isadmin = 1
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_poll_question WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM erro_poll_vote WHERE ckey = \"[ckey]\")")
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_poll_question WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM erro_poll_vote WHERE ckey = \"[ckey]\") AND id NOT IN (SELECT pollid FROM erro_poll_textreply WHERE ckey = \"[ckey]\")")
query.Execute()
var/newpoll = 0
while(query.NextRow())
@@ -313,6 +313,25 @@
if("TEXT")
var/replytext = href_list["replytext"]
log_text_poll_reply(pollid, replytext)
if("NUMVAL")
var/id_min = text2num(href_list["minid"])
var/id_max = text2num(href_list["maxid"])
if( (id_max - id_min) > 100 ) //Basic exploit prevention
usr << "The option ID difference is too big. Please contact administration or the database admin."
return
for(var/optionid = id_min; optionid<= id_max; optionid++)
if(!isnull(href_list["o[optionid]"])) //Test if this optionid was replied to
var/rating
if(href_list["o[optionid]"] == "abstain")
rating = null
else
rating = text2num(href_list["o[optionid]"])
if(!isnum(rating))
return
vote_on_numval_poll(pollid, optionid, rating)
proc/IsJobAvailable(rank)
var/datum/job/job = job_master.GetJob(rank)

View File

@@ -229,6 +229,77 @@
output += "[vote_text]"
src << browse(output,"window=playerpoll;size=500x500")
//Polls with a text input
if("NUMVAL")
var/DBQuery/voted_query = dbcon.NewQuery("SELECT o.text, v.rating FROM erro_poll_option o, erro_poll_vote v WHERE o.pollid = [pollid] AND v.ckey = '[usr.ckey]' AND o.id = v.optionid")
voted_query.Execute()
var/output = "<div align='center'><B>Player poll</B>"
output +="<hr>"
output += "<b>Question: [pollquestion]</b><br>"
output += "<font size='2'>Poll runs from <b>[pollstarttime]</b> until <b>[pollendtime]</b></font><p>"
var/voted = 0
while(voted_query.NextRow())
voted = 1
var/optiontext = voted_query.item[1]
var/rating = voted_query.item[2]
output += "<br><b>[optiontext] - [rating]</b>"
if(!voted) //Only make this a form if we have not voted yet
output += "<form name='cardcomp' action='?src=\ref[src]' method='get'>"
output += "<input type='hidden' name='src' value='\ref[src]'>"
output += "<input type='hidden' name='votepollid' value='[pollid]'>"
output += "<input type='hidden' name='votetype' value='NUMVAL'>"
var/minid = 999999
var/maxid = 0
var/DBQuery/option_query = dbcon.NewQuery("SELECT id, text, minval, maxval, descmin, descmid, descmax FROM erro_poll_option WHERE pollid = [pollid]")
option_query.Execute()
while(option_query.NextRow())
var/optionid = text2num(option_query.item[1])
var/optiontext = option_query.item[2]
var/minvalue = text2num(option_query.item[3])
var/maxvalue = text2num(option_query.item[4])
var/descmin = option_query.item[5]
var/descmid = option_query.item[6]
var/descmax = option_query.item[7]
if(optionid < minid)
minid = optionid
if(optionid > maxid)
maxid = optionid
var/midvalue = round( (maxvalue + minvalue) / 2)
if(isnull(minvalue) || isnull(maxvalue) || (minvalue == maxvalue))
continue
output += "<br>[optiontext]: <select name='o[optionid]'>"
output += "<option value='abstain'>abstain</option>"
for (var/j = minvalue; j <= maxvalue; j++)
if(j == minvalue && descmin)
output += "<option value='[j]'>[j] ([descmin])</option>"
else if (j == midvalue && descmid)
output += "<option value='[j]'>[j] ([descmid])</option>"
else if (j == maxvalue && descmax)
output += "<option value='[j]'>[j] ([descmax])</option>"
else
output += "<option value='[j]'>[j]</option>"
output += "</select>"
output += "<input type='hidden' name='minid' value='[minid]'>"
output += "<input type='hidden' name='maxid' value='[maxid]'>"
output += "<p><input type='submit' value='Submit'>"
output += "</form>"
src << browse(output,"window=playerpoll;size=500x500")
return
/mob/new_player/proc/vote_on_poll(var/pollid = -1, var/optionid = -1)
@@ -364,4 +435,74 @@
insert_query.Execute()
usr << "\blue Feedback logging successful."
usr << browse(null,"window=playerpoll")
/mob/new_player/proc/vote_on_numval_poll(var/pollid = -1, var/optionid = -1, var/rating = null)
if(pollid == -1 || optionid == -1)
return
if(!isnum(pollid) || !isnum(optionid))
return
var/user = sqlfdbklogin
var/pass = sqlfdbkpass
var/db = sqlfdbkdb
var/address = sqladdress
var/port = sqlport
var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
if(dbcon.IsConnected())
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
select_query.Execute()
var/validpoll = 0
while(select_query.NextRow())
if(select_query.item[4] != "NUMVAL")
return
validpoll = 1
break
if(!validpoll)
usr << "\red Poll is not valid."
return
var/DBQuery/select_query2 = dbcon.NewQuery("SELECT id FROM erro_poll_option WHERE id = [optionid] AND pollid = [pollid]")
select_query2.Execute()
var/validoption = 0
while(select_query2.NextRow())
validoption = 1
break
if(!validoption)
usr << "\red Poll option is not valid."
return
var/alreadyvoted = 0
var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM erro_poll_vote WHERE optionid = [optionid] AND ckey = '[usr.ckey]'")
voted_query.Execute()
while(voted_query.NextRow())
alreadyvoted = 1
break
if(alreadyvoted)
usr << "\red You already voted in this poll."
return
var/adminrank = "Player"
if(usr && usr.client && usr.client.holder)
adminrank = usr.client.holder.rank
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO erro_poll_vote (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank, rating) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]', [(isnull(rating)) ? "null" : rating])")
insert_query.Execute()
usr << "\blue Vote successful."
usr << browse(null,"window=playerpoll")

View File

@@ -17,9 +17,9 @@
update_icon()
/obj/item/weapon/clipboard/MouseDrop(obj/over_object as obj) //Quick clipboard fix. -Agouri
if(ishuman(usr) || ismonkey(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~
if(ishuman(usr))
var/mob/M = usr
if (!(istype(over_object, /obj/screen) ))
if(!(istype(over_object, /obj/screen) ))
return ..()
if(!M.restrained() && !M.stat)
@@ -31,7 +31,7 @@
M.u_equip(src)
M.put_in_l_hand(src)
src.add_fingerprint(usr)
add_fingerprint(usr)
return
/obj/item/weapon/clipboard/update_icon()
@@ -58,7 +58,7 @@
/obj/item/weapon/clipboard/attack_self(mob/user as mob)
var/dat = "<title>Clipboard</title>"
if (haspen)
if(haspen)
dat += "<A href='?src=\ref[src];pen=1'>Remove Pen</A><BR><HR>"
else
dat += "<A href='?src=\ref[src];addpen=1'>Add Pen</A><BR><HR>"
@@ -79,10 +79,10 @@
/obj/item/weapon/clipboard/Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()))
if((usr.stat || usr.restrained()))
return
if (usr.contents.Find(src))
if(usr.contents.Find(src))
if(href_list["pen"])
if(haspen)

View File

@@ -2,22 +2,16 @@
name = "filing cabinet"
desc = "A large cabinet with drawers."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "filing_cabinet0"
var/icon_closed = "filing_cabinet0"
var/icon_open = "filing_cabinet1"
icon_state = "filingcabinet"
density = 1
anchored = 1
/obj/structure/filingcabinet/chestdrawer
name = "chest drawer"
icon_state = "chestdrawer"
icon_closed = "chestdrawer"
icon_open = "chestdrawer-open"
/obj/structure/filingcabinet/filingcabinet
icon_state = "filingcabinet"
icon_closed = "filingcabinet"
icon_open = "filingcabinet-open"
/obj/structure/filingcabinet/filingcabinet //not changing the path to avoid unecessary map issues, but please don't name stuff like this in future -Pete
icon_state = "tallcabinet"
/obj/structure/filingcabinet/initialize()
for(var/obj/item/I in loc)
@@ -29,9 +23,9 @@
user << "<span class='notice'>You put [P] in [src].</span>"
user.drop_item()
P.loc = src
icon_state = icon_open
icon_state = "[initial(icon_state)]-open"
sleep(5)
icon_state = icon_closed
icon_state = initial(icon_state)
updateUsrDialog()
else if(istype(P, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
@@ -65,8 +59,7 @@
if(P && in_range(src, usr))
usr.put_in_hands(P)
updateUsrDialog()
icon_state = icon_open
icon_state = "[initial(icon_state)]-open"
sleep(5)
icon_state = icon_closed
icon_state = initial(icon_state)

View File

@@ -36,7 +36,7 @@
update_icon()
else if(istype(W, /obj/item/weapon/pen))
var/n_name = copytext(sanitize(input(usr, "What would you like to label the folder?", "Folder Labelling", null) as text),1,MAX_NAME_LEN)
if ((loc == usr && usr.stat == 0))
if((loc == usr && usr.stat == 0))
name = "folder[(n_name ? text("- '[n_name]'") : null)]"
return
@@ -54,10 +54,10 @@
/obj/item/weapon/folder/Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()))
if((usr.stat || usr.restrained()))
return
if (usr.contents.Find(src))
if(usr.contents.Find(src))
if(href_list["remove"])
var/obj/item/P = locate(href_list["remove"])

View File

@@ -10,7 +10,7 @@
/obj/item/weapon/hand_labeler/afterattack(atom/A, mob/user as mob)
if(!mode) //if it's off, give up.
return
if(A==loc) // if placing the labeller into something (e.g. backpack)
if(A == loc) // if placing the labeller into something (e.g. backpack)
return // don't set a label
if(!labels_left)
@@ -29,22 +29,21 @@
user << "<span class='notice'>You can't label cyborgs.</span>"
return
for(var/mob/M in viewers())
if ((M.client && !( M.blinded )))
M << "\blue [user] labels [A] as [label]."
user.visible_message("<span class='notice'>[user] labels [A] as [label].</span>", \
"<span class='notice'>You label [A] as [label].</span>")
A.name = "[A.name] ([label])"
/obj/item/weapon/hand_labeler/attack_self()
/obj/item/weapon/hand_labeler/attack_self(mob/user as mob)
mode = !mode
icon_state = "labeler[mode]"
if(mode)
usr << "<span class='notice'>You turn on \the [src].</span>"
user << "<span class='notice'>You turn on \the [src].</span>"
//Now let them chose the text.
var/str = copytext(reject_bad_text(input(usr,"Label text?","Set label","")),1,MAX_NAME_LEN)
var/str = copytext(reject_bad_text(input(user,"Label text?","Set label","")),1,MAX_NAME_LEN)
if(!str || !length(str))
usr << "<span class='notice'>Invalid text.</span>"
user << "<span class='notice'>Invalid text.</span>"
return
label = str
usr << "<span class='notice'>You set the text to '[str]'.</span>"
user << "<span class='notice'>You set the text to '[str]'.</span>"
else
usr << "<span class='notice'>You turn off \the [src].</span>"
user << "<span class='notice'>You turn off \the [src].</span>"

View File

@@ -5,18 +5,18 @@
icon_state = "paper"
throwforce = 0
w_class = 1.0
throw_speed = 3
throw_range = 15
throw_range = 1
throw_speed = 1
layer = 4
pressure_resistance = 1
slot_flags = SLOT_HEAD
body_parts_covered = HEAD
attack_verb = list("")
var/info //What's actually written on the paper.
var/info_links //A different version of the paper which includes html links at fields and EOF
var/stamps //The (text for the) stamps on the paper.
var/fields //Amount of user created fields
var/info //What's actually written on the paper.
var/info_links //A different version of the paper which includes html links at fields and EOF
var/stamps //The (text for the) stamps on the paper.
var/fields //Amount of user created fields
var/list/stamped
var/rigged = 0
var/spam_flag = 0
@@ -29,25 +29,25 @@
/obj/item/weapon/paper/New()
..()
src.pixel_y = rand(-8, 8)
src.pixel_x = rand(-9, 9)
pixel_y = rand(-8, 8)
pixel_x = rand(-9, 9)
spawn(2)
if(src.info)
src.overlays += "paper_words"
update_icon()
updateinfolinks()
return
/obj/item/weapon/paper/update_icon()
if(src.info)
src.overlays += "paper_words"
return
if(info)
icon_state = "paper_words"
return
icon_state = "paper"
/obj/item/weapon/paper/examine()
set src in oview(1)
// ..() //We don't want them to see the dumb "this is a paper" thing every time.
// I didn't like the idea that people can read tiny pieces of paper from across the room.
// Now you need to be next to the paper in order to read it.
// I didn't like the idea that people can read tiny pieces of paper from across the room.
// Now you need to be next to the paper in order to read it.
if(in_range(usr, src))
if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon)))
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)][stamps]</BODY></HTML>", "window=[name]")
@@ -64,12 +64,12 @@
set category = "Object"
set src in usr
if ((CLUMSY in usr.mutations) && prob(50))
if((CLUMSY in usr.mutations) && prob(50))
usr << "<span class='warning'>You cut yourself on the paper.</span>"
return
var/n_name = input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text
n_name = copytext(n_name, 1, 32)
if ((loc == usr && usr.stat == 0))
if((loc == usr && usr.stat == 0))
name = "paper[(n_name ? text("- '[n_name]'") : null)]"
add_fingerprint(usr)
return
@@ -79,18 +79,18 @@
if(rigged && (Holiday == "April Fool's Day"))
if(spam_flag == 0)
spam_flag = 1
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1)
spawn(20)
spam_flag = 0
return
/obj/item/weapon/paper/attack_ai(var/mob/living/silicon/ai/user as mob)
var/dist
if (istype(user) && user.current) //is AI
if(istype(user) && user.current) //is AI
dist = get_dist(src, user.current)
else //cyborg or AI not seeing through a camera
dist = get_dist(src, user)
if (dist < 2)
if(dist < 2)
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
else
@@ -142,12 +142,15 @@
addtofield(i, "<font face=\"[deffont]\"><A href='?src=\ref[src];write=[i]'>write</A></font>", 1)
info_links = info_links + "<font face=\"[deffont]\"><A href='?src=\ref[src];write=end'>write</A></font>"
/obj/item/weapon/paper/proc/clearpaper()
info = null
stamps = null
stamped = list()
overlays = null
updateinfolinks()
update_icon()
/obj/item/weapon/paper/proc/parsepencode(var/t, var/obj/item/weapon/pen/P, mob/user as mob, var/iscrayon = 0)
// t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
@@ -187,7 +190,7 @@
// t = dd_replacetext(t, "#", "") // Junk converted to nothing!
//Count the fields
//Count the fields
var/laststart = 1
while(1)
var/i = findtext(t, "<span class=\"paper_field\">", laststart)
@@ -220,9 +223,10 @@
\[hr\] : Adds a horizontal rule.
</BODY></HTML>"}, "window=paper_help")
/obj/item/weapon/paper/Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()))
if((usr.stat || usr.restrained()))
return
if(href_list["write"])
@@ -237,7 +241,7 @@
iscrayon = 1
if ((!in_range(src, usr) && src.loc != usr && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != usr && usr.get_active_hand() != i)) // Some check to see if he's allowed to write
if((!in_range(src, usr) && loc != usr && !( istype(loc, /obj/item/weapon/clipboard) ) && loc.loc != usr && usr.get_active_hand() != i)) // Some check to see if he's allowed to write
return
t = parsepencode(t, i, usr, iscrayon) // Encode everything from pencode to html
@@ -250,8 +254,8 @@
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_links][stamps]</BODY></HTML>", "window=[name]") // Update the window
if(!overlays.Find("paper_words"))
overlays += "paper_words"
update_icon()
/obj/item/weapon/paper/attackby(obj/item/weapon/P as obj, mob/user as mob)
..()
@@ -259,43 +263,33 @@
if(user.mind && (user.mind.assigned_role == "Clown"))
clown = 1
if (istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon))
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_links][stamps]</BODY></HTML>", "window=[name]")
if(istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon))
user << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_links][stamps]</BODY></HTML>", "window=[name]")
//openhelp(user)
return
else if(istype(P, /obj/item/weapon/stamp))
if ((!in_range(src, usr) && src.loc != user && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != user && user.get_active_hand() != P))
if((!in_range(src, usr) && loc != user && !( istype(loc, /obj/item/weapon/clipboard) ) && loc.loc != user && user.get_active_hand() != P))
return
stamps += (stamps=="" ? "<HR>" : "<BR>") + "<i>This paper has been stamped with the [P.name].</i>"
switch(P.type)
if(/obj/item/weapon/stamp/captain)
overlays += "paper_stamped_cap"
if(/obj/item/weapon/stamp/hop)
overlays += "paper_stamped_hop"
if(/obj/item/weapon/stamp/hos)
overlays += "paper_stamped_hos"
if(/obj/item/weapon/stamp/ce)
overlays += "paper_stamped_ce"
if(/obj/item/weapon/stamp/rd)
overlays += "paper_stamped_rd"
if(/obj/item/weapon/stamp/cmo)
overlays += "paper_stamped_cmo"
if(/obj/item/weapon/stamp/denied)
overlays += "paper_stamped_denied"
if(/obj/item/weapon/stamp/clown)
if (!clown)
usr << "<span class='notice'>You are totally unable to use the stamp. HONK!</span>"
return
else
overlays += "paper_stamped_clown"
else
overlays += "paper_stamped"
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
stampoverlay.pixel_x = rand(-2, 2)
stampoverlay.pixel_y = rand(-3, 2)
if(istype(P, /obj/item/weapon/stamp/clown))
if(!clown)
user << "<span class='notice'>You are totally unable to use the stamp. HONK!</span>"
return
stampoverlay.icon_state = "paper_[P.icon_state]"
if(!stamped)
stamped = new
stamped += P.type
overlays += stampoverlay
user << "<span class='notice'>You stamp the paper with your rubber stamp.</span>"
add_fingerprint(user)
return

View File

@@ -1,5 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
/obj/item/weapon/paper_bin
name = "paper bin"
icon = 'icons/obj/bureaucracy.dmi'
@@ -10,74 +8,78 @@
throw_speed = 3
throw_range = 7
pressure_resistance = 10
var/amount = 30 //How much paper is in the bin.
var/list/papers = new/list() //List of papers put in the bin for reference.
var/sealed = 1 //If it's brandnew and unopened, it's sealed.
var/amount = 30 //How much paper is in the bin.
var/list/papers = new/list() //List of papers put in the bin for reference.
MouseDrop(mob/user as mob)
if ((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr))))))
if(!istype(usr, /mob/living/carbon/metroid) && !istype(usr, /mob/living/simple_animal))
if( !usr.get_active_hand() ) //if active hand is empty
attack_hand(usr, 1, 1)
/obj/item/weapon/paper_bin/MouseDrop(mob/user as mob)
if((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr))))))
if(!istype(usr, /mob/living/carbon/metroid) && !istype(usr, /mob/living/simple_animal))
if( !usr.get_active_hand() ) //if active hand is empty
attack_hand(usr, 1, 1)
return
/obj/item/weapon/paper_bin/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/item/weapon/paper_bin/attack_hand(mob/user as mob)
if(amount >= 1)
amount--
if(amount==0)
update_icon()
var/obj/item/weapon/paper/P
if(papers.len > 0) //If there's any custom paper on the stack, use that instead of creating a new paper.
P = papers[papers.len]
papers.Remove(P)
else
P = new /obj/item/weapon/paper
if(Holiday == "April Fool's Day")
if(prob(30))
P.info = "<font face=\"[P.crayonfont]\" color=\"red\"><b>HONK HONK HONK HONK HONK HONK HONK<br>HOOOOOOOOOOOOOOOOOOOOOONK<br>APRIL FOOLS</b></font>"
P.rigged = 1
P.updateinfolinks()
P.loc = user.loc
if(ishuman(user))
user.put_in_hands(P)
user << "<span class='notice'>You take a paper out of the bin.</span>"
else
P.loc = get_turf_loc(src)
user << "<span class='notice'>You take a paper out of the bin.</span>"
else
user << "<span class='notice'>The paper bin is empty!</span>"
add_fingerprint(user)
return
/obj/item/weapon/paper_bin/attackby(obj/item/weapon/paper/i as obj, mob/user as mob)
if(!istype(i))
return
user.drop_item()
i.loc = src
usr << "<span class='notice'>You put the paper on the top of the paper bin.</span>"
papers.Add(i)
amount++
attack_paw(mob/user as mob)
return src.attack_hand(user)
attack_hand(mob/user as mob)
if (amount >= 1)
amount--
if(amount==0)
update_icon()
/obj/item/weapon/paper_bin/examine()
set src in oview(1)
var/obj/item/weapon/paper/P
if (papers.len > 0) // If there's any custom paper on the stack, use that instead of creating a new paper.
P = papers[papers.len]
papers.Remove(P)
else
P = new /obj/item/weapon/paper
if(Holiday == "April Fool's Day")
if(prob(30))
P.info = "<font face=\"[P.crayonfont]\" color=\"red\"><b>HONK HONK HONK HONK HONK HONK HONK<br>HOOOOOOOOOOOOOOOOOOOOOONK<br>APRIL FOOLS</b></font>"
P.rigged = 1
P.updateinfolinks()
if(amount)
usr << "<span class='notice'>There " + (amount > 1 ? "are [amount] papers" : "is one paper") + " in the bin.</span>"
else
usr << "<span class='notice'>There are no papers in the bin.</span>"
return
P.loc = user.loc
if(ishuman(user))
user.put_in_hands(P)
user << "<span class='notice'>You take a paper out of the bin.</span>"
else
P.loc = get_turf_loc(src)
user << "<span class='notice'>You take a paper out of the bin.</span>"
else
user << "<span class='notice'>The paper bin is empty!</span>"
add_fingerprint(user)
return
attackby(obj/item/weapon/paper/i as obj, mob/user as mob)
if(!istype(i))
return
user.drop_item()
i.loc = src
usr << "<span class='notice'>You put the paper on the top of the paper bin.</span>"
papers.Add(i)
amount++
examine()
set src in oview(1)
if(amount)
usr << "<span class='notice'>There " + (amount > 1 ? "are [amount] papers" : "is one paper") + " in the bin.</span>"
else
usr << "<span class='notice'>There are no papers in the bin.</span>"
return
update_icon()
if(amount < 1)
icon_state = "paper_bin0"
else
icon_state = "paper_bin1"
/obj/item/weapon/paper_bin/update_icon()
if(amount < 1)
icon_state = "paper_bin0"
else
icon_state = "paper_bin1"

View File

@@ -25,6 +25,7 @@
var/colour = "black" //what colour the ink is!
pressure_resistance = 5
/obj/item/weapon/pen/blue
desc = "It's a normal blue ink pen."
icon_state = "pen_blue"
@@ -40,36 +41,28 @@
icon_state = "pen"
colour = "white"
/obj/item/weapon/pen/invisble
desc = "It's an invisble pen marker."
icon_state = "pen"
colour = "white"
/obj/item/weapon/pen/attack(mob/M as mob, mob/user as mob)
if(!ismob(M))
return
user << "\red You stab [M] with the pen."
user << "<span class='warning'>You stab [M] with the pen.</span>"
M << "\red You feel a tiny prick!"
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stabbed with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to stab [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) Used the [src.name] to stab [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user.name] ([user.ckey]) Used the [src.name] to stab [M.name] ([M.ckey])")
msg_admin_attack("ATTACK: [user.name] ([user.ckey]) Used the [src.name] to stab [M.name] ([M.ckey])") //BS12 EDIT ALG
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stabbed with [name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to stab [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) Used the [name] to stab [M.name] ([M.ckey])</font>")
return
/*
* Sleepy Pens
*/
/obj/item/weapon/pen/sleepypen
origin_tech = "syndicate=5"
desc = "It's a black ink pen with a sharp point and a carefully engraved \"Waffle Co.\""
flags = FPRINT | TABLEPASS | OPENCONTAINER
slot_flags = SLOT_BELT
origin_tech = "materials=2;syndicate=5"
/obj/item/weapon/pen/sleepypen/attack_paw(mob/user as mob)
return src.attack_hand(user)
return
/obj/item/weapon/pen/sleepypen/New()
var/datum/reagents/R = new/datum/reagents(30) //Used to be 300
@@ -79,6 +72,7 @@
..()
return
/obj/item/weapon/pen/sleepypen/attack(mob/M as mob, mob/user as mob)
if(!(istype(M,/mob)))
return
@@ -91,10 +85,11 @@
/*
* Parapens
*/
/obj/item/weapon/pen/paralysis
flags = FPRINT | TABLEPASS | OPENCONTAINER
slot_flags = SLOT_BELT
origin_tech = "materials=2;syndicate=5"
/obj/item/weapon/pen/paralysis/attack_paw(mob/user as mob)
return src.attack_hand(user)
return
/obj/item/weapon/pen/paralysis/attack(mob/M as mob, mob/user as mob)
if(!(istype(M,/mob)))
@@ -104,6 +99,7 @@
if(M.reagents) reagents.trans_to(M, 50)
return
/obj/item/weapon/pen/paralysis/New()
var/datum/reagents/R = new/datum/reagents(50)
reagents = R

View File

@@ -17,10 +17,10 @@
var/maxcopies = 10 //how many copies can be copied at once- idea shamelessly stolen from bs12's copier!
attack_ai(mob/user as mob)
return src.attack_hand(user)
return attack_hand(user)
attack_paw(mob/user as mob)
return src.attack_hand(user)
return attack_hand(user)
attack_hand(mob/user as mob)
user.machine = src
@@ -47,7 +47,7 @@
if(copy)
for(var/i = 0, i < copies, i++)
if(toner > 0)
var/obj/item/weapon/paper/c = new /obj/item/weapon/paper (src.loc)
var/obj/item/weapon/paper/c = new /obj/item/weapon/paper (loc)
if(toner > 10) //lots of toner, make it dark
c.info = "<font color = #101010>"
else //no toner? shitty copies for you!
@@ -68,7 +68,7 @@
else if(photocopy)
for(var/i = 0, i < copies, i++)
if(toner > 0)
var/obj/item/weapon/photo/p = new /obj/item/weapon/photo (src.loc)
var/obj/item/weapon/photo/p = new /obj/item/weapon/photo (loc)
var/icon/I = icon(photocopy.icon, photocopy.icon_state)
if(toner > 10) //plenty of toner, go straight greyscale
I.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) //I'm not sure how expensive this is, but given the many limitations of photocopying, it shouldn't be an issue.

View File

@@ -46,7 +46,7 @@
/obj/item/weapon/stamp/denied
name = "\improper DENIED rubber stamp"
icon_state = "stamp-qm"
icon_state = "stamp-deny"
color = "redcoat"
/obj/item/weapon/stamp/clown
@@ -56,4 +56,4 @@
/obj/item/weapon/stamp/attack_paw(mob/user as mob)
return src.attack_hand(user)
return attack_hand(user)

View File

@@ -35,7 +35,7 @@
NC.mergeConnectedNetworks(NC.d2)
NC.mergeConnectedNetworksOnTurf()
if(powernet==null)
if(powernet == null)
if(NC.powernet == null)
NC.powernet = new()
powernets += NC.powernet

View File

@@ -0,0 +1,292 @@
#define LOGIC_HIGH 5
//Indicators only have one input and no outputs
/obj/machinery/logic/indicator
//Input is searched from the 'dir' direction
var/obj/structure/cable/input
/obj/machinery/logic/indicator/process()
if(input)
return 1
if(!input)
var/turf/T = get_step(src, dir)
if(T)
var/inv_dir = turn(dir, 180)
for(var/obj/structure/cable/C in T)
if(C.d1 == inv_dir || C.d2 == inv_dir)
input = C
return 1
return 0 //If it gets to here, it means no suitable wire to link to was found.
/obj/machinery/logic/indicator/bulb
icon = 'icons/obj/lighting.dmi'
icon_state = "bulb0"
/obj/machinery/logic/indicator/bulb/process()
if(!..()) //Parent proc checks if input1 exists.
return
var/datum/powernet/pn_input = input.powernet
if(!pn_input)
return
if(pn_input.avail >= LOGIC_HIGH)
icon_state = "bulb1"
else
icon_state = "bulb0"
//Sensors only have one output and no inputs
/obj/machinery/logic/sensor
//Output is searched from the 'dir' direction
var/obj/structure/cable/output
/obj/machinery/logic/sensor/process()
if(output)
return 1
if(!output)
var/turf/T = get_step(src, dir)
if(T)
var/inv_dir = turn(dir, 180)
for(var/obj/structure/cable/C in T)
if(C.d1 == inv_dir || C.d2 == inv_dir)
output = C
return 1
return 0 //If it gets to here, it means no suitable wire to link to was found.
//Constant high generator. This will continue to send a signal of LOGIC_HIGH as long as it exists.
/obj/machinery/logic/sensor/constant_high
icon = 'icons/obj/atmospherics/outlet_injector.dmi'
icon_state = "off"
/obj/machinery/logic/sensor/constant_high/process()
if(!..()) //Parent proc checks if input1 exists.
return
var/datum/powernet/pn_output = output.powernet
if(!pn_output)
return
pn_output.newavail = max(pn_output.avail, LOGIC_HIGH)
//ONE INPUT logic elements have one input and one output
/obj/machinery/logic/oneinput
var/dir_input = 2
var/dir_output = 1
var/obj/structure/cable/input
var/obj/structure/cable/output
icon = 'icons/obj/pipes/heat.dmi'
icon_state = "intact"
/obj/machinery/logic/oneinput/process()
if(input && output)
return 1
if(!dir_input || !dir_output)
return 0
if(!input)
var/turf/T = get_step(src, dir_input)
if(T)
var/inv_dir = turn(dir_input, 180)
for(var/obj/structure/cable/C in T)
if(C.d1 == inv_dir || C.d2 == inv_dir)
input = C
if(!output)
var/turf/T = get_step(src, dir_output)
if(T)
var/inv_dir = turn(dir_output, 180)
for(var/obj/structure/cable/C in T)
if(C.d1 == inv_dir || C.d2 == inv_dir)
output = C
return 0 //On the process() call, where everything is still being searched for, it returns 0. It will return 1 on the next process() call.
//NOT GATE
/obj/machinery/logic/oneinput/not/process()
if(!..()) //Parent proc checks if input1, input2 and output exist.
return
var/datum/powernet/pn_input = input.powernet
if(!pn_input)
return
var/datum/powernet/pn_output = output.powernet
if(!pn_output)
return
if( !(pn_input.avail >= LOGIC_HIGH))
pn_output.newavail = max(pn_output.avail, LOGIC_HIGH) //Set the output avilable power to 5 or whatever it was before.
else
pn_output.newload += LOGIC_HIGH //Otherwise increase the load to 5
//TWO INPUT logic elements have two inputs and one output
/obj/machinery/logic/twoinput
var/dir_input1 = 2
var/dir_input2 = 8
var/dir_output = 1
var/obj/structure/cable/input1
var/obj/structure/cable/input2
var/obj/structure/cable/output
icon = 'icons/obj/atmospherics/mixer.dmi'
icon_state = "intact_off"
/obj/machinery/logic/twoinput/process()
if(input1 && input2 && output)
return 1
if(!dir_input1 || !dir_input2 || !dir_output)
return 0
if(!input1)
var/turf/T = get_step(src, dir_input1)
if(T)
var/inv_dir = turn(dir_input1, 180)
for(var/obj/structure/cable/C in T)
if(C.d1 == inv_dir || C.d2 == inv_dir)
input1 = C
if(!input2)
var/turf/T = get_step(src, dir_input2)
if(T)
var/inv_dir = turn(dir_input2, 180)
for(var/obj/structure/cable/C in T)
if(C.d1 == inv_dir || C.d2 == inv_dir)
input2 = C
if(!output)
var/turf/T = get_step(src, dir_output)
if(T)
var/inv_dir = turn(dir_output, 180)
for(var/obj/structure/cable/C in T)
if(C.d1 == inv_dir || C.d2 == inv_dir)
output = C
return 0 //On the process() call, where everything is still being searched for, it returns 0. It will return 1 on the next process() call.
//AND GATE
/obj/machinery/logic/twoinput/and/process()
if(!..()) //Parent proc checks if input1, input2 and output exist.
return
var/datum/powernet/pn_input1 = input1.powernet
var/datum/powernet/pn_input2 = input2.powernet
if(!pn_input1 || !pn_input2)
return
var/datum/powernet/pn_output = output.powernet
if(!pn_output)
return
if( (pn_input1.avail >= LOGIC_HIGH) && (pn_input2.avail >= LOGIC_HIGH) )
pn_output.newavail = max(pn_output.avail, LOGIC_HIGH) //Set the output avilable power to 5 or whatever it was before.
else
pn_output.newload += LOGIC_HIGH //Otherwise increase the load to 5
//OR GATE
/obj/machinery/logic/twoinput/or/process()
if(!..()) //Parent proc checks if input1, input2 and output exist.
return
var/datum/powernet/pn_input1 = input1.powernet
var/datum/powernet/pn_input2 = input2.powernet
if(!pn_input1 || !pn_input2)
return
var/datum/powernet/pn_output = output.powernet
if(!pn_output)
return
if( (pn_input1.avail >= LOGIC_HIGH) || (pn_input2.avail >= LOGIC_HIGH) )
pn_output.newavail = max(pn_output.avail, LOGIC_HIGH) //Set the output avilable power to 5 or whatever it was before.
else
pn_output.newload += LOGIC_HIGH //Otherwise increase the load to 5
//XOR GATE
/obj/machinery/logic/twoinput/xor/process()
if(!..()) //Parent proc checks if input1, input2 and output exist.
return
var/datum/powernet/pn_input1 = input1.powernet
var/datum/powernet/pn_input2 = input2.powernet
if(!pn_input1 || !pn_input2)
return
var/datum/powernet/pn_output = output.powernet
if(!pn_output)
return
if( (pn_input1.avail >= LOGIC_HIGH) != (pn_input2.avail >= LOGIC_HIGH) )
pn_output.newavail = max(pn_output.avail, LOGIC_HIGH) //Set the output avilable power to 5 or whatever it was before.
else
pn_output.newload += LOGIC_HIGH //Otherwise increase the load to 5
//XNOR GATE (EQUIVALENCE)
/obj/machinery/logic/twoinput/xnor/process()
if(!..()) //Parent proc checks if input1, input2 and output exist.
return
var/datum/powernet/pn_input1 = input1.powernet
var/datum/powernet/pn_input2 = input2.powernet
if(!pn_input1 || !pn_input2)
return
var/datum/powernet/pn_output = output.powernet
if(!pn_output)
return
if( (pn_input1.avail >= LOGIC_HIGH) == (pn_input2.avail >= LOGIC_HIGH) )
pn_output.newavail = max(pn_output.avail, LOGIC_HIGH) //Set the output avilable power to 5 or whatever it was before.
else
pn_output.newload += LOGIC_HIGH //Otherwise increase the load to 5
#define RELAY_POWER_TRANSFER 2000 //How much power a relay transfers through.
//RELAY - input1 governs the flow from input2 to output
/obj/machinery/logic/twoinput/relay/process()
if(!..()) //Parent proc checks if input1, input2 and output exist.
return
var/datum/powernet/pn_input1 = input1.powernet
if(!pn_input1)
return
if( pn_input1.avail >= LOGIC_HIGH )
var/datum/powernet/pn_input2 = input2.powernet
var/datum/powernet/pn_output = output.powernet
if(!pn_output)
return
if(pn_input2.avail >= RELAY_POWER_TRANSFER)
pn_input2.newload += RELAY_POWER_TRANSFER
pn_output.newavail += RELAY_POWER_TRANSFER
#undef RELAY_POWER_TRANSFER
#undef LOGIC_HIGH

View File

@@ -2011,7 +2011,7 @@ datum
..()
return
..()
/* //removed because of meta bullshit. this is why we can't have nice things.
syndicream
name = "Cream filling"
id = "syndicream"
@@ -2029,7 +2029,7 @@ datum
..()
return
..()
*/
cornoil
name = "Corn Oil"
id = "cornoil"

View File

@@ -34,7 +34,7 @@
if(R && R.cell)
if(mode == 1 && reagents.total_volume < 30) //Don't recharge reagents and drain power if the storage is full.
R.cell.use(charge_cost) //Take power from borg...
reagents.add_reagent("tricordrazine",5) //And fill hypo with reagent.
reagents.add_reagent("doctorsdelight",5) //And fill hypo with reagent.
if(mode == 2 && reagents.total_volume < 30)
R.cell.use(charge_cost)
reagents.add_reagent("inaprovaline", 5)
@@ -78,7 +78,7 @@
mode = 1
charge_tick = 0
reagents.clear_reagents()
user << "\blue Synthesizer is now producing 'Tricordrazine'."
user << "\blue Synthesizer is now producing 'Doctor's Delight'."
return
/obj/item/weapon/reagent_containers/borghypo/examine()

View File

@@ -1023,7 +1023,7 @@
New()
..()
reagents.add_reagent("nutriment", 4)
reagents.add_reagent("syndicream", 2)
reagents.add_reagent("doctor_delight", 2)
bitesize = 3
/obj/item/weapon/reagent_containers/food/snacks/loadedbakedpotato
@@ -1288,6 +1288,7 @@
reagents.add_reagent("tomatojuice", 2)
bitesize = 5
/* No more of this
/obj/item/weapon/reagent_containers/food/snacks/telebacon
name = "Tele Bacon"
desc = "It tastes a little odd but it is still delicious."
@@ -1302,7 +1303,7 @@
if(!reagents.total_volume)
baconbeacon.loc = usr
baconbeacon.digest_delay()
*/
/obj/item/weapon/reagent_containers/food/snacks/monkeycube
name = "monkey cube"
@@ -1754,7 +1755,7 @@
New()
..()
reagents.add_reagent("nutriment", 8)
reagents.add_reagent("syndicream", 5)
reagents.add_reagent("doctor_delight", 5)
bitesize = 3
/obj/item/weapon/reagent_containers/food/snacks/appletart

View File

@@ -20,7 +20,7 @@
/obj/item/weapon/reagent_containers/hypospray/New() //comment this to make hypos start off empty
..()
reagents.add_reagent("tricordrazine", 30)
reagents.add_reagent("doctorsdelight", 30)
return
/obj/item/weapon/reagent_containers/hypospray/attack(mob/M as mob, mob/user as mob)