Merge branch 'master' into upstream-merge-32221
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#define GLOBAL_PROTECT(X)\
|
||||
/datum/controller/global_vars/InitGlobal##X(){\
|
||||
..();\
|
||||
gvars_datum_protected_varlist += #X;\
|
||||
gvars_datum_protected_varlist[#X] = TRUE;\
|
||||
}
|
||||
#else
|
||||
#define GLOBAL_PROTECT(X)
|
||||
|
||||
@@ -43,8 +43,10 @@
|
||||
var/obj/item/paper/P = new /obj/item/paper(C.loc)
|
||||
P.name = "paper - '[title]'"
|
||||
P.info = text
|
||||
C.messagetitle.Add("[title]")
|
||||
C.messagetext.Add(text)
|
||||
var/datum/comm_message/message = new
|
||||
message.title = title
|
||||
message.content = text
|
||||
C.add_message(message)
|
||||
P.update_icon()
|
||||
|
||||
/proc/minor_announce(message, title = "Attention:", alert)
|
||||
|
||||
@@ -1157,6 +1157,7 @@ obj/item/projectile/bullet/c10mm/soporific
|
||||
name = "\improper Foam Force Mk.37F"
|
||||
desc = "A licensed foam-firing reproduction of a handgun with a toggle-locking mechanism manufactured by CX Armories. This model is coated with a special polychromic material. Uses standard foam pistol magazines."
|
||||
icon_state = "p37_foam"
|
||||
pin = /obj/item/device/firing_pin
|
||||
spawnwithmagazine = TRUE
|
||||
mag_type = /obj/item/ammo_box/magazine/toy/pistol
|
||||
can_suppress = FALSE
|
||||
|
||||
@@ -40,18 +40,18 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars)
|
||||
stat("Globals:", statclick.update("Edit"))
|
||||
|
||||
/datum/controller/global_vars/can_vv_get(var_name)
|
||||
if(var_name in gvars_datum_protected_varlist)
|
||||
if(gvars_datum_protected_varlist[var_name])
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/controller/global_vars/vv_edit_var(var_name, var_value)
|
||||
if((var_name in gvars_datum_protected_varlist))
|
||||
if(gvars_datum_protected_varlist[var_name])
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/controller/global_vars/Initialize()
|
||||
gvars_datum_init_order = list()
|
||||
gvars_datum_protected_varlist = list("gvars_datum_protected_varlist")
|
||||
gvars_datum_protected_varlist = list("gvars_datum_protected_varlist" = TRUE)
|
||||
var/list/global_procs = typesof(/datum/controller/global_vars/proc)
|
||||
var/expected_len = vars.len - gvars_datum_in_built_vars.len
|
||||
if(global_procs.len != expected_len)
|
||||
|
||||
@@ -18,6 +18,8 @@ SUBSYSTEM_DEF(mapping)
|
||||
var/list/shuttle_templates = list()
|
||||
var/list/shelter_templates = list()
|
||||
|
||||
var/list/areas_in_z = list()
|
||||
|
||||
var/loading_ruins = FALSE
|
||||
|
||||
/datum/controller/subsystem/mapping/PreInit()
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/datum/looping_sound/active_outside_ashstorm
|
||||
mid_sounds = list(
|
||||
'sound/weather/ashstorm/outside/active_mid1.ogg'=1,
|
||||
'sound/weather/ashstorm/outside/active_mid1.ogg'=1,
|
||||
'sound/weather/ashstorm/outside/active_mid1.ogg'=1
|
||||
)
|
||||
mid_length = 80
|
||||
start_sound = 'sound/weather/ashstorm/outside/active_start.ogg'
|
||||
start_length = 130
|
||||
end_sound = 'sound/weather/ashstorm/outside/active_end.ogg'
|
||||
volume = 80
|
||||
|
||||
/datum/looping_sound/active_inside_ashstorm
|
||||
mid_sounds = list(
|
||||
'sound/weather/ashstorm/inside/active_mid1.ogg'=1,
|
||||
'sound/weather/ashstorm/inside/active_mid2.ogg'=1,
|
||||
'sound/weather/ashstorm/inside/active_mid3.ogg'=1
|
||||
)
|
||||
mid_length = 80
|
||||
start_sound = 'sound/weather/ashstorm/inside/active_start.ogg'
|
||||
start_length = 130
|
||||
end_sound = 'sound/weather/ashstorm/inside/active_end.ogg'
|
||||
volume = 80
|
||||
|
||||
/datum/looping_sound/weak_outside_ashstorm
|
||||
mid_sounds = list(
|
||||
'sound/weather/ashstorm/outside/weak_mid1.ogg'=1,
|
||||
'sound/weather/ashstorm/outside/weak_mid2.ogg'=1,
|
||||
'sound/weather/ashstorm/outside/weak_mid3.ogg'=1
|
||||
)
|
||||
mid_length = 80
|
||||
start_sound = 'sound/weather/ashstorm/outside/weak_start.ogg'
|
||||
start_length = 130
|
||||
end_sound = 'sound/weather/ashstorm/outside/weak_end.ogg'
|
||||
volume = 50
|
||||
|
||||
/datum/looping_sound/weak_inside_ashstorm
|
||||
mid_sounds = list(
|
||||
'sound/weather/ashstorm/inside/weak_mid1.ogg'=1,
|
||||
'sound/weather/ashstorm/inside/weak_mid2.ogg'=1,
|
||||
'sound/weather/ashstorm/inside/weak_mid3.ogg'=1
|
||||
)
|
||||
mid_length = 80
|
||||
start_sound = 'sound/weather/ashstorm/inside/weak_start.ogg'
|
||||
start_length = 130
|
||||
end_sound = 'sound/weather/ashstorm/inside/weak_end.ogg'
|
||||
volume = 50
|
||||
@@ -5,18 +5,15 @@
|
||||
|
||||
telegraph_message = "<span class='boldwarning'>An eerie moan rises on the wind. Sheets of burning ash blacken the horizon. Seek shelter.</span>"
|
||||
telegraph_duration = 300
|
||||
telegraph_sound = 'sound/lavaland/ash_storm_windup.ogg'
|
||||
telegraph_overlay = "light_ash"
|
||||
|
||||
weather_message = "<span class='userdanger'><i>Smoldering clouds of scorching ash billow down around you! Get inside!</i></span>"
|
||||
weather_duration_lower = 600
|
||||
weather_duration_upper = 1200
|
||||
weather_sound = 'sound/lavaland/ash_storm_start.ogg'
|
||||
weather_overlay = "ash_storm"
|
||||
|
||||
end_message = "<span class='boldannounce'>The shrieking wind whips away the last of the ash and falls to its usual murmur. It should be safe to go outside now.</span>"
|
||||
end_duration = 300
|
||||
end_sound = 'sound/lavaland/ash_storm_end.ogg'
|
||||
end_overlay = "light_ash"
|
||||
|
||||
area_type = /area/lavaland/surface/outdoors
|
||||
@@ -26,6 +23,53 @@
|
||||
|
||||
probability = 90
|
||||
|
||||
var/datum/looping_sound/active_outside_ashstorm/sound_ao = new(list(), FALSE, TRUE)
|
||||
var/datum/looping_sound/active_inside_ashstorm/sound_ai = new(list(), FALSE, TRUE)
|
||||
var/datum/looping_sound/weak_outside_ashstorm/sound_wo = new(list(), FALSE, TRUE)
|
||||
var/datum/looping_sound/weak_inside_ashstorm/sound_wi = new(list(), FALSE, TRUE)
|
||||
|
||||
/datum/weather/ash_storm/telegraph()
|
||||
. = ..()
|
||||
var/list/inside_areas = list()
|
||||
var/list/outside_areas = list()
|
||||
var/list/eligible_areas = SSmapping.areas_in_z["[target_z]"]
|
||||
for(var/i in 1 to eligible_areas.len)
|
||||
var/area/place = eligible_areas[i]
|
||||
if(place.outdoors)
|
||||
outside_areas += place
|
||||
else
|
||||
inside_areas += place
|
||||
CHECK_TICK
|
||||
|
||||
sound_ao.output_atoms = outside_areas
|
||||
sound_ai.output_atoms = inside_areas
|
||||
sound_wo.output_atoms = outside_areas
|
||||
sound_wi.output_atoms = inside_areas
|
||||
|
||||
sound_wo.start()
|
||||
sound_wi.start()
|
||||
|
||||
/datum/weather/ash_storm/start()
|
||||
. = ..()
|
||||
sound_wo.stop()
|
||||
sound_wi.stop()
|
||||
|
||||
sound_ao.start()
|
||||
sound_ai.start()
|
||||
|
||||
/datum/weather/ash_storm/wind_down()
|
||||
. = ..()
|
||||
sound_ao.stop()
|
||||
sound_ai.stop()
|
||||
|
||||
sound_wo.start()
|
||||
sound_wi.start()
|
||||
|
||||
/datum/weather/ash_storm/end()
|
||||
. = ..()
|
||||
sound_wo.stop()
|
||||
sound_wi.stop()
|
||||
|
||||
/datum/weather/ash_storm/proc/is_ash_immune(mob/living/L)
|
||||
if(ismecha(L.loc)) //Mechs are immune
|
||||
return TRUE
|
||||
@@ -50,7 +94,6 @@
|
||||
desc = "A passing ash storm blankets the area in harmless embers."
|
||||
|
||||
weather_message = "<span class='notice'>Gentle embers waft down around you like grotesque snow. The storm seems to have passed you by...</span>"
|
||||
weather_sound = 'sound/lavaland/ash_storm_windup.ogg'
|
||||
weather_overlay = "light_ash"
|
||||
|
||||
end_message = "<span class='notice'>The emberfall slows, stops. Another layer of hardened soot to the basalt beneath your feet.</span>"
|
||||
|
||||
@@ -132,6 +132,22 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
if(!IS_DYNAMIC_LIGHTING(src))
|
||||
add_overlay(/obj/effect/fullbright)
|
||||
|
||||
if(contents.len)
|
||||
var/list/areas_in_z = SSmapping.areas_in_z
|
||||
var/z
|
||||
for(var/i in 1 to contents.len)
|
||||
var/atom/thing = contents[i]
|
||||
if(!thing)
|
||||
continue
|
||||
z = thing.z
|
||||
break
|
||||
if(!z)
|
||||
WARNING("No z found for [src]")
|
||||
return
|
||||
if(!areas_in_z["[z]"])
|
||||
areas_in_z["[z]"] = list()
|
||||
areas_in_z["[z]"] += src
|
||||
|
||||
/area/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
@@ -273,6 +273,7 @@ Credit where due:
|
||||
if(plasmaman && !visualsOnly) //If we need to breathe from the plasma tank, we should probably start doing that
|
||||
H.internal = H.get_item_for_held_index(2)
|
||||
H.update_internals_hud_icon(1)
|
||||
H.sec_hud_set_ID()
|
||||
|
||||
/obj/item/paper/servant_primer
|
||||
name = "The Ark And You: A Primer On Servitude"
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
/datum/game_mode/traitor/proc/add_latejoin_traitor(datum/mind/character)
|
||||
var/datum/antagonist/traitor/new_antag = new antag_datum(character)
|
||||
new_antag.should_specialise = TRUE
|
||||
character.add_antag_datum(antag_datum)
|
||||
character.add_antag_datum(new_antag)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -506,3 +506,14 @@ Class Procs:
|
||||
. = ..()
|
||||
if (AM == occupant)
|
||||
occupant = null
|
||||
|
||||
/obj/machinery/proc/adjust_item_drop_location(atom/movable/AM) // Adjust item drop location to a 3x3 grid inside the tile, returns slot id from 0 to 8
|
||||
var/md5 = md5(AM.name) // Oh, and it's deterministic too. A specific item will always drop from the same slot.
|
||||
#if DM_VERSION > 511
|
||||
#warn Refactor the loop in /obj/machinery/proc/adjust_item_drop_location() to make use of 512's list-like access to characters in a string
|
||||
#endif
|
||||
for (var/i in 1 to 32)
|
||||
. += hex2num(copytext(md5,i,i+1))
|
||||
. = . % 9
|
||||
AM.pixel_x = -8 + ((.%3)*8)
|
||||
AM.pixel_y = -8 + (round( . / 3)*8)
|
||||
@@ -8,9 +8,10 @@
|
||||
circuit = /obj/item/circuitboard/computer/communications
|
||||
var/authenticated = 0
|
||||
var/auth_id = "Unknown" //Who is currently logged in?
|
||||
var/list/datum/comm_message/messages = list()
|
||||
var/datum/comm_message/currmsg
|
||||
var/datum/comm_message/aicurrmsg
|
||||
var/list/messagetitle = list()
|
||||
var/list/messagetext = list()
|
||||
var/currmsg = 0
|
||||
var/aicurrmsg = 0
|
||||
var/state = STATE_DEFAULT
|
||||
var/aistate = STATE_DEFAULT
|
||||
var/message_cooldown = 0
|
||||
@@ -47,7 +48,7 @@
|
||||
/obj/machinery/computer/communications/process()
|
||||
if(..())
|
||||
if(state != STATE_STATUSDISPLAY)
|
||||
updateDialog()
|
||||
src.updateDialog()
|
||||
|
||||
|
||||
/obj/machinery/computer/communications/Topic(href, href_list)
|
||||
@@ -64,7 +65,7 @@
|
||||
switch(href_list["operation"])
|
||||
// main interface
|
||||
if("main")
|
||||
state = STATE_DEFAULT
|
||||
src.state = STATE_DEFAULT
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
if("login")
|
||||
var/mob/M = usr
|
||||
@@ -74,13 +75,13 @@
|
||||
I = M.get_idcard()
|
||||
|
||||
if(I && istype(I))
|
||||
if(check_access(I))
|
||||
if(src.check_access(I))
|
||||
authenticated = 1
|
||||
auth_id = "[I.registered_name] ([I.assignment])"
|
||||
if((20 in I.access))
|
||||
authenticated = 2
|
||||
playsound(src, 'sound/machines/terminal_on.ogg', 50, 0)
|
||||
if(emagged)
|
||||
if(src.emagged)
|
||||
authenticated = 2
|
||||
auth_id = "Unknown"
|
||||
to_chat(M, "<span class='warning'>[src] lets out a quiet alarm as its login is overriden.</span>")
|
||||
@@ -131,7 +132,7 @@
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
|
||||
if("announce")
|
||||
if(authenticated==2)
|
||||
if(src.authenticated==2)
|
||||
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, 0)
|
||||
make_announcement(usr)
|
||||
|
||||
@@ -185,56 +186,53 @@
|
||||
to_chat(usr, "Not enough credits.")
|
||||
|
||||
if("callshuttle")
|
||||
state = STATE_DEFAULT
|
||||
if(authenticated)
|
||||
state = STATE_CALLSHUTTLE
|
||||
src.state = STATE_DEFAULT
|
||||
if(src.authenticated)
|
||||
src.state = STATE_CALLSHUTTLE
|
||||
if("callshuttle2")
|
||||
if(authenticated)
|
||||
if(src.authenticated)
|
||||
SSshuttle.requestEvac(usr, href_list["call"])
|
||||
if(SSshuttle.emergency.timer)
|
||||
post_status("shuttle")
|
||||
state = STATE_DEFAULT
|
||||
src.state = STATE_DEFAULT
|
||||
if("cancelshuttle")
|
||||
state = STATE_DEFAULT
|
||||
if(authenticated)
|
||||
state = STATE_CANCELSHUTTLE
|
||||
src.state = STATE_DEFAULT
|
||||
if(src.authenticated)
|
||||
src.state = STATE_CANCELSHUTTLE
|
||||
if("cancelshuttle2")
|
||||
if(authenticated)
|
||||
if(src.authenticated)
|
||||
SSshuttle.cancelEvac(usr)
|
||||
state = STATE_DEFAULT
|
||||
src.state = STATE_DEFAULT
|
||||
if("messagelist")
|
||||
currmsg = 0
|
||||
state = STATE_MESSAGELIST
|
||||
src.currmsg = 0
|
||||
src.state = STATE_MESSAGELIST
|
||||
if("viewmessage")
|
||||
state = STATE_VIEWMESSAGE
|
||||
if (!currmsg)
|
||||
src.state = STATE_VIEWMESSAGE
|
||||
if (!src.currmsg)
|
||||
if(href_list["message-num"])
|
||||
var/msgnum = text2num(href_list["message-num"])
|
||||
currmsg = messages[msgnum]
|
||||
src.currmsg = text2num(href_list["message-num"])
|
||||
else
|
||||
state = STATE_MESSAGELIST
|
||||
src.state = STATE_MESSAGELIST
|
||||
if("delmessage")
|
||||
state = currmsg ? STATE_DELMESSAGE : STATE_MESSAGELIST
|
||||
src.state = (src.currmsg) ? STATE_DELMESSAGE : STATE_MESSAGELIST
|
||||
if("delmessage2")
|
||||
if(authenticated)
|
||||
if(currmsg)
|
||||
if(aicurrmsg == currmsg)
|
||||
aicurrmsg = null
|
||||
messages -= currmsg
|
||||
currmsg = null
|
||||
state = STATE_MESSAGELIST
|
||||
if(src.authenticated)
|
||||
if(src.currmsg)
|
||||
var/title = src.messagetitle[src.currmsg]
|
||||
var/text = src.messagetext[src.currmsg]
|
||||
src.messagetitle.Remove(title)
|
||||
src.messagetext.Remove(text)
|
||||
if(src.currmsg == src.aicurrmsg)
|
||||
src.aicurrmsg = 0
|
||||
src.currmsg = 0
|
||||
src.state = STATE_MESSAGELIST
|
||||
else
|
||||
state = STATE_VIEWMESSAGE
|
||||
if("respond")
|
||||
var/answer = text2num(href_list["answer"])
|
||||
if(!currmsg || !answer || currmsg.possible_answers.len < answer)
|
||||
state = STATE_MESSAGELIST
|
||||
currmsg.answered = answer
|
||||
state = STATE_VIEWMESSAGE
|
||||
src.state = STATE_VIEWMESSAGE
|
||||
if("status")
|
||||
state = STATE_STATUSDISPLAY
|
||||
src.state = STATE_STATUSDISPLAY
|
||||
|
||||
if("securitylevel")
|
||||
tmp_alertlevel = text2num( href_list["newalertlevel"] )
|
||||
src.tmp_alertlevel = text2num( href_list["newalertlevel"] )
|
||||
if(!tmp_alertlevel)
|
||||
tmp_alertlevel = 0
|
||||
state = STATE_CONFIRM_LEVEL
|
||||
@@ -247,12 +245,12 @@
|
||||
make_maint_all_access()
|
||||
log_game("[key_name(usr)] enabled emergency maintenance access.")
|
||||
message_admins("[key_name_admin(usr)] enabled emergency maintenance access.")
|
||||
state = STATE_DEFAULT
|
||||
src.state = STATE_DEFAULT
|
||||
if("disableemergency")
|
||||
revoke_maint_all_access()
|
||||
log_game("[key_name(usr)] disabled emergency maintenance access.")
|
||||
message_admins("[key_name_admin(usr)] disabled emergency maintenance access.")
|
||||
state = STATE_DEFAULT
|
||||
src.state = STATE_DEFAULT
|
||||
|
||||
// Status display stuff
|
||||
if("setstat")
|
||||
@@ -267,14 +265,14 @@
|
||||
|
||||
if("setmsg1")
|
||||
stat_msg1 = reject_bad_text(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 40)
|
||||
updateDialog()
|
||||
src.updateDialog()
|
||||
if("setmsg2")
|
||||
stat_msg2 = reject_bad_text(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 40)
|
||||
updateDialog()
|
||||
src.updateDialog()
|
||||
|
||||
// OMG CENTCOM LETTERHEAD
|
||||
if("MessageCentCom")
|
||||
if(authenticated==2)
|
||||
if(src.authenticated==2)
|
||||
if(!checkCCcooldown())
|
||||
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
|
||||
return
|
||||
@@ -290,7 +288,7 @@
|
||||
|
||||
// OMG SYNDICATE ...LETTERHEAD
|
||||
if("MessageSyndicate")
|
||||
if((authenticated==2) && (emagged))
|
||||
if((src.authenticated==2) && (src.emagged))
|
||||
if(!checkCCcooldown())
|
||||
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
@@ -308,10 +306,10 @@
|
||||
to_chat(usr, "<span class='notice'>Backup routing data restored!</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
emagged = FALSE
|
||||
updateDialog()
|
||||
src.updateDialog()
|
||||
|
||||
if("nukerequest") //When there's no other way
|
||||
if(authenticated==2)
|
||||
if(src.authenticated==2)
|
||||
if(!checkCCcooldown())
|
||||
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
|
||||
return
|
||||
@@ -327,45 +325,41 @@
|
||||
|
||||
// AI interface
|
||||
if("ai-main")
|
||||
aicurrmsg = null
|
||||
aistate = STATE_DEFAULT
|
||||
src.aicurrmsg = 0
|
||||
src.aistate = STATE_DEFAULT
|
||||
if("ai-callshuttle")
|
||||
aistate = STATE_CALLSHUTTLE
|
||||
src.aistate = STATE_CALLSHUTTLE
|
||||
if("ai-callshuttle2")
|
||||
SSshuttle.requestEvac(usr, href_list["call"])
|
||||
aistate = STATE_DEFAULT
|
||||
src.aistate = STATE_DEFAULT
|
||||
if("ai-messagelist")
|
||||
aicurrmsg = null
|
||||
aistate = STATE_MESSAGELIST
|
||||
src.aicurrmsg = 0
|
||||
src.aistate = STATE_MESSAGELIST
|
||||
if("ai-viewmessage")
|
||||
aistate = STATE_VIEWMESSAGE
|
||||
if (!aicurrmsg)
|
||||
src.aistate = STATE_VIEWMESSAGE
|
||||
if (!src.aicurrmsg)
|
||||
if(href_list["message-num"])
|
||||
var/msgnum = text2num(href_list["message-num"])
|
||||
aicurrmsg = messages[msgnum]
|
||||
src.aicurrmsg = text2num(href_list["message-num"])
|
||||
else
|
||||
aistate = STATE_MESSAGELIST
|
||||
src.aistate = STATE_MESSAGELIST
|
||||
if("ai-delmessage")
|
||||
aistate = aicurrmsg ? STATE_DELMESSAGE : STATE_MESSAGELIST
|
||||
src.aistate = (src.aicurrmsg) ? STATE_DELMESSAGE : STATE_MESSAGELIST
|
||||
if("ai-delmessage2")
|
||||
if(aicurrmsg)
|
||||
if(currmsg == aicurrmsg)
|
||||
currmsg = null
|
||||
messages -= aicurrmsg
|
||||
aicurrmsg = null
|
||||
aistate = STATE_MESSAGELIST
|
||||
if("ai-respond")
|
||||
var/answer = text2num(href_list["answer"])
|
||||
if(!aicurrmsg || !answer || aicurrmsg.possible_answers.len < answer)
|
||||
aistate = STATE_MESSAGELIST
|
||||
aicurrmsg.answered = answer
|
||||
aistate = STATE_VIEWMESSAGE
|
||||
if(src.aicurrmsg)
|
||||
var/title = src.messagetitle[src.aicurrmsg]
|
||||
var/text = src.messagetext[src.aicurrmsg]
|
||||
src.messagetitle.Remove(title)
|
||||
src.messagetext.Remove(text)
|
||||
if(src.currmsg == src.aicurrmsg)
|
||||
src.currmsg = 0
|
||||
src.aicurrmsg = 0
|
||||
src.aistate = STATE_MESSAGELIST
|
||||
if("ai-status")
|
||||
aistate = STATE_STATUSDISPLAY
|
||||
src.aistate = STATE_STATUSDISPLAY
|
||||
if("ai-announce")
|
||||
make_announcement(usr, 1)
|
||||
if("ai-securitylevel")
|
||||
tmp_alertlevel = text2num( href_list["newalertlevel"] )
|
||||
src.tmp_alertlevel = text2num( href_list["newalertlevel"] )
|
||||
if(!tmp_alertlevel)
|
||||
tmp_alertlevel = 0
|
||||
var/old_level = GLOB.security_level
|
||||
@@ -386,23 +380,24 @@
|
||||
if(SEC_LEVEL_BLUE)
|
||||
SSblackbox.inc("alert_comms_blue",1)
|
||||
tmp_alertlevel = 0
|
||||
aistate = STATE_DEFAULT
|
||||
src.aistate = STATE_DEFAULT
|
||||
if("ai-changeseclevel")
|
||||
aistate = STATE_ALERT_LEVEL
|
||||
src.aistate = STATE_ALERT_LEVEL
|
||||
|
||||
if("ai-emergencyaccess")
|
||||
aistate = STATE_TOGGLE_EMERGENCY
|
||||
src.aistate = STATE_TOGGLE_EMERGENCY
|
||||
if("ai-enableemergency")
|
||||
make_maint_all_access()
|
||||
log_game("[key_name(usr)] enabled emergency maintenance access.")
|
||||
message_admins("[key_name_admin(usr)] enabled emergency maintenance access.")
|
||||
aistate = STATE_DEFAULT
|
||||
src.aistate = STATE_DEFAULT
|
||||
if("ai-disableemergency")
|
||||
revoke_maint_all_access()
|
||||
log_game("[key_name(usr)] disabled emergency maintenance access.")
|
||||
message_admins("[key_name_admin(usr)] disabled emergency maintenance access.")
|
||||
aistate = STATE_DEFAULT
|
||||
src.aistate = STATE_DEFAULT
|
||||
|
||||
updateUsrDialog()
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/computer/communications/attackby(obj/I, mob/user, params)
|
||||
if(istype(I, /obj/item/card/id))
|
||||
@@ -422,7 +417,7 @@
|
||||
/obj/machinery/computer/communications/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
if (z > 6)
|
||||
if (src.z > 6)
|
||||
to_chat(user, "<span class='boldannounce'>Unable to establish a connection</span>: \black You're too far away from the station!")
|
||||
return
|
||||
|
||||
@@ -434,19 +429,19 @@
|
||||
|
||||
|
||||
var/datum/browser/popup = new(user, "communications", "Communications Console", 400, 500)
|
||||
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
|
||||
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
|
||||
|
||||
if(issilicon(user))
|
||||
var/dat2 = interact_ai(user) // give the AI a different interact proc to limit its access
|
||||
var/dat2 = src.interact_ai(user) // give the AI a different interact proc to limit its access
|
||||
if(dat2)
|
||||
dat += dat2
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
return
|
||||
|
||||
switch(state)
|
||||
switch(src.state)
|
||||
if(STATE_DEFAULT)
|
||||
if (authenticated)
|
||||
if (src.authenticated)
|
||||
if(SSshuttle.emergencyCallAmount)
|
||||
if(SSshuttle.emergencyLastCallLoc)
|
||||
dat += "Most recent shuttle call/recall traced to: <b>[format_text(SSshuttle.emergencyLastCallLoc.name)]</b><BR>"
|
||||
@@ -454,33 +449,33 @@
|
||||
dat += "Unable to trace most recent shuttle call/recall signal.<BR>"
|
||||
dat += "Logged in as: [auth_id]"
|
||||
dat += "<BR>"
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=logout'>Log Out</A> \]<BR>"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=logout'>Log Out</A> \]<BR>"
|
||||
dat += "<BR><B>General Functions</B>"
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=messagelist'>Message List</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=messagelist'>Message List</A> \]"
|
||||
switch(SSshuttle.emergency.mode)
|
||||
if(SHUTTLE_IDLE, SHUTTLE_RECALL)
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=callshuttle'>Call Emergency Shuttle</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=callshuttle'>Call Emergency Shuttle</A> \]"
|
||||
else
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=cancelshuttle'>Cancel Shuttle Call</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=cancelshuttle'>Cancel Shuttle Call</A> \]"
|
||||
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=status'>Set Status Display</A> \]"
|
||||
if (authenticated==2)
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=status'>Set Status Display</A> \]"
|
||||
if (src.authenticated==2)
|
||||
dat += "<BR><BR><B>Captain Functions</B>"
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=announce'>Make a Captain's Announcement</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=announce'>Make a Captain's Announcement</A> \]"
|
||||
if(CONFIG_GET(string/cross_server_address))
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=crossserver'>Send a message to an allied station</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref(src)];operation=crossserver'>Send a message to an allied station</A> \]"
|
||||
if(SSmapping.config.allow_custom_shuttles)
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=purchase_menu'>Purchase Shuttle</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=changeseclevel'>Change Alert Level</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=emergencyaccess'>Emergency Maintenance Access</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=nukerequest'>Request Nuclear Authentication Codes</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref(src)];operation=purchase_menu'>Purchase Shuttle</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref(src)];operation=changeseclevel'>Change Alert Level</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref(src)];operation=emergencyaccess'>Emergency Maintenance Access</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref(src)];operation=nukerequest'>Request Nuclear Authentication Codes</A> \]"
|
||||
if(!emagged)
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=MessageCentCom'>Send Message to CentCom</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=MessageCentCom'>Send Message to CentCom</A> \]"
|
||||
else
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=MessageSyndicate'>Send Message to \[UNKNOWN\]</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=RestoreBackup'>Restore Backup Routing Data</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=MessageSyndicate'>Send Message to \[UNKNOWN\]</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=RestoreBackup'>Restore Backup Routing Data</A> \]"
|
||||
else
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=login'>Log In</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=login'>Log In</A> \]"
|
||||
if(STATE_CALLSHUTTLE)
|
||||
dat += get_call_shuttle_form()
|
||||
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, 0)
|
||||
@@ -489,63 +484,56 @@
|
||||
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, 0)
|
||||
if(STATE_MESSAGELIST)
|
||||
dat += "Messages:"
|
||||
for(var/i in 1 to messages.len)
|
||||
var/datum/comm_message/M = messages[i]
|
||||
dat += "<BR><A HREF='?src=[REF(src)];operation=viewmessage;message-num=[i]'>[M.title]</A>"
|
||||
for(var/i = 1; i<=src.messagetitle.len; i++)
|
||||
dat += "<BR><A HREF='?src=\ref[src];operation=viewmessage;message-num=[i]'>[src.messagetitle[i]]</A>"
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
if(STATE_VIEWMESSAGE)
|
||||
if (currmsg)
|
||||
dat += "<B>[currmsg.title]</B><BR><BR>[currmsg.content]"
|
||||
if(!currmsg.answered && currmsg.possible_answers.len)
|
||||
for(var/i in 1 to currmsg.possible_answers.len)
|
||||
var/answer = currmsg.possible_answers[i]
|
||||
dat += "<br>\[ <A HREF='?src=[REF(src)];operation=respond;answer=[i]'>Answer : [answer]</A> \]"
|
||||
else if(currmsg.answered)
|
||||
var/answered = currmsg.possible_answers[currmsg.answered]
|
||||
dat += "<br> Archived Answer : [answered]"
|
||||
dat += "<BR><BR>\[ <A HREF='?src=[REF(src)];operation=delmessage'>Delete</A> \]"
|
||||
if (src.currmsg)
|
||||
dat += "<B>[src.messagetitle[src.currmsg]]</B><BR><BR>[src.messagetext[src.currmsg]]"
|
||||
if (src.authenticated)
|
||||
dat += "<BR><BR>\[ <A HREF='?src=\ref[src];operation=delmessage'>Delete</a> \]"
|
||||
else
|
||||
aistate = STATE_MESSAGELIST
|
||||
attack_hand(user)
|
||||
return null
|
||||
src.state = STATE_MESSAGELIST
|
||||
src.attack_hand(user)
|
||||
return
|
||||
if(STATE_DELMESSAGE)
|
||||
if (currmsg)
|
||||
dat += "Are you sure you want to delete this message? \[ <A HREF='?src=[REF(src)];operation=delmessage2'>OK</A> | <A HREF='?src=[REF(src)];operation=viewmessage'>Cancel</A> \]"
|
||||
if (src.currmsg)
|
||||
dat += "Are you sure you want to delete this message? \[ <A HREF='?src=\ref[src];operation=delmessage2'>OK</A> | <A HREF='?src=\ref[src];operation=viewmessage'>Cancel</A> \]"
|
||||
else
|
||||
state = STATE_MESSAGELIST
|
||||
attack_hand(user)
|
||||
src.state = STATE_MESSAGELIST
|
||||
src.attack_hand(user)
|
||||
return
|
||||
if(STATE_STATUSDISPLAY)
|
||||
dat += "Set Status Displays<BR>"
|
||||
dat += "\[ <A HREF='?src=[REF(src)];operation=setstat;statdisp=blank'>Clear</A> \]<BR>"
|
||||
dat += "\[ <A HREF='?src=[REF(src)];operation=setstat;statdisp=shuttle'>Shuttle ETA</A> \]<BR>"
|
||||
dat += "\[ <A HREF='?src=[REF(src)];operation=setstat;statdisp=message'>Message</A> \]"
|
||||
dat += "<ul><li> Line 1: <A HREF='?src=[REF(src)];operation=setmsg1'>[ stat_msg1 ? stat_msg1 : "(none)"]</A>"
|
||||
dat += "<li> Line 2: <A HREF='?src=[REF(src)];operation=setmsg2'>[ stat_msg2 ? stat_msg2 : "(none)"]</A></ul><br>"
|
||||
dat += "\[ Alert: <A HREF='?src=[REF(src)];operation=setstat;statdisp=alert;alert=default'>None</A> |"
|
||||
dat += " <A HREF='?src=[REF(src)];operation=setstat;statdisp=alert;alert=redalert'>Red Alert</A> |"
|
||||
dat += " <A HREF='?src=[REF(src)];operation=setstat;statdisp=alert;alert=lockdown'>Lockdown</A> |"
|
||||
dat += " <A HREF='?src=[REF(src)];operation=setstat;statdisp=alert;alert=biohazard'>Biohazard</A> \]<BR><HR>"
|
||||
dat += "\[ <A HREF='?src=\ref[src];operation=setstat;statdisp=blank'>Clear</A> \]<BR>"
|
||||
dat += "\[ <A HREF='?src=\ref[src];operation=setstat;statdisp=shuttle'>Shuttle ETA</A> \]<BR>"
|
||||
dat += "\[ <A HREF='?src=\ref[src];operation=setstat;statdisp=message'>Message</A> \]"
|
||||
dat += "<ul><li> Line 1: <A HREF='?src=\ref[src];operation=setmsg1'>[ stat_msg1 ? stat_msg1 : "(none)"]</A>"
|
||||
dat += "<li> Line 2: <A HREF='?src=\ref[src];operation=setmsg2'>[ stat_msg2 ? stat_msg2 : "(none)"]</A></ul><br>"
|
||||
dat += "\[ Alert: <A HREF='?src=\ref[src];operation=setstat;statdisp=alert;alert=default'>None</A> |"
|
||||
dat += " <A HREF='?src=\ref[src];operation=setstat;statdisp=alert;alert=redalert'>Red Alert</A> |"
|
||||
dat += " <A HREF='?src=\ref[src];operation=setstat;statdisp=alert;alert=lockdown'>Lockdown</A> |"
|
||||
dat += " <A HREF='?src=\ref[src];operation=setstat;statdisp=alert;alert=biohazard'>Biohazard</A> \]<BR><HR>"
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
if(STATE_ALERT_LEVEL)
|
||||
dat += "Current alert level: [get_security_level()]<BR>"
|
||||
if(GLOB.security_level == SEC_LEVEL_DELTA)
|
||||
dat += "<font color='red'><b>The self-destruct mechanism is active. Find a way to deactivate the mechanism to lower the alert level or evacuate.</b></font>"
|
||||
else
|
||||
dat += "<A HREF='?src=[REF(src)];operation=securitylevel;newalertlevel=[SEC_LEVEL_BLUE]'>Blue</A><BR>"
|
||||
dat += "<A HREF='?src=[REF(src)];operation=securitylevel;newalertlevel=[SEC_LEVEL_GREEN]'>Green</A>"
|
||||
dat += "<A HREF='?src=\ref[src];operation=securitylevel;newalertlevel=[SEC_LEVEL_BLUE]'>Blue</A><BR>"
|
||||
dat += "<A HREF='?src=\ref[src];operation=securitylevel;newalertlevel=[SEC_LEVEL_GREEN]'>Green</A>"
|
||||
if(STATE_CONFIRM_LEVEL)
|
||||
dat += "Current alert level: [get_security_level()]<BR>"
|
||||
dat += "Confirm the change to: [num2seclevel(tmp_alertlevel)]<BR>"
|
||||
dat += "<A HREF='?src=[REF(src)];operation=swipeidseclevel'>Swipe ID</A> to confirm change.<BR>"
|
||||
dat += "<A HREF='?src=\ref[src];operation=swipeidseclevel'>Swipe ID</A> to confirm change.<BR>"
|
||||
if(STATE_TOGGLE_EMERGENCY)
|
||||
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, 0)
|
||||
if(GLOB.emergency_access == 1)
|
||||
dat += "<b>Emergency Maintenance Access is currently <font color='red'>ENABLED</font></b>"
|
||||
dat += "<BR>Restore maintenance access restrictions? <BR>\[ <A HREF='?src=[REF(src)];operation=disableemergency'>OK</A> | <A HREF='?src=[REF(src)];operation=viewmessage'>Cancel</A> \]"
|
||||
dat += "<BR>Restore maintenance access restrictions? <BR>\[ <A HREF='?src=\ref[src];operation=disableemergency'>OK</A> | <A HREF='?src=\ref[src];operation=viewmessage'>Cancel</A> \]"
|
||||
else
|
||||
dat += "<b>Emergency Maintenance Access is currently <font color='green'>DISABLED</font></b>"
|
||||
dat += "<BR>Lift access restrictions on maintenance and external airlocks? <BR>\[ <A HREF='?src=[REF(src)];operation=enableemergency'>OK</A> | <A HREF='?src=[REF(src)];operation=viewmessage'>Cancel</A> \]"
|
||||
dat += "<BR>Lift access restrictions on maintenance and external airlocks? <BR>\[ <A HREF='?src=\ref[src];operation=enableemergency'>OK</A> | <A HREF='?src=\ref[src];operation=viewmessage'>Cancel</A> \]"
|
||||
|
||||
if(STATE_PURCHASE)
|
||||
dat += "Budget: [SSshuttle.points] Credits.<BR>"
|
||||
@@ -556,9 +544,9 @@
|
||||
dat += "[S.description]<BR>"
|
||||
if(S.prerequisites)
|
||||
dat += "Prerequisites: [S.prerequisites]<BR>"
|
||||
dat += "<A href='?src=[REF(src)];operation=buyshuttle;chosen_shuttle=[REF(S)]'>(<font color=red><i>Purchase</i></font>)</A><BR><BR>"
|
||||
dat += "<A href='?src=\ref[src];operation=buyshuttle;chosen_shuttle=\ref[S]'>(<font color=red><i>Purchase</i></font>)</A><BR><BR>"
|
||||
|
||||
dat += "<BR><BR>\[ [(state != STATE_DEFAULT) ? "<A HREF='?src=[REF(src)];operation=main'>Main Menu</A> | " : ""]<A HREF='?src=[REF(user)];mach_close=communications'>Close</A> \]"
|
||||
dat += "<BR><BR>\[ [(src.state != STATE_DEFAULT) ? "<A HREF='?src=\ref[src];operation=main'>Main Menu</A> | " : ""]<A HREF='?src=\ref[user];mach_close=communications'>Close</A> \]"
|
||||
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
@@ -585,8 +573,8 @@
|
||||
/obj/machinery/computer/communications/proc/get_call_shuttle_form(ai_interface = 0)
|
||||
var/form_id = "callshuttle"
|
||||
var/dat = get_javascript_header(form_id)
|
||||
dat += "<form name='callshuttle' id='[form_id]' action='?src=[REF(src)]' method='get' style='display: inline'>"
|
||||
dat += "<input type='hidden' name='src' value='[REF(src)]'>"
|
||||
dat += "<form name='callshuttle' id='[form_id]' action='?src=\ref[src]' method='get' style='display: inline'>"
|
||||
dat += "<input type='hidden' name='src' value='\ref[src]'>"
|
||||
dat += "<input type='hidden' name='operation' value='[ai_interface ? "ai-callshuttle2" : "callshuttle2"]'>"
|
||||
dat += "<b>Nature of emergency:</b><BR> <input type='text' id='reasonfield' name='call' style='width:250px; background-color:#FFDDDD; onkeydown='getLength() onkeyup='getLength()' onkeypress='getLength()'>"
|
||||
dat += "<BR>Are you sure you want to call the shuttle? \[ <a href='#' onclick='submit()'>Call</a> \]"
|
||||
@@ -595,8 +583,8 @@
|
||||
/obj/machinery/computer/communications/proc/get_cancel_shuttle_form()
|
||||
var/form_id = "cancelshuttle"
|
||||
var/dat = get_javascript_header(form_id)
|
||||
dat += "<form name='cancelshuttle' id='[form_id]' action='?src=[REF(src)]' method='get' style='display: inline'>"
|
||||
dat += "<input type='hidden' name='src' value='[REF(src)]'>"
|
||||
dat += "<form name='cancelshuttle' id='[form_id]' action='?src=\ref[src]' method='get' style='display: inline'>"
|
||||
dat += "<input type='hidden' name='src' value='\ref[src]'>"
|
||||
dat += "<input type='hidden' name='operation' value='cancelshuttle2'>"
|
||||
|
||||
dat += "<BR>Are you sure you want to cancel the shuttle? \[ <a href='#' onclick='submit()'>Cancel</a> \]"
|
||||
@@ -604,7 +592,7 @@
|
||||
|
||||
/obj/machinery/computer/communications/proc/interact_ai(mob/living/silicon/ai/user)
|
||||
var/dat = ""
|
||||
switch(aistate)
|
||||
switch(src.aistate)
|
||||
if(STATE_DEFAULT)
|
||||
if(SSshuttle.emergencyCallAmount)
|
||||
if(SSshuttle.emergencyLastCallLoc)
|
||||
@@ -616,73 +604,65 @@
|
||||
else
|
||||
dat += "Current login: None"
|
||||
dat += "<BR><BR><B>General Functions</B>"
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=ai-messagelist'>Message List</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=ai-messagelist'>Message List</A> \]"
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_IDLE)
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=ai-callshuttle'>Call Emergency Shuttle</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=ai-status'>Set Status Display</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=ai-callshuttle'>Call Emergency Shuttle</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=ai-status'>Set Status Display</A> \]"
|
||||
dat += "<BR><BR><B>Special Functions</B>"
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=ai-announce'>Make an Announcement</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=ai-changeseclevel'>Change Alert Level</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=ai-emergencyaccess'>Emergency Maintenance Access</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=ai-announce'>Make an Announcement</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=ai-changeseclevel'>Change Alert Level</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=ai-emergencyaccess'>Emergency Maintenance Access</A> \]"
|
||||
if(STATE_CALLSHUTTLE)
|
||||
dat += get_call_shuttle_form(1)
|
||||
if(STATE_MESSAGELIST)
|
||||
dat += "Messages:"
|
||||
for(var/i in 1 to messages.len)
|
||||
var/datum/comm_message/M = messages[i]
|
||||
dat += "<BR><A HREF='?src=[REF(src)];operation=ai-viewmessage;message-num=[i]'>[M.title]</A>"
|
||||
for(var/i = 1; i<=src.messagetitle.len; i++)
|
||||
dat += "<BR><A HREF='?src=\ref[src];operation=ai-viewmessage;message-num=[i]'>[src.messagetitle[i]]</A>"
|
||||
if(STATE_VIEWMESSAGE)
|
||||
if (aicurrmsg)
|
||||
dat += "<B>[aicurrmsg.title]</B><BR><BR>[aicurrmsg.content]"
|
||||
if(!aicurrmsg.answered && aicurrmsg.possible_answers.len)
|
||||
for(var/i in 1 to aicurrmsg.possible_answers.len)
|
||||
var/answer = aicurrmsg.possible_answers[i]
|
||||
dat += "<br>\[ <A HREF='?src=[REF(src)];operation=ai-respond;answer=[i]'>Answer : [answer]</A> \]"
|
||||
else if(aicurrmsg.answered)
|
||||
var/answered = aicurrmsg.possible_answers[aicurrmsg.answered]
|
||||
dat += "<br> Archived Answer : [answered]"
|
||||
dat += "<BR><BR>\[ <A HREF='?src=[REF(src)];operation=ai-delmessage'>Delete</A> \]"
|
||||
if (src.aicurrmsg)
|
||||
dat += "<B>[src.messagetitle[src.aicurrmsg]]</B><BR><BR>[src.messagetext[src.aicurrmsg]]"
|
||||
dat += "<BR><BR>\[ <A HREF='?src=\ref[src];operation=ai-delmessage'>Delete</A> \]"
|
||||
else
|
||||
aistate = STATE_MESSAGELIST
|
||||
attack_hand(user)
|
||||
src.aistate = STATE_MESSAGELIST
|
||||
src.attack_hand(user)
|
||||
return null
|
||||
if(STATE_DELMESSAGE)
|
||||
if(aicurrmsg)
|
||||
dat += "Are you sure you want to delete this message? \[ <A HREF='?src=[REF(src)];operation=ai-delmessage2'>OK</A> | <A HREF='?src=[REF(src)];operation=ai-viewmessage'>Cancel</A> \]"
|
||||
if(src.aicurrmsg)
|
||||
dat += "Are you sure you want to delete this message? \[ <A HREF='?src=\ref[src];operation=ai-delmessage2'>OK</A> | <A HREF='?src=\ref[src];operation=ai-viewmessage'>Cancel</A> \]"
|
||||
else
|
||||
aistate = STATE_MESSAGELIST
|
||||
attack_hand(user)
|
||||
src.aistate = STATE_MESSAGELIST
|
||||
src.attack_hand(user)
|
||||
return
|
||||
|
||||
if(STATE_STATUSDISPLAY)
|
||||
dat += "Set Status Displays<BR>"
|
||||
dat += "\[ <A HREF='?src=[REF(src)];operation=setstat;statdisp=blank'>Clear</A> \]<BR>"
|
||||
dat += "\[ <A HREF='?src=[REF(src)];operation=setstat;statdisp=shuttle'>Shuttle ETA</A> \]<BR>"
|
||||
dat += "\[ <A HREF='?src=[REF(src)];operation=setstat;statdisp=message'>Message</A> \]"
|
||||
dat += "<ul><li> Line 1: <A HREF='?src=[REF(src)];operation=setmsg1'>[ stat_msg1 ? stat_msg1 : "(none)"]</A>"
|
||||
dat += "<li> Line 2: <A HREF='?src=[REF(src)];operation=setmsg2'>[ stat_msg2 ? stat_msg2 : "(none)"]</A></ul><br>"
|
||||
dat += "\[ Alert: <A HREF='?src=[REF(src)];operation=setstat;statdisp=alert;alert=default'>None</A> |"
|
||||
dat += " <A HREF='?src=[REF(src)];operation=setstat;statdisp=alert;alert=redalert'>Red Alert</A> |"
|
||||
dat += " <A HREF='?src=[REF(src)];operation=setstat;statdisp=alert;alert=lockdown'>Lockdown</A> |"
|
||||
dat += " <A HREF='?src=[REF(src)];operation=setstat;statdisp=alert;alert=biohazard'>Biohazard</A> \]<BR><HR>"
|
||||
dat += "\[ <A HREF='?src=\ref[src];operation=setstat;statdisp=blank'>Clear</A> \]<BR>"
|
||||
dat += "\[ <A HREF='?src=\ref[src];operation=setstat;statdisp=shuttle'>Shuttle ETA</A> \]<BR>"
|
||||
dat += "\[ <A HREF='?src=\ref[src];operation=setstat;statdisp=message'>Message</A> \]"
|
||||
dat += "<ul><li> Line 1: <A HREF='?src=\ref[src];operation=setmsg1'>[ stat_msg1 ? stat_msg1 : "(none)"]</A>"
|
||||
dat += "<li> Line 2: <A HREF='?src=\ref[src];operation=setmsg2'>[ stat_msg2 ? stat_msg2 : "(none)"]</A></ul><br>"
|
||||
dat += "\[ Alert: <A HREF='?src=\ref[src];operation=setstat;statdisp=alert;alert=default'>None</A> |"
|
||||
dat += " <A HREF='?src=\ref[src];operation=setstat;statdisp=alert;alert=redalert'>Red Alert</A> |"
|
||||
dat += " <A HREF='?src=\ref[src];operation=setstat;statdisp=alert;alert=lockdown'>Lockdown</A> |"
|
||||
dat += " <A HREF='?src=\ref[src];operation=setstat;statdisp=alert;alert=biohazard'>Biohazard</A> \]<BR><HR>"
|
||||
|
||||
if(STATE_ALERT_LEVEL)
|
||||
dat += "Current alert level: [get_security_level()]<BR>"
|
||||
if(GLOB.security_level == SEC_LEVEL_DELTA)
|
||||
dat += "<font color='red'><b>The self-destruct mechanism is active. Find a way to deactivate the mechanism to lower the alert level or evacuate.</b></font>"
|
||||
else
|
||||
dat += "<A HREF='?src=[REF(src)];operation=ai-securitylevel;newalertlevel=[SEC_LEVEL_BLUE]'>Blue</A><BR>"
|
||||
dat += "<A HREF='?src=[REF(src)];operation=ai-securitylevel;newalertlevel=[SEC_LEVEL_GREEN]'>Green</A>"
|
||||
dat += "<A HREF='?src=\ref[src];operation=ai-securitylevel;newalertlevel=[SEC_LEVEL_BLUE]'>Blue</A><BR>"
|
||||
dat += "<A HREF='?src=\ref[src];operation=ai-securitylevel;newalertlevel=[SEC_LEVEL_GREEN]'>Green</A>"
|
||||
|
||||
if(STATE_TOGGLE_EMERGENCY)
|
||||
if(GLOB.emergency_access == 1)
|
||||
dat += "<b>Emergency Maintenance Access is currently <font color='red'>ENABLED</font></b>"
|
||||
dat += "<BR>Restore maintenance access restrictions? <BR>\[ <A HREF='?src=[REF(src)];operation=ai-disableemergency'>OK</A> | <A HREF='?src=[REF(src)];operation=ai-viewmessage'>Cancel</A> \]"
|
||||
dat += "<BR>Restore maintenance access restrictions? <BR>\[ <A HREF='?src=\ref[src];operation=ai-disableemergency'>OK</A> | <A HREF='?src=\ref[src];operation=ai-viewmessage'>Cancel</A> \]"
|
||||
else
|
||||
dat += "<b>Emergency Maintenance Access is currently <font color='green'>DISABLED</font></b>"
|
||||
dat += "<BR>Lift access restrictions on maintenance and external airlocks? <BR>\[ <A HREF='?src=[REF(src)];operation=ai-enableemergency'>OK</A> | <A HREF='?src=[REF(src)];operation=ai-viewmessage'>Cancel</A> \]"
|
||||
dat += "<BR>Lift access restrictions on maintenance and external airlocks? <BR>\[ <A HREF='?src=\ref[src];operation=ai-enableemergency'>OK</A> | <A HREF='?src=\ref[src];operation=ai-viewmessage'>Cancel</A> \]"
|
||||
|
||||
dat += "<BR><BR>\[ [(aistate != STATE_DEFAULT) ? "<A HREF='?src=[REF(src)];operation=ai-main'>Main Menu</A> | " : ""]<A HREF='?src=[REF(user)];mach_close=communications'>Close</A> \]"
|
||||
dat += "<BR><BR>\[ [(src.aistate != STATE_DEFAULT) ? "<A HREF='?src=\ref[src];operation=ai-main'>Main Menu</A> | " : ""]<A HREF='?src=\ref[user];mach_close=communications'>Close</A> \]"
|
||||
return dat
|
||||
|
||||
/obj/machinery/computer/communications/proc/make_announcement(mob/living/user, is_silicon)
|
||||
@@ -733,3 +713,4 @@
|
||||
var/content
|
||||
var/list/possible_answers = list()
|
||||
var/answered
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
if(recharge_port && !QDELETED(recharge_port))
|
||||
data["recharge_port"] = list("mech" = null)
|
||||
if(recharge_port.recharging_mech && !QDELETED(recharge_port.recharging_mech))
|
||||
data["recharge_port"]["mech"] = list("health" = recharge_port.recharging_mech.obj_integrity, "max_integrity" = recharge_port.recharging_mech.max_integrity, "cell" = null)
|
||||
data["recharge_port"]["mech"] = list("health" = recharge_port.recharging_mech.obj_integrity, "maxhealth" = recharge_port.recharging_mech.max_integrity, "cell" = null)
|
||||
if(recharge_port.recharging_mech.cell && !QDELETED(recharge_port.recharging_mech.cell))
|
||||
data["recharge_port"]["mech"]["cell"] = list(
|
||||
"critfail" = recharge_port.recharging_mech.cell.crit_fail,
|
||||
|
||||
@@ -301,6 +301,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
item_state = "spliffoff"
|
||||
smoketime = 180
|
||||
chem_volume = 50
|
||||
list_reagents = null
|
||||
|
||||
/obj/item/clothing/mask/cigarette/rollie/New()
|
||||
..()
|
||||
|
||||
@@ -210,6 +210,7 @@
|
||||
item_state = "lamp"
|
||||
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
force = 10
|
||||
brightness_on = 5
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
flags_1 = CONDUCT_1
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/obj/item/device/instrument
|
||||
name = "generic instrument"
|
||||
resistance_flags = FLAMMABLE
|
||||
force = 10
|
||||
max_integrity = 100
|
||||
icon = 'icons/obj/musician.dmi'
|
||||
lefthand_file = 'icons/mob/inhands/equipment/instruments_lefthand.dmi'
|
||||
@@ -49,7 +50,6 @@
|
||||
desc = "A wooden musical instrument with four strings and a bow. \"The devil went down to space, he was looking for an assistant to grief.\""
|
||||
icon_state = "violin"
|
||||
item_state = "violin"
|
||||
force = 10
|
||||
hitsound = "swing_hit"
|
||||
instrumentId = "violin"
|
||||
|
||||
@@ -80,7 +80,6 @@
|
||||
icon_state = "guitar"
|
||||
item_state = "guitar"
|
||||
instrumentExt = "ogg"
|
||||
force = 10
|
||||
attack_verb = list("played metal on", "serenaded", "crashed", "smashed")
|
||||
hitsound = 'sound/weapons/stringsmash.ogg'
|
||||
instrumentId = "guitar"
|
||||
@@ -185,6 +184,7 @@
|
||||
/obj/item/device/instrument/recorder
|
||||
name = "recorder"
|
||||
desc = "Just like in school, playing ability and all."
|
||||
force = 5
|
||||
icon_state = "recorder"
|
||||
item_state = "recorder"
|
||||
instrumentId = "recorder"
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "magnets=3;engineering=4"
|
||||
force = 8
|
||||
|
||||
var/max_uses = 20
|
||||
var/uses = 0
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
origin_tech = "syndicate=3"
|
||||
icon_state = "syndie_headset"
|
||||
item_state = "syndie_headset"
|
||||
flags_2 = BANG_PROTECT_2
|
||||
flags_2 = BANG_PROTECT_2 | NO_EMP_WIRES_2
|
||||
|
||||
/obj/item/device/radio/headset/syndicate/alt/leader
|
||||
name = "team leader headset"
|
||||
@@ -80,7 +80,7 @@
|
||||
desc = "This is used by your elite security force. Protects ears from flashbangs.\nTo access the security channel, use :s."
|
||||
icon_state = "sec_headset_alt"
|
||||
item_state = "sec_headset_alt"
|
||||
flags_2 = BANG_PROTECT_2
|
||||
flags_2 = BANG_PROTECT_2 | NO_EMP_WIRES_2
|
||||
|
||||
/obj/item/device/radio/headset/headset_eng
|
||||
name = "engineering radio headset"
|
||||
@@ -132,7 +132,7 @@
|
||||
desc = "The headset of the boss. Protects ears from flashbangs.\nChannels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :v - service, :m - medical, :n - science."
|
||||
icon_state = "com_headset_alt"
|
||||
item_state = "com_headset_alt"
|
||||
flags_2 = BANG_PROTECT_2
|
||||
flags_2 = BANG_PROTECT_2 | NO_EMP_WIRES_2
|
||||
|
||||
/obj/item/device/radio/headset/heads/rd
|
||||
name = "\proper the research director's headset"
|
||||
@@ -151,7 +151,7 @@
|
||||
desc = "The headset of the man in charge of keeping order and protecting the station. Protects ears from flashbangs.\nTo access the security channel, use :s. For command, use :c."
|
||||
icon_state = "com_headset_alt"
|
||||
item_state = "com_headset_alt"
|
||||
flags_2 = BANG_PROTECT_2
|
||||
flags_2 = BANG_PROTECT_2 | NO_EMP_WIRES_2
|
||||
|
||||
/obj/item/device/radio/headset/heads/ce
|
||||
name = "\proper the chief engineer's headset"
|
||||
@@ -205,7 +205,7 @@
|
||||
icon_state = "cent_headset_alt"
|
||||
item_state = "cent_headset_alt"
|
||||
keyslot = null
|
||||
flags_2 = BANG_PROTECT_2
|
||||
flags_2 = BANG_PROTECT_2 | NO_EMP_WIRES_2
|
||||
|
||||
/obj/item/device/radio/headset/ai
|
||||
name = "\proper Integrated Subspace Transceiver "
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
var/emped = 0 //Highjacked to track the number of consecutive EMPs on the radio, allowing consecutive EMP's to stack properly.
|
||||
// "Example" = FREQ_LISTENING|FREQ_BROADCASTING
|
||||
flags_1 = CONDUCT_1 | HEAR_1
|
||||
flags_2 = NO_EMP_WIRES_2
|
||||
slot_flags = SLOT_BELT
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
|
||||
@@ -1,50 +1,50 @@
|
||||
/obj/item/grenade
|
||||
name = "grenade"
|
||||
desc = "It has an adjustable timer."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "grenade"
|
||||
item_state = "flashbang"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BELT
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 40
|
||||
var/active = 0
|
||||
var/det_time = 50
|
||||
var/display_timer = 1
|
||||
|
||||
/obj/item/grenade/deconstruct(disassembled = TRUE)
|
||||
if(!disassembled)
|
||||
prime()
|
||||
if(!QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/grenade/proc/clown_check(mob/living/carbon/human/user)
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>")
|
||||
/obj/item/grenade
|
||||
name = "grenade"
|
||||
desc = "It has an adjustable timer."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "grenade"
|
||||
item_state = "flashbang"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BELT
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 40
|
||||
var/active = 0
|
||||
var/det_time = 50
|
||||
var/display_timer = 1
|
||||
|
||||
/obj/item/grenade/deconstruct(disassembled = TRUE)
|
||||
if(!disassembled)
|
||||
prime()
|
||||
if(!QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/grenade/proc/clown_check(mob/living/carbon/human/user)
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>")
|
||||
preprime(user, 5, FALSE)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/grenade/examine(mob/user)
|
||||
..()
|
||||
if(display_timer)
|
||||
if(det_time > 1)
|
||||
to_chat(user, "The timer is set to [det_time/10] second\s.")
|
||||
else
|
||||
to_chat(user, "\The [src] is set for instant detonation.")
|
||||
|
||||
|
||||
/obj/item/grenade/attack_self(mob/user)
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
preprime(user)
|
||||
|
||||
|
||||
|
||||
/obj/item/grenade/examine(mob/user)
|
||||
..()
|
||||
if(display_timer)
|
||||
if(det_time > 1)
|
||||
to_chat(user, "The timer is set to [det_time/10] second\s.")
|
||||
else
|
||||
to_chat(user, "\The [src] is set for instant detonation.")
|
||||
|
||||
|
||||
/obj/item/grenade/attack_self(mob/user)
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
preprime(user)
|
||||
|
||||
/obj/item/grenade/proc/log_grenade(mob/user, turf/T)
|
||||
var/area/A = get_area(T)
|
||||
var/message = "[ADMIN_LOOKUPFLW(user)]) has primed \a [src] for detonation at [ADMIN_COORDJMP(T)]"
|
||||
@@ -52,57 +52,58 @@
|
||||
message_admins(message)
|
||||
log_game("[key_name(user)] has primed \a [src] for detonation at [A.name] [COORD(T)].")
|
||||
|
||||
/obj/item/grenade/proc/preprime(mob/user, delayoverride, msg = TRUE)
|
||||
/obj/item/grenade/proc/preprime(mob/user, delayoverride, msg = TRUE, volume = 60)
|
||||
var/turf/T = get_turf(src)
|
||||
log_grenade(user, T)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
if(msg)
|
||||
to_chat(user, "<span class='warning'>You prime \the [src]! [det_time/10] seconds!</span>")
|
||||
playsound(loc, 'sound/weapons/armbomb.ogg', 60, 1)
|
||||
active = TRUE
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
add_fingerprint(user)
|
||||
log_grenade(user, T) //Inbuilt admin procs already handle null users
|
||||
if(user)
|
||||
add_fingerprint(user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
if(msg)
|
||||
to_chat(user, "<span class='warning'>You prime \the [src]! [det_time/10] seconds!</span>")
|
||||
playsound(src, 'sound/weapons/armbomb.ogg', volume, 1)
|
||||
active = TRUE
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
addtimer(CALLBACK(src, .proc/prime), isnull(delayoverride)? det_time : delayoverride)
|
||||
|
||||
/obj/item/grenade/proc/prime()
|
||||
|
||||
/obj/item/grenade/proc/update_mob()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.dropItemToGround(src)
|
||||
|
||||
|
||||
/obj/item/grenade/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
switch(det_time)
|
||||
if ("1")
|
||||
det_time = 10
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 1 second detonation time.</span>")
|
||||
if ("10")
|
||||
det_time = 30
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 3 second detonation time.</span>")
|
||||
if ("30")
|
||||
det_time = 50
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 5 second detonation time.</span>")
|
||||
if ("50")
|
||||
det_time = 1
|
||||
to_chat(user, "<span class='notice'>You set the [name] for instant detonation.</span>")
|
||||
add_fingerprint(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/grenade/attack_hand()
|
||||
walk(src, null, null)
|
||||
..()
|
||||
|
||||
/obj/item/grenade/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/grenade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
var/obj/item/projectile/P = hitby
|
||||
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(15))
|
||||
owner.visible_message("<span class='danger'>[attack_text] hits [owner]'s [src], setting it off! What a shot!</span>")
|
||||
prime()
|
||||
|
||||
/obj/item/grenade/proc/prime()
|
||||
|
||||
/obj/item/grenade/proc/update_mob()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.dropItemToGround(src)
|
||||
|
||||
|
||||
/obj/item/grenade/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
switch(det_time)
|
||||
if ("1")
|
||||
det_time = 10
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 1 second detonation time.</span>")
|
||||
if ("10")
|
||||
det_time = 30
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 3 second detonation time.</span>")
|
||||
if ("30")
|
||||
det_time = 50
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 5 second detonation time.</span>")
|
||||
if ("50")
|
||||
det_time = 1
|
||||
to_chat(user, "<span class='notice'>You set the [name] for instant detonation.</span>")
|
||||
add_fingerprint(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/grenade/attack_hand()
|
||||
walk(src, null, null)
|
||||
..()
|
||||
|
||||
/obj/item/grenade/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/grenade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
var/obj/item/projectile/P = hitby
|
||||
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(15))
|
||||
owner.visible_message("<span class='danger'>[attack_text] hits [owner]'s [src], setting it off! What a shot!</span>")
|
||||
prime()
|
||||
return TRUE //It hit the grenade, not them
|
||||
|
||||
@@ -7,14 +7,66 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
resistance_flags = FLAMMABLE
|
||||
var/list/squeak_override //Weighted list; If you want your plush to have different squeak sounds use this
|
||||
var/stuffed = TRUE //If the plushie has stuffing in it
|
||||
var/obj/item/grenade/grenade //You can remove the stuffing from a plushie and add a grenade to it for *nefarious uses*
|
||||
|
||||
/obj/item/toy/plush/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/squeak, squeak_override)
|
||||
|
||||
/obj/item/toy/plush/Destroy()
|
||||
QDEL_NULL(grenade)
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/plush/handle_atom_del(atom/A)
|
||||
if(A == grenade)
|
||||
grenade = null
|
||||
..()
|
||||
|
||||
/obj/item/toy/plush/attack_self(mob/user)
|
||||
. = ..()
|
||||
to_chat(user, "<span class='notice'>You pet [src]. D'awww.</span>")
|
||||
if(stuffed || grenade)
|
||||
to_chat(user, "<span class='notice'>You pet [src]. D'awww.</span>")
|
||||
if(grenade && !grenade.active)
|
||||
if(istype(grenade, /obj/item/grenade/chem_grenade))
|
||||
var/obj/item/grenade/chem_grenade/G = grenade
|
||||
if(G.nadeassembly) //We're activated through different methods
|
||||
return
|
||||
log_game("[key_name(user)] activated a hidden grenade in [src].")
|
||||
grenade.preprime(user, msg = FALSE, volume = 10)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You try to pet [src], but it has no stuffing. Aww...</span>")
|
||||
|
||||
/obj/item/toy/plush/attackby(obj/item/I, mob/living/user, params)
|
||||
if(I.is_sharp())
|
||||
if(!grenade)
|
||||
if(!stuffed)
|
||||
to_chat(user, "<span class='warning'>You already murdered it!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] tears out the stuffing from [src]!</span>", "<span class='notice'>You rip a bunch of the stuffing from [src]. Murderer.</span>")
|
||||
playsound(I, I.usesound, 50, TRUE)
|
||||
stuffed = FALSE
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You remove the grenade from [src].</span>")
|
||||
user.put_in_hands(grenade)
|
||||
grenade = null
|
||||
return
|
||||
if(istype(I, /obj/item/grenade))
|
||||
if(stuffed)
|
||||
to_chat(user, "<span class='warning'>You need to remove some stuffing first!</span>")
|
||||
return
|
||||
if(grenade)
|
||||
to_chat(user, "<span class='warning'>[src] already has a grenade!</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
user.visible_message("<span class='warning'>[user] slides [grenade] into [src].</span>", \
|
||||
"<span class='danger'>You slide [I] into [src].</span>")
|
||||
grenade = I
|
||||
var/turf/T = get_turf(user)
|
||||
log_game("[key_name(user)] added a grenade ([I.name]) to [src] at [COORD(T)].")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/plush/carpplushie
|
||||
name = "space carp plushie"
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
/obj/item/borg/upgrade/hypospray/action(mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
return
|
||||
for(var/obj/item/reagent_containers/borghypo/H in R.module)
|
||||
for(var/obj/item/reagent_containers/borghypo/H in R.module.modules)
|
||||
if(H.accepts_reagent_upgrades)
|
||||
for(var/re in additional_reagents)
|
||||
H.add_reagent(re)
|
||||
@@ -355,7 +355,7 @@
|
||||
return
|
||||
|
||||
var/found_hypo = FALSE
|
||||
for(var/obj/item/reagent_containers/borghypo/H in R.module)
|
||||
for(var/obj/item/reagent_containers/borghypo/H in R.module.modules)
|
||||
H.bypass_protection = TRUE
|
||||
found_hypo = TRUE
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "sharpener"
|
||||
desc = "A block that makes things sharp."
|
||||
force = 5
|
||||
var/used = 0
|
||||
var/increment = 4
|
||||
var/max = 30
|
||||
|
||||
@@ -457,6 +457,15 @@
|
||||
flamethrower_screwdriver(I, user)
|
||||
else if(istype(I, /obj/item/stack/rods))
|
||||
flamethrower_rods(I, user)
|
||||
else if(istype(I, /obj/item/reagent_containers) && I.is_open_container())
|
||||
var/amountNeeded = max_fuel - get_fuel()
|
||||
var/obj/item/reagent_containers/container = I
|
||||
if(length(container.reagents.reagent_list) > 1)
|
||||
to_chat(user, "<span class='warning'>[container] has too many chemicals mixed into it. You wouldn't want to put the wrong chemicals into [src].</span>")
|
||||
return ..()
|
||||
if(amountNeeded > 0 && container.reagents.has_reagent("welding_fuel"))
|
||||
container.reagents.trans_id_to(src, "welding_fuel", amountNeeded)
|
||||
to_chat(user, "<span class='notice'>You transfer some fuel from [container] to [src].</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -591,7 +591,7 @@
|
||||
desc = "This is how real men fight."
|
||||
icon_state = "latexballon"
|
||||
item_state = "nothing"
|
||||
force = 1
|
||||
force = 0
|
||||
throwforce = 0
|
||||
flags_1 = DROPDEL_1 | ABSTRACT_1
|
||||
attack_verb = list("slapped")
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
desc = "A collapsed roller bed that can be carried around."
|
||||
icon = 'icons/obj/rollerbed.dmi'
|
||||
icon_state = "folded"
|
||||
w_class = WEIGHT_CLASS_BULKY // Can't be put in backpacks.
|
||||
w_class = WEIGHT_CLASS_NORMAL // No more excuses, stop getting blood everywhere
|
||||
|
||||
/obj/item/roller/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/roller/robo))
|
||||
|
||||
@@ -498,7 +498,7 @@
|
||||
flick("baton_active", src)
|
||||
var/stunforce = B.stunforce
|
||||
user.Knockdown(stunforce)
|
||||
user.stuttering = stunforce
|
||||
user.stuttering = stunforce/20
|
||||
B.deductcharge(B.hitcost)
|
||||
user.visible_message("<span class='warning'>[user] shocks themself while attempting to wash the active [B.name]!</span>", \
|
||||
"<span class='userdanger'>You unwisely attempt to wash [B] while it's still on.</span>")
|
||||
|
||||
@@ -130,6 +130,10 @@
|
||||
var/backpack_contents = -1
|
||||
var/suit_store = -1
|
||||
|
||||
var/hair_style
|
||||
var/facial_hair_style
|
||||
var/skin_tone
|
||||
|
||||
/obj/effect/mob_spawn/human/Initialize()
|
||||
if(ispath(outfit))
|
||||
outfit = new outfit()
|
||||
@@ -147,6 +151,20 @@
|
||||
H.underwear = "Nude"
|
||||
H.undershirt = "Nude"
|
||||
H.socks = "Nude"
|
||||
if(hair_style)
|
||||
H.hair_style = hair_style
|
||||
else
|
||||
H.hair_style = random_hair_style(gender)
|
||||
if(facial_hair_style)
|
||||
H.facial_hair_style = facial_hair_style
|
||||
else
|
||||
H.facial_hair_style = random_facial_hair_style(gender)
|
||||
if(skin_tone)
|
||||
H.skin_tone = skin_tone
|
||||
else
|
||||
H.skin_tone = random_skin_tone()
|
||||
H.update_hair()
|
||||
H.update_body()
|
||||
if(outfit)
|
||||
var/static/list/slots = list("uniform", "r_hand", "l_hand", "suit", "shoes", "gloves", "ears", "glasses", "mask", "head", "belt", "r_pocket", "l_pocket", "back", "id", "neck", "backpack_contents", "suit_store")
|
||||
for(var/slot in slots)
|
||||
|
||||
@@ -259,9 +259,19 @@ GLOBAL_VAR_INIT(normal_ooc_colour, OOC_COLOR)
|
||||
set category = "OOC"
|
||||
set desc ="Ignore a player's messages on the OOC channel"
|
||||
|
||||
var/selection = input("Please, select a player!", "Ignore", null, null) as null|anything in sortKey(GLOB.clients)
|
||||
if(!selection)
|
||||
|
||||
var/see_ghost_names = isobserver(mob)
|
||||
var/list/choices = list()
|
||||
for(var/client/C in GLOB.clients)
|
||||
if(isobserver(C.mob) && see_ghost_names)
|
||||
choices["[C.mob]([C])"] = C
|
||||
else
|
||||
choices[C] = C
|
||||
choices = sortList(choices)
|
||||
var/selection = input("Please, select a player!", "Ignore", null, null) as null|anything in choices
|
||||
if(!selection || !(selection in choices))
|
||||
return
|
||||
selection = choices[selection]
|
||||
if(selection == src)
|
||||
to_chat(src, "You can't ignore yourself.")
|
||||
return
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
name = "Meteor Wave: Normal"
|
||||
typepath = /datum/round_event/meteor_wave
|
||||
weight = 4
|
||||
min_players = 5
|
||||
min_players = 15
|
||||
max_occurrences = 3
|
||||
earliest_start = 25 MINUTES
|
||||
|
||||
/datum/round_event/meteor_wave
|
||||
startWhen = 6
|
||||
@@ -54,9 +55,10 @@
|
||||
/datum/round_event_control/meteor_wave/threatening
|
||||
name = "Meteor Wave: Threatening"
|
||||
typepath = /datum/round_event/meteor_wave/threatening
|
||||
weight = 2
|
||||
min_players = 5
|
||||
weight = 5
|
||||
min_players = 20
|
||||
max_occurrences = 3
|
||||
earliest_start = 35 MINUTES
|
||||
|
||||
/datum/round_event/meteor_wave/threatening
|
||||
wave_name = "threatening"
|
||||
@@ -64,9 +66,10 @@
|
||||
/datum/round_event_control/meteor_wave/catastrophic
|
||||
name = "Meteor Wave: Catastrophic"
|
||||
typepath = /datum/round_event/meteor_wave/catastrophic
|
||||
weight = 1
|
||||
min_players = 5
|
||||
weight = 7
|
||||
min_players = 25
|
||||
max_occurrences = 3
|
||||
earliest_start = 45 MINUTES
|
||||
|
||||
/datum/round_event/meteor_wave/catastrophic
|
||||
wave_name = "catastrophic"
|
||||
|
||||
@@ -194,6 +194,7 @@
|
||||
break
|
||||
if(O.name == params["name"])
|
||||
O.forceMove(drop_location())
|
||||
adjust_item_drop_location(O)
|
||||
desired--
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -75,24 +75,54 @@
|
||||
/datum/emote/living/carbon/human/wag/run_emote(mob/user, params)
|
||||
. = ..()
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(.)
|
||||
if(!H.is_wagging_tail())
|
||||
H.startTailWag()
|
||||
else
|
||||
H.endTailWag()
|
||||
|
||||
/mob/living/carbon/human/proc/is_wagging_tail()
|
||||
return (dna && dna.species && ("waggingtail_lizard" in dna.species.mutant_bodyparts || "waggingtail_human" in dna.species.mutant_bodyparts))
|
||||
|
||||
/datum/emote/living/carbon/human/wag/can_run_emote(mob/user, status_check = TRUE)
|
||||
if(!..())
|
||||
return FALSE
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.dna && H.dna.species && ((H.dna.features["tail_lizard"] != "None") || (H.dna.features["tail_human"] != "None") || ("mam_tail" in H.dna.species.mutant_bodyparts)))
|
||||
if(H.dna && H.dna.species && (("tail_lizard" in H.dna.species.mutant_bodyparts) || ("waggingtail_lizard" in H.dna.species.mutant_bodyparts) || (H.dna.features["tail_human"] != "None")))
|
||||
return TRUE
|
||||
|
||||
/datum/emote/living/carbon/human/wag/select_message_type(mob/user)
|
||||
. = ..()
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(("waggingtail_lizard" in H.dna.species.mutant_bodyparts) || ("waggingtail_human" in H.dna.species.mutant_bodyparts) || ("mam_waggingtail" in H.dna.species.mutant_bodyparts))
|
||||
if(("waggingtail_lizard" in H.dna.species.mutant_bodyparts) || ("waggingtail_human" in H.dna.species.mutant_bodyparts))
|
||||
. = null
|
||||
|
||||
//Don't know where else to put this, it's basically an emote
|
||||
/mob/living/carbon/human/proc/startTailWag()
|
||||
if(!dna || !dna.species)
|
||||
return
|
||||
if("tail_lizard" in dna.species.mutant_bodyparts)
|
||||
dna.species.mutant_bodyparts -= "tail_lizard"
|
||||
dna.species.mutant_bodyparts -= "spines"
|
||||
dna.species.mutant_bodyparts |= "waggingtail_lizard"
|
||||
dna.species.mutant_bodyparts |= "waggingspines"
|
||||
if("tail_human" in dna.species.mutant_bodyparts)
|
||||
dna.species.mutant_bodyparts -= "tail_human"
|
||||
dna.species.mutant_bodyparts |= "waggingtail_human"
|
||||
update_body()
|
||||
|
||||
/mob/living/carbon/human/proc/endTailWag()
|
||||
if(!dna || !dna.species)
|
||||
return
|
||||
if("waggingtail_lizard" in dna.species.mutant_bodyparts)
|
||||
dna.species.mutant_bodyparts -= "waggingtail_lizard"
|
||||
dna.species.mutant_bodyparts -= "waggingspines"
|
||||
dna.species.mutant_bodyparts |= "tail_lizard"
|
||||
dna.species.mutant_bodyparts |= "spines"
|
||||
if("waggingtail_human" in dna.species.mutant_bodyparts)
|
||||
dna.species.mutant_bodyparts -= "waggingtail_human"
|
||||
dna.species.mutant_bodyparts |= "tail_human"
|
||||
update_body()
|
||||
|
||||
/datum/emote/living/carbon/human/wing
|
||||
key = "wing"
|
||||
key_third_person = "wings"
|
||||
@@ -121,41 +151,7 @@
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.dna && H.dna.species && (H.dna.features["wings"] != "None"))
|
||||
return TRUE
|
||||
|
||||
//Don't know where else to put this, it's basically an emote
|
||||
/mob/living/carbon/human/proc/startTailWag()
|
||||
if(!dna || !dna.species)
|
||||
return
|
||||
if("tail_lizard" in dna.species.mutant_bodyparts)
|
||||
dna.species.mutant_bodyparts -= "tail_lizard"
|
||||
dna.species.mutant_bodyparts -= "spines"
|
||||
dna.species.mutant_bodyparts |= "waggingtail_lizard"
|
||||
dna.species.mutant_bodyparts |= "waggingspines"
|
||||
if("tail_human" in dna.species.mutant_bodyparts)
|
||||
dna.species.mutant_bodyparts -= "tail_human"
|
||||
dna.species.mutant_bodyparts |= "waggingtail_human"
|
||||
if("mam_tail" in dna.species.mutant_bodyparts)
|
||||
dna.species.mutant_bodyparts -= "mam_tail"
|
||||
dna.species.mutant_bodyparts |= "mam_waggingtail"
|
||||
update_body()
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/endTailWag()
|
||||
if(!dna || !dna.species)
|
||||
return
|
||||
if("waggingtail_lizard" in dna.species.mutant_bodyparts)
|
||||
dna.species.mutant_bodyparts -= "waggingtail_lizard"
|
||||
dna.species.mutant_bodyparts -= "waggingspines"
|
||||
dna.species.mutant_bodyparts |= "tail_lizard"
|
||||
dna.species.mutant_bodyparts |= "spines"
|
||||
if("waggingtail_human" in dna.species.mutant_bodyparts)
|
||||
dna.species.mutant_bodyparts -= "waggingtail_human"
|
||||
dna.species.mutant_bodyparts |= "tail_human"
|
||||
if("mam_waggingtail" in dna.species.mutant_bodyparts)
|
||||
dna.species.mutant_bodyparts -= "mam_waggingtail"
|
||||
dna.species.mutant_bodyparts |= "mam_tail"
|
||||
update_body()
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/OpenWings()
|
||||
if(!dna || !dna.species)
|
||||
return
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
limbs_id = "golem"
|
||||
fixed_mut_color = "aaa"
|
||||
var/info_text = "As an <span class='danger'>Iron Golem</span>, you don't have any special traits."
|
||||
var/random_eligible = TRUE //If false, the golem subtype can't be made through golem mutation toxin
|
||||
|
||||
var/prefix = "Iron"
|
||||
var/list/special_names
|
||||
@@ -44,11 +45,20 @@
|
||||
name = "Random Golem"
|
||||
blacklisted = FALSE
|
||||
dangerous_existence = FALSE
|
||||
var/static/list/random_golem_types
|
||||
|
||||
/datum/species/golem/random/on_species_gain(mob/living/carbon/C, datum/species/old_species)
|
||||
..()
|
||||
var/list/golem_types = typesof(/datum/species/golem) - src.type
|
||||
var/datum/species/golem/golem_type = pick(golem_types)
|
||||
if(!random_golem_types)
|
||||
random_golem_types = subtypesof(/datum/species/golem) - type
|
||||
for(var/V in random_golem_types)
|
||||
var/datum/species/golem/G = V
|
||||
if(!initial(G.random_eligible))
|
||||
random_golem_types -= G
|
||||
to_chat(world, "Excluding golem type [initial(G.id)]")
|
||||
else
|
||||
to_chat(world, "Allowing golem type [initial(G.id)]")
|
||||
var/datum/species/golem/golem_type = pick(random_golem_types)
|
||||
var/mob/living/carbon/human/H = C
|
||||
H.set_species(golem_type)
|
||||
to_chat(H, "[initial(golem_type.info_text)]")
|
||||
@@ -596,7 +606,7 @@
|
||||
info_text = "<span class='bold alloy'>As a </span><span class='bold brass'>clockwork golem</span><span class='bold alloy'>, you are faster than \
|
||||
other types of golem (being a machine), and are immune to electric shocks.</span>"
|
||||
species_traits = list(NO_UNDERWEAR, NOTRANSSTING, NOBREATH, NOZOMBIE, VIRUSIMMUNE, RADIMMUNE, NOBLOOD, RESISTCOLD, RESISTPRESSURE, PIERCEIMMUNE)
|
||||
armor = 40 //Reinforced, but also slim to allow for fast movement
|
||||
armor = 20 //Reinforced, but much less so to allow for fast movement
|
||||
attack_verb = "smash"
|
||||
attack_sound = 'sound/magic/clockwork/anima_fragment_attack.ogg'
|
||||
sexes = FALSE
|
||||
@@ -638,7 +648,8 @@
|
||||
has_corpse = TRUE
|
||||
blacklisted = TRUE
|
||||
dangerous_existence = TRUE
|
||||
|
||||
random_eligible = FALSE
|
||||
|
||||
/datum/species/golem/cloth
|
||||
name = "Cloth Golem"
|
||||
id = "cloth golem"
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
name = "Syndicate Operative"
|
||||
id_job = "Operative"
|
||||
id_access_list = list(ACCESS_SYNDICATE)
|
||||
hair_style = "Bald"
|
||||
facial_hair_style = "Shaved"
|
||||
outfit = /datum/outfit/syndicatesoldiercorpse
|
||||
|
||||
/datum/outfit/syndicatesoldiercorpse
|
||||
@@ -31,6 +33,8 @@
|
||||
name = "Syndicate Commando"
|
||||
id_job = "Operative"
|
||||
id_access_list = list(ACCESS_SYNDICATE)
|
||||
hair_style = "Bald"
|
||||
facial_hair_style = "Shaved"
|
||||
outfit = /datum/outfit/syndicatecommandocorpse
|
||||
|
||||
/datum/outfit/syndicatecommandocorpse
|
||||
@@ -50,6 +54,8 @@
|
||||
name = "Syndicate Stormtrooper"
|
||||
id_job = "Operative"
|
||||
id_access_list = list(ACCESS_SYNDICATE)
|
||||
hair_style = "Bald"
|
||||
facial_hair_style = "Shaved"
|
||||
outfit = /datum/outfit/syndicatestormtroopercorpse
|
||||
|
||||
/datum/outfit/syndicatestormtroopercorpse
|
||||
@@ -67,11 +73,16 @@
|
||||
/obj/effect/mob_spawn/human/clown/corpse
|
||||
roundstart = FALSE
|
||||
instant = TRUE
|
||||
|
||||
skin_tone = "caucasian1"
|
||||
hair_style = "Bald"
|
||||
facial_hair_style = "Shaved"
|
||||
|
||||
/obj/effect/mob_spawn/human/corpse/pirate
|
||||
name = "Pirate"
|
||||
skin_tone = "Caucasian1" //all pirates are white because it's easier that way
|
||||
outfit = /datum/outfit/piratecorpse
|
||||
hair_style = "Bald"
|
||||
facial_hair_style = "Shaved"
|
||||
|
||||
/datum/outfit/piratecorpse
|
||||
name = "Pirate Corpse"
|
||||
@@ -94,12 +105,17 @@
|
||||
/obj/effect/mob_spawn/human/corpse/russian
|
||||
name = "Russian"
|
||||
outfit = /datum/outfit/russiancorpse
|
||||
hair_style = "Bald"
|
||||
facial_hair_style = "Shaved"
|
||||
|
||||
/datum/outfit/russiancorpse
|
||||
name = "Russian Corpse"
|
||||
uniform = /obj/item/clothing/under/soviet
|
||||
shoes = /obj/item/clothing/shoes/jackboots
|
||||
head = /obj/item/clothing/head/bearpelt
|
||||
gloves = /obj/item/clothing/gloves/color/black
|
||||
mask = /obj/item/clothing/mask/gas
|
||||
|
||||
|
||||
|
||||
/obj/effect/mob_spawn/human/corpse/russian/ranged
|
||||
@@ -109,6 +125,7 @@
|
||||
name = "Ranged Russian Corpse"
|
||||
head = /obj/item/clothing/head/ushanka
|
||||
|
||||
|
||||
/obj/effect/mob_spawn/human/corpse/russian/ranged/trooper
|
||||
outfit = /datum/outfit/russiancorpse/ranged/trooper
|
||||
|
||||
@@ -119,8 +136,8 @@
|
||||
shoes = /obj/item/clothing/shoes/combat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
ears = /obj/item/device/radio/headset
|
||||
mask = /obj/item/clothing/mask/balaclava
|
||||
head = /obj/item/clothing/head/helmet/alt
|
||||
mask = /obj/item/clothing/mask/balaclava
|
||||
|
||||
|
||||
/obj/effect/mob_spawn/human/corpse/russian/ranged/officer
|
||||
@@ -131,7 +148,7 @@
|
||||
name = "Russian Officer Corpse"
|
||||
uniform = /obj/item/clothing/under/rank/security/navyblue/russian
|
||||
suit = /obj/item/clothing/suit/security/officer/russian
|
||||
shoes = /obj/item/clothing/shoes/laceup
|
||||
shoes = /obj/item/clothing/shoes/combat
|
||||
ears = /obj/item/device/radio/headset
|
||||
head = /obj/item/clothing/head/ushanka
|
||||
|
||||
@@ -139,6 +156,9 @@
|
||||
/obj/effect/mob_spawn/human/corpse/wizard
|
||||
name = "Space Wizard Corpse"
|
||||
outfit = /datum/outfit/wizardcorpse
|
||||
hair_style = "Bald"
|
||||
facial_hair_style = "Long Beard"
|
||||
skin_tone = "Caucasian1"
|
||||
|
||||
/datum/outfit/wizardcorpse
|
||||
name = "Space Wizard Corpse"
|
||||
@@ -153,6 +173,8 @@
|
||||
id_job = "Private Security Force"
|
||||
id_access = "Security Officer"
|
||||
outfit = /datum/outfit/nanotrasensoldiercorpse2
|
||||
hair_style = "Bald"
|
||||
facial_hair_style = "Shaved"
|
||||
|
||||
/datum/outfit/nanotrasensoldiercorpse2
|
||||
name = "NT Private Security Officer Corpse"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
environment_smash = ENVIRONMENT_SMASH_NONE
|
||||
del_on_death = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/nanotrasenpeace
|
||||
/mob/living/simple_animal/hostile/retaliate/nanotrasenpeace //this should be in a different file
|
||||
name = "Nanotrasen Private Security Officer"
|
||||
desc = "An officer part of Nanotrasen's private security force."
|
||||
icon = 'icons/mob/simple_human.dmi'
|
||||
|
||||
@@ -45,8 +45,6 @@
|
||||
sight = SEE_SELF|SEE_MOBS|SEE_OBJS|SEE_TURFS
|
||||
anchored = TRUE
|
||||
|
||||
gold_core_spawnable = 1
|
||||
|
||||
var/cannot_be_seen = 1
|
||||
var/mob/living/creator = null
|
||||
|
||||
|
||||
@@ -62,11 +62,13 @@
|
||||
/obj/machinery/chem_master/attackby(obj/item/I, mob/user, params)
|
||||
if(default_deconstruction_screwdriver(user, "mixer0_nopower", "mixer0", I))
|
||||
if(beaker)
|
||||
beaker.loc = src.loc
|
||||
beaker.forceMove(drop_location())
|
||||
adjust_item_drop_location(beaker)
|
||||
beaker = null
|
||||
reagents.clear_reagents()
|
||||
if(bottle)
|
||||
bottle.loc = src.loc
|
||||
bottle.forceMove(drop_location())
|
||||
adjust_item_drop_location(bottle)
|
||||
bottle = null
|
||||
return
|
||||
|
||||
@@ -153,7 +155,8 @@
|
||||
switch(action)
|
||||
if("eject")
|
||||
if(beaker)
|
||||
beaker.loc = src.loc
|
||||
beaker.forceMove(drop_location())
|
||||
adjust_item_drop_location(beaker)
|
||||
beaker = null
|
||||
reagents.clear_reagents()
|
||||
icon_state = "mixer0"
|
||||
@@ -161,7 +164,8 @@
|
||||
|
||||
if("ejectp")
|
||||
if(bottle)
|
||||
bottle.loc = src.loc
|
||||
bottle.forceMove(drop_location())
|
||||
adjust_item_drop_location(bottle)
|
||||
bottle = null
|
||||
. = TRUE
|
||||
|
||||
@@ -214,16 +218,15 @@
|
||||
if(bottle && bottle.contents.len < bottle.storage_slots)
|
||||
P = new/obj/item/reagent_containers/pill(bottle)
|
||||
else
|
||||
P = new/obj/item/reagent_containers/pill(src.loc)
|
||||
P = new/obj/item/reagent_containers/pill(drop_location())
|
||||
P.name = trim("[name] pill")
|
||||
P.pixel_x = rand(-7, 7) //random position
|
||||
P.pixel_y = rand(-7, 7)
|
||||
adjust_item_drop_location(P)
|
||||
reagents.trans_to(P,vol_each)
|
||||
else
|
||||
var/name = stripped_input(usr, "Name:", "Name your pack!", reagents.get_master_reagent_name(), MAX_NAME_LEN)
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, be_close=TRUE))
|
||||
return
|
||||
var/obj/item/reagent_containers/food/condiment/pack/P = new/obj/item/reagent_containers/food/condiment/pack(src.loc)
|
||||
var/obj/item/reagent_containers/food/condiment/pack/P = new/obj/item/reagent_containers/food/condiment/pack(drop_location())
|
||||
|
||||
P.originalname = name
|
||||
P.name = trim("[name] pack")
|
||||
@@ -248,10 +251,9 @@
|
||||
var/obj/item/reagent_containers/pill/P
|
||||
|
||||
for(var/i = 0; i < amount; i++)
|
||||
P = new/obj/item/reagent_containers/pill/patch(src.loc)
|
||||
P = new/obj/item/reagent_containers/pill/patch(drop_location())
|
||||
P.name = trim("[name] patch")
|
||||
P.pixel_x = rand(-7, 7) //random position
|
||||
P.pixel_y = rand(-7, 7)
|
||||
adjust_item_drop_location(P)
|
||||
reagents.trans_to(P,vol_each)
|
||||
. = TRUE
|
||||
|
||||
@@ -264,7 +266,7 @@
|
||||
var/name = stripped_input(usr, "Name:","Name your bottle!", (reagents.total_volume ? reagents.get_master_reagent_name() : " "), MAX_NAME_LEN)
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, be_close=TRUE))
|
||||
return
|
||||
var/obj/item/reagent_containers/food/condiment/P = new(src.loc)
|
||||
var/obj/item/reagent_containers/food/condiment/P = new(drop_location())
|
||||
P.originalname = name
|
||||
P.name = trim("[name] bottle")
|
||||
reagents.trans_to(P, P.volume)
|
||||
@@ -280,15 +282,15 @@
|
||||
|
||||
var/obj/item/reagent_containers/glass/bottle/P
|
||||
for(var/i = 0; i < amount_full; i++)
|
||||
P = new/obj/item/reagent_containers/glass/bottle(src.loc)
|
||||
P.pixel_x = rand(-7, 7) //random position
|
||||
P.pixel_y = rand(-7, 7)
|
||||
P = new/obj/item/reagent_containers/glass/bottle(drop_location())
|
||||
P.name = trim("[name] bottle")
|
||||
adjust_item_drop_location(P)
|
||||
reagents.trans_to(P, 30)
|
||||
|
||||
if(vol_part)
|
||||
P = new/obj/item/reagent_containers/glass/bottle(src.loc)
|
||||
P = new/obj/item/reagent_containers/glass/bottle(drop_location())
|
||||
P.name = trim("[name] bottle")
|
||||
adjust_item_drop_location(P)
|
||||
reagents.trans_to(P, vol_part)
|
||||
. = TRUE
|
||||
|
||||
@@ -328,6 +330,29 @@
|
||||
return 0
|
||||
|
||||
|
||||
/obj/machinery/chem_master/adjust_item_drop_location(atom/movable/AM) // Special version for chemmasters and condimasters
|
||||
if (AM == beaker)
|
||||
AM.pixel_x = -8
|
||||
AM.pixel_y = 8
|
||||
return null
|
||||
else if (AM == bottle)
|
||||
if (length(bottle.contents))
|
||||
AM.pixel_x = -13
|
||||
else
|
||||
AM.pixel_x = -7
|
||||
AM.pixel_y = -8
|
||||
return null
|
||||
else
|
||||
var/md5 = md5(AM.name)
|
||||
#if DM_VERSION > 511
|
||||
#warn Refactor the loop in /obj/machinery/chem_master/adjust_item_drop_location() to make use of 512's list-like access to characters in a string
|
||||
#endif
|
||||
for (var/i in 1 to 32)
|
||||
. += hex2num(copytext(md5,i,i+1))
|
||||
. = . % 9
|
||||
AM.pixel_x = ((.%3)*6)
|
||||
AM.pixel_y = -8 + (round( . / 3)*8)
|
||||
|
||||
/obj/machinery/chem_master/condimaster
|
||||
name = "CondiMaster 3000"
|
||||
desc = "Used to create condiments and other cooking supplies."
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
/obj/machinery/smoke_machine/attackby(obj/item/I, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(I, /obj/item/reagent_containers))
|
||||
if(istype(I, /obj/item/reagent_containers) && I.is_open_container())
|
||||
var/obj/item/reagent_containers/RC = I
|
||||
var/units = RC.reagents.trans_to(src, RC.amount_per_transfer_from_this)
|
||||
if(units)
|
||||
|
||||
@@ -124,39 +124,37 @@
|
||||
cut_overlays()
|
||||
. = ..()
|
||||
if(dropped) //certain overlays only appear when the limb is being detached from its owner.
|
||||
var/datum/sprite_accessory/S
|
||||
|
||||
if(status != BODYPART_ROBOTIC) //having a robotic head hides certain features.
|
||||
//facial hair
|
||||
if(facial_hair_style)
|
||||
S = GLOB.facial_hair_styles_list[facial_hair_style]
|
||||
var/datum/sprite_accessory/S = GLOB.facial_hair_styles_list[facial_hair_style]
|
||||
if(S)
|
||||
var/image/facial_overlay = image(S.icon, "[S.icon_state]", -HAIR_LAYER, SOUTH)
|
||||
facial_overlay.color = "#" + facial_hair_color
|
||||
facial_overlay.alpha = hair_alpha
|
||||
. += facial_overlay
|
||||
|
||||
var/image/hair_overlay = image(layer = -HAIR_LAYER, dir = SOUTH)
|
||||
. += hair_overlay
|
||||
//Applies the debrained overlay if there is no brain
|
||||
if(!brain)
|
||||
var/image/debrain_overlay = image(layer = -HAIR_LAYER, dir = SOUTH)
|
||||
if(animal_origin == ALIEN_BODYPART)
|
||||
hair_overlay.icon = 'icons/mob/animal_parts.dmi'
|
||||
hair_overlay.icon_state = "debrained_alien"
|
||||
debrain_overlay.icon = 'icons/mob/animal_parts.dmi'
|
||||
debrain_overlay.icon_state = "debrained_alien"
|
||||
else if(animal_origin == LARVA_BODYPART)
|
||||
hair_overlay.icon = 'icons/mob/animal_parts.dmi'
|
||||
hair_overlay.icon_state = "debrained_larva"
|
||||
debrain_overlay.icon = 'icons/mob/animal_parts.dmi'
|
||||
debrain_overlay.icon_state = "debrained_larva"
|
||||
else if(!(NOBLOOD in species_flags_list))
|
||||
hair_overlay.icon = 'icons/mob/human_face.dmi'
|
||||
hair_overlay.icon_state = "debrained"
|
||||
debrain_overlay.icon = 'icons/mob/human_face.dmi'
|
||||
debrain_overlay.icon_state = "debrained"
|
||||
. += debrain_overlay
|
||||
else
|
||||
if(hair_style)
|
||||
S = GLOB.hair_styles_list[hair_style]
|
||||
if(S)
|
||||
hair_overlay.icon = icon
|
||||
hair_overlay.icon_state = "[S.icon_state]"
|
||||
hair_overlay.color = "#" + hair_color
|
||||
hair_overlay.alpha = hair_alpha
|
||||
var/datum/sprite_accessory/S2 = GLOB.hair_styles_list[hair_style]
|
||||
if(S2)
|
||||
var/image/hair_overlay = image(S2.icon, "[S2.icon_state]", -HAIR_LAYER, SOUTH)
|
||||
hair_overlay.color = "#" + hair_color
|
||||
hair_overlay.alpha = hair_alpha
|
||||
. += hair_overlay
|
||||
|
||||
|
||||
// lipstick
|
||||
|
||||
Reference in New Issue
Block a user