mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 23:17:28 +01:00
Merge remote-tracking branch 'upstream/dev' into 150722-TagPairs
Conflicts: code/modules/clothing/spacesuits/rig/rig.dm
This commit is contained in:
@@ -1142,21 +1142,22 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(choice == 1)
|
||||
if (id)
|
||||
remove_id()
|
||||
return 1
|
||||
else
|
||||
var/obj/item/I = user.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
user.drop_item()
|
||||
if (istype(I, /obj/item/weapon/card/id) && user.unEquip(I))
|
||||
I.loc = src
|
||||
id = I
|
||||
return 1
|
||||
else
|
||||
var/obj/item/weapon/card/I = user.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id) && I:registered_name)
|
||||
if (istype(I, /obj/item/weapon/card/id) && I:registered_name && user.unEquip(I))
|
||||
var/obj/old_id = id
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
id = I
|
||||
user.put_in_hands(old_id)
|
||||
return
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// access to status display signals
|
||||
/obj/item/device/pda/attackby(obj/item/C as obj, mob/user as mob)
|
||||
@@ -1184,9 +1185,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
else
|
||||
//Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
|
||||
if(((src in user.contents) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) )
|
||||
id_check(user, 2)
|
||||
user << "<span class='notice'>You put the ID into \the [src]'s slot.</span>"
|
||||
updateSelfDialog()//Update self dialog on success.
|
||||
if(id_check(user, 2))
|
||||
user << "<span class='notice'>You put the ID into \the [src]'s slot.</span>"
|
||||
updateSelfDialog()//Update self dialog on success.
|
||||
return //Return in case of failed check or when successful.
|
||||
updateSelfDialog()//For the non-input related code.
|
||||
else if(istype(C, /obj/item/device/paicard) && !src.pai)
|
||||
|
||||
@@ -105,12 +105,13 @@
|
||||
if(istype(ai.loc, /turf/))
|
||||
new /obj/structure/AIcore/deactivated(get_turf(ai))
|
||||
|
||||
ai.carded = 1
|
||||
admin_attack_log(user, ai, "Carded with [src.name]", "Was carded with [src.name]", "used the [src.name] to card")
|
||||
src.name = "[initial(name)] - [ai.name]"
|
||||
|
||||
ai.loc = src
|
||||
ai.cancel_camera()
|
||||
ai.destroy_eyeobj(src)
|
||||
ai.cancel_camera()
|
||||
ai.control_disabled = 1
|
||||
ai.aiRestorePowerRoutine = 0
|
||||
carded_ai = ai
|
||||
@@ -120,10 +121,14 @@
|
||||
if(user.client)
|
||||
user << "<span class='notice'><b>Transfer successful:</b></span> [ai.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
|
||||
|
||||
ai.canmove = 1
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/item/device/aicard/proc/clear()
|
||||
if(carded_ai && istype(carded_ai.loc, /turf))
|
||||
carded_ai.canmove = 0
|
||||
carded_ai.carded = 0
|
||||
name = initial(name)
|
||||
carded_ai = null
|
||||
update_icon()
|
||||
@@ -140,10 +145,9 @@
|
||||
carded_ai.show_message(rendered, type)
|
||||
..()
|
||||
|
||||
/*
|
||||
/obj/item/device/aicard/relaymove(var/mob/user, var/direction)
|
||||
if(src.loc && istype(src.loc.loc, /obj/item/rig_module))
|
||||
var/obj/item/rig_module/module = src.loc.loc
|
||||
if(!module.holder || !direction)
|
||||
return
|
||||
module.holder.forced_move(direction)*/
|
||||
if(user.stat || user.stunned)
|
||||
return
|
||||
var/obj/item/weapon/rig/rig = src.get_rig()
|
||||
if(istype(rig))
|
||||
rig.forced_move(direction, user)
|
||||
|
||||
@@ -16,14 +16,9 @@
|
||||
|
||||
/obj/item/device/flashlight/initialize()
|
||||
..()
|
||||
if(on)
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
set_light(brightness_on)
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
set_light(0)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/flashlight/proc/update_brightness(var/mob/user = null)
|
||||
/obj/item/device/flashlight/update_icon()
|
||||
if(on)
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
set_light(brightness_on)
|
||||
@@ -36,7 +31,7 @@
|
||||
user << "You cannot turn the light on while in this [user.loc]." //To prevent some lighting anomalities.
|
||||
return 0
|
||||
on = !on
|
||||
update_brightness(user)
|
||||
update_icon()
|
||||
user.update_action_buttons()
|
||||
return 1
|
||||
|
||||
@@ -171,11 +166,7 @@
|
||||
on = 0
|
||||
src.force = initial(src.force)
|
||||
src.damtype = initial(src.damtype)
|
||||
if(ismob(loc))
|
||||
var/mob/U = loc
|
||||
update_brightness(U)
|
||||
else
|
||||
update_brightness(null)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/flashlight/flare/attack_self(mob/user)
|
||||
|
||||
@@ -206,10 +197,11 @@
|
||||
on = 1 //Bio-luminesence has one setting, on.
|
||||
|
||||
/obj/item/device/flashlight/slime/New()
|
||||
..()
|
||||
set_light(brightness_on)
|
||||
spawn(1) //Might be sloppy, but seems to be necessary to prevent further runtimes and make these work as intended... don't judge me!
|
||||
update_brightness()
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/item/device/flashlight/slime/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/device/flashlight/slime/attack_self(mob/user)
|
||||
return //Bio-luminescence does not toggle.
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
var/looking_for_personality = 0
|
||||
var/mob/living/silicon/pai/pai
|
||||
|
||||
/*/obj/item/device/paicard/relaymove(var/mob/user, var/direction)
|
||||
if(src.loc && istype(src.loc.loc, /obj/item/rig_module))
|
||||
var/obj/item/rig_module/module = src.loc.loc
|
||||
if(!module.holder || !direction)
|
||||
return
|
||||
module.holder.forced_move(direction)*/
|
||||
/obj/item/device/paicard/relaymove(var/mob/user, var/direction)
|
||||
if(user.stat || user.stunned)
|
||||
return
|
||||
var/obj/item/weapon/rig/rig = src.get_rig()
|
||||
if(istype(rig))
|
||||
rig.forced_move(direction, user)
|
||||
|
||||
/obj/item/device/paicard/New()
|
||||
..()
|
||||
|
||||
@@ -365,10 +365,10 @@ datum/uplink_item/dd_SortValue()
|
||||
item_cost = 7
|
||||
path = /obj/item/weapon/aiModule/syndicate
|
||||
|
||||
/datum/uplink_item/item/tools/singularity_beacon
|
||||
name = "Singularity Beacon (DANGER!)"
|
||||
/datum/uplink_item/item/tools/supply_beacon
|
||||
name = "Hacked Supply Beacon (DANGER!)"
|
||||
item_cost = 7
|
||||
path = /obj/item/device/radio/beacon/syndicate
|
||||
path = /obj/item/supply_beacon
|
||||
|
||||
/datum/uplink_item/item/tools/teleporter
|
||||
name = "Teleporter Circuit Board"
|
||||
@@ -622,7 +622,7 @@ var/image/default_abstract_uplink_icon
|
||||
if(!user)
|
||||
return 0
|
||||
|
||||
var/obj/item/weapon/card/id/I = GetIdCard(user)
|
||||
var/obj/item/weapon/card/id/I = user.GetIdCard()
|
||||
var/datum/data/record/random_general_record
|
||||
var/datum/data/record/random_medical_record
|
||||
if(data_core.general.len)
|
||||
|
||||
@@ -33,12 +33,12 @@ obj/item/device/hailer/attack_self(mob/living/carbon/user as mob)
|
||||
|
||||
if(isnull(insults))
|
||||
playsound(get_turf(src), 'sound/voice/halt.ogg', 100, 1, vary = 0)
|
||||
user.show_message("<span class='warning'>[user]'s [name] rasps, \"[use_message]\"</span>",1)
|
||||
user.audible_message("<span class='warning'>[user]'s [name] rasps, \"[use_message]\"</span>", "<span class='warning'>\The [user] holds up \the [name].</span>")
|
||||
else
|
||||
if(insults > 0)
|
||||
playsound(get_turf(src), 'sound/voice/binsult.ogg', 100, 1, vary = 0)
|
||||
// Yes, it used to show the transcription of the sound clip. That was a) inaccurate b) immature as shit.
|
||||
user.show_message("<span class='warning'>[user]'s [name] gurgles something indecipherable and deeply offensive.</span>")
|
||||
user.audible_message("<span class='warning'>[user]'s [name] gurgles something indecipherable and deeply offensive.</span>", "<span class='warning'>\The [user] holds up \the [name].</span>")
|
||||
insults--
|
||||
else
|
||||
user << "<span class='danger'>*BZZZZZZZZT*</span>"
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
R.modtype = initial(R.modtype)
|
||||
R.hands.icon_state = initial(R.hands.icon_state)
|
||||
|
||||
R.choose_icon(1, R.set_module_sprites(list("Default" = "robot")))
|
||||
|
||||
R.notify_ai(ROBOT_NOTIFICATION_MODULE_RESET, R.module.name)
|
||||
R.module.Reset(R)
|
||||
qdel(R.module)
|
||||
R.module = null
|
||||
R.updatename("Default")
|
||||
|
||||
return 1
|
||||
|
||||
@@ -184,11 +184,9 @@
|
||||
if(!uses_charge)
|
||||
amount -= used
|
||||
if (amount <= 0)
|
||||
spawn(0) //delete the empty stack once the current context yields
|
||||
if (amount <= 0) //check again in case someone transferred stuff to us
|
||||
if(usr)
|
||||
usr.remove_from_mob(src)
|
||||
qdel(src)
|
||||
if(usr)
|
||||
usr.remove_from_mob(src)
|
||||
qdel(src) //should be safe to qdel immediately since if someone is still using this stack it will persist for a little while longer
|
||||
return 1
|
||||
else
|
||||
if(get_amount() < used)
|
||||
|
||||
@@ -122,8 +122,9 @@
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/card/id/proc/show(mob/user as mob)
|
||||
user << browse_rsc(front, "front.png")
|
||||
user << browse_rsc(side, "side.png")
|
||||
if(front && side)
|
||||
user << browse_rsc(front, "front.png")
|
||||
user << browse_rsc(side, "side.png")
|
||||
var/datum/browser/popup = new(user, "idcard", name, 600, 250)
|
||||
popup.set_content(dat())
|
||||
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
|
||||
@@ -137,17 +138,21 @@
|
||||
front = getFlatIcon(M, SOUTH, always_use_defdir = 1)
|
||||
side = getFlatIcon(M, WEST, always_use_defdir = 1)
|
||||
|
||||
/obj/item/weapon/card/id/proc/set_owner_info(var/mob/living/carbon/human/H)
|
||||
if(!H || !H.dna)
|
||||
return
|
||||
age = H.age
|
||||
blood_type = H.dna.b_type
|
||||
dna_hash = H.dna.unique_enzymes
|
||||
fingerprint_hash = md5(H.dna.uni_identity)
|
||||
registered_name = H.real_name
|
||||
sex = capitalize(H.gender)
|
||||
set_id_photo(H)
|
||||
update_name()
|
||||
/mob/proc/set_id_info(var/obj/item/weapon/card/id/id_card)
|
||||
id_card.age = 0
|
||||
id_card.registered_name = real_name
|
||||
id_card.sex = capitalize(gender)
|
||||
id_card.set_id_photo(src)
|
||||
|
||||
if(dna)
|
||||
id_card.blood_type = dna.b_type
|
||||
id_card.dna_hash = dna.unique_enzymes
|
||||
id_card.fingerprint_hash= md5(dna.uni_identity)
|
||||
id_card.update_name()
|
||||
|
||||
/mob/living/carbon/human/set_id_info(var/obj/item/weapon/card/id/id_card)
|
||||
..()
|
||||
id_card.age = age
|
||||
|
||||
/obj/item/weapon/card/id/proc/dat()
|
||||
var/dat = ("<table><tr><td>")
|
||||
@@ -213,9 +218,20 @@
|
||||
item_state = "gold_id"
|
||||
registered_name = "Captain"
|
||||
assignment = "Captain"
|
||||
New()
|
||||
access = get_all_station_access()
|
||||
..()
|
||||
/obj/item/weapon/card/id/captains_spare/New()
|
||||
access = get_all_station_access()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/synthetic
|
||||
name = "\improper Synthetic ID"
|
||||
desc = "Access module for NanoTrasen Synthetics"
|
||||
icon_state = "id-robot"
|
||||
item_state = "tdgreen"
|
||||
assignment = "Synthetic"
|
||||
|
||||
/obj/item/weapon/card/id/synthetic/New()
|
||||
access = get_all_station_access()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/centcom
|
||||
name = "\improper CentCom. ID"
|
||||
|
||||
@@ -6,12 +6,11 @@ var/global/list/syndicate_ids = list()
|
||||
origin_tech = list(TECH_ILLEGAL = 3)
|
||||
var/electronic_warfare = 1
|
||||
var/registered_user = null
|
||||
var/list/initial_access = list(access_maint_tunnels, access_syndicate, access_external_airlocks)
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/New(mob/user as mob)
|
||||
syndicate_ids += src
|
||||
..()
|
||||
access = initial_access.Copy()
|
||||
access = syndicate_access.Copy()
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/Destroy()
|
||||
syndicate_ids -= src
|
||||
@@ -39,8 +38,8 @@ var/global/list/syndicate_ids = list()
|
||||
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
|
||||
if(!registered_user)
|
||||
registered_user = user
|
||||
set_owner_info(user)
|
||||
user << "<span class='notice'>The microscanner marks you as its owner, preventing others some accessing its internals.</span>"
|
||||
user.set_id_info(src)
|
||||
user << "<span class='notice'>The microscanner marks you as its owner, preventing others from accessing its internals.</span>"
|
||||
if(registered_user == user)
|
||||
switch(alert("Would you like edit the ID, or show it?","Show or Edit?", "Edit","Show"))
|
||||
if("Edit")
|
||||
@@ -163,7 +162,7 @@ var/global/list/syndicate_ids = list()
|
||||
if("Factory Reset")
|
||||
if(alert("This will factory reset the card, including access and owner. Continue?", "Factory Reset", "No", "Yes") == "Yes" && CanUseTopic(user, state))
|
||||
age = initial(age)
|
||||
access = initial_access.Copy()
|
||||
access = syndicate_access.Copy()
|
||||
assignment = initial(assignment)
|
||||
blood_type = initial(blood_type)
|
||||
dna_hash = initial(dna_hash)
|
||||
|
||||
@@ -224,6 +224,9 @@
|
||||
//Set the stop_messages to stop it from printing messages
|
||||
/obj/item/weapon/storage/proc/can_be_inserted(obj/item/W as obj, stop_messages = 0)
|
||||
if(!istype(W)) return //Not an item
|
||||
|
||||
if(!usr.canUnEquip(W))
|
||||
return 0
|
||||
|
||||
if(src.loc == W)
|
||||
return 0 //Means the item is already in the storage item
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
throwforce = 0
|
||||
w_class = 3
|
||||
origin_tech = "materials=1"
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 18750)
|
||||
var/deployed = 0
|
||||
|
||||
/obj/item/weapon/beartrap/suicide_act(mob/user)
|
||||
|
||||
Reference in New Issue
Block a user