mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-11 15:15:32 +01:00
Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into nanocrusade-two
This commit is contained in:
@@ -277,6 +277,13 @@ var/global/floorIsLava = 0
|
||||
var/dat = "<html><head><title>Info on [key]</title></head>"
|
||||
dat += "<body>"
|
||||
|
||||
var/p_age = "unknown"
|
||||
for(var/client/C in clients)
|
||||
if(C.ckey == key)
|
||||
p_age = C.player_age
|
||||
break
|
||||
dat +="<span style='color:#000000; font-weight: bold'>Player age: [p_age]</span><br>"
|
||||
|
||||
var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav")
|
||||
var/list/infos
|
||||
info >> infos
|
||||
@@ -747,20 +754,43 @@ var/global/floorIsLava = 0
|
||||
set category = "Server"
|
||||
set desc="Globally Toggles OOC"
|
||||
set name="Toggle OOC"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.ooc_allowed = !(config.ooc_allowed)
|
||||
if (config.ooc_allowed)
|
||||
world << "<B>The OOC channel has been globally enabled!</B>"
|
||||
else
|
||||
world << "<B>The OOC channel has been globally disabled!</B>"
|
||||
log_admin("[key_name(usr)] toggled OOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled OOC.", 1)
|
||||
log_and_message_admins("toggled OOC.")
|
||||
feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/togglelooc()
|
||||
set category = "Server"
|
||||
set desc="Globally Toggles LOOC"
|
||||
set name="Toggle LOOC"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.looc_allowed = !(config.looc_allowed)
|
||||
if (config.looc_allowed)
|
||||
world << "<B>The LOOC channel has been globally enabled!</B>"
|
||||
else
|
||||
world << "<B>The LOOC channel has been globally disabled!</B>"
|
||||
log_and_message_admins("toggled LOOC.")
|
||||
feedback_add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/datum/admins/proc/toggledsay()
|
||||
set category = "Server"
|
||||
set desc="Globally Toggles DSAY"
|
||||
set name="Toggle DSAY"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.dsay_allowed = !(config.dsay_allowed)
|
||||
if (config.dsay_allowed)
|
||||
world << "<B>Deadchat has been globally enabled!</B>"
|
||||
@@ -774,6 +804,10 @@ var/global/floorIsLava = 0
|
||||
set category = "Server"
|
||||
set desc="Toggle Dead OOC."
|
||||
set name="Toggle Dead OOC"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.dooc_allowed = !( config.dooc_allowed )
|
||||
log_admin("[key_name(usr)] toggled Dead OOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled Dead OOC.", 1)
|
||||
@@ -976,6 +1010,46 @@ var/global/floorIsLava = 0
|
||||
var/datum/seed/S = plant_controller.seeds[seedtype]
|
||||
S.harvest(usr,0,0,1)
|
||||
|
||||
/datum/admins/proc/spawn_custom_item()
|
||||
set category = "Debug"
|
||||
set desc = "Spawn a custom item."
|
||||
set name = "Spawn Custom Item"
|
||||
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/owner = input("Select a ckey.", "Spawn Custom Item") as null|anything in custom_items
|
||||
if(!owner|| !custom_items[owner])
|
||||
return
|
||||
|
||||
var/list/possible_items = custom_items[owner]
|
||||
var/datum/custom_item/item_to_spawn = input("Select an item to spawn.", "Spawn Custom Item") as null|anything in possible_items
|
||||
if(!item_to_spawn)
|
||||
return
|
||||
|
||||
item_to_spawn.spawn_item(get_turf(usr))
|
||||
|
||||
/datum/admins/proc/check_custom_items()
|
||||
|
||||
set category = "Debug"
|
||||
set desc = "Check the custom item list."
|
||||
set name = "Check Custom Items"
|
||||
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
if(!custom_items)
|
||||
usr << "Custom item list is null."
|
||||
return
|
||||
|
||||
if(!custom_items.len)
|
||||
usr << "Custom item list not populated."
|
||||
return
|
||||
|
||||
for(var/assoc_key in custom_items)
|
||||
usr << "[assoc_key] has:"
|
||||
var/list/current_items = custom_items[assoc_key]
|
||||
for(var/datum/custom_item/item in current_items)
|
||||
usr << "- name: [item.name] icon: [item.item_icon] path: [item.item_path] desc: [item.item_desc]"
|
||||
|
||||
/datum/admins/proc/spawn_plant()
|
||||
set category = "Debug"
|
||||
set desc = "Spawn a spreading plant effect."
|
||||
|
||||
@@ -58,6 +58,7 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/investigate_show, /*various admintools for investigation. Such as a singulo grief-log*/
|
||||
/client/proc/secrets,
|
||||
/datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/
|
||||
/datum/admins/proc/togglelooc, /*toggles looc on/off for everyone*/
|
||||
/datum/admins/proc/toggleoocdead, /*toggles ooc on/off for everyone who is dead*/
|
||||
/datum/admins/proc/toggledsay, /*toggles dsay on/off for everyone*/
|
||||
/client/proc/game_panel, /*game panel, allows to change game-mode etc*/
|
||||
@@ -109,10 +110,13 @@ var/list/admin_verbs_fun = list(
|
||||
/client/proc/cmd_admin_add_random_ai_law,
|
||||
/client/proc/make_sound,
|
||||
/client/proc/toggle_random_events,
|
||||
/client/proc/editappear
|
||||
/client/proc/editappear,
|
||||
/client/proc/roll_dices
|
||||
)
|
||||
var/list/admin_verbs_spawn = list(
|
||||
/datum/admins/proc/spawn_fruit,
|
||||
/datum/admins/proc/spawn_custom_item,
|
||||
/datum/admins/proc/check_custom_items,
|
||||
/datum/admins/proc/spawn_plant,
|
||||
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
|
||||
/client/proc/respawn_character,
|
||||
@@ -254,6 +258,7 @@ var/list/admin_verbs_hideable = list(
|
||||
/client/proc/cmd_debug_tog_aliens,
|
||||
/client/proc/air_report,
|
||||
/client/proc/enable_debug_verbs,
|
||||
/client/proc/roll_dices,
|
||||
/proc/possess,
|
||||
/proc/release
|
||||
)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
display_name = holder.fakekey
|
||||
|
||||
for(var/mob/M in mob_list)
|
||||
if((M.mind && M.mind.special_role && M.client) || (M.client && M.client.holder))
|
||||
if((M.mind && M.mind.special_role && M.client) || check_rights(R_ADMIN, 0, M))
|
||||
M << "<font color='#960018'><span class='ooc'>" + create_text_tag("aooc", "Antag-OOC:", M.client) + " <EM>[display_name]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
|
||||
log_ooc("(ANTAG) [key] : [msg]")
|
||||
@@ -1,12 +1,17 @@
|
||||
/client/proc/cinematic(var/cinematic as anything in list("explosion",null))
|
||||
set name = "cinematic"
|
||||
set name = "Cinematic"
|
||||
set category = "Fun"
|
||||
set desc = "Shows a cinematic." // Intended for testing but I thought it might be nice for events on the rare occasion Feel free to comment it out if it's not wanted.
|
||||
set hidden = 1
|
||||
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
if(alert("Are you sure you want to run [cinematic]?","Confirmation","Yes","No")=="No") return
|
||||
if(!ticker) return
|
||||
switch(cinematic)
|
||||
if("explosion")
|
||||
if(alert("The game will be over. Are you really sure?", "Confirmation" ,"Continue", "Cancel") == "Cancel")
|
||||
return
|
||||
var/parameter = input(src,"station_missed = ?","Enter Parameter",0) as num
|
||||
var/override
|
||||
switch(parameter)
|
||||
@@ -15,4 +20,8 @@
|
||||
if(0)
|
||||
override = input(src,"mode = ?","Enter Parameter",null) as anything in list("blob","mercenary","AI malfunction","no override")
|
||||
ticker.station_explosion_cinematic(parameter,override)
|
||||
|
||||
log_admin("[key_name(src)] launched cinematic \"[cinematic]\"")
|
||||
message_admins("[key_name_admin(src)] launched cinematic \"[cinematic]\"", 1)
|
||||
|
||||
return
|
||||
@@ -525,6 +525,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
//log_admin("[key_name(src)] has alienized [M.key].")
|
||||
var/list/dresspacks = list(
|
||||
"strip",
|
||||
"job",
|
||||
"standard space gear",
|
||||
"tournament standard red",
|
||||
"tournament standard green",
|
||||
@@ -555,10 +556,25 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
for (var/obj/item/I in M)
|
||||
if (istype(I, /obj/item/weapon/implant))
|
||||
continue
|
||||
qdel(I)
|
||||
M.drop_from_inventory(I)
|
||||
if(I.loc != M)
|
||||
qdel(I)
|
||||
switch(dresscode)
|
||||
if ("strip")
|
||||
//do nothing
|
||||
if ("job")
|
||||
var/selected_job = input("Select job", "Robust quick dress shop") as null|anything in joblist
|
||||
if (isnull(selected_job))
|
||||
return
|
||||
|
||||
var/datum/job/job = job_master.GetJob(selected_job)
|
||||
if(!job)
|
||||
return
|
||||
|
||||
job.equip(M)
|
||||
job.apply_fingerprints(M)
|
||||
job_master.spawnId(M, selected_job)
|
||||
|
||||
if ("standard space gear")
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/client/proc/roll_dices()
|
||||
set category = "Fun"
|
||||
set name = "Roll Dice"
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
var/sum = input("How many times should we throw?") as num
|
||||
var/side = input("Select the number of sides.") as num
|
||||
if(!side)
|
||||
side = 6
|
||||
if(!sum)
|
||||
sum = 2
|
||||
|
||||
var/dice = num2text(sum) + "d" + num2text(side)
|
||||
|
||||
if(alert("Do you want to inform the world about your game?",,"Yes", "No") == "Yes")
|
||||
world << "<h2 style=\"color:#A50400\">The dice have been rolled by Gods!</h2>"
|
||||
|
||||
var/result = roll(dice)
|
||||
|
||||
if(alert("Do you want to inform the world about the result?",,"Yes", "No") == "Yes")
|
||||
world << "<h2 style=\"color:#A50400\">Gods rolled [dice], result is [result]</h2>"
|
||||
|
||||
message_admins("[key_name_admin(src)] rolled dice [dice], result is [result]", 1)
|
||||
@@ -208,8 +208,8 @@
|
||||
O.vars[variable]) as num|null
|
||||
if(new_value == null) return
|
||||
|
||||
if(variable=="luminosity")
|
||||
O.SetLuminosity(new_value)
|
||||
if(variable=="light_range")
|
||||
O.set_light(new_value)
|
||||
else
|
||||
O.vars[variable] = new_value
|
||||
|
||||
@@ -217,24 +217,24 @@
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
if(variable=="luminosity")
|
||||
M.SetLuminosity(new_value)
|
||||
if(variable=="light_range")
|
||||
M.set_light(new_value)
|
||||
else
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if ( istype(A , O.type) )
|
||||
if(variable=="luminosity")
|
||||
A.SetLuminosity(new_value)
|
||||
if(variable=="light_range")
|
||||
A.set_light(new_value)
|
||||
else
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if ( istype(A , O.type) )
|
||||
if(variable=="luminosity")
|
||||
A.SetLuminosity(new_value)
|
||||
if(variable=="light_range")
|
||||
A.set_light(new_value)
|
||||
else
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -242,24 +242,24 @@
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if (M.type == O.type)
|
||||
if(variable=="luminosity")
|
||||
M.SetLuminosity(new_value)
|
||||
if(variable=="light_range")
|
||||
M.set_light(new_value)
|
||||
else
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if (A.type == O.type)
|
||||
if(variable=="luminosity")
|
||||
A.SetLuminosity(new_value)
|
||||
if(variable=="light_range")
|
||||
A.set_light(new_value)
|
||||
else
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if (A.type == O.type)
|
||||
if(variable=="luminosity")
|
||||
A.SetLuminosity(new_value)
|
||||
if(variable=="light_range")
|
||||
A.set_light(new_value)
|
||||
else
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -372,4 +372,4 @@
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
log_admin("[key_name(src)] mass modified [original_name]'s [variable] to [O.vars[variable]]")
|
||||
message_admins("[key_name_admin(src)] mass modified [original_name]'s [variable] to [O.vars[variable]]", 1)
|
||||
message_admins("[key_name_admin(src)] mass modified [original_name]'s [variable] to [O.vars[variable]]", 1)
|
||||
|
||||
@@ -455,10 +455,10 @@ var/list/forbidden_varedit_object_types = list(
|
||||
O.vars[variable] = var_new
|
||||
|
||||
if("num")
|
||||
if(variable=="luminosity")
|
||||
if(variable=="light_range")
|
||||
var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num
|
||||
if(var_new == null) return
|
||||
O.SetLuminosity(var_new)
|
||||
O.set_light(var_new)
|
||||
else if(variable=="stat")
|
||||
var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num
|
||||
if(var_new == null) return
|
||||
|
||||
@@ -4,7 +4,7 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
|
||||
/client/proc/strike_team()
|
||||
set category = "Fun"
|
||||
set name = "Spawn Strike Team"
|
||||
set desc = "Spawns a death squad if you want to run an admin event."
|
||||
set desc = "Spawns a strike team if you want to run an admin event."
|
||||
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
@@ -20,12 +20,12 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
|
||||
|
||||
var/datum/antagonist/deathsquad/team
|
||||
|
||||
var/choice = input(usr, "Select type of strike team:") as null|anything in list("Death Squad", "Mercenaries")
|
||||
var/choice = input(usr, "Select type of strike team:") as null|anything in list("Heavy Asset Protection", "Mercenaries")
|
||||
if(!choice)
|
||||
return
|
||||
|
||||
switch(choice)
|
||||
if("Death Squad")
|
||||
if("Heavy Asset Protection")
|
||||
team = deathsquad
|
||||
if("Mercenaries")
|
||||
team = commandos
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
var/list/sources = new() //List of sources triggering the alarm. Used to determine when the alarm should be cleared.
|
||||
var/list/sources_assoc = new() //Associative list of source triggers. Used to efficiently acquire the alarm source.
|
||||
var/list/cameras //List of cameras that can be switched to, if the player has that capability.
|
||||
var/cache_id //ID for camera cache, changed by invalidateCameraCache().
|
||||
var/area/last_area //The last acquired area, used should origin be lost (for example a destroyed borg containing an alarming camera).
|
||||
var/area/last_name //The last acquired name, used should origin be lost
|
||||
var/area/last_camera_area //The last area in which cameras where fetched, used to see if the camera list should be updated.
|
||||
@@ -74,8 +75,12 @@
|
||||
return last_name
|
||||
|
||||
/datum/alarm/proc/cameras()
|
||||
// reset camera cache
|
||||
if(camera_cache_id != cache_id)
|
||||
cameras = null
|
||||
cache_id = camera_cache_id
|
||||
// If the alarm origin has changed area, for example a borg containing an alarming camera, reset the list of cameras
|
||||
if(cameras && (last_camera_area != alarm_area()))
|
||||
else if(cameras && (last_camera_area != alarm_area()))
|
||||
cameras = null
|
||||
|
||||
// The list of cameras is also reset by /proc/invalidateCameraCache()
|
||||
@@ -96,18 +101,17 @@
|
||||
* Assisting procs *
|
||||
******************/
|
||||
/atom/proc/get_alarm_area()
|
||||
var/area/A = get_area(src)
|
||||
return A.master
|
||||
return get_area(src)
|
||||
|
||||
/area/get_alarm_area()
|
||||
return src.master
|
||||
return src
|
||||
|
||||
/atom/proc/get_alarm_name()
|
||||
var/area/A = get_area(src)
|
||||
return A.master.name
|
||||
return A.name
|
||||
|
||||
/area/get_alarm_name()
|
||||
return master.name
|
||||
return name
|
||||
|
||||
/mob/get_alarm_name()
|
||||
return name
|
||||
|
||||
@@ -84,8 +84,7 @@
|
||||
return src
|
||||
|
||||
/turf/get_alarm_origin()
|
||||
var/area/area = get_area(src)
|
||||
return area.master // Very important to get area.master, as dynamic lightning can and will split areas.
|
||||
return get_area(src)
|
||||
|
||||
/datum/alarm_handler/proc/register(var/object, var/procName)
|
||||
listeners[object] = procName
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = ""
|
||||
flags = CONDUCT
|
||||
w_class = 2.0
|
||||
matter = list("metal" = 100)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100)
|
||||
throwforce = 2
|
||||
throw_speed = 3
|
||||
throw_range = 10
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "igniter"
|
||||
desc = "A small electronic device able to ignite combustable substances."
|
||||
icon_state = "igniter"
|
||||
matter = list("metal" = 500, "glass" = 50, "waste" = 10)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
|
||||
origin_tech = "magnets=1"
|
||||
|
||||
secured = 1
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
name = "infrared emitter"
|
||||
desc = "Emits a visible or invisible beam and is triggered when the beam is interrupted."
|
||||
icon_state = "infrared"
|
||||
matter = list("metal" = 1000, "glass" = 500, "waste" = 100)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 500, "waste" = 100)
|
||||
origin_tech = "magnets=2"
|
||||
|
||||
wires = WIRE_PULSE
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "mousetrap"
|
||||
desc = "A handy little spring-loaded trap for catching pesty rodents."
|
||||
icon_state = "mousetrap"
|
||||
matter = list("metal" = 100, "waste" = 10)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100, "waste" = 10)
|
||||
origin_tech = "combat=1"
|
||||
var/armed = 0
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "proximity sensor"
|
||||
desc = "Used for scanning and alerting when someone enters a certain proximity."
|
||||
icon_state = "prox"
|
||||
matter = list("metal" = 800, "glass" = 200, "waste" = 50)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 800, "glass" = 200, "waste" = 50)
|
||||
origin_tech = "magnets=1"
|
||||
|
||||
wires = WIRE_PULSE
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "Used to remotely activate devices."
|
||||
icon_state = "signaller"
|
||||
item_state = "signaler"
|
||||
matter = list("metal" = 1000, "glass" = 200, "waste" = 100)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 200, "waste" = 100)
|
||||
origin_tech = "magnets=1"
|
||||
wires = WIRE_RECEIVE | WIRE_PULSE | WIRE_RADIO_PULSE | WIRE_RADIO_RECEIVE
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "timer"
|
||||
desc = "Used to time things. Works well with contraptions which has to count down. Tick tock."
|
||||
icon_state = "timer"
|
||||
matter = list("metal" = 500, "glass" = 50, "waste" = 10)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
|
||||
origin_tech = "magnets=1"
|
||||
|
||||
wires = WIRE_PULSE
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "voice analyzer"
|
||||
desc = "A small electronic device able to record a voice sample, and send a signal when that sample is repeated."
|
||||
icon_state = "voice"
|
||||
matter = list("metal" = 500, "glass" = 50, "waste" = 10)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
|
||||
origin_tech = "magnets=1"
|
||||
var/listening = 0
|
||||
var/recorded //the activation message
|
||||
|
||||
@@ -305,3 +305,14 @@
|
||||
'icons/spideros_icons/sos_13.png',
|
||||
'icons/spideros_icons/sos_14.png'
|
||||
)
|
||||
|
||||
|
||||
mob/proc/MayRespawn()
|
||||
return 0
|
||||
|
||||
client/proc/MayRespawn()
|
||||
if(mob)
|
||||
return mob.MayRespawn()
|
||||
|
||||
// Something went wrong, client is usually kicked or transfered to a new mob at this point
|
||||
return 0
|
||||
|
||||
@@ -84,6 +84,7 @@ datum/preferences
|
||||
var/religion = "None" //Religious association.
|
||||
|
||||
//Mob preview
|
||||
var/mob/living/carbon/human/dummy //the mannequin
|
||||
var/icon/preview_icon = null
|
||||
var/icon/preview_icon_front = null
|
||||
var/icon/preview_icon_side = null
|
||||
@@ -1447,7 +1448,7 @@ datum/preferences
|
||||
rlimb_data[limb] = choice
|
||||
organ_data[limb] = "cyborg"
|
||||
if(second_limb)
|
||||
organ_data[second_limb] = choice
|
||||
rlimb_data[second_limb] = choice
|
||||
organ_data[second_limb] = "cyborg"
|
||||
if(third_limb && organ_data[third_limb] == "amputated")
|
||||
organ_data[third_limb] = null
|
||||
@@ -1642,30 +1643,18 @@ datum/preferences
|
||||
character.gen_record = gen_record
|
||||
character.exploit_record = exploit_record
|
||||
|
||||
character.gender = gender
|
||||
character.change_gender(gender)
|
||||
character.age = age
|
||||
character.b_type = b_type
|
||||
|
||||
character.r_eyes = r_eyes
|
||||
character.g_eyes = g_eyes
|
||||
character.b_eyes = b_eyes
|
||||
character.change_eye_color(r_eyes,g_eyes,b_eyes)
|
||||
character.change_hair_color(r_hair,g_hair,b_hair)
|
||||
character.change_facial_hair_color(r_facial,g_facial,b_facial)
|
||||
character.change_skin_color(r_skin,g_skin,b_skin)
|
||||
character.change_skin_tone(s_tone)
|
||||
|
||||
character.r_hair = r_hair
|
||||
character.g_hair = g_hair
|
||||
character.b_hair = b_hair
|
||||
|
||||
character.r_facial = r_facial
|
||||
character.g_facial = g_facial
|
||||
character.b_facial = b_facial
|
||||
|
||||
character.r_skin = r_skin
|
||||
character.g_skin = g_skin
|
||||
character.b_skin = b_skin
|
||||
|
||||
character.s_tone = s_tone
|
||||
|
||||
character.h_style = h_style
|
||||
character.f_style = f_style
|
||||
character.change_hair(h_style)
|
||||
character.change_facial_hair(f_style)
|
||||
|
||||
character.home_system = home_system
|
||||
character.citizenship = citizenship
|
||||
|
||||
@@ -279,7 +279,7 @@ var/global/list/gear_datums = list()
|
||||
|
||||
/datum/gear/scanning_goggles
|
||||
display_name = "scanning goggles"
|
||||
path = /obj/item/clothing/glasses/fluff/uzenwa_sissra_1
|
||||
path = /obj/item/clothing/glasses/science/scanners
|
||||
cost = 1
|
||||
slot = slot_glasses
|
||||
|
||||
@@ -893,7 +893,7 @@ var/global/list/gear_datums = list()
|
||||
|
||||
/datum/gear/toeless_jackboots
|
||||
display_name = "toe-less jackboots"
|
||||
path = /obj/item/clothing/shoes/jackboots/fluff/kecer_eldraran
|
||||
path = /obj/item/clothing/shoes/jackboots/unathi
|
||||
cost = 1
|
||||
slot = slot_shoes
|
||||
|
||||
|
||||
@@ -264,37 +264,19 @@ BLIND // can't see anything
|
||||
return
|
||||
on = !on
|
||||
user << "You [on ? "enable" : "disable"] the helmet light."
|
||||
update_light(user)
|
||||
update_flashlight(user)
|
||||
else
|
||||
return ..(user)
|
||||
|
||||
/obj/item/clothing/head/proc/update_light(var/mob/user = null)
|
||||
/obj/item/clothing/head/proc/update_flashlight(var/mob/user = null)
|
||||
if(on && !light_applied)
|
||||
if(loc == user)
|
||||
user.SetLuminosity(user.luminosity + brightness_on)
|
||||
SetLuminosity(brightness_on)
|
||||
set_light(brightness_on)
|
||||
light_applied = 1
|
||||
else if(!on && light_applied)
|
||||
if(loc == user)
|
||||
user.SetLuminosity(user.luminosity - brightness_on)
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
light_applied = 0
|
||||
update_icon(user)
|
||||
|
||||
/obj/item/clothing/head/equipped(mob/user)
|
||||
..()
|
||||
spawn(1)
|
||||
if(on && loc == user && !light_applied)
|
||||
user.SetLuminosity(user.luminosity + brightness_on)
|
||||
light_applied = 1
|
||||
|
||||
/obj/item/clothing/head/dropped(mob/user)
|
||||
..()
|
||||
spawn(1)
|
||||
if(on && loc != user && light_applied)
|
||||
user.SetLuminosity(user.luminosity - brightness_on)
|
||||
light_applied = 0
|
||||
|
||||
/obj/item/clothing/head/update_icon(var/mob/user)
|
||||
|
||||
overlays.Cut()
|
||||
@@ -308,18 +290,6 @@ BLIND // can't see anything
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_head()
|
||||
|
||||
/obj/item/clothing/head/equipped(mob/user)
|
||||
..()
|
||||
update_light(user)
|
||||
|
||||
/obj/item/clothing/head/pickup(mob/user)
|
||||
..()
|
||||
update_light(user)
|
||||
|
||||
/obj/item/clothing/head/dropped(mob/user)
|
||||
..()
|
||||
update_light(user)
|
||||
|
||||
/obj/item/clothing/head/update_clothing_icon()
|
||||
if (ismob(src.loc))
|
||||
var/mob/M = src.loc
|
||||
@@ -357,6 +327,7 @@ BLIND // can't see anything
|
||||
permeability_coefficient = 0.50
|
||||
slowdown = SHOES_SLOWDOWN
|
||||
force = 2
|
||||
var/overshoes = 0
|
||||
species_restricted = list("exclude","Unathi","Tajara")
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/shoes.dmi')
|
||||
|
||||
|
||||
@@ -62,6 +62,11 @@
|
||||
..()
|
||||
overlay = global_hud.science
|
||||
|
||||
/obj/item/clothing/glasses/science/scanners
|
||||
name = "Scanning Goggles"
|
||||
desc = "A very oddly shaped pair of goggles with bits of wire poking out the sides. A soft humming sound emanates from it."
|
||||
icon_state = "uzenwa_sissra_1"
|
||||
|
||||
/obj/item/clothing/glasses/night
|
||||
name = "Night Vision Goggles"
|
||||
desc = "You can totally see in the dark now!"
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
item_state = "lgloves"
|
||||
siemens_coefficient = 1.0 //thin latex gloves, much more conductive than fabric gloves (basically a capacitor for AC)
|
||||
permeability_coefficient = 0.01
|
||||
|
||||
germ_level = 0
|
||||
/obj/item/clothing/gloves/botanic_leather
|
||||
desc = "These leather work gloves protect against thorns, barbs, prickles, spikes and other harmful objects of floral origin."
|
||||
name = "botanist's leather gloves"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
icon_state = "welding"
|
||||
flags = HEADCOVERSEYES | HEADCOVERSMOUTH
|
||||
item_state = "welding"
|
||||
matter = list("metal" = 3000, "glass" = 1000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 3000, "glass" = 1000)
|
||||
var/up = 0
|
||||
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
flags_inv = (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
|
||||
|
||||
@@ -1,31 +1,72 @@
|
||||
/obj/item/clothing/shoes/magboots
|
||||
desc = "Magnetic boots, often used during extravehicular activity to ensure the user remains safely attached to the vehicle."
|
||||
desc = "Magnetic boots, often used during extravehicular activity to ensure the user remains safely attached to the vehicle. They're large enough to be worn over other footwear."
|
||||
name = "magboots"
|
||||
icon_state = "magboots0"
|
||||
species_restricted = null
|
||||
force = 3
|
||||
overshoes = 1
|
||||
var/magpulse = 0
|
||||
var/icon_base = "magboots"
|
||||
icon_action_button = "action_blank"
|
||||
action_button_name = "Toggle the magboots"
|
||||
var/obj/item/clothing/shoes/shoes = null //Undershoes
|
||||
var/mob/living/carbon/human/wearer = null //For shoe procs
|
||||
|
||||
/obj/item/clothing/shoes/magboots/proc/set_slowdown()
|
||||
slowdown = shoes? max(SHOES_SLOWDOWN, shoes.slowdown): SHOES_SLOWDOWN //So you can't put on magboots to make you walk faster.
|
||||
if (magpulse)
|
||||
slowdown += 3
|
||||
|
||||
/obj/item/clothing/shoes/magboots/attack_self(mob/user)
|
||||
if(magpulse)
|
||||
flags &= ~NOSLIP
|
||||
slowdown = SHOES_SLOWDOWN
|
||||
magpulse = 0
|
||||
set_slowdown()
|
||||
force = 3
|
||||
if(icon_base) icon_state = "[icon_base]0"
|
||||
user << "You disable the mag-pulse traction system."
|
||||
else
|
||||
flags |= NOSLIP
|
||||
slowdown = 2
|
||||
magpulse = 1
|
||||
set_slowdown()
|
||||
force = 5
|
||||
if(icon_base) icon_state = "[icon_base]1"
|
||||
user << "You enable the mag-pulse traction system."
|
||||
user.update_inv_shoes() //so our mob-overlays update
|
||||
|
||||
/obj/item/clothing/shoes/magboots/mob_can_equip(mob/user)
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
if(H.shoes)
|
||||
shoes = H.shoes
|
||||
if(shoes.overshoes)
|
||||
user << "You are unable to wear \the [src] as \the [H.shoes] are in the way."
|
||||
shoes = null
|
||||
return 0
|
||||
H.drop_from_inventory(shoes) //Remove the old shoes so you can put on the magboots.
|
||||
shoes.loc = src
|
||||
|
||||
if(!..())
|
||||
if(shoes) //Put the old shoes back on if the check fails.
|
||||
if(H.equip_to_slot_if_possible(shoes, slot_shoes))
|
||||
src.shoes = null
|
||||
return 0
|
||||
|
||||
if (shoes)
|
||||
user << "You slip \the [src] on over \the [shoes]."
|
||||
set_slowdown()
|
||||
wearer = H
|
||||
return 1
|
||||
|
||||
/obj/item/clothing/shoes/magboots/dropped()
|
||||
..()
|
||||
var/mob/living/carbon/human/H = wearer
|
||||
if(shoes)
|
||||
if(!H.equip_to_slot_if_possible(shoes, slot_shoes))
|
||||
shoes.loc = get_turf(src)
|
||||
src.shoes = null
|
||||
wearer = null
|
||||
|
||||
/obj/item/clothing/shoes/magboots/examine(mob/user)
|
||||
..(user)
|
||||
var/state = "disabled"
|
||||
|
||||
@@ -89,6 +89,13 @@
|
||||
force = 3
|
||||
siemens_coefficient = 0.7
|
||||
|
||||
/obj/item/clothing/shoes/jackboots/unathi
|
||||
name = "toe-less jackboots"
|
||||
desc = "Modified pair of jackboots, particularly friendly to those species whose toes hold claws."
|
||||
item_state = "digiboots"
|
||||
icon_state = "digiboots"
|
||||
species_restricted = null
|
||||
|
||||
/obj/item/clothing/shoes/cult
|
||||
name = "boots"
|
||||
desc = "A pair of boots worn by the followers of Nar-Sie."
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
desc = "It looks pretty sciency."
|
||||
icon = 'icons/obj/rig_modules.dmi'
|
||||
icon_state = "module"
|
||||
matter = list("metal" = 20000, "plastic" = 30000, "glass" = 5000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 20000, "plastic" = 30000, "glass" = 5000)
|
||||
|
||||
var/damage = 0
|
||||
var/obj/item/weapon/rig/holder
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
disruptable = 1
|
||||
disruptive = 0
|
||||
|
||||
use_power_cost = 5
|
||||
active_power_cost = 1
|
||||
use_power_cost = 50
|
||||
active_power_cost = 10
|
||||
passive_power_cost = 0
|
||||
module_cooldown = 30
|
||||
|
||||
@@ -101,6 +101,10 @@
|
||||
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
|
||||
if(!istype(H.loc, /turf))
|
||||
H << "<span class='warning'>You cannot teleport out of your current location.</span>"
|
||||
return 0
|
||||
|
||||
var/turf/T
|
||||
if(target)
|
||||
T = get_turf(target)
|
||||
@@ -187,4 +191,4 @@
|
||||
if(holder && holder.wearer)
|
||||
holder.wearer.drop_from_inventory(src)
|
||||
qdel(holder)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -142,7 +142,8 @@
|
||||
piece.icon_state = "[initial(icon_state)]"
|
||||
piece.min_cold_protection_temperature = min_cold_protection_temperature
|
||||
piece.max_heat_protection_temperature = max_heat_protection_temperature
|
||||
piece.siemens_coefficient = siemens_coefficient
|
||||
if(piece.siemens_coefficient > siemens_coefficient) //So that insulated gloves keep their insulation.
|
||||
piece.siemens_coefficient = siemens_coefficient
|
||||
piece.permeability_coefficient = permeability_coefficient
|
||||
piece.unacidable = unacidable
|
||||
if(islist(armor)) piece.armor = armor.Copy()
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
slowdown = 0
|
||||
|
||||
chest_type = /obj/item/clothing/suit/space/rig/light/ninja
|
||||
glove_type = /obj/item/clothing/gloves/rig/light/ninja
|
||||
|
||||
req_access = list(access_syndicate)
|
||||
|
||||
@@ -80,6 +81,10 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/clothing/gloves/rig/light/ninja
|
||||
name = "insulated gloves"
|
||||
siemens_coefficient = 0
|
||||
|
||||
/obj/item/clothing/suit/space/rig/light/ninja
|
||||
breach_threshold = 38 //comparable to regular hardsuits
|
||||
|
||||
|
||||
@@ -59,15 +59,10 @@
|
||||
|
||||
/obj/item/clothing/suit/space/void/examine(user)
|
||||
..(user)
|
||||
if(boots || helmet || tank)
|
||||
var/D = "Installed equipment: "
|
||||
var/first = 1
|
||||
for(var/obj/item/I in list(helmet,boots,tank))
|
||||
if (I)
|
||||
D += "[first?"":", "]\the [I]\icon[I]"
|
||||
first = 0
|
||||
D += "."
|
||||
user << D
|
||||
var/list/part_list = new
|
||||
for(var/obj/item/I in list(helmet,boots,tank))
|
||||
part_list += "\a [I]"
|
||||
user << "\The [src] has [english_list(part_list)] installed."
|
||||
if(tank && in_range(src,user))
|
||||
user << "<span class='notice'>The wrist-mounted pressure gauge reads [max(round(tank.air_contents.return_pressure()),0)] kPa remaining in \the [tank].</span>"
|
||||
|
||||
@@ -96,10 +91,7 @@
|
||||
helmet.canremove = 0
|
||||
|
||||
if(boots)
|
||||
if(H.shoes)
|
||||
M << "You are unable to deploy your suit's magboots as \the [H.shoes] are in the way."
|
||||
else if (H.equip_to_slot_if_possible(boots, slot_shoes))
|
||||
M << "Your suit's boots deploy with a hiss."
|
||||
if (H.equip_to_slot_if_possible(boots, slot_shoes))
|
||||
boots.canremove = 0
|
||||
|
||||
if(tank)
|
||||
@@ -115,18 +107,18 @@
|
||||
var/mob/living/carbon/human/H
|
||||
|
||||
if(helmet)
|
||||
helmet.canremove = 1
|
||||
H = helmet.loc
|
||||
if(istype(H))
|
||||
if(helmet && H.head == helmet)
|
||||
helmet.canremove = 1
|
||||
H.drop_from_inventory(helmet)
|
||||
helmet.loc = src
|
||||
|
||||
if(boots)
|
||||
boots.canremove = 1
|
||||
H = boots.loc
|
||||
if(istype(H))
|
||||
if(boots && H.shoes == boots)
|
||||
boots.canremove = 1
|
||||
H.drop_from_inventory(boots)
|
||||
boots.loc = src
|
||||
|
||||
|
||||
@@ -185,6 +185,14 @@
|
||||
/obj/item/device/healthanalyzer, /obj/item/device/flashlight, /obj/item/device/radio, /obj/item/weapon/tank/emergency_oxygen)
|
||||
body_parts_covered = UPPER_TORSO|ARMS
|
||||
|
||||
/obj/item/clothing/suit/storage/toggle/fr_jacket/ems
|
||||
name = "\improper EMS jacket"
|
||||
desc = "A dark blue, martian-pattern, EMS jacket. It sports high-visibility reflective stripes and a star of life on the back."
|
||||
icon_state = "ems_jacket_closed"
|
||||
item_state = "ems_jacket_closed"
|
||||
icon_open = "ems_jacket_open"
|
||||
icon_closed = "ems_jacket_closed"
|
||||
|
||||
//Mime
|
||||
/obj/item/clothing/suit/suspenders
|
||||
name = "suspenders"
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
siemens_coefficient = 1
|
||||
|
||||
/obj/item/clothing/under/stripper/mankini
|
||||
name = "the mankini"
|
||||
name = "mankini"
|
||||
desc = "No honest man would wear this abomination"
|
||||
icon_state = "mankini"
|
||||
siemens_coefficient = 1
|
||||
|
||||
@@ -9,11 +9,30 @@
|
||||
var/slot = "decor"
|
||||
var/obj/item/clothing/under/has_suit = null //the suit the tie may be attached to
|
||||
var/image/inv_overlay = null //overlay used when attached to clothing.
|
||||
var/image/inv_overlay_mob = null
|
||||
var/overlay_state = null
|
||||
|
||||
/obj/item/clothing/accessory/New()
|
||||
..()
|
||||
inv_overlay = image("icon" = 'icons/obj/clothing/ties_overlay.dmi', "icon_state" = "[overlay_state? "[overlay_state]" : "[icon_state]"]")
|
||||
/obj/item/clothing/accessory/proc/get_inv_overlay()
|
||||
if(!inv_overlay)
|
||||
var/tmp_icon_state = "[overlay_state? "[overlay_state]" : "[icon_state]"]"
|
||||
if(icon_override)
|
||||
if("[tmp_icon_state]_tie" in icon_states(icon_override))
|
||||
tmp_icon_state = "[tmp_icon_state]_tie"
|
||||
inv_overlay = image("icon" = icon_override, "icon_state" = "[tmp_icon_state]")
|
||||
else
|
||||
inv_overlay = image("icon" = 'icons/obj/clothing/ties_overlay.dmi', "icon_state" = "[tmp_icon_state]")
|
||||
return inv_overlay
|
||||
|
||||
/obj/item/clothing/accessory/proc/get_inv_mob_overlay()
|
||||
if(!inv_overlay_mob)
|
||||
var/tmp_icon_state = "[overlay_state? "[overlay_state]" : "[icon_state]"]"
|
||||
if(icon_override)
|
||||
if("[tmp_icon_state]_mob" in icon_states(icon_override))
|
||||
tmp_icon_state = "[tmp_icon_state]_mob"
|
||||
inv_overlay_mob = image("icon" = icon_override, "icon_state" = "[tmp_icon_state]")
|
||||
else
|
||||
inv_overlay_mob = image("icon" = 'icons/obj/clothing/ties_overlay.dmi', "icon_state" = "[tmp_icon_state]")
|
||||
return inv_overlay_mob
|
||||
|
||||
//when user attached an accessory to S
|
||||
/obj/item/clothing/accessory/proc/on_attached(obj/item/clothing/under/S, mob/user as mob)
|
||||
@@ -21,7 +40,7 @@
|
||||
return
|
||||
has_suit = S
|
||||
loc = has_suit
|
||||
has_suit.overlays += inv_overlay
|
||||
has_suit.overlays += get_inv_overlay()
|
||||
|
||||
user << "<span class='notice'>You attach [src] to [has_suit].</span>"
|
||||
src.add_fingerprint(user)
|
||||
@@ -29,7 +48,7 @@
|
||||
/obj/item/clothing/accessory/proc/on_removed(mob/user as mob)
|
||||
if(!has_suit)
|
||||
return
|
||||
has_suit.overlays -= inv_overlay
|
||||
has_suit.overlays -= get_inv_overlay()
|
||||
has_suit = null
|
||||
usr.put_in_hands(src)
|
||||
src.add_fingerprint(user)
|
||||
@@ -72,24 +91,42 @@
|
||||
if(MALE) their = "his"
|
||||
if(FEMALE) their = "her"
|
||||
|
||||
var/sound = "pulse"
|
||||
var/sound_strength
|
||||
|
||||
var/sound = "heartbeat"
|
||||
var/sound_strength = "cannot hear"
|
||||
var/heartbeat = 0
|
||||
if(M.species && M.species.has_organ["heart"])
|
||||
var/obj/item/organ/heart/heart = M.internal_organs_by_name["heart"]
|
||||
if(heart && !heart.robotic)
|
||||
heartbeat = 1
|
||||
if(M.stat == DEAD || (M.status_flags&FAKEDEATH))
|
||||
sound_strength = "cannot hear"
|
||||
sound = "anything"
|
||||
else
|
||||
sound_strength = "hear a weak"
|
||||
switch(body_part)
|
||||
if("chest")
|
||||
if(M.oxyloss < 50)
|
||||
sound_strength = "hear a healthy"
|
||||
sound = "pulse and respiration"
|
||||
sound_strength = "hear"
|
||||
sound = "no heartbeat"
|
||||
if(heartbeat)
|
||||
var/obj/item/organ/heart/heart = M.internal_organs_by_name["heart"]
|
||||
if(heart.is_bruised() || M.getOxyLoss() > 50)
|
||||
sound = "[pick("odd noises in","weak")] heartbeat"
|
||||
else
|
||||
sound = "healthy heartbeat"
|
||||
|
||||
var/obj/item/organ/heart/L = M.internal_organs_by_name["lungs"]
|
||||
if(!L || M.losebreath)
|
||||
sound += " and no respiration"
|
||||
else if(M.is_lung_ruptured() || M.getOxyLoss() > 50)
|
||||
sound += " and [pick("wheezing","gurgling")] sounds"
|
||||
else
|
||||
sound += " and healthy respiration"
|
||||
if("eyes","mouth")
|
||||
sound_strength = "cannot hear"
|
||||
sound = "anything"
|
||||
else
|
||||
sound_strength = "hear a weak"
|
||||
if(heartbeat)
|
||||
sound_strength = "hear a weak"
|
||||
sound = "pulse"
|
||||
|
||||
user.visible_message("[user] places [src] against [M]'s [body_part] and listens attentively.", "You place [src] against [their] [body_part]. You [sound_strength] [sound].")
|
||||
return
|
||||
@@ -140,78 +177,3 @@
|
||||
/obj/item/clothing/accessory/medal/gold/heroism
|
||||
name = "medal of exceptional heroism"
|
||||
desc = "An extremely rare golden medal awarded only by CentComm. To recieve such a medal is the highest honor and as such, very few exist. This medal is almost never awarded to anybody but commanders."
|
||||
|
||||
/*
|
||||
Holobadges are worn on the belt or neck, and can be used to show that the holder is an authorized
|
||||
Security agent - the user details can be imprinted on the badge with a Security-access ID card,
|
||||
or they can be emagged to accept any ID for use in disguises.
|
||||
*/
|
||||
|
||||
/obj/item/clothing/accessory/holobadge
|
||||
name = "holobadge"
|
||||
desc = "This glowing blue badge marks the holder as THE LAW."
|
||||
icon_state = "holobadge"
|
||||
slot_flags = SLOT_BELT | SLOT_TIE
|
||||
|
||||
var/emagged = 0 //Emagging removes Sec check.
|
||||
var/stored_name = null
|
||||
|
||||
/obj/item/clothing/accessory/holobadge/cord
|
||||
icon_state = "holobadge-cord"
|
||||
slot_flags = SLOT_MASK | SLOT_TIE
|
||||
|
||||
/obj/item/clothing/accessory/holobadge/attack_self(mob/user as mob)
|
||||
if(!stored_name)
|
||||
user << "Waving around a badge before swiping an ID would be pretty pointless."
|
||||
return
|
||||
if(isliving(user))
|
||||
user.visible_message("\red [user] displays their NanoTrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.","\red You display your NanoTrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.")
|
||||
|
||||
/obj/item/clothing/accessory/holobadge/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
|
||||
if (istype(O, /obj/item/weapon/card/emag))
|
||||
if (emagged)
|
||||
user << "\red [src] is already cracked."
|
||||
return
|
||||
else
|
||||
emagged = 1
|
||||
user << "\red You swipe [O] and crack the holobadge security checks."
|
||||
return
|
||||
|
||||
else if(istype(O, /obj/item/weapon/card/id) || istype(O, /obj/item/device/pda))
|
||||
|
||||
var/obj/item/weapon/card/id/id_card = null
|
||||
|
||||
if(istype(O, /obj/item/weapon/card/id))
|
||||
id_card = O
|
||||
else
|
||||
var/obj/item/device/pda/pda = O
|
||||
id_card = pda.id
|
||||
|
||||
if(access_security in id_card.access || emagged)
|
||||
user << "You imprint your ID details onto the badge."
|
||||
stored_name = id_card.registered_name
|
||||
name = "holobadge ([stored_name])"
|
||||
desc = "This glowing blue badge marks [stored_name] as THE LAW."
|
||||
else
|
||||
user << "[src] rejects your insufficient access rights."
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/clothing/accessory/holobadge/attack(mob/living/carbon/human/M, mob/living/user)
|
||||
if(isliving(user))
|
||||
user.visible_message("\red [user] invades [M]'s personal space, thrusting [src] into their face insistently.","\red You invade [M]'s personal space, thrusting [src] into their face insistently. You are the law.")
|
||||
|
||||
/obj/item/weapon/storage/box/holobadge
|
||||
name = "holobadge box"
|
||||
desc = "A box claiming to contain holobadges."
|
||||
New()
|
||||
new /obj/item/clothing/accessory/holobadge(src)
|
||||
new /obj/item/clothing/accessory/holobadge(src)
|
||||
new /obj/item/clothing/accessory/holobadge(src)
|
||||
new /obj/item/clothing/accessory/holobadge(src)
|
||||
new /obj/item/clothing/accessory/holobadge/cord(src)
|
||||
new /obj/item/clothing/accessory/holobadge/cord(src)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
Badges are worn on the belt or neck, and can be used to show that the holder is an authorized
|
||||
Security agent - the user details can be imprinted on holobadges with a Security-access ID card,
|
||||
or they can be emagged to accept any ID for use in disguises.
|
||||
*/
|
||||
|
||||
/obj/item/clothing/accessory/badge
|
||||
name = "detective's badge"
|
||||
desc = "NanoTrasen Security Department detective's badge, made from gold."
|
||||
icon_state = "badge"
|
||||
slot_flags = SLOT_BELT | SLOT_TIE
|
||||
|
||||
var/stored_name
|
||||
var/badge_string = "NanoTrasen Security Department"
|
||||
|
||||
/obj/item/clothing/accessory/badge/old
|
||||
name = "faded badge"
|
||||
desc = "A faded badge, backed with leather. It bears the emblem of the Forensic division."
|
||||
icon_state = "badge_round"
|
||||
|
||||
/obj/item/clothing/accessory/badge/proc/set_name(var/new_name)
|
||||
stored_name = new_name
|
||||
name = "[initial(name)] ([stored_name])"
|
||||
|
||||
/obj/item/clothing/accessory/badge/attack_self(mob/user as mob)
|
||||
|
||||
if(!stored_name)
|
||||
user << "You polish your old badge fondly, shining up the surface."
|
||||
set_name(user.real_name)
|
||||
return
|
||||
|
||||
if(isliving(user))
|
||||
if(stored_name)
|
||||
user.visible_message("<span class='notice'>[user] displays their [src.name].\nIt reads: [stored_name], [badge_string].</span>","<span class='notice'>You display your [src.name].\nIt reads: [stored_name], [badge_string].</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] displays their [src.name].\nIt reads: [badge_string].</span>","<span class='notice'>You display your [src.name]. It reads: [badge_string].</span>")
|
||||
|
||||
/obj/item/clothing/accessory/badge/attack(mob/living/carbon/human/M, mob/living/user)
|
||||
if(isliving(user))
|
||||
user.visible_message("<span class='danger'>[user] invades [M]'s personal space, thrusting [src] into their face insistently.</span>","<span class='danger'>You invade [M]'s personal space, thrusting [src] into their face insistently.</span>")
|
||||
|
||||
//.Holobadges.
|
||||
/obj/item/clothing/accessory/badge/holo
|
||||
name = "holobadge"
|
||||
desc = "This glowing blue badge marks the holder as THE LAW."
|
||||
var/emagged = 0 //Emagging removes Sec check.
|
||||
|
||||
/obj/item/clothing/accessory/badge/holo/cord
|
||||
icon_state = "holobadge-cord"
|
||||
slot_flags = SLOT_MASK | SLOT_TIE
|
||||
|
||||
/obj/item/clothing/accessory/badge/holo/attack_self(mob/user as mob)
|
||||
if(!stored_name)
|
||||
user << "Waving around a holobadge before swiping an ID would be pretty pointless."
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/accessory/badge/holo/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
|
||||
if (istype(O, /obj/item/weapon/card/emag))
|
||||
if (emagged)
|
||||
user << "<span class='danger'>[src] is already cracked.</span>"
|
||||
return
|
||||
else
|
||||
emagged = 1
|
||||
user << "<span class='danger'>You swipe [O] and crack the holobadge security checks.</span>"
|
||||
return
|
||||
|
||||
else if(istype(O, /obj/item/weapon/card/id) || istype(O, /obj/item/device/pda))
|
||||
|
||||
var/obj/item/weapon/card/id/id_card = null
|
||||
|
||||
if(istype(O, /obj/item/weapon/card/id))
|
||||
id_card = O
|
||||
else
|
||||
var/obj/item/device/pda/pda = O
|
||||
id_card = pda.id
|
||||
|
||||
if(access_security in id_card.access || emagged)
|
||||
user << "You imprint your ID details onto the badge."
|
||||
set_name(user.real_name)
|
||||
else
|
||||
user << "[src] rejects your insufficient access rights."
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/box/holobadge
|
||||
name = "holobadge box"
|
||||
desc = "A box claiming to contain holobadges."
|
||||
New()
|
||||
new /obj/item/clothing/accessory/badge/holo(src)
|
||||
new /obj/item/clothing/accessory/badge/holo(src)
|
||||
new /obj/item/clothing/accessory/badge/holo(src)
|
||||
new /obj/item/clothing/accessory/badge/holo(src)
|
||||
new /obj/item/clothing/accessory/badge/holo/cord(src)
|
||||
new /obj/item/clothing/accessory/badge/holo/cord(src)
|
||||
..()
|
||||
return
|
||||
@@ -0,0 +1,46 @@
|
||||
/obj/item/clothing/accessory/locket
|
||||
name = "silver locket"
|
||||
desc = "This oval shaped, argentium sterling silver locket hangs on an incredibly fine, refractive string, almost thin as hair and microweaved from links to a deceptive strength, of similar material. The edges are engraved very delicately with an elegant curving design, but overall the main is unmarked and smooth to the touch, leaving room for either remaining as a stolid piece or future alterations. There is an obvious internal place for a picture or lock of some sort, but even behind that is a very thin compartment unhinged with the pinch of a thumb and forefinger."
|
||||
icon_state = "locket"
|
||||
item_state = "locket"
|
||||
slot_flags = 0
|
||||
w_class = 2
|
||||
slot_flags = SLOT_MASK | SLOT_TIE
|
||||
var/base_icon
|
||||
var/open
|
||||
var/obj/item/held //Item inside locket.
|
||||
|
||||
/obj/item/clothing/accessory/locket/heart
|
||||
name = "heart-shaped locket"
|
||||
desc = " A silver, heart-shaped locket. It flips open to reveal two pictures, one of a young red-headed woman and one of a brunette of similar age. Small writing is etched onto the back, reading 'M+L'. Some may regard it as cheesy."
|
||||
icon_state = "heartlocket"
|
||||
|
||||
/obj/item/clothing/accessory/locket/attack_self(mob/user as mob)
|
||||
if(!base_icon)
|
||||
base_icon = icon_state
|
||||
open = !open
|
||||
user << "You flip \the [src] [open?"open":"closed"]."
|
||||
if(open)
|
||||
icon_state = "[base_icon]_open"
|
||||
if(held)
|
||||
user << "\The [held] falls out!"
|
||||
held.loc = get_turf(user)
|
||||
src.held = null
|
||||
else
|
||||
icon_state = "[base_icon]"
|
||||
|
||||
/obj/item/clothing/accessory/locket/attackby(var/obj/item/O as obj, mob/user as mob)
|
||||
if(!open)
|
||||
user << "You have to open it first."
|
||||
return
|
||||
|
||||
if(istype(O,/obj/item/weapon/paper) || istype(O, /obj/item/weapon/photo))
|
||||
if(held)
|
||||
usr << "[src] already has something inside it."
|
||||
else
|
||||
usr << "You slip [O] into [src]."
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
src.held = O
|
||||
return
|
||||
..()
|
||||
@@ -113,6 +113,13 @@
|
||||
permeability_coefficient = 0.50
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
|
||||
|
||||
/obj/item/clothing/under/rank/medical/paramedic
|
||||
name = "short sleeve medical jumpsuit"
|
||||
desc = "It's made of a special fiber that provides minor protection against biohazards. This one has a cross on the chest denoting that the wearer is trained medical personnel."
|
||||
icon_state = "medical_short"
|
||||
item_state = "medical_short"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS
|
||||
|
||||
/obj/item/clothing/under/rank/medical/blue
|
||||
name = "medical scrubs"
|
||||
desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in baby blue."
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,95 +1,189 @@
|
||||
//switch this out to use a database at some point
|
||||
//list of ckey/ real_name and item paths
|
||||
//gives item to specific people when they join if it can
|
||||
//for multiple items just add mutliple entries, unless i change it to be a listlistlist
|
||||
//yes, it has to be an item, you can't pick up nonitems
|
||||
// Switch this out to use a database at some point. Each ckey is
|
||||
// associated with a list of custom item datums. When the character
|
||||
// spawns, the list is checked and all appropriate datums are spawned.
|
||||
// See config/example/custom_items.txt for a more detailed overview
|
||||
// of how the config system works.
|
||||
|
||||
// CUSTOM ITEM ICONS:
|
||||
// Inventory icons must be in CUSTOM_ITEM_OBJ with state name [item_icon].
|
||||
// On-mob icons must be in CUSTOM_ITEM_MOB with state name [item_icon].
|
||||
// Inhands must be in CUSTOM_ITEM_MOB as [icon_state]_l and [icon_state]_r.
|
||||
|
||||
// Kits must have mech icons in CUSTOM_ITEM_OBJ under [kit_icon].
|
||||
// Broken must be [kit_icon]-broken and open must be [kit_icon]-open.
|
||||
|
||||
// Kits must also have hardsuit icons in CUSTOM_ITEM_MOB as [kit_icon]_suit
|
||||
// and [kit_icon]_helmet, and in CUSTOM_ITEM_OBJ as [kit_icon].
|
||||
|
||||
/var/list/custom_items = list()
|
||||
|
||||
/hook/startup/proc/loadCustomItems()
|
||||
var/custom_items_file = file2text("config/custom_items.txt")
|
||||
custom_items = text2list(custom_items_file, "\n")
|
||||
/datum/custom_item
|
||||
var/assoc_key
|
||||
var/character_name
|
||||
var/item_icon
|
||||
var/item_desc
|
||||
var/name
|
||||
var/item_path = /obj/item
|
||||
var/req_access = 0
|
||||
var/list/req_titles = list()
|
||||
var/kit_name
|
||||
var/kit_desc
|
||||
var/kit_icon
|
||||
var/additional_data
|
||||
|
||||
/datum/custom_item/proc/spawn_item(var/newloc)
|
||||
var/obj/item/citem = new item_path(newloc)
|
||||
apply_to_item(citem)
|
||||
return citem
|
||||
|
||||
/datum/custom_item/proc/apply_to_item(var/obj/item/item)
|
||||
if(!item)
|
||||
return
|
||||
if(name)
|
||||
item.name = name
|
||||
if(item_desc)
|
||||
item.desc = item_desc
|
||||
if(item_icon)
|
||||
item.icon = CUSTOM_ITEM_OBJ
|
||||
item.icon_state = item_icon
|
||||
if(istype(item, /obj/item))
|
||||
item.icon_override = CUSTOM_ITEM_MOB
|
||||
|
||||
// Kits are dumb so this is going to have to be hardcoded/snowflake.
|
||||
if(istype(item, /obj/item/device/kit))
|
||||
var/obj/item/device/kit/K = item
|
||||
K.new_name = kit_name
|
||||
K.new_desc = kit_desc
|
||||
K.new_icon = kit_icon
|
||||
K.new_icon_file = CUSTOM_ITEM_OBJ
|
||||
if(istype(item, /obj/item/device/kit/paint))
|
||||
var/obj/item/device/kit/paint/kit = item
|
||||
kit.allowed_types = text2list(additional_data, ", ")
|
||||
else if(istype(item, /obj/item/device/kit/suit))
|
||||
var/obj/item/device/kit/suit/kit = item
|
||||
kit.new_light_overlay = additional_data
|
||||
kit.new_mob_icon_file = CUSTOM_ITEM_MOB
|
||||
|
||||
return item
|
||||
|
||||
|
||||
// Parses the config file into the custom_items list.
|
||||
/hook/startup/proc/load_custom_items()
|
||||
|
||||
var/datum/custom_item/current_data
|
||||
for(var/line in text2list(file2text("config/custom_items.txt"), "\n"))
|
||||
|
||||
line = trim(line)
|
||||
if(line == "" || !line || findtext(line, "#", 1, 2))
|
||||
continue
|
||||
|
||||
if(findtext(line, "{", 1, 2) || findtext(line, "}", 1, 2)) // New block!
|
||||
if(current_data && current_data.assoc_key)
|
||||
if(!custom_items[current_data.assoc_key])
|
||||
custom_items[current_data.assoc_key] = list()
|
||||
var/list/L = custom_items[current_data.assoc_key]
|
||||
L |= current_data
|
||||
current_data = null
|
||||
|
||||
var/split = findtext(line,":")
|
||||
if(!split)
|
||||
continue
|
||||
var/field = trim(copytext(line,1,split))
|
||||
var/field_data = trim(copytext(line,(split+1)))
|
||||
if(!field || !field_data)
|
||||
continue
|
||||
|
||||
if(!current_data)
|
||||
current_data = new()
|
||||
|
||||
switch(field)
|
||||
if("ckey")
|
||||
current_data.assoc_key = lowertext(field_data)
|
||||
if("character_name")
|
||||
current_data.character_name = lowertext(field_data)
|
||||
if("item_path")
|
||||
current_data.item_path = text2path(field_data)
|
||||
if("item_name")
|
||||
current_data.name = field_data
|
||||
if("item_icon")
|
||||
current_data.item_icon = field_data
|
||||
if("item_desc")
|
||||
current_data.item_desc = field_data
|
||||
if("req_access")
|
||||
current_data.req_access = text2num(field_data)
|
||||
if("req_titles")
|
||||
current_data.req_titles = text2list(field_data,", ")
|
||||
if("kit_name")
|
||||
current_data.kit_name = field_data
|
||||
if("kit_desc")
|
||||
current_data.kit_desc = field_data
|
||||
if("kit_icon")
|
||||
current_data.kit_icon = field_data
|
||||
if("additional_data")
|
||||
current_data.additional_data = field_data
|
||||
return 1
|
||||
|
||||
/proc/EquipCustomItems(mob/living/carbon/human/M)
|
||||
for(var/line in custom_items)
|
||||
// split & clean up
|
||||
var/list/Entry = text2list(line, ":")
|
||||
for(var/i = 1 to Entry.len)
|
||||
Entry[i] = trim(Entry[i])
|
||||
//gets the relevant list for the key from the listlist if it exists, check to make sure they are meant to have it and then calls the giving function
|
||||
/proc/equip_custom_items(mob/living/carbon/human/M)
|
||||
var/list/key_list = custom_items[M.ckey]
|
||||
if(!key_list || key_list.len < 1)
|
||||
return
|
||||
|
||||
if(Entry.len < 3)
|
||||
continue;
|
||||
for(var/datum/custom_item/citem in key_list)
|
||||
|
||||
if(Entry[1] == M.ckey && Entry[2] == M.real_name)
|
||||
var/list/Paths = text2list(Entry[3], ",")
|
||||
for(var/P in Paths)
|
||||
var/ok = 0 // 1 if the item was placed successfully
|
||||
P = trim(P)
|
||||
var/path = text2path(P)
|
||||
if(!path) continue
|
||||
// Check for requisite ckey and character name.
|
||||
if((lowertext(citem.assoc_key) != lowertext(M.ckey)) || (lowertext(citem.character_name) != lowertext(M.real_name)))
|
||||
continue
|
||||
|
||||
var/obj/item/Item = new path()
|
||||
if(istype(Item,/obj/item/weapon/card/id))
|
||||
//id card needs to replace the original ID
|
||||
if(M.ckey == "nerezza" && M.real_name == "Asher Spock" && M.mind.role_alt_title && M.mind.role_alt_title != "Emergency Physician")
|
||||
//only spawn ID if asher is joining as an emergency physician
|
||||
ok = 1
|
||||
qdel(Item)
|
||||
goto skip
|
||||
var/obj/item/weapon/card/id/I = Item
|
||||
for(var/obj/item/weapon/card/id/C in M)
|
||||
//default settings
|
||||
I.name = "[M.real_name]'s ID Card ([M.mind.role_alt_title ? M.mind.role_alt_title : M.mind.assigned_role])"
|
||||
I.registered_name = M.real_name
|
||||
I.access = C.access
|
||||
I.assignment = C.assignment
|
||||
I.blood_type = C.blood_type
|
||||
I.dna_hash = C.dna_hash
|
||||
I.fingerprint_hash = C.fingerprint_hash
|
||||
//I.pin = C.pin
|
||||
// Check for required access.
|
||||
var/obj/item/weapon/card/id/current_id = M.wear_id
|
||||
if(citem.req_access && citem.req_access > 0)
|
||||
if(!(istype(current_id) && (citem.req_access in current_id.access)))
|
||||
continue
|
||||
|
||||
//custom stuff
|
||||
if(M.ckey == "fastler" && M.real_name == "Fastler Greay") //This is a Lifetime ID
|
||||
I.name = "[M.real_name]'s Lifetime ID Card ([M.mind.role_alt_title ? M.mind.role_alt_title : M.mind.assigned_role])"
|
||||
else if(M.ckey == "nerezza" && M.real_name == "Asher Spock") //This is an Odysseus Specialist ID
|
||||
I.name = "[M.real_name]'s Odysseus Specialist ID Card ([M.mind.role_alt_title ? M.mind.role_alt_title : M.mind.assigned_role])"
|
||||
I.access += list(access_robotics) //Station-based mecha pilots need this to access the recharge bay.
|
||||
else if(M.ckey == "roaper" && M.real_name == "Ian Colm") //This is a Technician ID
|
||||
I.name = "[M.real_name]'s Technician ID ([M.mind.role_alt_title ? M.mind.role_alt_title : M.mind.assigned_role])"
|
||||
// Check for required job title.
|
||||
if(citem.req_titles && citem.req_titles.len > 0)
|
||||
var/has_title
|
||||
var/current_title = M.mind.role_alt_title ? M.mind.role_alt_title : M.mind.assigned_role
|
||||
for(var/title in citem.req_titles)
|
||||
if(title == current_title)
|
||||
has_title = 1
|
||||
break
|
||||
if(!has_title)
|
||||
continue
|
||||
|
||||
//replace old ID
|
||||
qdel(C)
|
||||
ok = M.equip_to_slot_if_possible(I, slot_wear_id, 0) //if 1, last argument deletes on fail
|
||||
break
|
||||
else if(istype(Item,/obj/item/weapon/storage/belt))
|
||||
if(M.ckey == "jakksergal" && M.real_name == "Nashi Ra'hal" && M.mind.role_alt_title && M.mind.role_alt_title != "Nurse" && M.mind.role_alt_title != "Chemist")
|
||||
ok = 1
|
||||
qdel(Item)
|
||||
goto skip
|
||||
var/obj/item/weapon/storage/belt/medical/fluff/nashi_belt/I = Item
|
||||
if(istype(M.belt,/obj/item/weapon/storage/belt))
|
||||
for(var/obj/item/weapon/storage/belt/B in M)
|
||||
qdel(B)
|
||||
M.belt=null
|
||||
ok = M.equip_to_slot_if_possible(I, slot_belt, 0)
|
||||
break
|
||||
if(istype(M.belt,/obj/item/device/pda))
|
||||
for(var/obj/item/device/pda/Pda in M)
|
||||
M.belt=null
|
||||
M.equip_to_slot_if_possible(Pda, slot_l_store, 0)
|
||||
ok = M.equip_to_slot_if_possible(I, slot_belt, 0)
|
||||
else if(istype(M.back,/obj/item/weapon/storage) && M.back:contents.len < M.back:storage_slots) // Try to place it in something on the mob's back
|
||||
Item.loc = M.back
|
||||
ok = 1
|
||||
// ID cards and PDAs are applied directly to the existing object rather than spawned fresh.
|
||||
var/obj/item/existing_item
|
||||
if(citem.item_path == /obj/item/weapon/card/id && istype(current_id)) //Set earlier.
|
||||
existing_item = M.wear_id
|
||||
else if(citem.item_path == /obj/item/device/pda)
|
||||
existing_item = locate(/obj/item/device/pda) in M.contents
|
||||
|
||||
else
|
||||
for(var/obj/item/weapon/storage/S in M.contents) // Try to place it in any item that can store stuff, on the mob.
|
||||
if (S.contents.len < S.storage_slots)
|
||||
Item.loc = S
|
||||
ok = 1
|
||||
break
|
||||
// Spawn and equip the item.
|
||||
if(existing_item)
|
||||
citem.apply_to_item(existing_item)
|
||||
else
|
||||
place_custom_item(M,citem)
|
||||
|
||||
skip:
|
||||
if (ok == 0) // Finally, since everything else failed, place it on the ground
|
||||
Item.loc = get_turf(M.loc)
|
||||
// Places the item on the target mob.
|
||||
/proc/place_custom_item(mob/living/carbon/human/M, var/datum/custom_item/citem)
|
||||
|
||||
if(!citem) return
|
||||
var/obj/item/newitem = citem.spawn_item()
|
||||
|
||||
if(M.equip_to_appropriate_slot(newitem))
|
||||
return newitem
|
||||
|
||||
if(istype(M.back,/obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/backpack = M.back
|
||||
if(backpack.contents.len < backpack.storage_slots)
|
||||
newitem.loc = M.back
|
||||
return newitem
|
||||
|
||||
// Try to place it in any item that can store stuff, on the mob.
|
||||
for(var/obj/item/weapon/storage/S in M.contents)
|
||||
if (S.contents.len < S.storage_slots)
|
||||
newitem.loc = S
|
||||
return newitem
|
||||
newitem.loc = get_turf(M.loc)
|
||||
return newitem
|
||||
|
||||
@@ -31,8 +31,7 @@
|
||||
/obj/item/weapon/reagent_containers/glass/rag/attack(atom/target as obj|turf|area, mob/user as mob , flag)
|
||||
if(ismob(target) && target.reagents && reagents.total_volume)
|
||||
user.visible_message("\red \The [target] has been smothered with \the [src] by \the [user]!", "\red You smother \the [target] with \the [src]!", "You hear some struggling and muffled cries of surprise")
|
||||
src.reagents.reaction(target, TOUCH)
|
||||
spawn(5) src.reagents.clear_reagents()
|
||||
reagents.trans_to_mob(target, reagents.total_volume, CHEM_INGEST)
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -141,10 +141,11 @@
|
||||
if("finalise_create_account")
|
||||
var/account_name = href_list["holder_name"]
|
||||
var/starting_funds = max(text2num(href_list["starting_funds"]), 0)
|
||||
create_account(account_name, starting_funds, src)
|
||||
|
||||
starting_funds = Clamp(starting_funds, 0, station_account.money) // Not authorized to put the station in debt.
|
||||
starting_funds = min(starting_funds, fund_cap) // Not authrorized to give more than the fund cap.
|
||||
starting_funds = min(starting_funds, fund_cap) // Not authorized to give more than the fund cap.
|
||||
|
||||
create_account(account_name, starting_funds, src)
|
||||
if(starting_funds > 0)
|
||||
//subtract the money
|
||||
station_account.money -= starting_funds
|
||||
|
||||
@@ -63,11 +63,10 @@
|
||||
//world << " checking [areapath]"
|
||||
var/area/A = locate(areapath)
|
||||
//world << " A: [A], contents.len: [A.contents.len]"
|
||||
for(var/area/B in A.related)
|
||||
//world << " B: [B], contents.len: [B.contents.len]"
|
||||
for(var/turf/simulated/floor/F in B.contents)
|
||||
if(!F.contents.len)
|
||||
turfs += F
|
||||
for(var/turf/simulated/floor/F in A.contents)
|
||||
if(!F.contents.len)
|
||||
turfs += F
|
||||
|
||||
var/list/spawn_types = list()
|
||||
var/max_number
|
||||
@@ -116,4 +115,4 @@
|
||||
|
||||
#undef VERM_MICE
|
||||
#undef VERM_LIZARDS
|
||||
#undef VERM_SPIDERS
|
||||
#undef VERM_SPIDERS
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
/var/global/spacevines_spawned = 0
|
||||
|
||||
/datum/event/spacevine
|
||||
announceWhen = 10
|
||||
|
||||
/datum/event/spacevine/start()
|
||||
spacevine_infestation()
|
||||
spacevines_spawned = 1
|
||||
|
||||
/datum/event/spacevine/announce()
|
||||
command_announcement.Announce("Confirmed outbreak of level 7 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
/var/global/sent_spiders_to_station = 0
|
||||
|
||||
/datum/event/spider_infestation
|
||||
announceWhen = 400
|
||||
|
||||
announceWhen = 90
|
||||
var/spawncount = 1
|
||||
|
||||
|
||||
/datum/event/spider_infestation/setup()
|
||||
announceWhen = rand(announceWhen, announceWhen + 50)
|
||||
spawncount = rand(8, 12) //spiderlings only have a 50% chance to grow big and strong
|
||||
announceWhen = rand(announceWhen, announceWhen + 60)
|
||||
spawncount = rand(4 * severity, 6 * severity) //spiderlings only have a 50% chance to grow big and strong
|
||||
sent_spiders_to_station = 0
|
||||
|
||||
/datum/event/spider_infestation/announce()
|
||||
@@ -26,4 +25,4 @@
|
||||
var/obj/vent = pick(vents)
|
||||
new /obj/effect/spider/spiderling(vent.loc)
|
||||
vents -= vent
|
||||
spawncount--
|
||||
spawncount--
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/obj/item/weapon/pen
|
||||
description_info = {"This is an item for writing down your thoughts, on paper or elsewhere. The following special commands are available:
|
||||
Pen and crayon commands
|
||||
\[br\] : Creates a linebreak.
|
||||
\[center\] - \[/center\] : Centers the text.
|
||||
\[h1\] - \[/h1\] : Makes the text a first level heading.
|
||||
\[h2\] - \[/h2\] : Makes the text a second level headin.
|
||||
\[h3\] - \[/h3\] : Makes the text a third level heading.
|
||||
\[b\] - \[/b\] : Makes the text bold.
|
||||
\[i\] - \[/i\] : Makes the text italic.
|
||||
\[u\] - \[/u\] : Makes the text underlined.
|
||||
\[large\] - \[/large\] : Increases the size of the text.
|
||||
\[sign\] : Inserts a signature of your name in a foolproof way.
|
||||
\[field\] : Inserts an invisible field which lets you start type from there. Useful for forms.
|
||||
\[date\] : Inserts today's station date.
|
||||
\[time\] : Inserts the current station time.
|
||||
Pen exclusive commands
|
||||
\[small\] - \[/small\] : Decreases the size of the text.
|
||||
\[list\] - \[/list\] : A list.
|
||||
\[*\] : A dot used for lists.
|
||||
\[hr\] : Adds a horizontal rule."}
|
||||
@@ -1,5 +1,8 @@
|
||||
// Holographic Items!
|
||||
|
||||
// Holographic tables are in code/modules/tables/presets.dm
|
||||
// Holographic racks are in code/modules/tables/rack.dm
|
||||
|
||||
/turf/simulated/floor/holofloor/
|
||||
thermal_conductivity = 0
|
||||
|
||||
@@ -40,36 +43,6 @@
|
||||
return
|
||||
// HOLOFLOOR DOES NOT GIVE A FUCK
|
||||
|
||||
/obj/structure/table/holotable
|
||||
name = "table"
|
||||
desc = "A square piece of metal standing on four metal legs. It can not move."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "table"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
layer = 2.8
|
||||
throwpass = 1 //You can throw objects over this, despite it's density.
|
||||
|
||||
/obj/structure/table/holotable/attack_hand(mob/user as mob)
|
||||
return // HOLOTABLE DOES NOT GIVE A FUCK
|
||||
|
||||
|
||||
/obj/structure/table/holotable/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
user << "It's a holotable! There are no bolts!"
|
||||
return
|
||||
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/obj/structure/table/woodentable/holotable
|
||||
name = "table"
|
||||
desc = "A square piece of wood standing on four wooden legs. It can not move."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "wood_table"
|
||||
|
||||
/obj/structure/holostool
|
||||
name = "stool"
|
||||
desc = "Apply butt."
|
||||
@@ -192,6 +165,7 @@
|
||||
|
||||
/obj/item/weapon/holo
|
||||
damtype = HALLOSS
|
||||
no_attack_log = 1
|
||||
|
||||
/obj/item/weapon/holo/esword
|
||||
desc = "May the force be within you. Sorta."
|
||||
@@ -370,22 +344,6 @@
|
||||
for(var/mob/M in currentarea)
|
||||
M << "FIGHT!"
|
||||
|
||||
//Holorack
|
||||
|
||||
/obj/structure/table/rack/holorack
|
||||
name = "rack"
|
||||
desc = "Different from the Middle Ages version."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "rack"
|
||||
|
||||
/obj/structure/table/rack/holorack/attack_hand(mob/user as mob)
|
||||
return
|
||||
|
||||
/obj/structure/table/rack/holorack/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
user << "It's a holorack! You can't unwrench it!"
|
||||
return
|
||||
|
||||
//Holocarp
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/holodeck
|
||||
@@ -400,7 +358,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/holodeck/New()
|
||||
..()
|
||||
SetLuminosity(2) //hologram lighting
|
||||
set_light(2) //hologram lighting
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/holodeck/proc/set_safety(var/safe)
|
||||
if (safe)
|
||||
|
||||
@@ -341,9 +341,6 @@
|
||||
..()
|
||||
if(!seed)
|
||||
return
|
||||
if(seed.get_trait(TRAIT_BIOLUM))
|
||||
user.SetLuminosity(user.luminosity + seed.get_trait(TRAIT_BIOLUM))
|
||||
SetLuminosity(0)
|
||||
if(seed.get_trait(TRAIT_STINGS))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(istype(H) && H.gloves)
|
||||
@@ -354,12 +351,6 @@
|
||||
seed.do_thorns(H,src)
|
||||
seed.do_sting(H,src,pick("r_hand","l_hand"))
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/dropped(mob/user)
|
||||
..()
|
||||
if(seed && seed.get_trait(TRAIT_BIOLUM))
|
||||
user.SetLuminosity(user.luminosity - seed.get_trait(TRAIT_BIOLUM))
|
||||
SetLuminosity(seed.get_trait(TRAIT_BIOLUM))
|
||||
|
||||
// Predefined types for placing on the map.
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap
|
||||
|
||||
@@ -165,9 +165,10 @@
|
||||
if(!istype(splat)) // Plants handle their own stuff.
|
||||
splat.name = "[thrown.name] [pick("smear","smudge","splatter")]"
|
||||
if(get_trait(TRAIT_BIOLUM))
|
||||
var/clr
|
||||
if(get_trait(TRAIT_BIOLUM_COLOUR))
|
||||
splat.l_color = get_trait(TRAIT_BIOLUM_COLOUR)
|
||||
splat.SetLuminosity(get_trait(TRAIT_BIOLUM))
|
||||
clr = get_trait(TRAIT_BIOLUM_COLOUR)
|
||||
splat.set_light(get_trait(TRAIT_BIOLUM), l_color = clr)
|
||||
if(get_trait(TRAIT_PRODUCT_COLOUR))
|
||||
splat.color = get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
|
||||
@@ -276,12 +277,11 @@
|
||||
|
||||
// Handle light requirements.
|
||||
if(!light_supplied)
|
||||
var/area/A = get_area(current_turf)
|
||||
if(A)
|
||||
if(A.lighting_use_dynamic)
|
||||
light_supplied = max(0,min(10,current_turf.lighting_lumcount)-5)
|
||||
else
|
||||
light_supplied = 5
|
||||
var/atom/movable/lighting_overlay/L = locate(/atom/movable/lighting_overlay) in current_turf
|
||||
if(L)
|
||||
light_supplied = max(0,min(10,L.lum_r + L.lum_g + L.lum_b)-5)
|
||||
else
|
||||
light_supplied = 5
|
||||
if(light_supplied)
|
||||
if(abs(light_supplied - get_trait(TRAIT_IDEAL_LIGHT)) > get_trait(TRAIT_LIGHT_TOLERANCE))
|
||||
health_change += rand(1,3) * HYDRO_SPEED_MULTIPLIER
|
||||
@@ -696,9 +696,10 @@
|
||||
product.desc += " On second thought, something about this one looks strange."
|
||||
|
||||
if(get_trait(TRAIT_BIOLUM))
|
||||
var/clr
|
||||
if(get_trait(TRAIT_BIOLUM_COLOUR))
|
||||
product.l_color = get_trait(TRAIT_BIOLUM_COLOUR)
|
||||
product.SetLuminosity(get_trait(TRAIT_BIOLUM))
|
||||
clr = get_trait(TRAIT_BIOLUM_COLOUR)
|
||||
product.set_light(get_trait(TRAIT_BIOLUM), l_color = clr)
|
||||
|
||||
//Handle spawning in living, mobile products (like dionaea).
|
||||
if(istype(product,/mob/living))
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
if(S.seed && S.seed.get_trait(TRAIT_IMMUTABLE) > 0)
|
||||
user << "That seed is not compatible with our genetics technology."
|
||||
else
|
||||
user.remove_from_mob(W)
|
||||
user.drop_from_inventory(W)
|
||||
W.loc = src
|
||||
seed = W
|
||||
user << "You load [W] into [src]."
|
||||
@@ -120,7 +120,7 @@
|
||||
user << "That disk does not have any gene data loaded."
|
||||
return
|
||||
|
||||
user.remove_from_mob(W)
|
||||
user.drop_from_inventory(W)
|
||||
W.loc = src
|
||||
loaded_disk = W
|
||||
user << "You load [W] into [src]."
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
spawn(75)
|
||||
if(!host.ckey && !host.client)
|
||||
host.death() // This seems redundant, but a lot of mobs don't
|
||||
host.stat = 2 // handle death() properly. Better safe than etc.
|
||||
host.stat = DEAD // handle death() properly. Better safe than etc.
|
||||
host.visible_message("<span class='danger'>[host] is malformed and unable to survive. It expires pitifully, leaving behind some seeds.</span>")
|
||||
|
||||
var/total_yield = rand(1,3)
|
||||
@@ -27,7 +27,7 @@
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
if(jobban_isbanned(O, "Dionaea"))
|
||||
continue
|
||||
if(O.client)
|
||||
if(O.client && O.MayRespawn())
|
||||
if(O.client.prefs.be_special & BE_PLANT && !(O.client in currently_querying))
|
||||
currently_querying |= O.client
|
||||
question(O.client,host)
|
||||
|
||||
@@ -1,22 +1,28 @@
|
||||
#define DEFAULT_SEED "glowshroom"
|
||||
#define VINE_GROWTH_STAGES 5
|
||||
|
||||
/proc/spacevine_infestation()
|
||||
/proc/spacevine_infestation(var/potency_min=70, var/potency_max=100, var/maturation_min=5, var/maturation_max=15)
|
||||
spawn() //to stop the secrets panel hanging
|
||||
var/list/turf/simulated/floor/turfs = list() //list of all the empty floor turfs in the hallway areas
|
||||
for(var/areapath in typesof(/area/hallway))
|
||||
var/area/A = locate(areapath)
|
||||
for(var/area/B in A.related)
|
||||
for(var/turf/simulated/floor/F in B.contents)
|
||||
if(!F.contents.len)
|
||||
turfs += F
|
||||
for(var/turf/simulated/floor/F in A.contents)
|
||||
if(!F.contents.len)
|
||||
turfs += F
|
||||
|
||||
if(turfs.len) //Pick a turf to spawn at if we can
|
||||
var/turf/simulated/floor/T = pick(turfs)
|
||||
var/datum/seed/seed = plant_controller.create_random_seed(1)
|
||||
seed.set_trait(TRAIT_SPREAD,2) // So it will function properly as vines.
|
||||
seed.set_trait(TRAIT_POTENCY,rand(70,100)) // Guarantee a wide spread and powerful effects.
|
||||
new /obj/effect/plant(T,seed)
|
||||
seed.set_trait(TRAIT_POTENCY,rand(potency_min, potency_max)) // 70-100 potency will help guarantee a wide spread and powerful effects.
|
||||
seed.set_trait(TRAIT_MATURATION,rand(maturation_min, maturation_max))
|
||||
|
||||
//make vine zero start off fully matured
|
||||
var/obj/effect/plant/vine = new(T,seed)
|
||||
vine.health = vine.max_health
|
||||
vine.mature_time = 0
|
||||
vine.process()
|
||||
|
||||
message_admins("<span class='notice'>Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])</span>")
|
||||
|
||||
/obj/effect/dead_plant
|
||||
@@ -43,6 +49,7 @@
|
||||
icon_state = "bush4-1"
|
||||
layer = 3
|
||||
pass_flags = PASSTABLE
|
||||
mouse_opacity = 2
|
||||
|
||||
var/health = 10
|
||||
var/max_health = 100
|
||||
@@ -57,6 +64,7 @@
|
||||
var/spread_chance = 40
|
||||
var/spread_distance = 3
|
||||
var/evolve_chance = 2
|
||||
var/mature_time //minimum maturation time
|
||||
var/last_tick = 0
|
||||
var/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/plant
|
||||
|
||||
@@ -112,6 +120,7 @@
|
||||
if(max_growth > 2 && prob(50))
|
||||
max_growth-- //Ensure some variation in final sprite, makes the carpet of crap look less wonky.
|
||||
|
||||
mature_time = world.time + seed.get_trait(TRAIT_MATURATION) + 15 //prevent vines from maturing until at least a few seconds after they've been created.
|
||||
spread_chance = seed.get_trait(TRAIT_POTENCY)
|
||||
spread_distance = ((growth_type>0) ? round(spread_chance*0.6) : round(spread_chance*0.3))
|
||||
update_icon()
|
||||
@@ -146,14 +155,13 @@
|
||||
color = icon_colour
|
||||
// Apply colour and light from seed datum.
|
||||
if(seed.get_trait(TRAIT_BIOLUM))
|
||||
SetLuminosity(1+round(seed.get_trait(TRAIT_POTENCY)/20))
|
||||
var/clr
|
||||
if(seed.get_trait(TRAIT_BIOLUM_COLOUR))
|
||||
l_color = seed.get_trait(TRAIT_BIOLUM_COLOUR)
|
||||
else
|
||||
l_color = null
|
||||
clr = seed.get_trait(TRAIT_BIOLUM_COLOUR)
|
||||
set_light(1+round(seed.get_trait(TRAIT_POTENCY)/20), l_color = clr)
|
||||
return
|
||||
else
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
|
||||
/obj/effect/plant/proc/refresh_icon()
|
||||
var/growth = min(max_growth,round(health/growth_threshold))
|
||||
@@ -256,4 +264,4 @@
|
||||
die_off()
|
||||
|
||||
/obj/effect/plant/proc/is_mature()
|
||||
return (health >= (max_health/3))
|
||||
return (health >= (max_health/3) && world.time > mature_time)
|
||||
|
||||
@@ -70,7 +70,10 @@
|
||||
update_neighbors()
|
||||
|
||||
if(is_mature() && neighbors.len && prob(spread_chance))
|
||||
for(var/i=1,i<=seed.get_trait(TRAIT_YIELD),i++)
|
||||
//spread to 1-3 adjacent turfs depending on yield trait.
|
||||
var/max_spread = between(1, round(seed.get_trait(TRAIT_YIELD)*3/14), 3)
|
||||
|
||||
for(var/i in 1 to max_spread)
|
||||
if(prob(spread_chance))
|
||||
sleep(rand(3,5))
|
||||
if(!neighbors.len)
|
||||
|
||||
@@ -7,11 +7,16 @@
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
if(!buckled_mob && !M.buckled && !M.anchored && (M.small || prob(round(seed.get_trait(TRAIT_POTENCY)/2))))
|
||||
entangle(M)
|
||||
if(!buckled_mob && !M.buckled && !M.anchored && (M.small || prob(round(seed.get_trait(TRAIT_POTENCY)/6))))
|
||||
//wait a tick for the Entered() proc that called HasProximity() to finish (and thus the moving animation),
|
||||
//so we don't appear to teleport from two tiles away when moving into a turf adjacent to vines.
|
||||
spawn(1)
|
||||
entangle(M)
|
||||
|
||||
/obj/effect/plant/attack_hand(mob/user as mob)
|
||||
// Todo, cause damage.
|
||||
/obj/effect/plant/attack_hand(var/mob/user)
|
||||
manual_unbuckle(user)
|
||||
|
||||
/obj/effect/plant/attack_generic(var/mob/user)
|
||||
manual_unbuckle(user)
|
||||
|
||||
/obj/effect/plant/proc/trodden_on(var/mob/living/victim)
|
||||
@@ -60,13 +65,11 @@
|
||||
if(buckled_mob)
|
||||
return
|
||||
|
||||
if(!Adjacent(victim))
|
||||
if(victim.buckled)
|
||||
return
|
||||
|
||||
victim.buckled = src
|
||||
victim.update_canmove()
|
||||
buckled_mob = victim
|
||||
if(!victim.anchored && !victim.buckled && victim.loc != get_turf(src))
|
||||
//grabbing people
|
||||
if(!victim.anchored && Adjacent(victim) && victim.loc != get_turf(src))
|
||||
var/can_grab = 1
|
||||
if(istype(victim, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = victim
|
||||
@@ -75,4 +78,9 @@
|
||||
if(can_grab)
|
||||
src.visible_message("<span class='danger'>Tendrils lash out from \the [src] and drag \the [victim] in!</span>")
|
||||
victim.loc = src.loc
|
||||
victim << "<span class='danger'>Tendrils [pick("wind", "tangle", "tighten")] around you!</span>"
|
||||
|
||||
//entangling people
|
||||
if(victim.loc == src.loc)
|
||||
buckle_mob(victim)
|
||||
victim.set_dir(pick(cardinal))
|
||||
victim << "<span class='danger'>Tendrils [pick("wind", "tangle", "tighten")] around you!</span>"
|
||||
|
||||
@@ -350,7 +350,7 @@
|
||||
usr << "There is no label to remove."
|
||||
return
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/verb/set_light()
|
||||
/obj/machinery/portable_atmospherics/hydroponics/verb/setlight()
|
||||
set name = "Set Light"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
@@ -596,13 +596,12 @@
|
||||
if(closed_system && mechanical)
|
||||
light_string = "that the internal lights are set to [tray_light] lumens"
|
||||
else
|
||||
var/area/A = T.loc
|
||||
var/atom/movable/lighting_overlay/L = locate(/atom/movable/lighting_overlay) in T
|
||||
var/light_available
|
||||
if(A)
|
||||
if(A.lighting_use_dynamic)
|
||||
light_available = max(0,min(10,T.lighting_lumcount)-5)
|
||||
else
|
||||
light_available = 5
|
||||
if(L)
|
||||
light_available = max(0,min(10,L.lum_r + L.lum_g + L.lum_b)-5)
|
||||
else
|
||||
light_available = 5
|
||||
light_string = "a light level of [light_available] lumens"
|
||||
|
||||
usr << "The tray's sensor suite is reporting [light_string] and a temperature of [environment.temperature]K."
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// Handle nearby smoke if any.
|
||||
for(var/obj/effect/effect/smoke/chem/smoke in view(1, src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.copy_to(src, 5)
|
||||
smoke.reagents.trans_to_obj(src, 5, copy = 1)
|
||||
|
||||
//Do this even if we're not ready for a plant cycle.
|
||||
process_reagents()
|
||||
@@ -120,6 +120,14 @@
|
||||
harvest = 1
|
||||
lastproduce = age
|
||||
|
||||
// If we're a vine which is not in a closed tray and is at least half mature, and there's no vine currently on our turf: make one (maybe)
|
||||
if(!closed_system && \
|
||||
seed.get_trait(TRAIT_SPREAD) == 2 && \
|
||||
2 * age >= seed.get_trait(TRAIT_MATURATION) && \
|
||||
!(locate(/obj/effect/plant) in get_turf(src)) && \
|
||||
prob(2 * seed.get_trait(TRAIT_POTENCY)))
|
||||
new /obj/effect/plant(get_turf(src), seed)
|
||||
|
||||
if(prob(3)) // On each tick, there's a chance the pest population will increase
|
||||
pestlevel += 0.1 * HYDRO_SPEED_MULTIPLIER
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
force = 5.0
|
||||
throwforce = 7.0
|
||||
w_class = 2.0
|
||||
matter = list("metal" = 50)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50)
|
||||
attack_verb = list("slashed", "sliced", "cut", "clawed")
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
..()
|
||||
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/close_lid_verb
|
||||
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/remove_label
|
||||
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/set_light
|
||||
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/setlight
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/soil/CanPass()
|
||||
return 1
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
|
||||
switch(grown_seed.get_trait(TRAIT_CARNIVOROUS))
|
||||
if(1)
|
||||
dat += "<br>It is carniovorous and will eat tray pests for sustenance."
|
||||
dat += "<br>It is carnivorous and will eat tray pests for sustenance."
|
||||
if(2)
|
||||
dat += "<br>It is carnivorous and poses a significant threat to living things around it."
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
force = 5.0
|
||||
throwforce = 7.0
|
||||
w_class = 2.0
|
||||
matter = list("metal" = 50)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50)
|
||||
attack_verb = list("slashed", "sliced", "cut", "clawed")
|
||||
|
||||
//Hatchets and things to kill kudzu
|
||||
@@ -226,13 +226,13 @@
|
||||
icon_state = "hatchet"
|
||||
flags = CONDUCT
|
||||
force = 12.0
|
||||
w_class = 3.0
|
||||
w_class = 2
|
||||
throwforce = 15.0
|
||||
throw_speed = 4
|
||||
throw_range = 4
|
||||
sharp = 1
|
||||
edge = 1
|
||||
matter = list("metal" = 15000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 15000)
|
||||
origin_tech = "materials=2;combat=1"
|
||||
attack_verb = list("chopped", "torn", "cut")
|
||||
|
||||
@@ -270,11 +270,3 @@
|
||||
slot_flags = SLOT_BACK
|
||||
origin_tech = "materials=2;combat=2"
|
||||
attack_verb = list("chopped", "sliced", "cut", "reaped")
|
||||
|
||||
/obj/item/weapon/scythe/afterattack(atom/A, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if(istype(A, /obj/effect/plant))
|
||||
for(var/obj/effect/plant/B in orange(A,1))
|
||||
if(prob(80))
|
||||
B.die_off(1)
|
||||
qdel(A)
|
||||
@@ -73,12 +73,11 @@
|
||||
// Update bioluminescence.
|
||||
if(seed)
|
||||
if(seed.get_trait(TRAIT_BIOLUM))
|
||||
SetLuminosity(round(seed.get_trait(TRAIT_POTENCY)/10))
|
||||
var/clr
|
||||
if(seed.get_trait(TRAIT_BIOLUM_COLOUR))
|
||||
l_color = seed.get_trait(TRAIT_BIOLUM_COLOUR)
|
||||
else
|
||||
l_color = null
|
||||
clr = seed.get_trait(TRAIT_BIOLUM_COLOUR)
|
||||
set_light(round(seed.get_trait(TRAIT_POTENCY)/10), l_color = clr)
|
||||
return
|
||||
|
||||
SetLuminosity(0)
|
||||
return
|
||||
set_light(0)
|
||||
return
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
BS12 object based lighting system
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes from tg DAL:
|
||||
- Lighting is done using objects instead of subareas.
|
||||
- Animated transitions. (newer tg DAL has this)
|
||||
- Full colours with mixing.
|
||||
- Support for lights on shuttles.
|
||||
|
||||
- Code:
|
||||
- Instead of one flat luminosity var, light is represented by 3 atom vars:
|
||||
- light_range; range in tiles of the light, used for calculating falloff,
|
||||
- light_power; multiplier for the brightness of lights,
|
||||
- light_color; hex string representing the RGB colour of the light.
|
||||
- SetLuminosity() is now set_light() and takes the three variables above.
|
||||
- Variables can be left as null to not update them.
|
||||
- SetOpacity() is now set_opacity().
|
||||
- Areas have luminosity set to 1 permanently, no hard-lighting.
|
||||
- Objects inside other objects can have lights and they properly affect the turf. (flashlights)
|
||||
- area/master and area/list/related have been eviscerated since subareas aren't needed.
|
||||
*/
|
||||
|
||||
/*
|
||||
Relevant vars/procs:
|
||||
|
||||
atom: (lighting_atom.dm)
|
||||
- var/light_range; range in tiles of the light, used for calculating falloff
|
||||
- var/light_power; multiplier for the brightness of lights
|
||||
- var/light_color; hex string representing the RGB colour of the light
|
||||
|
||||
- var/datum/light_source/light; light source datum for this atom, only present if light_range && light_power
|
||||
- var/list/light_sources; light sources in contents that are shining through this object, including this object
|
||||
|
||||
- proc/set_light(l_range, l_power, l_color):
|
||||
- Sets light_range/power/color to non-null args and calls update_light()
|
||||
- proc/set_opacity(new_opacity):
|
||||
- Sets opacity to new_opacity.
|
||||
- If opacity has changed, call turf.reconsider_lights() to fix light occlusion
|
||||
- proc/update_light():
|
||||
- Updates the light var on this atom, deleting or creating as needed and calling .update()
|
||||
|
||||
|
||||
turf: (lighting_turf.dm)
|
||||
- var/list/affecting_lights; list of light sources that are shining onto this turf
|
||||
|
||||
- proc/reconsider_lights():
|
||||
- Force all light sources shining onto this turf to update
|
||||
|
||||
- proc/lighting_clear_overlays():
|
||||
- Delete (manual GC) all light overlays on this turf, used when changing turf to space
|
||||
- proc/lighting_build_overlays():
|
||||
- Create lighting overlays for this turf
|
||||
|
||||
|
||||
atom/movable/lighting_overlay: (lighting_overlay.dm)
|
||||
- var/lum_r, var/lum_g, var/lum_b; lumcounts of each colour
|
||||
- var/needs_update; set on update_lumcount, checked by lighting process
|
||||
|
||||
- var/xoffset, var/yoffset; (only present when using sub-tile overlays) fractional offset of this overlay in the tile
|
||||
|
||||
- proc/update_lumcount(delta_r, delta_g, delta_b):
|
||||
- Change the lumcount vars and queue the overlay for update
|
||||
- proc/update_overlay()
|
||||
- Called by the lighting process to update the color of the overlay
|
||||
*/
|
||||
@@ -0,0 +1,10 @@
|
||||
#define LIGHTING_INTERVAL 5 // frequency, in 1/10ths of a second, of the lighting process
|
||||
|
||||
#define LIGHTING_FALLOFF 1 // type of falloff to use for lighting; 1 for circular, 2 for square
|
||||
#define LIGHTING_LAMBERTIAN 1 // use lambertian shading for light sources
|
||||
#define LIGHTING_HEIGHT 1 // height off the ground of light sources on the pseudo-z-axis, you should probably leave this alone
|
||||
#define LIGHTING_TRANSITIONS 1 // smooth, animated transitions, similar to /tg/station
|
||||
|
||||
#define LIGHTING_RESOLUTION 1 // resolution of the lighting overlays, powers of 2 only, max of 32
|
||||
#define LIGHTING_LAYER 10 // drawing layer for lighting overlays
|
||||
#define LIGHTING_ICON 'icons/effects/lighting_overlay.dmi' // icon used for lighting shading effects
|
||||
@@ -0,0 +1,169 @@
|
||||
/datum/light_source
|
||||
var/atom/top_atom
|
||||
var/atom/source_atom
|
||||
|
||||
var/turf/source_turf
|
||||
var/light_power
|
||||
var/light_range
|
||||
var/light_color // string, decomposed by parse_light_color()
|
||||
|
||||
var/lum_r
|
||||
var/lum_g
|
||||
var/lum_b
|
||||
|
||||
var/list/effect_r
|
||||
var/list/effect_g
|
||||
var/list/effect_b
|
||||
var/list/effect_turf
|
||||
|
||||
var/applied
|
||||
|
||||
var/needs_update
|
||||
var/destroyed
|
||||
var/force_update
|
||||
|
||||
/datum/light_source/New(atom/owner, atom/top)
|
||||
source_atom = owner
|
||||
if(!source_atom.light_sources) source_atom.light_sources = list()
|
||||
source_atom.light_sources += src
|
||||
top_atom = top
|
||||
if(top_atom != source_atom)
|
||||
if(!top.light_sources) top.light_sources = list()
|
||||
top_atom.light_sources += src
|
||||
|
||||
source_turf = top_atom
|
||||
light_power = source_atom.light_power
|
||||
light_range = source_atom.light_range
|
||||
light_color = source_atom.light_color
|
||||
|
||||
parse_light_color()
|
||||
|
||||
effect_r = list()
|
||||
effect_g = list()
|
||||
effect_b = list()
|
||||
effect_turf = list()
|
||||
|
||||
update()
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/light_source/proc/destroy()
|
||||
destroyed = 1
|
||||
force_update()
|
||||
if(source_atom) source_atom.light_sources -= src
|
||||
if(top_atom) top_atom.light_sources -= src
|
||||
|
||||
/datum/light_source/proc/update(atom/new_top_atom)
|
||||
if(new_top_atom && new_top_atom != top_atom)
|
||||
if(top_atom != source_atom) top_atom.light_sources -= src
|
||||
top_atom = new_top_atom
|
||||
if(top_atom != source_atom)
|
||||
if(!top_atom.light_sources) top_atom.light_sources = list()
|
||||
top_atom.light_sources += src
|
||||
lighting_update_lights += src
|
||||
needs_update = 1
|
||||
|
||||
/datum/light_source/proc/force_update()
|
||||
needs_update = 1
|
||||
force_update = 1
|
||||
lighting_update_lights += src
|
||||
|
||||
/datum/light_source/proc/check()
|
||||
if(!source_atom || !light_range || !light_power)
|
||||
destroy()
|
||||
return 1
|
||||
|
||||
if(!top_atom)
|
||||
top_atom = source_atom
|
||||
. = 1
|
||||
|
||||
if(istype(top_atom, /turf))
|
||||
if(source_turf != top_atom)
|
||||
source_turf = top_atom
|
||||
. = 1
|
||||
else if(top_atom.loc != source_turf)
|
||||
source_turf = top_atom.loc
|
||||
. = 1
|
||||
|
||||
if(source_atom.light_power != light_power)
|
||||
light_power = source_atom.light_power
|
||||
. = 1
|
||||
|
||||
if(source_atom.light_range != light_range)
|
||||
light_range = source_atom.light_range
|
||||
. = 1
|
||||
|
||||
if(source_atom.light_color != light_color)
|
||||
light_color = source_atom.light_color
|
||||
parse_light_color()
|
||||
. = 1
|
||||
|
||||
if(light_range && light_power && !applied)
|
||||
. = 1
|
||||
|
||||
/datum/light_source/proc/parse_light_color()
|
||||
if(light_color)
|
||||
lum_r = GetRedPart(light_color) / 255
|
||||
lum_g = GetGreenPart(light_color) / 255
|
||||
lum_b = GetBluePart(light_color) / 255
|
||||
else
|
||||
lum_r = 1
|
||||
lum_g = 1
|
||||
lum_b = 1
|
||||
|
||||
/datum/light_source/proc/falloff(atom/movable/lighting_overlay/O)
|
||||
#if LIGHTING_FALLOFF == 1 // circular
|
||||
#if LIGHTING_RESOLUTION == 1
|
||||
. = (O.x - source_turf.x)**2 + (O.y - source_turf.y)**2 + LIGHTING_HEIGHT
|
||||
#else
|
||||
. = (O.x - source_turf.x + O.xoffset)**2 + (O.y - source_turf.y + O.yoffset)**2 + LIGHTING_HEIGHT
|
||||
#endif
|
||||
|
||||
#if LIGHTING_LAMBERTIAN == 1
|
||||
. = CLAMP01((1 - CLAMP01(sqrt(.) / light_range)) * (1 / (sqrt(. + 1))))
|
||||
#else
|
||||
. = 1 - CLAMP01(sqrt(.) / light_range)
|
||||
#endif
|
||||
|
||||
#elif LIGHTING_FALLOFF == 2 // square
|
||||
#if LIGHTING_RESOLUTION == 1
|
||||
. = abs(O.x - source_turf.x) + abs(O.y - source_turf.y) + LIGHTING_HEIGHT
|
||||
#else
|
||||
. = abs(O.x - source_turf.x + O.xoffset) + abs(O.y - source_turf.y + O.yoffset) + LIGHTING_HEIGHT
|
||||
#endif
|
||||
|
||||
#if LIGHTING_LAMBERTIAN == 1
|
||||
. = CLAMP01((1 - CLAMP01(. / light_range)) * (1 / (sqrt(.)**2 + )))
|
||||
#else
|
||||
. = 1 - CLAMP01(. / light_range)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/datum/light_source/proc/apply_lum()
|
||||
applied = 1
|
||||
if(istype(source_turf))
|
||||
for(var/atom/movable/lighting_overlay/O in view(light_range, source_turf))
|
||||
var/strength = light_power * falloff(O)
|
||||
|
||||
effect_r[O] = lum_r * strength
|
||||
effect_g[O] = lum_g * strength
|
||||
effect_b[O] = lum_b * strength
|
||||
|
||||
O.update_lumcount(lum_r * strength, lum_g * strength, lum_b * strength)
|
||||
for(var/turf/T in view(light_range, source_turf))
|
||||
if(!T.affecting_lights) T.affecting_lights = list()
|
||||
T.affecting_lights += src
|
||||
effect_turf += T
|
||||
|
||||
/datum/light_source/proc/remove_lum()
|
||||
applied = 0
|
||||
for(var/atom/movable/lighting_overlay/O in effect_r)
|
||||
O.update_lumcount(-effect_r[O], -effect_g[O], -effect_b[O])
|
||||
|
||||
for(var/turf/T in effect_turf)
|
||||
if(T.affecting_lights) T.affecting_lights -= src
|
||||
|
||||
effect_r.Cut()
|
||||
effect_g.Cut()
|
||||
effect_b.Cut()
|
||||
effect_turf.Cut()
|
||||
@@ -0,0 +1,81 @@
|
||||
/atom
|
||||
var/light_power = 1 // intensity of the light
|
||||
var/light_range = 0 // range in tiles of the light
|
||||
var/light_color // RGB string representing the colour of the light
|
||||
|
||||
var/datum/light_source/light
|
||||
var/list/light_sources
|
||||
|
||||
/atom/proc/set_light(l_range, l_power, l_color)
|
||||
if(l_power != null) light_power = l_power
|
||||
if(l_range != null) light_range = l_range
|
||||
if(l_color != null) light_color = l_color
|
||||
|
||||
update_light()
|
||||
|
||||
/atom/proc/update_light()
|
||||
if(!light_power || !light_range)
|
||||
if(light)
|
||||
light.destroy()
|
||||
light = null
|
||||
else
|
||||
if(!istype(loc, /atom/movable))
|
||||
. = src
|
||||
else
|
||||
. = loc
|
||||
|
||||
if(light)
|
||||
light.update(.)
|
||||
else
|
||||
light = new /datum/light_source(src, .)
|
||||
|
||||
/atom/New()
|
||||
. = ..()
|
||||
if(light_power && light_range)
|
||||
update_light()
|
||||
|
||||
/atom/Destroy()
|
||||
if(light)
|
||||
light.destroy()
|
||||
light = null
|
||||
return ..()
|
||||
|
||||
/atom/movable/Destroy()
|
||||
var/turf/T = loc
|
||||
if(opacity && istype(T))
|
||||
T.reconsider_lights()
|
||||
return ..()
|
||||
|
||||
/atom/movable/Move()
|
||||
var/turf/old_loc = loc
|
||||
. = ..()
|
||||
|
||||
if(loc != old_loc)
|
||||
for(var/datum/light_source/L in light_sources)
|
||||
L.source_atom.update_light()
|
||||
|
||||
var/turf/new_loc = loc
|
||||
if(istype(old_loc) && opacity)
|
||||
old_loc.reconsider_lights()
|
||||
|
||||
if(istype(new_loc) && opacity)
|
||||
new_loc.reconsider_lights()
|
||||
|
||||
/atom/proc/set_opacity(new_opacity)
|
||||
var/old_opacity = opacity
|
||||
opacity = new_opacity
|
||||
var/turf/T = loc
|
||||
if(old_opacity != new_opacity && istype(T))
|
||||
T.reconsider_lights()
|
||||
|
||||
/obj/item/equipped()
|
||||
. = ..()
|
||||
update_light()
|
||||
|
||||
/obj/item/pickup()
|
||||
. = ..()
|
||||
update_light()
|
||||
|
||||
/obj/item/dropped()
|
||||
. = ..()
|
||||
update_light()
|
||||
@@ -0,0 +1,48 @@
|
||||
/atom/movable/lighting_overlay
|
||||
name = ""
|
||||
mouse_opacity = 0
|
||||
simulated = 0
|
||||
anchored = 1
|
||||
|
||||
icon = LIGHTING_ICON
|
||||
layer = LIGHTING_LAYER
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
color = "#000000"
|
||||
|
||||
var/lum_r
|
||||
var/lum_g
|
||||
var/lum_b
|
||||
|
||||
#if LIGHTING_RESOLUTION != 1
|
||||
var/xoffset
|
||||
var/yoffset
|
||||
#endif
|
||||
|
||||
var/needs_update
|
||||
|
||||
/atom/movable/lighting_overlay/New()
|
||||
. = ..()
|
||||
verbs.Cut()
|
||||
|
||||
/atom/movable/lighting_overlay/proc/update_lumcount(delta_r, delta_g, delta_b)
|
||||
lum_r += delta_r
|
||||
lum_g += delta_g
|
||||
lum_b += delta_b
|
||||
|
||||
needs_update = 1
|
||||
lighting_update_overlays += src
|
||||
|
||||
/atom/movable/lighting_overlay/proc/update_overlay()
|
||||
var/mx = max(lum_r, lum_g, lum_b)
|
||||
. = 1 // factor
|
||||
if(mx > 1)
|
||||
. = 1/mx
|
||||
#if LIGHTING_TRANSITIONS == 1
|
||||
animate(src,
|
||||
color = rgb(lum_r * 255 * ., lum_g * 255 * ., lum_b * 255 * .),
|
||||
LIGHTING_INTERVAL - 1
|
||||
)
|
||||
#else
|
||||
color = rgb(lum_r * 255 * ., lum_g * 255 * ., lum_b * 255 * .)
|
||||
#endif
|
||||
@@ -0,0 +1,27 @@
|
||||
/datum/controller/process/lighting/setup()
|
||||
name = "lighting"
|
||||
schedule_interval = LIGHTING_INTERVAL
|
||||
|
||||
create_lighting_overlays()
|
||||
|
||||
/datum/controller/process/lighting/doWork()
|
||||
for(var/datum/light_source/L in lighting_update_lights)
|
||||
if(L.needs_update)
|
||||
if(L.destroyed || L.check() || L.force_update)
|
||||
L.remove_lum()
|
||||
if(!L.destroyed) L.apply_lum()
|
||||
L.force_update = 0
|
||||
L.needs_update = 0
|
||||
|
||||
scheck()
|
||||
|
||||
lighting_update_lights.Cut()
|
||||
|
||||
for(var/atom/movable/lighting_overlay/O in lighting_update_overlays)
|
||||
if(O.needs_update)
|
||||
O.update_overlay()
|
||||
O.needs_update = 0
|
||||
|
||||
scheck()
|
||||
|
||||
lighting_update_overlays.Cut()
|
||||
@@ -0,0 +1,47 @@
|
||||
/var/list/lighting_update_lights = list()
|
||||
/var/list/lighting_update_overlays = list()
|
||||
|
||||
/area/var/lighting_use_dynamic = 1
|
||||
|
||||
// duplicates lots of code, but this proc needs to be as fast as possible.
|
||||
/proc/create_lighting_overlays(zlevel = 0)
|
||||
var/state = "light[LIGHTING_RESOLUTION]"
|
||||
var/area/A
|
||||
if(zlevel == 0) // populate all zlevels
|
||||
for(var/turf/T in world)
|
||||
if(T.dynamic_lighting)
|
||||
A = T.loc
|
||||
if(A.lighting_use_dynamic)
|
||||
#if LIGHTING_RESOLUTION == 1
|
||||
var/atom/movable/lighting_overlay/O = new(T)
|
||||
O.icon_state = state
|
||||
#else
|
||||
for(var/i = 0; i < LIGHTING_RESOLUTION; i++)
|
||||
for(var/j = 0; j < LIGHTING_RESOLUTION; j++)
|
||||
var/atom/movable/lighting_overlay/O = new(T)
|
||||
O.pixel_x = i * (32 / LIGHTING_RESOLUTION)
|
||||
O.pixel_y = j * (32 / LIGHTING_RESOLUTION)
|
||||
O.xoffset = (((2*i + 1) / (LIGHTING_RESOLUTION * 2)) - 0.5)
|
||||
O.yoffset = (((2*j + 1) / (LIGHTING_RESOLUTION * 2)) - 0.5)
|
||||
O.icon_state = state
|
||||
#endif
|
||||
else
|
||||
for(var/x = 1; x <= world.maxx; x++)
|
||||
for(var/y = 1; y <= world.maxy; y++)
|
||||
var/turf/T = locate(x, y, zlevel)
|
||||
if(T.dynamic_lighting)
|
||||
A = T.loc
|
||||
if(A.lighting_use_dynamic)
|
||||
#if LIGHTING_RESOLUTION == 1
|
||||
var/atom/movable/lighting_overlay/O = new(T)
|
||||
O.icon_state = state
|
||||
#else
|
||||
for(var/i = 0; i < LIGHTING_RESOLUTION; i++)
|
||||
for(var/j = 0; j < LIGHTING_RESOLUTION; j++)
|
||||
var/atom/movable/lighting_overlay/O = new(T)
|
||||
O.pixel_x = i * (32 / LIGHTING_RESOLUTION)
|
||||
O.pixel_y = j * (32 / LIGHTING_RESOLUTION)
|
||||
O.xoffset = (((2*i + 1) / (LIGHTING_RESOLUTION * 2)) - 0.5)
|
||||
O.yoffset = (((2*j + 1) / (LIGHTING_RESOLUTION * 2)) - 0.5)
|
||||
O.icon_state = state
|
||||
#endif
|
||||
@@ -0,0 +1,29 @@
|
||||
/turf
|
||||
var/list/affecting_lights
|
||||
|
||||
/turf/proc/reconsider_lights()
|
||||
for(var/datum/light_source/L in affecting_lights)
|
||||
L.force_update()
|
||||
|
||||
/turf/proc/lighting_clear_overlays()
|
||||
for(var/atom/movable/lighting_overlay/L in src)
|
||||
L.loc = null
|
||||
|
||||
/turf/proc/lighting_build_overlays()
|
||||
if(!locate(/atom/movable/lighting_overlay) in src)
|
||||
var/state = "light[LIGHTING_RESOLUTION]"
|
||||
var/area/A = loc
|
||||
if(A.lighting_use_dynamic)
|
||||
#if LIGHTING_RESOLUTION == 1
|
||||
var/atom/movable/lighting_overlay/O = new(src)
|
||||
O.icon_state = state
|
||||
#else
|
||||
for(var/i = 0; i < LIGHTING_RESOLUTION; i++)
|
||||
for(var/j = 0; j < LIGHTING_RESOLUTION; j++)
|
||||
var/atom/movable/lighting_overlay/O = new(src)
|
||||
O.pixel_x = i * (32 / LIGHTING_RESOLUTION)
|
||||
O.pixel_y = j * (32 / LIGHTING_RESOLUTION)
|
||||
O.xoffset = (((2*i + 1) / (LIGHTING_RESOLUTION * 2)) - 0.5)
|
||||
O.yoffset = (((2*j + 1) / (LIGHTING_RESOLUTION * 2)) - 0.5)
|
||||
O.icon_state = state
|
||||
#endif
|
||||
@@ -0,0 +1,10 @@
|
||||
#undef LIGHTING_INTERVAL
|
||||
|
||||
#undef LIGHTING_FALLOFF
|
||||
#undef LIGHTING_LAMBERTIAN
|
||||
#undef LIGHTING_HEIGHT
|
||||
#undef LIGHTING_TRANSITIONS
|
||||
|
||||
#undef LIGHTING_RESOLUTION
|
||||
#undef LIGHTING_LAYER
|
||||
#undef LIGHTING_ICON
|
||||
@@ -0,0 +1,233 @@
|
||||
var/list/name_to_material
|
||||
|
||||
/proc/populate_material_list(force_remake=0)
|
||||
if(name_to_material && !force_remake) return // Already set up!
|
||||
name_to_material = list()
|
||||
for(var/type in typesof(/material) - /material)
|
||||
var/material/new_mineral = new type
|
||||
if(!new_mineral.name)
|
||||
continue
|
||||
name_to_material[lowertext(new_mineral.name)] = new_mineral
|
||||
return 1
|
||||
|
||||
/proc/get_material_by_name(name)
|
||||
if(!name_to_material)
|
||||
populate_material_list()
|
||||
|
||||
return name_to_material[name]
|
||||
|
||||
/*
|
||||
Valid sprite masks:
|
||||
stone
|
||||
metal
|
||||
solid
|
||||
cult
|
||||
*/
|
||||
|
||||
/material
|
||||
var/name // Tag for use in overlay generation/list population .
|
||||
var/display_name
|
||||
var/flags = 0
|
||||
var/icon_base = "metal"
|
||||
var/icon_colour
|
||||
var/icon_reinf = "reinf_metal"
|
||||
var/stack_type
|
||||
var/cut_delay = 0
|
||||
var/radioactivity
|
||||
var/ignition_point
|
||||
var/melting_point = 1800 // K, walls will take damage if they're next to a fire hotter than this
|
||||
var/integrity = 150 // Damage before wall falls apart, essentially.
|
||||
var/hardness = 60 // Used to determine if a hulk can punch through this wall.
|
||||
var/rotting_touch_message = "crumbles under your touch"
|
||||
var/opacity = 1
|
||||
var/explosion_resistance = 5
|
||||
var/shard_type = SHARD_SHRAPNEL
|
||||
var/shard_icon
|
||||
var/shard_can_repair = 1
|
||||
var/tableslam_noise = 'sound/weapons/tablehit1.ogg'
|
||||
|
||||
/material/New()
|
||||
..()
|
||||
if(!display_name)
|
||||
display_name = name
|
||||
if(!shard_icon)
|
||||
shard_icon = shard_type
|
||||
|
||||
/material/placeholder
|
||||
name = "placeholder"
|
||||
|
||||
/material/proc/place_dismantled_girder(var/turf/target, var/material/reinf_material)
|
||||
var/obj/structure/girder/G = new(target)
|
||||
if(reinf_material)
|
||||
G.reinf_material = reinf_material
|
||||
G.reinforce_girder()
|
||||
|
||||
/material/proc/place_dismantled_product(var/turf/target,var/is_devastated)
|
||||
for(var/x=1;x<(is_devastated?2:3);x++)
|
||||
place_sheet(target)
|
||||
|
||||
/material/proc/place_sheet(var/turf/target)
|
||||
if(stack_type)
|
||||
return new stack_type(target)
|
||||
|
||||
/material/proc/place_shard(var/turf/target)
|
||||
if(shard_type)
|
||||
return new /obj/item/weapon/shard(target, src)
|
||||
|
||||
/material/proc/is_brittle()
|
||||
return !!(flags & MATERIAL_BRITTLE)
|
||||
|
||||
/material/uranium
|
||||
name = "uranium"
|
||||
stack_type = /obj/item/stack/sheet/mineral/uranium
|
||||
radioactivity = 12
|
||||
icon_base = "stone"
|
||||
icon_reinf = "reinf_stone"
|
||||
icon_colour = "#007A00"
|
||||
|
||||
/material/diamond
|
||||
name = "diamond"
|
||||
stack_type = /obj/item/stack/sheet/mineral/diamond
|
||||
flags = MATERIAL_UNMELTABLE
|
||||
cut_delay = 60
|
||||
icon_colour = "#00FFE1"
|
||||
opacity = 0.4
|
||||
shard_type = SHARD_SHARD
|
||||
tableslam_noise = 'sound/effects/Glasshit.ogg'
|
||||
|
||||
/material/gold
|
||||
name = "gold"
|
||||
stack_type = /obj/item/stack/sheet/mineral/gold
|
||||
icon_colour = "#EDD12F"
|
||||
|
||||
/material/silver
|
||||
name = "silver"
|
||||
stack_type = /obj/item/stack/sheet/mineral/silver
|
||||
icon_colour = "#D1E6E3"
|
||||
|
||||
/material/phoron
|
||||
name = "phoron"
|
||||
stack_type = /obj/item/stack/sheet/mineral/phoron
|
||||
ignition_point = 300
|
||||
icon_base = "stone"
|
||||
icon_colour = "#FC2BC5"
|
||||
shard_type = SHARD_SHARD
|
||||
|
||||
/material/sandstone
|
||||
name = "sandstone"
|
||||
stack_type = /obj/item/stack/sheet/mineral/sandstone
|
||||
icon_base = "stone"
|
||||
icon_reinf = "reinf_stone"
|
||||
icon_colour = "#D9C179"
|
||||
shard_type = SHARD_STONE_PIECE
|
||||
|
||||
/material/steel
|
||||
name = DEFAULT_WALL_MATERIAL
|
||||
stack_type = /obj/item/stack/sheet/metal
|
||||
icon_base = "solid"
|
||||
icon_reinf = "reinf_over"
|
||||
icon_colour = "#666666"
|
||||
|
||||
/material/steel/holographic
|
||||
name = "holographic " + DEFAULT_WALL_MATERIAL
|
||||
display_name = DEFAULT_WALL_MATERIAL
|
||||
stack_type = null
|
||||
shard_type = SHARD_NONE
|
||||
|
||||
/material/plasteel
|
||||
name = "plasteel"
|
||||
stack_type = /obj/item/stack/sheet/plasteel
|
||||
integrity = 800
|
||||
melting_point = 6000
|
||||
icon_base = "solid"
|
||||
icon_reinf = "reinf_over"
|
||||
icon_colour = "#777777"
|
||||
explosion_resistance = 25
|
||||
|
||||
/material/glass
|
||||
name = "glass"
|
||||
stack_type = /obj/item/stack/sheet/glass
|
||||
flags = MATERIAL_BRITTLE
|
||||
icon_colour = "#00E1FF"
|
||||
opacity = 0.3
|
||||
integrity = 100
|
||||
shard_type = SHARD_SHARD
|
||||
tableslam_noise = 'sound/effects/Glasshit.ogg'
|
||||
|
||||
/material/glass/phoron
|
||||
name = "phoron glass"
|
||||
stack_type = /obj/item/stack/sheet/glass/phoronglass
|
||||
flags = MATERIAL_BRITTLE
|
||||
ignition_point = 300
|
||||
integrity = 200 // idk why but phoron windows are strong, so.
|
||||
icon_colour = "#FC2BC5"
|
||||
|
||||
/material/plastic
|
||||
name = "plastic"
|
||||
stack_type = /obj/item/stack/sheet/mineral/plastic
|
||||
flags = MATERIAL_BRITTLE
|
||||
icon_base = "solid"
|
||||
icon_reinf = "reinf_over"
|
||||
icon_colour = "#CCCCCC"
|
||||
|
||||
/material/osmium
|
||||
name = "osmium"
|
||||
stack_type = /obj/item/stack/sheet/mineral/osmium
|
||||
icon_colour = "#9999FF"
|
||||
|
||||
/material/tritium
|
||||
name = "tritium"
|
||||
stack_type = /obj/item/stack/sheet/mineral/tritium
|
||||
icon_colour = "#777777"
|
||||
|
||||
/material/mhydrogen
|
||||
name = "mhydrogen"
|
||||
stack_type = /obj/item/stack/sheet/mineral/mhydrogen
|
||||
icon_colour = "#E6C5DE"
|
||||
|
||||
/material/platinum
|
||||
name = "platinum"
|
||||
stack_type = /obj/item/stack/sheet/mineral/platinum
|
||||
icon_colour = "#9999FF"
|
||||
|
||||
/material/iron
|
||||
name = "iron"
|
||||
stack_type = /obj/item/stack/sheet/mineral/iron
|
||||
icon_colour = "#5C5454"
|
||||
|
||||
/material/wood
|
||||
name = "wood"
|
||||
stack_type = /obj/item/stack/sheet/wood
|
||||
icon_colour = "#824B28"
|
||||
integrity = 25
|
||||
icon_base = "solid"
|
||||
explosion_resistance = 2
|
||||
shard_type = SHARD_SPLINTER
|
||||
shard_can_repair = 0 // you can't weld splinters back into planks
|
||||
|
||||
/material/wood/holographic
|
||||
name = "holographic wood"
|
||||
display_name = "wood"
|
||||
stack_type = null
|
||||
shard_type = SHARD_NONE
|
||||
|
||||
/material/cult
|
||||
name = "cult"
|
||||
display_name = "disturbing stone"
|
||||
icon_base = "cult"
|
||||
icon_colour = "#402821"
|
||||
icon_reinf = "reinf_cult"
|
||||
shard_type = SHARD_STONE_PIECE
|
||||
|
||||
/material/cult/place_dismantled_girder(var/turf/target)
|
||||
new /obj/structure/girder/cult(target)
|
||||
|
||||
/material/cult/place_dismantled_product(var/turf/target)
|
||||
new /obj/effect/decal/cleanable/blood(target)
|
||||
|
||||
/material/cult/reinf
|
||||
name = "cult2"
|
||||
display_name = "human remains"
|
||||
|
||||
/material/cult/reinf/place_dismantled_product(var/turf/target)
|
||||
new /obj/effect/decal/remains/human(target)
|
||||
@@ -120,7 +120,7 @@
|
||||
new/obj/item/clothing/mask/gas/clown_hat(src)
|
||||
new/obj/item/weapon/bikehorn(src)
|
||||
//new/obj/item/weapon/stamp/clown(src) I'd add it, but only clowns can use it
|
||||
new/obj/item/toy/crayon/rainbow(src)
|
||||
new/obj/item/weapon/pen/crayon/rainbow(src)
|
||||
new/obj/item/toy/waterflower(src)
|
||||
if(95)
|
||||
new/obj/item/clothing/under/mime(src)
|
||||
@@ -130,7 +130,7 @@
|
||||
new/obj/item/clothing/mask/gas/mime(src)
|
||||
new/obj/item/clothing/head/beret(src)
|
||||
new/obj/item/clothing/suit/suspenders(src)
|
||||
new/obj/item/toy/crayon/mime(src)
|
||||
new/obj/item/weapon/pen/crayon/mime(src)
|
||||
new/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(src)
|
||||
if(96)
|
||||
new/obj/item/weapon/vampiric(src)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
product = /obj/item/stack/sheet/plasteel
|
||||
|
||||
/datum/alloy/steel
|
||||
metaltag = "steel"
|
||||
metaltag = DEFAULT_WALL_MATERIAL
|
||||
requires = list(
|
||||
"coal" = 1,
|
||||
"hematite" = 1
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "forensic0-old" //GET A BETTER SPRITE.
|
||||
item_state = "electronic"
|
||||
matter = list("metal" = 150)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 150)
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
|
||||
/obj/item/weapon/mining_scanner/attack_self(mob/user as mob)
|
||||
|
||||
@@ -42,8 +42,9 @@
|
||||
for(var/ore in machine.ores_processing)
|
||||
|
||||
if(!machine.ores_stored[ore] && !show_all_ores) continue
|
||||
|
||||
dat += "<tr><td width = 40><b>[capitalize(ore)]</b></td><td width = 30>[machine.ores_stored[ore]]</td><td width = 100><font color='"
|
||||
var/ore/O = ore_data[ore]
|
||||
if(!O) continue
|
||||
dat += "<tr><td width = 40><b>[capitalize(O.display_name)]</b></td><td width = 30>[machine.ores_stored[ore]]</td><td width = 100><font color='"
|
||||
if(machine.ores_processing[ore])
|
||||
switch(machine.ores_processing[ore])
|
||||
if(0)
|
||||
@@ -104,14 +105,13 @@
|
||||
icon_state = "furnace"
|
||||
density = 1
|
||||
anchored = 1
|
||||
luminosity = 3
|
||||
light_range = 3
|
||||
var/obj/machinery/mineral/input = null
|
||||
var/obj/machinery/mineral/output = null
|
||||
var/obj/machinery/mineral/console = null
|
||||
var/sheets_per_tick = 10
|
||||
var/list/ores_processing[0]
|
||||
var/list/ores_stored[0]
|
||||
var/list/ore_data[0]
|
||||
var/list/alloy_data[0]
|
||||
var/active = 0
|
||||
|
||||
@@ -123,11 +123,12 @@
|
||||
for(var/alloytype in typesof(/datum/alloy)-/datum/alloy)
|
||||
alloy_data += new alloytype()
|
||||
|
||||
for(var/oretype in typesof(/datum/ore)-/datum/ore)
|
||||
var/datum/ore/OD = new oretype()
|
||||
ore_data[OD.oretag] = OD
|
||||
ores_processing[OD.oretag] = 0
|
||||
ores_stored[OD.oretag] = 0
|
||||
if(!ore_data || !ore_data.len)
|
||||
for(var/oretype in typesof(/ore)-/ore)
|
||||
var/ore/OD = new oretype()
|
||||
ore_data[OD.name] = OD
|
||||
ores_processing[OD.name] = 0
|
||||
ores_stored[OD.name] = 0
|
||||
|
||||
//Locate our output and input machinery.
|
||||
spawn(5)
|
||||
@@ -150,8 +151,10 @@
|
||||
for(var/i = 0,i<sheets_per_tick,i++)
|
||||
var/obj/item/weapon/ore/O = locate() in input.loc
|
||||
if(!O) break
|
||||
if(!isnull(ores_stored[O.oretag])) ores_stored[O.oretag]++
|
||||
O.loc = null
|
||||
if(!isnull(ores_stored[O.material]))
|
||||
ores_stored[O.material]++
|
||||
|
||||
qdel(O)
|
||||
|
||||
if(!active)
|
||||
return
|
||||
@@ -164,7 +167,7 @@
|
||||
|
||||
if(ores_stored[metal] > 0 && ores_processing[metal] != 0)
|
||||
|
||||
var/datum/ore/O = ore_data[metal]
|
||||
var/ore/O = ore_data[metal]
|
||||
|
||||
if(!O) continue
|
||||
|
||||
@@ -206,24 +209,28 @@
|
||||
var/can_make = Clamp(ores_stored[metal],0,sheets_per_tick-sheets)
|
||||
if(can_make%2>0) can_make--
|
||||
|
||||
if(!can_make || ores_stored[metal] < 1)
|
||||
var/material/M = name_to_material[O.compresses_to]
|
||||
|
||||
if(!istype(M) || !can_make || ores_stored[metal] < 1)
|
||||
continue
|
||||
|
||||
for(var/i=0,i<can_make,i+=2)
|
||||
ores_stored[metal]-=2
|
||||
sheets+=2
|
||||
new O.compresses_to(output.loc)
|
||||
new M.stack_type(output.loc)
|
||||
|
||||
else if(ores_processing[metal] == 1 && O.smelts_to) //Smelting.
|
||||
|
||||
var/can_make = Clamp(ores_stored[metal],0,sheets_per_tick-sheets)
|
||||
if(!can_make || ores_stored[metal] < 1)
|
||||
|
||||
var/material/M = name_to_material[O.smelts_to]
|
||||
if(!istype(M) || !can_make || ores_stored[metal] < 1)
|
||||
continue
|
||||
|
||||
for(var/i=0,i<can_make,i++)
|
||||
ores_stored[metal]--
|
||||
sheets++
|
||||
new O.smelts_to(output.loc)
|
||||
new M.stack_type(output.loc)
|
||||
else
|
||||
ores_stored[metal]--
|
||||
sheets++
|
||||
@@ -231,4 +238,4 @@
|
||||
else
|
||||
continue
|
||||
|
||||
console.updateUsrDialog()
|
||||
console.updateUsrDialog()
|
||||
|
||||
@@ -89,8 +89,8 @@
|
||||
|
||||
stack_storage["glass"] = 0
|
||||
stack_paths["glass"] = /obj/item/stack/sheet/glass
|
||||
stack_storage["metal"] = 0
|
||||
stack_paths["metal"] = /obj/item/stack/sheet/metal
|
||||
stack_storage[DEFAULT_WALL_MATERIAL] = 0
|
||||
stack_paths[DEFAULT_WALL_MATERIAL] = /obj/item/stack/sheet/metal
|
||||
stack_storage["plasteel"] = 0
|
||||
stack_paths["plasteel"] = /obj/item/stack/sheet/plasteel
|
||||
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
/**********************Light************************/
|
||||
|
||||
//this item is intended to give the effect of entering the mine, so that light gradually fades
|
||||
/obj/effect/light_emitter
|
||||
name = "Light-emtter"
|
||||
anchored = 1
|
||||
unacidable = 1
|
||||
luminosity = 8
|
||||
|
||||
/**********************Miner Lockers**************************/
|
||||
|
||||
/obj/structure/closet/secure_closet/miner
|
||||
@@ -35,8 +26,7 @@
|
||||
new /obj/item/device/flashlight/lantern(src)
|
||||
new /obj/item/weapon/shovel(src)
|
||||
new /obj/item/weapon/pickaxe(src)
|
||||
new /obj/item/clothing/glasses/meson(src)
|
||||
|
||||
new /obj/item/clothing/glasses/material(src)
|
||||
|
||||
/******************************Lantern*******************************/
|
||||
|
||||
@@ -59,7 +49,7 @@
|
||||
icon_state = "pickaxe"
|
||||
item_state = "jackhammer"
|
||||
w_class = 4.0
|
||||
matter = list("metal" = 3750)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 3750)
|
||||
var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
attack_verb = list("hit", "pierced", "sliced", "attacked")
|
||||
@@ -119,6 +109,7 @@
|
||||
origin_tech = "materials=4;phorontech=3;engineering=3"
|
||||
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."
|
||||
drill_verb = "cutting"
|
||||
drill_sound = 'sound/items/Welder.ogg'
|
||||
sharp = 1
|
||||
edge = 1
|
||||
|
||||
@@ -161,7 +152,7 @@
|
||||
throwforce = 4.0
|
||||
item_state = "shovel"
|
||||
w_class = 3.0
|
||||
matter = list("metal" = 50)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50)
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked")
|
||||
sharp = 0
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
density = 1
|
||||
blocks_air = 1
|
||||
temperature = T0C
|
||||
var/mineral/mineral
|
||||
var/ore/mineral
|
||||
var/mined_ore = 0
|
||||
var/last_act = 0
|
||||
var/emitter_blasts_taken = 0 // EMITTER MINING! Muhehe.
|
||||
@@ -95,13 +95,13 @@
|
||||
|
||||
|
||||
/turf/simulated/mineral/proc/UpdateMineral()
|
||||
clear_ore_effects()
|
||||
if(!mineral)
|
||||
name = "\improper Rock"
|
||||
icon_state = "rock"
|
||||
return
|
||||
name = "\improper [mineral.display_name] deposit"
|
||||
overlays.Cut()
|
||||
overlays += "rock_[mineral.name]"
|
||||
new /obj/effect/mineral(src, mineral)
|
||||
|
||||
//Not even going to touch this pile of spaghetti
|
||||
/turf/simulated/mineral/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -234,10 +234,15 @@
|
||||
else
|
||||
return attack_hand(user)
|
||||
|
||||
/turf/simulated/mineral/proc/clear_ore_effects()
|
||||
for(var/obj/effect/mineral/M in contents)
|
||||
qdel(M)
|
||||
|
||||
/turf/simulated/mineral/proc/DropMineral()
|
||||
if(!mineral)
|
||||
return
|
||||
|
||||
clear_ore_effects()
|
||||
var/obj/item/weapon/ore/O = new mineral.ore (src)
|
||||
if(istype(O))
|
||||
geologic_data.UpdateNearbyArtifactInfo(src)
|
||||
@@ -274,6 +279,7 @@
|
||||
var/list/step_overlays = list("n" = NORTH, "s" = SOUTH, "e" = EAST, "w" = WEST)
|
||||
|
||||
//Add some rubble, you did just clear out a big chunk of rock.
|
||||
|
||||
var/turf/simulated/floor/plating/airless/asteroid/N = ChangeTurf(/turf/simulated/floor/plating/airless/asteroid)
|
||||
N.overlay_detail = "asteroid[rand(0,9)]"
|
||||
|
||||
@@ -369,12 +375,9 @@
|
||||
/turf/simulated/mineral/random/New()
|
||||
if (prob(mineralChance) && !mineral)
|
||||
var/mineral_name = pickweight(mineralSpawnChanceList) //temp mineral name
|
||||
|
||||
if(!name_to_mineral)
|
||||
SetupMinerals()
|
||||
|
||||
if (mineral_name && mineral_name in name_to_mineral)
|
||||
mineral = name_to_mineral[mineral_name]
|
||||
mineral_name = lowertext(mineral_name)
|
||||
if (mineral_name && (mineral_name in ore_data))
|
||||
mineral = ore_data[mineral_name]
|
||||
UpdateMineral()
|
||||
|
||||
. = ..()
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/obj/effect/mineral
|
||||
name = "mineral vein"
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
desc = "Shiny."
|
||||
mouse_opacity = 0
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/ore_key
|
||||
var/image/scanner_image
|
||||
|
||||
/obj/effect/mineral/New(var/newloc, var/ore/M)
|
||||
..(newloc)
|
||||
name = "[M.display_name] deposit"
|
||||
ore_key = M.name
|
||||
icon_state = "rock_[ore_key]"
|
||||
var/turf/T = get_turf(src)
|
||||
layer = T.layer+0.1
|
||||
|
||||
/obj/effect/mineral/proc/get_scan_overlay()
|
||||
if(!scanner_image)
|
||||
var/ore/O = ore_data[ore_key]
|
||||
if(O)
|
||||
scanner_image = image(icon, loc = get_turf(src), icon_state = (O.scan_icon ? O.scan_icon : icon_state))
|
||||
else
|
||||
world << "No ore data for [src]!"
|
||||
return scanner_image
|
||||
@@ -1,72 +0,0 @@
|
||||
var/list/name_to_mineral
|
||||
|
||||
/proc/SetupMinerals()
|
||||
name_to_mineral = list()
|
||||
for(var/type in typesof(/mineral) - /mineral)
|
||||
var/mineral/new_mineral = new type
|
||||
if(!new_mineral.name)
|
||||
continue
|
||||
name_to_mineral[new_mineral.name] = new_mineral
|
||||
return 1
|
||||
|
||||
/mineral
|
||||
var/name // Tag for use in overlay generation/list population .
|
||||
var/display_name // What am I called?
|
||||
var/result_amount // How much ore?
|
||||
var/spread = 1 // Does this type of deposit spread?
|
||||
var/spread_chance // Chance of spreading in any direction
|
||||
var/ore // Path to the ore produced when tile is mined.
|
||||
|
||||
|
||||
/mineral/New()
|
||||
. = ..()
|
||||
if(!display_name)
|
||||
display_name = name
|
||||
|
||||
/mineral/uranium
|
||||
name = "Uranium"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/uranium
|
||||
|
||||
/mineral/platinum
|
||||
name = "Platinum"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/osmium
|
||||
|
||||
/mineral/iron
|
||||
name = "Iron"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/iron
|
||||
|
||||
/mineral/coal
|
||||
name = "Coal"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/coal
|
||||
|
||||
/mineral/diamond
|
||||
name = "Diamond"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/diamond
|
||||
|
||||
/mineral/gold
|
||||
name = "Gold"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/gold
|
||||
|
||||
/mineral/silver
|
||||
name = "Silver"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/silver
|
||||
|
||||
/mineral/phoron
|
||||
name = "Phoron"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/phoron
|
||||
@@ -17,7 +17,7 @@
|
||||
var/amt_uranium = 0
|
||||
var/newCoins = 0 //how many coins the machine made in it's last load
|
||||
var/processing = 0
|
||||
var/chosen = "metal" //which material will be used to make coins
|
||||
var/chosen = DEFAULT_WALL_MATERIAL //which material will be used to make coins
|
||||
var/coinsToProduce = 10
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];choose=silver'>Choose</A>")
|
||||
dat += text("<br><font color='#555555'><b>Iron inserted: </b>[amt_iron]</font> ")
|
||||
if (chosen == "metal")
|
||||
if (chosen == DEFAULT_WALL_MATERIAL)
|
||||
dat += text("chosen")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];choose=metal'>Choose</A>")
|
||||
@@ -133,7 +133,7 @@
|
||||
icon_state = "coinpress1"
|
||||
var/obj/item/weapon/moneybag/M
|
||||
switch(chosen)
|
||||
if("metal")
|
||||
if(DEFAULT_WALL_MATERIAL)
|
||||
while(amt_iron > 0 && coinsToProduce > 0)
|
||||
if (locate(/obj/item/weapon/moneybag,output.loc))
|
||||
M = locate(/obj/item/weapon/moneybag,output.loc)
|
||||
|
||||
+24
-24
@@ -4,71 +4,71 @@
|
||||
icon_state = "ore2"
|
||||
w_class = 2
|
||||
var/datum/geosample/geologic_data
|
||||
var/oretag
|
||||
var/material
|
||||
|
||||
/obj/item/weapon/ore/uranium
|
||||
name = "pitchblende"
|
||||
icon_state = "Uranium ore"
|
||||
icon_state = "ore_uranium"
|
||||
origin_tech = "materials=5"
|
||||
oretag = "uranium"
|
||||
material = "uranium"
|
||||
|
||||
/obj/item/weapon/ore/iron
|
||||
name = "hematite"
|
||||
icon_state = "Iron ore"
|
||||
icon_state = "ore_iron"
|
||||
origin_tech = "materials=1"
|
||||
oretag = "hematite"
|
||||
material = "hematite"
|
||||
|
||||
/obj/item/weapon/ore/coal
|
||||
name = "carbonaceous rock"
|
||||
icon_state = "Coal ore"
|
||||
name = "raw carbon"
|
||||
icon_state = "ore_coal"
|
||||
origin_tech = "materials=1"
|
||||
oretag = "coal"
|
||||
material = "carbon"
|
||||
|
||||
/obj/item/weapon/ore/glass
|
||||
name = "impure silicates"
|
||||
icon_state = "Glass ore"
|
||||
icon_state = "ore_glass"
|
||||
origin_tech = "materials=1"
|
||||
oretag = "sand"
|
||||
material = "sand"
|
||||
|
||||
/obj/item/weapon/ore/phoron
|
||||
name = "phoron crystals"
|
||||
icon_state = "Phoron ore"
|
||||
icon_state = "ore_phoron"
|
||||
origin_tech = "materials=2"
|
||||
oretag = "phoron"
|
||||
material = "phoron"
|
||||
|
||||
/obj/item/weapon/ore/silver
|
||||
name = "native silver ore"
|
||||
icon_state = "Silver ore"
|
||||
icon_state = "ore_silver"
|
||||
origin_tech = "materials=3"
|
||||
oretag = "silver"
|
||||
material = "silver"
|
||||
|
||||
/obj/item/weapon/ore/gold
|
||||
name = "native gold ore"
|
||||
icon_state = "Gold ore"
|
||||
icon_state = "ore_gold"
|
||||
origin_tech = "materials=4"
|
||||
oretag = "gold"
|
||||
material = "gold"
|
||||
|
||||
/obj/item/weapon/ore/diamond
|
||||
name = "diamonds"
|
||||
icon_state = "Diamond ore"
|
||||
icon_state = "ore_diamond"
|
||||
origin_tech = "materials=6"
|
||||
oretag = "diamond"
|
||||
material = "diamond"
|
||||
|
||||
/obj/item/weapon/ore/osmium
|
||||
name = "raw platinum"
|
||||
icon_state = "Platinum ore"
|
||||
oretag = "platinum"
|
||||
icon_state = "ore_platinum"
|
||||
material = "platinum"
|
||||
|
||||
/obj/item/weapon/ore/hydrogen
|
||||
name = "raw hydrogen"
|
||||
icon_state = "Phazon"
|
||||
oretag = "hydrogen"
|
||||
icon_state = "ore_hydrogen"
|
||||
material = "mhydrogen"
|
||||
|
||||
/obj/item/weapon/ore/slag
|
||||
name = "Slag"
|
||||
desc = "Completely useless"
|
||||
desc = "Someone screwed up..."
|
||||
icon_state = "slag"
|
||||
oretag = "slag"
|
||||
material = null
|
||||
|
||||
/obj/item/weapon/ore/New()
|
||||
pixel_x = rand(0,16)-8
|
||||
|
||||
@@ -1,52 +1,133 @@
|
||||
/datum/ore
|
||||
var/oretag
|
||||
var/global/list/ore_data = list()
|
||||
|
||||
/ore
|
||||
var/name
|
||||
var/display_name
|
||||
var/alloy
|
||||
var/smelts_to
|
||||
var/compresses_to
|
||||
var/result_amount // How much ore?
|
||||
var/spread = 1 // Does this type of deposit spread?
|
||||
var/spread_chance // Chance of spreading in any direction
|
||||
var/ore // Path to the ore produced when tile is mined.
|
||||
var/scan_icon // Overlay for ore scanners.
|
||||
// Xenoarch stuff. No idea what it's for, just refactored it to be less awful.
|
||||
var/list/xarch_ages = list(
|
||||
"thousand" = 999,
|
||||
"million" = 999
|
||||
)
|
||||
var/xarch_source_mineral = "iron"
|
||||
|
||||
/datum/ore/uranium
|
||||
smelts_to = /obj/item/stack/sheet/mineral/uranium
|
||||
oretag = "uranium"
|
||||
/ore/New()
|
||||
. = ..()
|
||||
if(!display_name)
|
||||
display_name = name
|
||||
|
||||
/datum/ore/iron
|
||||
smelts_to = /obj/item/stack/sheet/mineral/iron
|
||||
/ore/uranium
|
||||
name = "uranium"
|
||||
display_name = "pitchblende"
|
||||
smelts_to = "uranium"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/uranium
|
||||
scan_icon = "mineral_uncommon"
|
||||
xarch_ages = list(
|
||||
"thousand" = 999,
|
||||
"million" = 704
|
||||
)
|
||||
xarch_source_mineral = "potassium"
|
||||
|
||||
/ore/hematite
|
||||
name = "hematite"
|
||||
display_name = "hematite"
|
||||
smelts_to = "iron"
|
||||
alloy = 1
|
||||
oretag = "hematite"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/iron
|
||||
scan_icon = "mineral_common"
|
||||
|
||||
/datum/ore/coal
|
||||
smelts_to = /obj/item/stack/sheet/mineral/plastic
|
||||
/ore/coal
|
||||
name = "carbon"
|
||||
display_name = "raw carbon"
|
||||
smelts_to = "plastic"
|
||||
alloy = 1
|
||||
oretag = "coal"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/coal
|
||||
scan_icon = "mineral_common"
|
||||
|
||||
/datum/ore/glass
|
||||
smelts_to = /obj/item/stack/sheet/glass
|
||||
compresses_to = /obj/item/stack/sheet/mineral/sandstone
|
||||
oretag = "sand"
|
||||
/ore/glass
|
||||
name = "sand"
|
||||
display_name = "impure silicates"
|
||||
smelts_to = "glass"
|
||||
compresses_to = "sandstone"
|
||||
|
||||
/datum/ore/phoron
|
||||
/ore/phoron
|
||||
name = "phoron"
|
||||
display_name = "phoron crystals"
|
||||
compresses_to = "phoron"
|
||||
//smelts_to = something that explodes violently on the conveyor, huhuhuhu
|
||||
compresses_to = /obj/item/stack/sheet/mineral/phoron
|
||||
oretag = "phoron"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/phoron
|
||||
scan_icon = "mineral_uncommon"
|
||||
xarch_ages = list(
|
||||
"thousand" = 999,
|
||||
"million" = 999,
|
||||
"billion" = 13,
|
||||
"billion_lower" = 10
|
||||
)
|
||||
xarch_source_mineral = "phoron"
|
||||
|
||||
/datum/ore/silver
|
||||
smelts_to = /obj/item/stack/sheet/mineral/silver
|
||||
oretag = "silver"
|
||||
/ore/silver
|
||||
name = "silver"
|
||||
display_name = "native silver"
|
||||
smelts_to = "silver"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/silver
|
||||
scan_icon = "mineral_uncommon"
|
||||
|
||||
/datum/ore/gold
|
||||
smelts_to = /obj/item/stack/sheet/mineral/gold
|
||||
oretag = "gold"
|
||||
/ore/gold
|
||||
smelts_to = "gold"
|
||||
name = "gold"
|
||||
display_name = "native gold"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/gold
|
||||
scan_icon = "mineral_uncommon"
|
||||
xarch_ages = list(
|
||||
"thousand" = 999,
|
||||
"million" = 999,
|
||||
"billion" = 4,
|
||||
"billion_lower" = 3
|
||||
)
|
||||
|
||||
/datum/ore/diamond
|
||||
compresses_to = /obj/item/stack/sheet/mineral/diamond
|
||||
oretag = "diamond"
|
||||
/ore/diamond
|
||||
name = "diamond"
|
||||
display_name = "diamond"
|
||||
compresses_to = "diamond"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/diamond
|
||||
scan_icon = "mineral_rare"
|
||||
xarch_source_mineral = "nitrogen"
|
||||
|
||||
/datum/ore/osmium
|
||||
smelts_to = /obj/item/stack/sheet/mineral/platinum
|
||||
compresses_to = /obj/item/stack/sheet/mineral/osmium
|
||||
/ore/platinum
|
||||
name = "platinum"
|
||||
display_name = "raw platinum"
|
||||
smelts_to = "platinum"
|
||||
compresses_to = "osmium"
|
||||
alloy = 1
|
||||
oretag = "platinum"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/osmium
|
||||
scan_icon = "mineral_rare"
|
||||
|
||||
/datum/ore/hydrogen
|
||||
smelts_to = /obj/item/stack/sheet/mineral/tritium
|
||||
compresses_to = /obj/item/stack/sheet/mineral/mhydrogen
|
||||
oretag = "hydrogen"
|
||||
/ore/hydrogen
|
||||
name = "mhydrogen"
|
||||
display_name = "metallic hydrogen"
|
||||
smelts_to = "tritium"
|
||||
compresses_to = "mhydrogen"
|
||||
scan_icon = "mineral_rare"
|
||||
@@ -436,9 +436,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
src << "<span class='warning'>Spawning as a mouse is currently disabled.</span>"
|
||||
return
|
||||
|
||||
var/mob/dead/observer/M = usr
|
||||
if(config.antag_hud_restricted && M.has_enabled_antagHUD == 1)
|
||||
src << "<span class='warning'>antagHUD restrictions prevent you from spawning in as a mouse.</span>"
|
||||
if(!MayRespawn(1))
|
||||
return
|
||||
|
||||
var/timedifference = world.time - client.time_died_as_mouse
|
||||
@@ -677,3 +675,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
client.images |= ghost_darkness_images
|
||||
if (ghostimage)
|
||||
client.images -= ghostimage //remove ourself
|
||||
|
||||
mob/dead/observer/MayRespawn(var/feedback = 0)
|
||||
if(config.antag_hud_restricted && has_enabled_antagHUD == 1)
|
||||
if(feedback)
|
||||
src << "<span class='warning'>antagHUD restrictions prevent you from respawning.</span>"
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if(src.can_use())
|
||||
cameranet.addCamera(src)
|
||||
else
|
||||
src.SetLuminosity(0)
|
||||
src.set_light(0)
|
||||
cameranet.removeCamera(src)
|
||||
|
||||
/obj/machinery/camera/New()
|
||||
|
||||
@@ -155,7 +155,7 @@ var/list/slot_equipment_priority = list( \
|
||||
Target = loc
|
||||
|
||||
remove_from_mob(W)
|
||||
if(!W) return 1 // self destroying objects (tk, grabs)
|
||||
if(!(W && W.loc)) return 1 // self destroying objects (tk, grabs)
|
||||
|
||||
W.forceMove(Target)
|
||||
update_icons()
|
||||
|
||||
@@ -110,14 +110,14 @@
|
||||
if(stat)
|
||||
return 0
|
||||
on = 1
|
||||
SetLuminosity(light_strength)
|
||||
set_light(light_strength)
|
||||
update_icons()
|
||||
return 1
|
||||
|
||||
/mob/living/bot/proc/turn_off()
|
||||
on = 0
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
update_icons()
|
||||
|
||||
/mob/living/bot/proc/explode()
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
beacon_freq = freq
|
||||
if("screw")
|
||||
screwloose = !screwloose
|
||||
usr << "<span class='notice>You twiddle the screw.</span>"
|
||||
usr << "<span class='notice'>You twiddle the screw.</span>"
|
||||
if("oddbutton")
|
||||
oddbutton = !oddbutton
|
||||
usr << "<span class='notice'>You press the weird button.</span>"
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
if(building == 1)
|
||||
I = new /obj/item/stack/tile/plasteel(src)
|
||||
else
|
||||
I = new /obj/item/stack/rods(src)
|
||||
I = PoolOrNew(/obj/item/stack/rods, src)
|
||||
A.attackby(I, src)
|
||||
target = null
|
||||
repairing = 0
|
||||
|
||||
@@ -103,8 +103,7 @@
|
||||
update_icons()
|
||||
if(do_mob(src, H, 30))
|
||||
if(t == 1)
|
||||
reagent_glass.reagents.trans_to(H, injection_amount)
|
||||
reagent_glass.reagents.reaction(H, 2)
|
||||
reagent_glass.reagents.trans_to_mob(H, injection_amount, CHEM_BLOOD)
|
||||
else
|
||||
H.reagents.add_reagent(t, injection_amount)
|
||||
visible_message("<span class='warning'>[src] injects [H] with the syringe!</span>")
|
||||
|
||||
@@ -334,53 +334,13 @@
|
||||
path = list()
|
||||
|
||||
/mob/living/bot/secbot/proc/check_threat(var/mob/living/M)
|
||||
if(M.stat == DEAD)
|
||||
if(!M || !istype(M) || M.stat)
|
||||
return 0
|
||||
|
||||
if(emagged)
|
||||
return 10
|
||||
|
||||
var/threatcount = 0
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(H.handcuffed)
|
||||
return 0
|
||||
|
||||
var/obj/item/weapon/card/id/id = GetIdCard(H) //Agent cards lower threatlevel.
|
||||
if(id && istype(id, /obj/item/weapon/card/id/syndicate))
|
||||
threatcount -= 2
|
||||
|
||||
if(idcheck && !access_scanner.allowed(H))
|
||||
if(istype(H.l_hand, /obj/item/weapon/gun) || istype(H.l_hand, /obj/item/weapon/melee))
|
||||
threatcount += 4
|
||||
|
||||
if(istype(H.r_hand, /obj/item/weapon/gun) || istype(H.r_hand, /obj/item/weapon/melee))
|
||||
threatcount += 4
|
||||
|
||||
if(istype(H.belt, /obj/item/weapon/gun) || istype(H.belt, /obj/item/weapon/melee))
|
||||
threatcount += 2
|
||||
|
||||
if(H.species.name != "Human") //beepsky so racist.
|
||||
threatcount += 2
|
||||
|
||||
if(check_records || check_arrest)
|
||||
var/perpname = H.name
|
||||
if(id)
|
||||
perpname = id.registered_name
|
||||
|
||||
var/datum/data/record/R = find_security_record("name", perpname)
|
||||
if(check_records && !R)
|
||||
threatcount += 4
|
||||
|
||||
if(check_arrest && R && (R.fields["criminal"] == "*Arrest*"))
|
||||
threatcount += 4
|
||||
|
||||
else if(isanimal(M))
|
||||
if(istype(M, /mob/living/simple_animal/hostile) && !istype(M, /mob/living/simple_animal/hostile/retaliate/goat))
|
||||
threatcount += 4
|
||||
|
||||
return threatcount
|
||||
return M.assess_perp(access_scanner, idcheck, check_records, check_arrest)
|
||||
|
||||
/mob/living/bot/secbot/proc/patrol_step()
|
||||
if(loc == patrol_target)
|
||||
|
||||
@@ -23,10 +23,6 @@
|
||||
verbs += /mob/living/proc/ventcrawl
|
||||
verbs += /mob/living/proc/hide
|
||||
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
name = "[initial(name)] ([rand(1, 1000)])"
|
||||
real_name = name
|
||||
regenerate_icons()
|
||||
|
||||
@@ -31,4 +31,4 @@
|
||||
|
||||
/mob/living/carbon/alien/diona/put_in_hands(var/obj/item/W) // No hands.
|
||||
W.loc = get_turf(src)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -1,16 +1,7 @@
|
||||
/mob/living/carbon/alien/diona/attack_hand(mob/living/carbon/human/M as mob)
|
||||
|
||||
if(istype(M))
|
||||
//Let people pick the little buggers up.
|
||||
if(M.a_intent == I_HELP)
|
||||
if(M.species && M.species.name == "Diona")
|
||||
M << "You feel your being twine with that of [src] as it merges with your biomass."
|
||||
src << "You feel your being twine with that of [M] as you merge with its biomass."
|
||||
src.verbs += /mob/living/carbon/alien/diona/proc/split
|
||||
src.verbs -= /mob/living/carbon/alien/diona/proc/merge
|
||||
src.loc = M
|
||||
else
|
||||
get_scooped(M)
|
||||
if(istype(M) && M.a_intent == I_HELP)
|
||||
if(M.species && M.species.name == "Diona" && do_merge(M))
|
||||
return
|
||||
|
||||
get_scooped(M)
|
||||
return
|
||||
..()
|
||||
@@ -24,18 +24,21 @@
|
||||
|
||||
var/mob/living/M = input(src,"Who do you wish to merge with?") in null|choices
|
||||
|
||||
if(!M || !src || !(src.Adjacent(M))) return
|
||||
if(!M)
|
||||
src << "There is nothing nearby to merge with."
|
||||
else if(!do_merge(M))
|
||||
src << "You fail to merge with \the [M]..."
|
||||
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
M << "You feel your being twine with that of [src] as it merges with your biomass."
|
||||
M.status_flags |= PASSEMOTES
|
||||
|
||||
src << "You feel your being twine with that of [M] as you merge with its biomass."
|
||||
src.loc = M
|
||||
src.verbs += /mob/living/carbon/alien/diona/proc/split
|
||||
src.verbs -= /mob/living/carbon/alien/diona/proc/merge
|
||||
else
|
||||
return
|
||||
/mob/living/carbon/alien/diona/proc/do_merge(var/mob/living/carbon/human/H)
|
||||
if(!istype(H) || !src || !(src.Adjacent(H)))
|
||||
return 0
|
||||
H << "You feel your being twine with that of \the [src] as it merges with your biomass."
|
||||
H.status_flags |= PASSEMOTES
|
||||
src << "You feel your being twine with that of \the [H] as you merge with its biomass."
|
||||
loc = H
|
||||
verbs += /mob/living/carbon/alien/diona/proc/split
|
||||
verbs -= /mob/living/carbon/alien/diona/proc/merge
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/alien/diona/proc/split()
|
||||
|
||||
|
||||
@@ -4,10 +4,12 @@
|
||||
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
|
||||
if(isturf(loc)) //else, there's considered to be no light
|
||||
var/turf/T = loc
|
||||
var/area/A = T.loc
|
||||
if(A)
|
||||
if(A.lighting_use_dynamic) light_amount = min(10,T.lighting_lumcount) - 5 //hardcapped so it's not abused by having a ton of flashlights
|
||||
else light_amount = 5
|
||||
var/atom/movable/lighting_overlay/L = locate(/atom/movable/lighting_overlay) in T
|
||||
if(L)
|
||||
light_amount = min(10,L.lum_r + L.lum_g + L.lum_b) - 5 //hardcapped so it's not abused by having a ton of flashlights
|
||||
else
|
||||
light_amount = 5
|
||||
|
||||
|
||||
nutrition += light_amount
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
w_class = 3
|
||||
origin_tech = "biotech=3"
|
||||
|
||||
var/list/construction_cost = list("metal"=1000,"glass"=500)
|
||||
var/list/construction_cost = list(DEFAULT_WALL_MATERIAL=1000,"glass"=500)
|
||||
var/construction_time = 75
|
||||
//these vars are so the mecha fabricator doesn't shit itself anymore. --NEO
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
var/locked = 0
|
||||
var/mob/living/carbon/brain/brainmob = null//The current occupant.
|
||||
var/obj/item/organ/brain/brainobj = null //The current brain organ.
|
||||
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
|
||||
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
@@ -60,7 +61,8 @@
|
||||
living_mob_list += brainmob
|
||||
|
||||
user.drop_item()
|
||||
qdel(O)
|
||||
brainobj = O
|
||||
brainobj.loc = src
|
||||
|
||||
name = "Man-Machine Interface: [brainmob.real_name]"
|
||||
icon_state = "mmi_full"
|
||||
@@ -91,7 +93,13 @@
|
||||
user << "\red You upend the MMI, but the brain is clamped into place."
|
||||
else
|
||||
user << "\blue You upend the MMI, spilling the brain onto the floor."
|
||||
var/obj/item/organ/brain/brain = new(user.loc)
|
||||
var/obj/item/organ/brain/brain
|
||||
if (brainobj) //Pull brain organ out of MMI.
|
||||
brainobj.loc = user.loc
|
||||
brain = brainobj
|
||||
brainobj = null
|
||||
else //Or make a new one if empty.
|
||||
brain = new(user.loc)
|
||||
brainmob.container = null//Reset brainmob mmi var.
|
||||
brainmob.loc = brain//Throw mob into brain.
|
||||
living_mob_list -= brainmob//Get outta here
|
||||
|
||||
@@ -105,7 +105,18 @@
|
||||
|
||||
proc/handle_chemicals_in_body()
|
||||
|
||||
if(reagents) reagents.metabolize(src)
|
||||
chem_effects.Cut()
|
||||
analgesic = 0
|
||||
|
||||
if(touching)
|
||||
touching.metabolize(0, CHEM_TOUCH)
|
||||
if(ingested)
|
||||
ingested.metabolize(0, CHEM_INGEST)
|
||||
if(reagents)
|
||||
reagents.metabolize(0, CHEM_BLOOD)
|
||||
|
||||
if(CE_PAINKILLER in chem_effects)
|
||||
analgesic = chem_effects[CE_PAINKILLER]
|
||||
|
||||
confused = max(0, confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
w_class = 3
|
||||
origin_tech = "engineering=4;materials=4;bluespace=2;programming=4"
|
||||
|
||||
construction_cost = list("metal"=500,"glass"=500,"silver"=200,"gold"=200,"phoron"=100,"diamond"=10)
|
||||
construction_cost = list(DEFAULT_WALL_MATERIAL=500,"glass"=500,"silver"=200,"gold"=200,"phoron"=100,"diamond"=10)
|
||||
construction_time = 75
|
||||
var/searching = 0
|
||||
var/askDelay = 10 * 60 * 1
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/proc/request_player()
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
|
||||
if(!O.MayRespawn())
|
||||
continue
|
||||
if(jobban_isbanned(O, "AI") && jobban_isbanned(O, "Cyborg"))
|
||||
continue
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
var/datum/gas_mixture/breath = null
|
||||
|
||||
//First, check if we can breathe at all
|
||||
if(health < config.health_threshold_crit && !reagents.has_reagent("inaprovaline")) //crit aka circulatory shock
|
||||
if(health < config.health_threshold_crit && !(CE_STABLE in chem_effects)) //crit aka circulatory shock
|
||||
losebreath++
|
||||
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
@@ -65,11 +65,9 @@
|
||||
|
||||
for(var/obj/effect/effect/smoke/chem/smoke in view(1, src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.reaction(src, INGEST)
|
||||
spawn(5)
|
||||
if(smoke)
|
||||
//maybe check air pressure here or something to see if breathing in smoke is even possible.
|
||||
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
|
||||
smoke.reagents.trans_to_mob(src, 10, CHEM_INGEST, copy = 1)
|
||||
//maybe check air pressure here or something to see if breathing in smoke is even possible.
|
||||
// I dunno, maybe the reagents enter the blood stream through the lungs?
|
||||
break // If they breathe in the nasty stuff once, no need to continue checking
|
||||
|
||||
/mob/living/carbon/proc/handle_breath(datum/gas_mixture/breath)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user