Merge branch 'master' into upstream-merge-28681

This commit is contained in:
LetterJay
2017-06-27 06:16:34 -05:00
committed by GitHub
4 changed files with 26 additions and 12 deletions

View File

@@ -1417,3 +1417,10 @@ GLOBAL_PROTECT(valid_HTTPSGet)
mob_occupant = brain.brainmob
return mob_occupant
//counts the number of bits in Byond's 16-bit width field
//in constant time and memory!
/proc/BitCount(bitfield)
var/temp = bitfield - ((bitfield>>1)&46811) - ((bitfield>>2)&37449) //0133333 and 0111111 respectively
temp = ((temp + (temp>>3))&29127) % 63 //070707
return temp

View File

@@ -22,7 +22,7 @@
icon_state = "NONE"
ttone = "data"
fon = 0
detonate = 0
detonatable = FALSE
/obj/item/device/pda/ai/attack_self(mob/user)
if ((honkamt > 0) && (prob(60)))//For clown virus.
@@ -119,7 +119,7 @@
default_cartridge = /obj/item/weapon/cartridge/captain
inserted_item = /obj/item/weapon/pen/fountain/captain
icon_state = "pda-captain"
detonate = 0
detonatable = FALSE
/obj/item/device/pda/cargo
name = "cargo technician PDA"

View File

@@ -0,0 +1,10 @@
diff a/code/game/objects/items/devices/PDA/PDA_types.dm b/code/game/objects/items/devices/PDA/PDA_types.dm (rejected hunks)
@@ -121,7 +121,7 @@
default_cartridge = /obj/item/weapon/cartridge/captain
inserted_item = /obj/item/weapon/pen/fountain/captain
icon_state = "pda-captain"
- detonatable = 0
+ detonatable = FALSE
/obj/item/device/pda/cargo
name = "cargo technician PDA"

View File

@@ -21,7 +21,7 @@
name = "\improper Honkworks 5.0 cartridge"
icon_state = "cart-clown"
desc = "A data cartridge for portable microcomputers. It smells vaguely of banannas"
access_clown = 1
access = CART_CLOWN
/obj/item/weapon/cartridge/virus/clown/send_virus(obj/item/device/pda/target, mob/living/U)
if(charges <= 0)
@@ -37,7 +37,7 @@
/obj/item/weapon/cartridge/virus/mime
name = "\improper Gestur-O 1000 cartridge"
icon_state = "cart-mi"
access_mime = 1
access = CART_MIME
/obj/item/weapon/cartridge/virus/mime/send_virus(obj/item/device/pda/target, mob/living/U)
if(charges <= 0)
@@ -54,7 +54,7 @@
/obj/item/weapon/cartridge/virus/syndicate
name = "\improper Detomatix cartridge"
icon_state = "cart"
access_remote_door = 1
access = CART_REMOTE_DOOR
remote_door_id = "smindicate" //Make sure this matches the syndicate shuttle's shield/door id!! //don't ask about the name, testing.
charges = 4
@@ -66,15 +66,12 @@
charges--
var/difficulty = 0
if(target.cartridge)
difficulty += target.cartridge.access_medical
difficulty += target.cartridge.access_security
difficulty += target.cartridge.access_engine
difficulty += target.cartridge.access_clown
difficulty += target.cartridge.access_janitor
difficulty += target.cartridge.access_manifest * 2
difficulty += BitCount(target.cartridge.access&(CART_MEDICAL | CART_SECURITY | CART_ENGINE | CART_CLOWN | CART_JANITOR | CART_MANIFEST))
if(target.cartridge.access & CART_MANIFEST)
difficulty++ //if cartridge has manifest access it has extra snowflake difficulty
else
difficulty += 2
if(prob(difficulty * 15) || (target.hidden_uplink))
if(!target.detonatable || prob(difficulty * 15) || (target.hidden_uplink))
U.show_message("<span class='danger'>An error flashes on your [src].</span>", 1)
else
U.show_message("<span class='notice'>Success!</span>", 1)