mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 08:34:16 +01:00
Merge branch 'bleeding-edge-freeze' of github.com:Baystation12/Baystation12 into feature
This commit is contained in:
@@ -64,7 +64,8 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/cmd_admin_change_custom_event,
|
||||
/client/proc/cmd_admin_rejuvenate,
|
||||
/client/proc/toggleattacklogs,
|
||||
/datum/admins/proc/show_skills
|
||||
/datum/admins/proc/show_skills,
|
||||
/client/proc/check_customitem_activity
|
||||
)
|
||||
var/list/admin_verbs_ban = list(
|
||||
/client/proc/unban_panel,
|
||||
@@ -115,7 +116,8 @@ var/list/admin_verbs_server = list(
|
||||
/datum/admins/proc/adjump,
|
||||
/datum/admins/proc/toggle_aliens,
|
||||
/datum/admins/proc/toggle_space_ninja,
|
||||
/client/proc/toggle_random_events
|
||||
/client/proc/toggle_random_events,
|
||||
/client/proc/check_customitem_activity
|
||||
)
|
||||
var/list/admin_verbs_debug = list(
|
||||
/client/proc/restart_controller,
|
||||
|
||||
@@ -2418,6 +2418,10 @@
|
||||
src.admincaster_signature = adminscrub(input(usr, "Provide your desired signature", "Network Identity Handler", ""))
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["populate_inactive_customitems"])
|
||||
if(check_rights(R_ADMIN|R_SERVER))
|
||||
populate_inactive_customitems_list(src.owner)
|
||||
|
||||
// player info stuff
|
||||
|
||||
if(href_list["add_player_info"])
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
var/checked_for_inactives = 0
|
||||
var/inactive_keys = "None<br>"
|
||||
|
||||
/client/proc/check_customitem_activity()
|
||||
set category = "Admin"
|
||||
set name = "Check activity of players with custom items"
|
||||
|
||||
var/dat = "<b>Inactive players with custom items</b><br>"
|
||||
dat += "<br>"
|
||||
dat += "The list below contains players with custom items that have not logged\
|
||||
in for the past two months, or have not logged in since this system was implemented.\
|
||||
This system requires the feedback SQL database to be properly setup and linked.<br>"
|
||||
dat += "<br>"
|
||||
dat += "Populating this list is done automatically, but must be manually triggered on a per\
|
||||
round basis. Populating the list may cause a lag spike, so use it sparingly.<br>"
|
||||
dat += "<hr>"
|
||||
if(checked_for_inactives)
|
||||
dat += inactive_keys
|
||||
dat += "<hr>"
|
||||
dat += "This system was implemented on March 1 2013, and the database a few days before that. Root server access is required to add or disable access to specific custom items.<br>"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];_src_=holder;populate_inactive_customitems=1'>Populate list (requires an active database connection)</a><br>"
|
||||
|
||||
usr << browse(dat, "window=inactive_customitems;size=600x480")
|
||||
|
||||
/proc/populate_inactive_customitems_list(var/client/C)
|
||||
set background = 1
|
||||
|
||||
if(checked_for_inactives)
|
||||
return
|
||||
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
return
|
||||
|
||||
//grab all ckeys associated with custom items
|
||||
var/list/ckeys_with_customitems = list()
|
||||
|
||||
var/file = file2text("config/custom_items.txt")
|
||||
var/lines = text2list(file, "\n")
|
||||
|
||||
for(var/line in lines)
|
||||
// split & clean up
|
||||
var/list/Entry = text2list(line, ":")
|
||||
for(var/i = 1 to Entry.len)
|
||||
Entry[i] = trim(Entry[i])
|
||||
|
||||
if(Entry.len < 1)
|
||||
continue
|
||||
|
||||
var/cur_key = Entry[1]
|
||||
if(!ckeys_with_customitems.Find(cur_key))
|
||||
ckeys_with_customitems.Add(cur_key)
|
||||
|
||||
//run a query to get all ckeys inactive for over 2 months
|
||||
var/list/inactive_ckeys = list()
|
||||
if(ckeys_with_customitems.len)
|
||||
var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey, lastseen FROM erro_player WHERE datediff(Now(),lastseen) > 2")
|
||||
query_inactive.Execute()
|
||||
while(query_inactive.NextRow())
|
||||
var/cur_ckey = query_inactive.item[1]
|
||||
//if the ckey has a custom item attached, output it
|
||||
if(ckeys_with_customitems.Find(cur_ckey))
|
||||
ckeys_with_customitems.Remove(cur_ckey)
|
||||
inactive_ckeys[cur_ckey] = "last seen on [query_inactive.item[2]]"
|
||||
|
||||
//if there are ckeys left over, check whether they have a database entry at all
|
||||
if(ckeys_with_customitems.len)
|
||||
for(var/cur_ckey in ckeys_with_customitems)
|
||||
var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey FROM erro_player WHERE ckey = '[cur_ckey]'")
|
||||
query_inactive.Execute()
|
||||
if(!query_inactive.RowCount())
|
||||
inactive_ckeys += cur_ckey
|
||||
|
||||
if(inactive_ckeys.len)
|
||||
inactive_keys = ""
|
||||
for(var/cur_key in inactive_ckeys)
|
||||
if(inactive_ckeys[cur_key])
|
||||
inactive_keys += "<b>[cur_key]</b> - [inactive_ckeys[cur_key]]<br>"
|
||||
else
|
||||
inactive_keys += "[cur_key] - no database entry<br>"
|
||||
|
||||
checked_for_inactives = 1
|
||||
if(C)
|
||||
C.check_customitem_activity()
|
||||
@@ -553,6 +553,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
"blue wizard",
|
||||
"red wizard",
|
||||
"marisa wizard",
|
||||
"emergency rescue team",
|
||||
)
|
||||
var/dresscode = input("Select dress for [M]", "Robust quick dress shop") as null|anything in dresspacks
|
||||
if (isnull(dresscode))
|
||||
|
||||
@@ -124,8 +124,9 @@
|
||||
icon_state = "rig-medical"
|
||||
name = "medical hardsuit"
|
||||
item_state = "medical_hardsuit"
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical,/obj/item/roller)
|
||||
slowdown = 2.0
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical)
|
||||
|
||||
|
||||
//Security
|
||||
/obj/item/clothing/head/helmet/space/rig/security
|
||||
name = "security hardsuit helmet"
|
||||
|
||||
@@ -10,14 +10,13 @@
|
||||
var/construction_time = 75
|
||||
var/searching = 0
|
||||
var/askDelay = 10 * 60 * 1
|
||||
|
||||
var/mob/living/carbon/brain/brainmob = null
|
||||
req_access = list(access_robotics)
|
||||
var/locked = 0
|
||||
var/mob/living/carbon/brain/brainmob = null//The current occupant.
|
||||
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
if(!brainmob && searching == 0)
|
||||
if(!brainmob.key && searching == 0)
|
||||
//Start the process of searching for a new user.
|
||||
user << "\blue You carefully locate the manual activation switch and start the positronic brain's boot process."
|
||||
icon_state = "posibrain-searching"
|
||||
@@ -37,7 +36,7 @@
|
||||
spawn(0)
|
||||
if(!C) return
|
||||
var/response = alert(C, "Someone is requesting a personality for a positronic brain. Would you like to play as one?", "Positronic brain request", "Yes", "No", "Never for this round")
|
||||
if(!C || brainmob) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
|
||||
if(!C || brainmob.key) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
|
||||
if(response == "Yes")
|
||||
transfer_personality(C.mob)
|
||||
else if (response == "Never for this round")
|
||||
@@ -47,25 +46,10 @@
|
||||
|
||||
proc/transfer_personality(var/mob/candidate)
|
||||
|
||||
var/mob/living/carbon/brain/B = new(src)
|
||||
|
||||
src.searching = 0
|
||||
|
||||
src.brainmob = B
|
||||
src.brainmob.mind = candidate.mind
|
||||
|
||||
src.brainmob.name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
|
||||
src.brainmob.real_name = src.brainmob.name
|
||||
src.name = "positronic brain ([src.brainmob.name])"
|
||||
src.brainmob.loc = src
|
||||
src.brainmob.container = src
|
||||
src.brainmob.robot_talk_understand = 1
|
||||
src.brainmob.stat = 0
|
||||
src.brainmob.silent = 0
|
||||
src.brainmob.brain_op_stage = 4.0
|
||||
src.brainmob.key = candidate.key
|
||||
dead_mob_list -= src.brainmob
|
||||
living_mob_list += src.brainmob
|
||||
src.name = "positronic brain ([src.brainmob.name])"
|
||||
|
||||
src.brainmob << "<b>You are a positronic brain, brought into existence on [station_name()].</b>"
|
||||
src.brainmob << "<b>As a synthetic intelligence, you answer to all crewmembers, as well as the AI.</b>"
|
||||
@@ -101,7 +85,7 @@
|
||||
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n[desc]\n"
|
||||
msg += "<span class='warning'>"
|
||||
|
||||
if(src.brainmob)
|
||||
if(src.brainmob.key)
|
||||
switch(src.brainmob.stat)
|
||||
if(CONSCIOUS)
|
||||
if(!src.brainmob.client) msg += "It appears to be in stand-by mode.\n" //afk
|
||||
@@ -124,4 +108,19 @@
|
||||
brainmob.emp_damage += rand(10,20)
|
||||
if(3)
|
||||
brainmob.emp_damage += rand(0,10)
|
||||
..()
|
||||
|
||||
/obj/item/device/posibrain/New()
|
||||
|
||||
src.brainmob = new(src)
|
||||
src.brainmob.name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
|
||||
src.brainmob.real_name = src.brainmob.name
|
||||
src.brainmob.loc = src
|
||||
src.brainmob.container = src
|
||||
src.brainmob.robot_talk_understand = 1
|
||||
src.brainmob.stat = 0
|
||||
src.brainmob.silent = 0
|
||||
src.brainmob.brain_op_stage = 4.0
|
||||
dead_mob_list -= src.brainmob
|
||||
|
||||
..()
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
var/list/listening = hearers(1, src)
|
||||
listening -= src
|
||||
//listening += src
|
||||
listening += src
|
||||
|
||||
var/list/heard = list()
|
||||
for (var/mob/M in listening)
|
||||
|
||||
@@ -0,0 +1,325 @@
|
||||
/mob/living/simple_animal/spiderbot
|
||||
|
||||
min_oxy = 0
|
||||
max_tox = 0
|
||||
max_co2 = 0
|
||||
minbodytemp = 0
|
||||
maxbodytemp = 500
|
||||
|
||||
var/obj/item/device/radio/borg/radio = null
|
||||
var/mob/living/silicon/ai/connected_ai = null
|
||||
var/obj/item/weapon/cell/cell = null
|
||||
var/obj/machinery/camera/camera = null
|
||||
var/obj/item/device/mmi/mmi = null
|
||||
var/list/req_access = list(access_robotics) //Access needed to pop out the brain.
|
||||
|
||||
name = "Spider-bot"
|
||||
desc = "A skittering robotic friend!"
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "spiderbot-chassis"
|
||||
icon_living = "spiderbot-chassis"
|
||||
icon_dead = "spiderbot-smashed"
|
||||
wander = 0
|
||||
|
||||
health = 10
|
||||
maxHealth = 10
|
||||
|
||||
attacktext = "shocks"
|
||||
attacktext = "shocks"
|
||||
melee_damage_lower = 1
|
||||
melee_damage_upper = 3
|
||||
|
||||
response_help = "pets"
|
||||
response_disarm = "shoos"
|
||||
response_harm = "stomps on"
|
||||
|
||||
var/obj/item/held_item = null //Storage for single item they can hold.
|
||||
var/emagged = 0 //IS WE EXPLODEN?
|
||||
var/syndie = 0 //IS WE SYNDICAT? (currently unused)
|
||||
speed = -1 //Spiderbots gotta go fast.
|
||||
//pass_flags = PASSTABLE //Maybe griefy?
|
||||
small = 1
|
||||
speak_emote = list("beeps","clicks","chirps")
|
||||
|
||||
/mob/living/simple_animal/spiderbot/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
|
||||
if(istype(O, /obj/item/device/mmi) || istype(O, /obj/item/device/posibrain))
|
||||
var/obj/item/device/mmi/B = O
|
||||
if(src.mmi) //There's already a brain in it.
|
||||
user << "\red There's already a brain in [src]!"
|
||||
return
|
||||
if(!B.brainmob)
|
||||
user << "\red Sticking an empty MMI into the frame would sort of defeat the purpose."
|
||||
return
|
||||
if(!B.brainmob.key)
|
||||
var/ghost_can_reenter = 0
|
||||
if(B.brainmob.mind)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.can_reenter_corpse && G.mind == B.brainmob.mind)
|
||||
ghost_can_reenter = 1
|
||||
break
|
||||
if(!ghost_can_reenter)
|
||||
user << "<span class='notice'>[O] is completely unresponsive; there's no point.</span>"
|
||||
return
|
||||
|
||||
if(B.brainmob.stat == DEAD)
|
||||
user << "\red [O] is dead. Sticking it into the frame would sort of defeat the purpose."
|
||||
return
|
||||
|
||||
if(jobban_isbanned(B.brainmob, "Cyborg"))
|
||||
user << "\red [O] does not seem to fit."
|
||||
return
|
||||
|
||||
user << "\blue You install [O] in [src]!"
|
||||
|
||||
user.drop_item()
|
||||
src.mmi = O
|
||||
src.transfer_personality(O)
|
||||
|
||||
O.loc = src
|
||||
src.update_icon()
|
||||
return 1
|
||||
|
||||
if (istype(O, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = O
|
||||
if (WT.remove_fuel(0))
|
||||
if(health < maxHealth)
|
||||
health += pick(1,1,1,2,2,3)
|
||||
if(health > maxHealth)
|
||||
health = maxHealth
|
||||
add_fingerprint(user)
|
||||
for(var/mob/W in viewers(user, null))
|
||||
W.show_message(text("\red [user] has spot-welded some of the damage to [src]!"), 1)
|
||||
else
|
||||
user << "\blue [src] is undamaged!"
|
||||
else
|
||||
user << "Need more welding fuel!"
|
||||
return
|
||||
else if(istype(O, /obj/item/weapon/card/id)||istype(O, /obj/item/device/pda))
|
||||
if (!mmi)
|
||||
user << "\red There's no reason to swipe your ID - the spiderbot has no brain to remove."
|
||||
return 0
|
||||
|
||||
var/obj/item/weapon/card/id/id_card
|
||||
|
||||
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_robotics in id_card.access)
|
||||
user << "\blue You swipe your access card and pop the brain out of [src]."
|
||||
eject_brain()
|
||||
|
||||
if(held_item)
|
||||
held_item.loc = src.loc
|
||||
held_item = null
|
||||
|
||||
return 1
|
||||
else
|
||||
user << "\red You swipe your card, with no effect."
|
||||
return 0
|
||||
else if (istype(O, /obj/item/weapon/card/emag))
|
||||
if (emagged)
|
||||
user << "\red [src] is already overloaded - better run."
|
||||
return 0
|
||||
else
|
||||
emagged = 1
|
||||
user << "\blue You short out the security protocols and overload [src]'s cell, priming it to explode in a short time."
|
||||
spawn(100) src << "\red Your cell seems to be outputting a lot of power..."
|
||||
spawn(200) src << "\red Internal heat sensors are spiking! Something is badly wrong with your cell!"
|
||||
spawn(300) src.explode()
|
||||
|
||||
else
|
||||
if(O.force)
|
||||
var/damage = O.force
|
||||
if (O.damtype == HALLOSS)
|
||||
damage = 0
|
||||
adjustBruteLoss(damage)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
|
||||
else
|
||||
usr << "\red This weapon is ineffective, it does no damage."
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red [user] gently taps [src] with the [O]. ")
|
||||
|
||||
/mob/living/simple_animal/spiderbot/proc/transfer_personality(var/obj/item/device/mmi/M as obj)
|
||||
|
||||
src.mind = M.brainmob.mind
|
||||
src.mind.key = M.brainmob.key
|
||||
src.name = "Spider-bot ([M.brainmob.name])"
|
||||
|
||||
/mob/living/simple_animal/spiderbot/proc/explode() //When emagged.
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red [src] makes an odd warbling noise, fizzles, and explodes.")
|
||||
explosion(get_turf(loc), -1, -1, 3, 5)
|
||||
eject_brain()
|
||||
Die()
|
||||
|
||||
/mob/living/simple_animal/spiderbot/proc/update_icon()
|
||||
if(mmi)
|
||||
if (istype(mmi,/obj/item/device/mmi))
|
||||
icon_state = "spiderbot-chassis-mmi"
|
||||
icon_living = "spiderbot-chassis-mmi"
|
||||
else
|
||||
icon_state = "spiderbot-chassis-posi"
|
||||
icon_living = "spiderbot-chassis-posi"
|
||||
else
|
||||
icon_state = "spiderbot-chassis"
|
||||
icon_living = "spiderbot-chassis"
|
||||
|
||||
/mob/living/simple_animal/spiderbot/proc/eject_brain()
|
||||
if(mmi)
|
||||
var/turf/T = get_turf(loc)
|
||||
if(T)
|
||||
mmi.loc = T
|
||||
if(mind) mind.transfer_to(mmi.brainmob)
|
||||
mmi = null
|
||||
src.name = "Spider-bot"
|
||||
update_icon()
|
||||
|
||||
/mob/living/simple_animal/spiderbot/Del()
|
||||
eject_brain()
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/spiderbot/New()
|
||||
|
||||
radio = new /obj/item/device/radio/borg(src)
|
||||
camera = new /obj/machinery/camera(src)
|
||||
camera.c_tag = "Spiderbot-[real_name]"
|
||||
camera.network = list("SS13")
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/spiderbot/Die()
|
||||
|
||||
living_mob_list -= src
|
||||
dead_mob_list += src
|
||||
|
||||
if(camera)
|
||||
camera.status = 0
|
||||
|
||||
robogibs(src.loc, viruses)
|
||||
src.Del()
|
||||
return
|
||||
|
||||
//copy paste from alien/larva, if that func is updated please update this one also
|
||||
/mob/living/simple_animal/spiderbot/verb/ventcrawl()
|
||||
set name = "Crawl through Vent"
|
||||
set desc = "Enter an air vent and crawl through the pipe system."
|
||||
set category = "Spiderbot"
|
||||
|
||||
// if(!istype(V,/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent))
|
||||
// return
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
||||
var/welded = 0
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
||||
if(!v.welded)
|
||||
vent_found = v
|
||||
break
|
||||
else
|
||||
welded = 1
|
||||
if(vent_found)
|
||||
if(vent_found.network&&vent_found.network.normal_members.len)
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
|
||||
if(temp_vent.loc == loc)
|
||||
continue
|
||||
vents.Add(temp_vent)
|
||||
var/list/choices = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
|
||||
if(vent.loc.z != loc.z)
|
||||
continue
|
||||
var/atom/a = get_turf(vent)
|
||||
choices.Add(a.loc)
|
||||
var/turf/startloc = loc
|
||||
var/obj/selection = input("Select a destination.", "Duct System") in choices
|
||||
var/selection_position = choices.Find(selection)
|
||||
if(loc==startloc)
|
||||
var/obj/target_vent = vents[selection_position]
|
||||
if(target_vent)
|
||||
loc = target_vent.loc
|
||||
else
|
||||
src << "\blue You need to remain still while entering a vent."
|
||||
else
|
||||
src << "\blue This vent is not connected to anything."
|
||||
else if(welded)
|
||||
src << "\red That vent is welded."
|
||||
else
|
||||
src << "\blue You must be standing on or beside an air vent to enter it."
|
||||
return
|
||||
|
||||
//copy paste from alien/larva, if that func is updated please update this one alsoghost
|
||||
/mob/living/simple_animal/spiderbot/verb/hide()
|
||||
set name = "Hide"
|
||||
set desc = "Allows to hide beneath tables or certain items. Toggled on or off."
|
||||
set category = "Spiderbot"
|
||||
|
||||
if (layer != TURF_LAYER+0.2)
|
||||
layer = TURF_LAYER+0.2
|
||||
src << text("\blue You are now hiding.")
|
||||
else
|
||||
layer = MOB_LAYER
|
||||
src << text("\blue You have stopped hiding.")
|
||||
|
||||
//Cannibalized from the parrot mob. ~Zuhayr
|
||||
|
||||
/mob/living/simple_animal/spiderbot/verb/drop_held_item()
|
||||
set name = "Drop held item"
|
||||
set category = "Spiderbot"
|
||||
set desc = "Drop the item you're holding."
|
||||
|
||||
if(stat)
|
||||
return
|
||||
|
||||
if(!held_item)
|
||||
usr << "\red You have nothing to drop!"
|
||||
return 0
|
||||
|
||||
if(istype(held_item, /obj/item/weapon/grenade))
|
||||
visible_message("\red [src] launches the [held_item]!", "\red You launch the [held_item]!", "You hear a skittering noise and a thump!")
|
||||
var/obj/item/weapon/grenade/G = held_item
|
||||
G.loc = src.loc
|
||||
G.prime()
|
||||
held_item = null
|
||||
return 1
|
||||
|
||||
visible_message("\blue [src] drops the [held_item]!", "\blue You drop the [held_item]!", "You hear a skittering noise and a soft thump.")
|
||||
|
||||
held_item.loc = src.loc
|
||||
held_item = null
|
||||
return 1
|
||||
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/spiderbot/verb/get_item()
|
||||
set name = "Pick up item"
|
||||
set category = "Spiderbot"
|
||||
set desc = "Allows you to take a nearby small item."
|
||||
|
||||
if(stat)
|
||||
return -1
|
||||
|
||||
if(held_item)
|
||||
src << "\red You are already holding the [held_item]"
|
||||
return 1
|
||||
|
||||
var/list/items = list()
|
||||
for(var/obj/item/I in view(1,src))
|
||||
if(I.loc != src && I.w_class <= 2)
|
||||
items.Add(I)
|
||||
|
||||
var/obj/selection = input("Select an item.", "Pickup") in items
|
||||
|
||||
if(selection)
|
||||
held_item = selection
|
||||
selection.loc = src
|
||||
visible_message("\blue [src] scoops up the [held_item]!", "\blue You grab the [held_item]!", "You hear a skittering noise and a clink.")
|
||||
return held_item
|
||||
|
||||
src << "\red There is nothing of interest to take."
|
||||
return 0
|
||||
@@ -127,6 +127,14 @@
|
||||
/obj/item/device/camera/attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
return
|
||||
|
||||
/obj/item/device/camera/attack_self(mob/user as mob)
|
||||
on = !on
|
||||
if(on)
|
||||
src.icon_state = "camera"
|
||||
else
|
||||
src.icon_state = "camera_off"
|
||||
user << "You switch the camera [on ? "on" : "off"]."
|
||||
return
|
||||
|
||||
/obj/item/device/camera/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/device/camera_film))
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
if(isnull(AC) || !istype(AC))
|
||||
return 0
|
||||
AC.loc = get_turf(src) //Eject casing onto ground.
|
||||
AC.desc += " This one is spent." //descriptions are magic
|
||||
if(AC.BB)
|
||||
AC.desc += " This one is spent." //descriptions are magic - only when there's a projectile in the casing
|
||||
in_chamber = AC.BB //Load projectile into chamber.
|
||||
AC.BB.loc = src //Set projectile loc to gun.
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user